/* ============================================================
   AURORA — A2P tax-resolution skin
   Single-hue tonal system. Every brand color derives from one
   hex via the @palette block (build.py rewrites it per client).
   Type: Fraunces (display) · Inter (body) · Space Mono (data).
   ============================================================ */

/* @palette:start */
:root {
  --primary: #1E3A5F;
  --primary-dark: #182e4c;
  --secondary: #274b7b;
  --accent: #213f68;
  --accent-light: #2a5185;
}
/* @palette:end */

:root {
  /* Neutrals (fixed, cool paper) */
  --ink:        #14161B;
  --ink-soft:   #474C57;
  --ink-faint:  #878C97;
  --paper:      #F6F7F9;
  --surface:    #FFFFFF;
  --line:       #E5E7EC;

  /* Brand-tinted helpers (via color-mix, so they follow --primary) */
  --wash:       color-mix(in srgb, var(--primary) 4%,  #ffffff);
  --wash-2:     color-mix(in srgb, var(--primary) 7%,  #ffffff);
  --edge:       color-mix(in srgb, var(--primary) 14%, #ffffff);
  --brand-soft: color-mix(in srgb, var(--primary) 10%, #ffffff);

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Shape + depth */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 26px;
  --r-pill: 999px;
  --shadow:    0 22px 60px color-mix(in srgb, var(--primary) 13%, transparent);
  --shadow-sm: 0 10px 30px color-mix(in srgb, var(--primary) 9%,  transparent);

  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --------------------------- Typography --------------------------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--ink); letter-spacing: -0.01em; line-height: 1.08; }
h1 { font-optical-sizing: auto; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

p { color: var(--ink-soft); }
a { color: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; }

/* --------------------------- Buttons --------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.95rem 1.6rem; border-radius: var(--r-pill);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.btn-arrow { transition: transform .25s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* --------------------------- Navigation --------------------------- */

.nav {
  position: sticky; top: 0; z-index: 900;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 1.05rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.brand {
  font-family: var(--font-display); font-weight: 600; font-size: 1.4rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline; gap: 0.5rem;
}
.brand .brand-mark {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  color: var(--primary); border: 1px solid var(--edge); border-radius: var(--r-pill);
  padding: 0.2rem 0.55rem; text-transform: uppercase; font-weight: 700;
  transform: translateY(-2px);
}
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; position: relative; transition: color .2s ease; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--primary); transition: width .25s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 1.25rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------- Hero --------------------------- */

.hero { position: relative; padding: clamp(3rem, 6vw, 6rem) 0 clamp(3.5rem, 7vw, 7rem); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 82% 8%, var(--brand-soft) 0%, transparent 60%),
    radial-gradient(50% 50% at 0% 100%, var(--wash-2) 0%, transparent 55%);
}
.hero-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero-eyebrow { margin-bottom: 1.4rem; display: inline-flex; align-items: center; gap: 0.7rem; }
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--brand-soft); }
.hero h1 { font-size: clamp(2.6rem, 4.4vw + 1rem, 4.3rem); margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero-sub { font-size: 1.18rem; color: var(--ink-soft); max-width: 34ch; margin-bottom: 2.2rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.hero-trust { display: flex; gap: 1.5rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.03em; }
.hero-trust span { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-trust span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* Signature: the Case Ledger panel */
.ledger {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 1.9rem; position: relative;
}
.ledger::before {
  content: ''; position: absolute; left: 1.9rem; right: 1.9rem; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-light)); border-radius: 0 0 4px 4px;
}
.ledger-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.ledger-file { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ink-faint); text-transform: uppercase; }
.ledger-file strong { color: var(--ink); display: block; font-size: 0.92rem; letter-spacing: 0.06em; margin-top: 0.2rem; }
.status-pill {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); background: var(--brand-soft); border: 1px solid var(--edge);
  padding: 0.35rem 0.7rem; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 0.4rem;
}
.status-pill .live { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.ledger-steps { list-style: none; position: relative; margin: 0.4rem 0 1.6rem; }
.ledger-steps::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 20px; width: 2px; background: var(--line); }
.ledger-steps .fill { position: absolute; left: 11px; top: 8px; width: 2px; background: var(--primary); height: 0; animation: fill 1.6s ease .3s forwards; }
@keyframes fill { to { height: calc(100% - 46px); } }
.ledger-steps li { position: relative; padding: 0.55rem 0 0.55rem 2.4rem; }
.ledger-steps li .tick {
  position: absolute; left: 0; top: 0.55rem; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); border: 2px solid var(--primary);
  color: var(--primary); font-size: 0.72rem; z-index: 1;
}
.ledger-steps li.done .tick { background: var(--primary); color: #fff; }
.ledger-steps li.active .tick { border-style: dashed; }
.ledger-steps li .lbl { font-weight: 600; font-size: 0.96rem; color: var(--ink); }
.ledger-steps li .meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.ledger-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.ledger-foot .metric { font-family: var(--font-mono); }
.ledger-foot .metric b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--primary); font-weight: 600; }
.ledger-foot .metric span { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }

