:root {
  --navy: #0C1B33;
  --navy-mid: #162444;
  --navy-light: #1E3256;
  --gold: #C9922A;
  --gold-light: #E8B655;
  --gold-pale: #F5E4C0;
  --cream: #FAF7F2;
  --cream-dark: #F0EAE0;
  --white: #FFFFFF;
  --muted: #5A6880;
  --border: rgba(12,27,51,0.12);
  --border-gold: rgba(201,146,42,0.3);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', Arial, sans-serif;
  --radius-small: 4px;
  --radius-card: 12px;
  --radius-pill: 100px;
  --card-shadow: 0 8px 32px rgba(12,27,51,0.10);
  --card-shadow-soft: 0 8px 32px rgba(12,27,51,0.08);
  --error-bg: #FEF0F0;
  --error-border: #F5A5A5;
  --error-text: #C0392B;
  --error-field: #E74C3C;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  appearance: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 32px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--gold);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-small);
  z-index: 999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-small);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: var(--navy);
}

.nav-container {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo,
.footer-logo {
  font-family: var(--font-display);
  color: var(--white);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
}

.nav-logo {
  font-size: 22px;
}

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

.nav-links a:not(.nav-cta) {
  position: relative;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 400;
  transition: color 0.15s;
}

.nav-links a:not(.nav-cta):hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--gold-light);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.15s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-small);
  background: transparent;
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--navy);
  background-image: repeating-linear-gradient(-55deg, transparent, transparent 36px, rgba(255,255,255,0.025) 36px, rgba(255,255,255,0.025) 37px);
  padding: 72px 0 64px;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 28px;
  border-bottom: 1px solid var(--gold-light);
}

.hero h1,
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
  margin: 0;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(38px, 5vw, 62px);
}

.hero h1 em,
.cta-band h2 em {
  color: var(--gold-light);
  font-style: italic;
}

.hero-subheadline {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255,255,255,0.60);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
}

.hero-wave {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 60px;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
}

.diagnostic-section {
  background: var(--cream);
  padding: 80px 0;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 44px 40px;
  box-shadow: var(--card-shadow-soft);
}

.form-warning {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--navy);
  line-height: 1.65;
}

.form-heading {
  margin: 0 0 24px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
}

.field-group {
  margin-bottom: 24px;
}

.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.label-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 11px;
  margin-left: 4px;
}

input,
textarea {
  width: 100%;
  background: var(--cream-dark);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-small);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  background: var(--white);
}

.field-error input,
.field-error textarea {
  border-color: var(--error-field);
}

.field-hint,
.error-msg {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.field-hint {
  color: var(--muted);
  font-weight: 300;
}

.error-msg {
  color: var(--error-text);
  font-weight: 500;
}

.privacy-note {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
  line-height: 1.6;
}

.api-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--error-text);
}

.api-error[hidden] {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-submit {
  width: 100%;
  background: var(--navy);
  color: var(--white);
  padding: 16px 28px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.btn-submit:hover:not(:disabled) {
  background: var(--navy-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(12,27,51,0.2);
}

.btn-submit:disabled {
  cursor: wait;
  opacity: 0.82;
}

.result-panel {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 36px;
}

.placeholder-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-size: 18px;
}

.placeholder-state h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
}

.placeholder-state p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
}

.placeholder-divider {
  height: 1px;
  margin: 28px 0 24px;
  background: var(--border);
}

.placeholder-label {
  margin-bottom: 14px !important;
  color: var(--navy) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.coverage-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.coverage-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}

.coverage-list li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.result-wrap {
  margin: -10px 0 0;
}

.result-section {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.result-section:last-of-type {
  border-bottom: none;
}

.result-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.result-section-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 300;
  color: rgba(12,27,51,0.08);
  line-height: 1;
  margin-right: 14px;
  flex-shrink: 0;
}

.result-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
}

.result-section-body p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 10px;
  font-weight: 300;
}

.result-section-body p:last-child {
  margin-bottom: 0;
}

.result-cta {
  background: var(--gold-pale);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  margin-top: 32px;
}

.result-cta h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
}

.result-cta p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  font-weight: 300;
}

.result-cta-button {
  margin-top: 8px;
  background: var(--navy);
  color: var(--white);
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 500;
}

.result-cta-button:hover {
  background: var(--navy-light);
}

.result-cta-link {
  display: block;
  margin-top: 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  padding: 80px 0;
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, rgba(201,146,42,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.cta-eyebrow {
  margin-bottom: 16px;
}

.cta-band h2 {
  font-size: clamp(34px, 4vw, 52px);
}

.cta-band p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px auto 28px;
  color: rgba(255,255,255,0.60);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
}

.cta-button {
  background: var(--gold);
  color: var(--white);
  padding: 15px 30px;
  font-size: 15px;
  font-weight: 500;
}

.cta-button:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.cta-email {
  display: block;
  margin-top: 14px;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
}

.cta-email:hover {
  color: var(--white);
}

.site-footer {
  background: var(--navy-mid);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 42px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 20px;
}

.footer-brand p {
  max-width: 260px;
  margin: 0;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
}

.footer-column h2 {
  margin: 0 0 18px;
  color: rgba(255,255,255,0.30);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-column a {
  display: block;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.50);
  font-size: 14px;
  transition: color 0.15s;
}

.footer-column a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 28px;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255,255,255,0.25);
  font-size: 12px;
}

.footer-bottom a {
  color: var(--gold-light);
  font-size: 13px;
}

.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 90;
  cursor: pointer;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--navy-light);
}

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

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@media (max-width: 900px) {
  .diagnostic-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  body.nav-open {
    overflow: hidden;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-menu {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    background: var(--navy-mid);
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s, opacity 0.2s, visibility 0.2s;
  }

  .mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu a {
    color: rgba(255,255,255,0.78);
    padding: 16px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 15px;
  }

  .mobile-menu a[aria-current="page"] {
    color: var(--white);
  }

  .mobile-menu .mobile-book-link {
    color: var(--gold-light);
    font-weight: 500;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 20px;
  }

  .hero {
    padding: 56px 0 56px;
  }

  .diagnostic-section,
  .cta-band {
    padding: 56px 0;
  }

  .form-card,
  .result-panel {
    padding: 32px 24px;
  }

  .result-cta {
    padding: 28px 22px;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@media print {
  .site-nav,
  .back-to-top,
  .cta-band,
  .hero-wave {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
}
