/* ==========================================================================
   MEPIT — Apple-Inspired Design System (RTL Hebrew + LTR Technical Tokens)
   ========================================================================== */

:root {
  /* Apple Surface Palette */
  --bg-page: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.86);
  --bg-glass: rgba(255, 255, 255, 0.78);
  --bg-subtle: #fbfbfd;
  --bg-input: #f5f5f7;
  --bg-input-focus: #ffffff;

  /* Apple Typography Ink */
  --ink-primary: #1d1d1f;
  --ink-secondary: #515154;
  --ink-tertiary: #86868b;

  /* Brand & Apple System Accents (Harmonized with MEPIT Logo) */
  --brand-blue: #1557c0;
  --apple-blue: #0066cc;
  --apple-blue-hover: #0071e3;
  --brand-navy: #071a33;
  --brand-cyan: #2997ff;
  --brand-amber: #e68a00;
  --brand-coral: #e53935;
  --status-green: #28cd41;

  /* Borders & Hairlines */
  --border-hairline: rgba(0, 0, 0, 0.08);
  --border-input: #d2d2d7;
  --focus-ring: rgba(0, 102, 204, 0.18);

  /* Shadows */
  --shadow-card: 0 10px 34px rgba(7, 26, 51, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 18px 44px rgba(7, 26, 51, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-highlight: 0 0 0 2px var(--apple-blue), 0 20px 48px rgba(0, 102, 204, 0.14);

  /* Radii */
  --radius-card: 24px;
  --radius-input: 12px;
  --radius-pill: 980px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Heebo", "Inter", "Segoe UI", sans-serif;
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  right: 16px;
  background: var(--brand-navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-input);
  text-decoration: none;
  z-index: 999;
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Global Frosted Glass Navigation Bar
   ========================================================================== */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-hairline);
  transition: background 0.25s var(--ease-apple);
}

.nav-container {
  max-width: 1120px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-primary);
}

.nav-brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.nav-brand-wordmark {
  font-family: "Inter", var(--font-sans);
  font-size: 19px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.nav-brand-wordmark span {
  font-weight: 800;
  color: var(--brand-blue);
}
.nav-brand-wordmark b {
  font-weight: 800;
  color: var(--brand-navy);
}

.nav-status-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: rgba(0, 0, 0, 0.05);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--ink-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.22s var(--ease-apple), background-color 0.22s var(--ease-apple), box-shadow 0.22s var(--ease-apple), border-color 0.22s var(--ease-apple);
}

.btn:active {
  transform: scale(0.985);
}

.btn-sm {
  font-size: 13px;
  padding: 6px 16px;
}

.btn-lg {
  font-size: 16px;
  padding: 14px 28px;
}

.btn-primary {
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.24);
}
.btn-primary:hover {
  background: var(--apple-blue-hover);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.32);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-primary);
  border-color: var(--border-input);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.btn-secondary:hover {
  background: #ffffff;
  border-color: #b8b8bf;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.icon-arrow {
  transition: transform 0.2s var(--ease-apple);
}
.btn-primary:hover .icon-arrow {
  transform: translateX(-3px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding: 56px 0 68px;
  background: radial-gradient(1100px 540px at 50% 0%, #ffffff 0%, #f5f5f7 78%);
  border-bottom: 1px solid var(--border-hairline);
  overflow: hidden;
}

/* Subtle CAD / Blueprint Coordinate Grid echoing the MEPIT Logo */
.hero-ambient {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(21, 87, 192, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21, 87, 192, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  margin-bottom: 28px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-green);
  box-shadow: 0 0 0 4px rgba(40, 205, 65, 0.18);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(40, 205, 65, 0.18); }
  50% { box-shadow: 0 0 0 7px rgba(40, 205, 65, 0.06); }
}

.hero-logo-stage {
  margin: 0 auto 24px;
  display: flex;
  justify-content: center;
}

.hero-logo-img {
  width: min(290px, 68vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(7, 26, 51, 0.06));
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink-primary);
}

.hero-title-accent {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-navy) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 auto 34px;
  max-width: 670px;
  font-size: clamp(17px, 2.1vw, 20px);
  font-weight: 400;
  line-height: 1.62;
  color: var(--ink-secondary);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-stealth-note {
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-tertiary);
  max-width: 620px;
}
.hero-stealth-note svg {
  flex-shrink: 0;
  color: var(--brand-blue);
}