/* --------------------------- Section scaffold --------------------------- */

section { padding: clamp(3.5rem, 7vw, 7rem) 0; }
.section-tint { background: var(--wash); border-block: 1px solid var(--line); }
.section-dark { background: var(--primary-dark); color: #fff; }
.section-head { max-width: 640px; margin: 0 auto clamp(2.5rem, 4vw, 4rem); text-align: center; }
.section-head .eyebrow { margin-bottom: 1rem; display: inline-block; }
.section-head h2 { font-size: clamp(2rem, 2.6vw + 1rem, 3rem); margin-bottom: 1rem; }
.section-head p { font-size: 1.1rem; color: var(--ink-soft); }
.section-dark .section-head h2, .section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: var(--accent-light); }
.section-dark p { color: color-mix(in srgb, #fff 78%, transparent); }

/* --------------------------- About --------------------------- */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-grid h2 { font-size: clamp(1.9rem, 2.4vw + 1rem, 2.7rem); margin-bottom: 1.4rem; }
.about-grid p { font-size: 1.06rem; margin-bottom: 1.1rem; }
.about-marks { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.about-marks .mark { background: var(--surface); padding: 1.6rem; }
.about-marks .mark b { font-family: var(--font-display); font-size: 2.2rem; color: var(--primary); font-weight: 600; display: block; line-height: 1; }
.about-marks .mark span { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }

/* --------------------------- Services --------------------------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 2rem; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--edge); }
.card .num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--primary); letter-spacing: 0.1em; }
.card h3 { font-size: 1.35rem; margin: 0.9rem 0 0.7rem; }
.card p { font-size: 0.98rem; color: var(--ink-soft); }

/* --------------------------- Process --------------------------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--primary); font-weight: 700;
  position: absolute; top: 0; left: 0; letter-spacing: 0.08em;
}
.step::after { content: ''; position: absolute; top: 6px; left: 3.2rem; right: -0.75rem; height: 1px; background: var(--edge); }
.steps .step:last-child::after { display: none; }
.step h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.95rem; }
.section-dark .step::after { background: color-mix(in srgb, #fff 20%, transparent); }
.section-dark .step p { color: color-mix(in srgb, #fff 72%, transparent); }
.section-dark .step::before { color: var(--accent-light); }

/* --------------------------- FAQ --------------------------- */

.faq { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 1.5rem 3rem 1.5rem 0; position: relative; font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.faq-q::after { content: '+'; position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); font-family: var(--font-body); font-size: 1.6rem; color: var(--primary); transition: transform .3s ease; }
.faq-item.open .faq-q::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq-a p { padding-bottom: 1.6rem; font-size: 1rem; color: var(--ink-soft); }

/* --------------------------- Lead form --------------------------- */

.form-wrap { max-width: 720px; margin: 0 auto; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(2rem, 4vw, 3.2rem); }
.form-card h2 { font-size: clamp(1.8rem, 2.4vw + 1rem, 2.5rem); margin-bottom: 0.8rem; }
.form-card > p { margin-bottom: 2rem; color: var(--ink-soft); }
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.5rem; }
.field input {
  width: 100%; padding: 0.95rem 1.1rem; font-family: var(--font-body); font-size: 1rem;
  border: 1px solid var(--edge); border-radius: var(--r-sm); background: var(--wash); color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--brand-soft); }
.field input.error { border-color: #C6413B; box-shadow: 0 0 0 4px color-mix(in srgb, #C6413B 12%, transparent); }
.error-message { display: none; color: #C6413B; font-size: 0.82rem; margin-top: 0.4rem; }
.consent { display: flex; gap: 0.8rem; align-items: flex-start; margin-bottom: 1.1rem; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
.consent label { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.55; cursor: pointer; }
.consent label strong { color: var(--ink); font-weight: 600; }
.form-legal { font-size: 0.82rem; color: var(--ink-faint); margin: 0.4rem 0 1.6rem; }
.form-legal a { color: var(--primary); font-weight: 600; text-decoration: none; }
.form-legal a:hover { text-decoration: underline; }
.btn-submit { width: 100%; justify-content: center; }
.thank-you { display: none; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: clamp(2.5rem, 5vw, 4rem); }
.thank-you.show { display: block; animation: rise .5s ease; }
.thank-you h3 { font-size: 2rem; margin-bottom: 1rem; color: var(--primary); }
.thank-you p { margin-bottom: 0.9rem; }

/* Contact split layout */
.contact-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 2.5rem; align-items: start; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 2rem; position: sticky; top: 6rem; }
.info-card h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.info-row { margin-bottom: 1.3rem; }
.info-row .k { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); display: block; margin-bottom: 0.35rem; }
.info-row .v, .info-row .v a { font-weight: 600; color: var(--ink); text-decoration: none; font-size: 1.02rem; }
.info-row .v a:hover { color: var(--primary); }

/* --------------------------- Legal pages --------------------------- */

.legal { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.legal-head { max-width: var(--maxw); margin: 0 auto 2.5rem; padding: 0 2rem; }
.legal-head .eyebrow { display: inline-block; margin-bottom: 0.9rem; }
.legal-head h1 { font-size: clamp(2.2rem, 3vw + 1rem, 3.4rem); }
.legal-head .lead { font-size: 1.1rem; color: var(--ink-soft); margin-top: 0.8rem; max-width: 60ch; }
.legal-body { max-width: 860px; margin: 0 auto; padding: 0 2rem; }
.legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: clamp(2rem, 4vw, 3.5rem); }
.effective { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-soft); background: var(--wash); border-left: 3px solid var(--primary); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 1rem 1.2rem; margin-bottom: 2.2rem; }
.effective strong { color: var(--primary); }
.legal-card > p { font-size: 1.02rem; line-height: 1.8; margin-bottom: 1.4rem; }
.legal-card h2 { font-size: 1.5rem; margin: 2.6rem 0 1rem; }
.legal-card h3 { font-size: 1.2rem; margin: 1.8rem 0 0.8rem; }
.legal-card ul { margin: 0 0 1.6rem 1.4rem; }
.legal-card li { font-size: 1.02rem; line-height: 1.8; color: var(--ink-soft); margin-bottom: 0.6rem; }
.legal-card strong { color: var(--ink); }
.legal-card a { color: var(--primary); font-weight: 600; text-decoration: none; }
.legal-card a:hover { text-decoration: underline; }
.legal-contact { margin-top: 2.5rem; padding: 2rem; background: var(--primary-dark); color: #fff; border-radius: var(--r); }
.legal-contact h2 { color: #fff; margin-top: 0; font-size: 1.4rem; }
.legal-contact p { color: color-mix(in srgb, #fff 80%, transparent); margin-bottom: 0.4rem; }
.legal-contact .name { font-family: var(--font-display); font-size: 1.25rem; color: #fff; margin: 0.6rem 0 0.4rem; }
.legal-links { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); text-align: center; font-family: var(--font-mono); font-size: 0.85rem; }
.legal-links a { color: var(--primary); text-decoration: none; margin: 0 0.8rem; }

/* --------------------------- Footer --------------------------- */

.footer { background: var(--primary-dark); color: #fff; padding: clamp(3rem, 5vw, 4.5rem) 0 2rem; }
.footer-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; }
.footer h4.brand-f { font-family: var(--font-display); font-size: 1.5rem; color: #fff; margin-bottom: 1rem; }
.footer p { color: color-mix(in srgb, #fff 72%, transparent); font-size: 0.95rem; max-width: 34ch; }
.footer .col h5 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 1.1rem; }
.footer .col a { display: block; color: color-mix(in srgb, #fff 78%, transparent); text-decoration: none; font-size: 0.95rem; margin-bottom: 0.7rem; transition: color .2s ease, transform .2s ease; }
.footer .col a:hover { color: #fff; transform: translateX(3px); }
.footer-bottom { max-width: var(--maxw); margin: 2.5rem auto 0; padding: 1.6rem 2rem 0; border-top: 1px solid color-mix(in srgb, #fff 14%, transparent); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.78rem; color: color-mix(in srgb, #fff 60%, transparent); }

/* --------------------------- Motion in --------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
[data-rise] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
[data-rise].in { opacity: 1; transform: translateY(0); }

/* --------------------------- Responsive --------------------------- */

@media (max-width: 940px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
  .info-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ledger { max-width: 460px; }
}
@media (max-width: 620px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 1.2rem; padding: 1.5rem 2rem; background: var(--paper); border-bottom: 1px solid var(--line); }
  .cards, .steps, .footer-grid { grid-template-columns: 1fr; }
  .container, .nav-inner, .hero-grid, .footer-grid, .legal-head, .legal-body { padding-left: 1.3rem; padding-right: 1.3rem; }
  .hero-actions .btn { flex: 1; justify-content: center; }
}

/* --------------------------- A11y --------------------------- */

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  [data-rise] { opacity: 1; transform: none; }
  .ledger-steps .fill { height: calc(100% - 46px); }
}