/* ==========================================================================
   Section Headers & Bento Teaser Cards
   ========================================================================== */
.section-vision {
  padding: 76px 0 40px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.section-eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-blue);
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--ink-primary);
}

.section-subtitle {
  margin: 0;
  font-size: 17px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.bento-card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s var(--ease-apple), box-shadow 0.28s var(--ease-apple);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.bento-card-blue .bento-icon {
  background: rgba(21, 87, 192, 0.09);
  color: var(--brand-blue);
}

.bento-card-cyan .bento-icon {
  background: rgba(230, 138, 0, 0.11);
  color: #c77200;
}

.bento-card-gold .bento-icon {
  background: rgba(7, 26, 51, 0.07);
  color: var(--brand-navy);
}

.bento-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-tertiary);
  margin-bottom: 6px;
}

.bento-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-primary);
}

.bento-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Dual Forms Section
   ========================================================================== */
.section-forms {
  padding: 48px 0 92px;
}

/* Mobile Quick Switcher (Hidden on Desktop where both cards sit side by side) */
.form-switcher {
  display: none;
  background: rgba(0, 0, 0, 0.05);
  padding: 5px;
  border-radius: 16px;
  margin: 0 auto 24px;
  max-width: 480px;
  gap: 6px;
}

.switcher-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s var(--ease-apple);
}

.switcher-tab.is-active {
  background: #ffffff;
  color: var(--ink-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.switcher-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.switcher-dot-blue { background: var(--apple-blue); }
.switcher-dot-amber { background: var(--brand-amber); }

.forms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.form-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
  padding: 36px 32px;
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease-apple), transform 0.35s var(--ease-apple);
}

.form-card.is-highlighted {
  box-shadow: var(--shadow-highlight);
}

.form-card-accent {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
}
.form-card-accent-blue {
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-blue));
}
.form-card-accent-amber {
  background: linear-gradient(90deg, #ffb300, var(--brand-coral), var(--brand-navy));
}

.form-card-header {
  margin-bottom: 26px;
}

.mepit-form {
  margin-top: auto;
  display: grid;
  gap: 16px;
}

.form-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.form-badge-blue {
  background: rgba(0, 102, 204, 0.09);
  color: var(--brand-blue);
}
.form-badge-amber {
  background: rgba(230, 138, 0, 0.12);
  color: #b86600;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.form-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-primary);
}

.form-desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

/* Form Controls */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
}

.req {
  color: var(--brand-coral);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--ink-primary);
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  padding: 12px 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-tertiary);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  background: #ededf2;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: var(--bg-input-focus);
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid {
  border-color: var(--brand-coral);
  background: #fff8f8;
}

.field textarea {
  resize: vertical;
  min-height: 104px;
  line-height: 1.5;
}

.btn-submit {
  width: 100%;
  padding: 15px 24px;
  font-size: 15.5px;
  font-weight: 700;
  border-radius: var(--radius-input);
  margin-top: 4px;
}

.btn-submit-blue {
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.22);
}
.btn-submit-blue:hover {
  background: var(--apple-blue-hover);
}

.btn-submit-dark {
  background: var(--brand-navy);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(7, 26, 51, 0.2);
}
.btn-submit-dark:hover {
  background: #0d274c;
}

.btn-submit[disabled] {
  opacity: 0.72;
  cursor: wait;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.btn-submit.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Feedback Banner */
.form-feedback {
  border-radius: var(--radius-input);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
}

.form-feedback.is-success {
  background: rgba(40, 205, 65, 0.1);
  border: 1px solid rgba(40, 205, 65, 0.3);
  color: #136f24;
}

.form-feedback.is-error {
  background: rgba(229, 57, 53, 0.08);
  border: 1px solid rgba(229, 57, 53, 0.28);
  color: #a3201d;
}

.feedback-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-mailto-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--apple-blue);
  text-decoration: none;
}
.feedback-mailto-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  background: #ffffff;
  padding: 28px 0;
  font-size: 13px;
  color: var(--ink-tertiary);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-secondary);
}

.footer-mark {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-sep {
  color: var(--border-input);
}

/* ==========================================================================
   Responsive Design (Tablet & Mobile)
   ========================================================================== */
@media (max-width: 960px) {
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-switcher {
    display: flex;
  }

  .forms-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    display: none;
  }

  .form-card.is-active-mobile {
    display: flex;
  }

  .form-card-header {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: 36px 0 48px;
  }

  .form-card {
    padding: 26px 20px;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
