/* ============================================================
   EMERALD CITY APOSTILLES — Design System
   Concept: the ink stamp / ledger, with a nod to the city itself.
   An apostille IS a seal — so the visual language borrows from
   stamps, parchment, and official ink rather than generic "warm
   SaaS." The evergreen accent ties the mark to Seattle; the
   sealing-wax red is spent only on the one action that matters.
   ============================================================ */

:root {
  /* --- Color tokens --- */
  --ink:        #1E2A38;   /* primary text, header, footer */
  --ink-soft:   #34445A;   /* secondary headings on dark */
  --paper:      #F6EFDE;   /* warm parchment background */
  --paper-deep: #EDE2C9;   /* card / section backgrounds on paper */
  --seal:       #A23E2F;   /* sealing-wax red — reserved for the one primary action */
  --seal-dark:  #832F23;   /* hover state for seal accent */
  --evergreen:  #2F5D46;   /* the city mark — badges, links, the stamp itself */
  --evergreen-dark: #234636;
  --brass:      #B8873D;   /* hairline dividers, secondary detail */
  --taupe:      #7A7267;   /* muted / secondary text */
  --line:       #D9CBA8;   /* hairline borders on paper */
  --white:      #FFFDF8;

  /* --- Type --- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --step-3: clamp(2.1rem, 1.7rem + 2vw, 3rem);
  --step-4: clamp(2.5rem, 2rem + 2.6vw, 3.6rem);

  --content-width: 740px;
  --wide-width: 1120px;
  --radius: 6px;
}

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

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.1em; max-width: 68ch; }
.lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 56ch; }

a { color: var(--evergreen); }
a:hover { color: var(--evergreen-dark); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -999px; top: auto;
  background: var(--ink); color: var(--white); padding: 0.75em 1.25em;
  z-index: 1000; border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --- Layout helpers --- */
.wrap { max-width: var(--wide-width); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--content-width); margin: 0 auto; padding: 0 1.5rem; }
section { padding: clamp(2.5rem, 5vw, 5rem) 0; }
.section-tight { padding: clamp(1.5rem, 3vw, 3rem) 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* --- Header / nav --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 239, 222, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); font-weight: 600; }
.brand-sub { font-size: 0.72rem; color: var(--taupe); letter-spacing: 0.02em; }

.main-nav { display: flex; align-items: center; gap: 1.75rem; }
.main-nav a:not(.btn) {
  color: var(--ink-soft); text-decoration: none; font-size: 0.95rem;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.main-nav a:not(.btn):hover { border-bottom-color: var(--brass); color: var(--ink); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 42px; height: 42px; cursor: pointer; color: var(--ink);
}

@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.5rem 1.25rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .main-nav .btn { margin-top: 0.75rem; text-align: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* --- Buttons --- */
.btn {
  display: inline-block; font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 0.8em 1.5em; border-radius: var(--radius); text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--seal); color: var(--white); }
.btn-primary:hover { background: var(--seal-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-block { display: block; width: 100%; text-align: center; }

/* --- Hero --- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.eyebrow-badge {
  display: inline-flex; align-items: center; gap: 0.5em;
  background: var(--paper-deep); border: 1px solid var(--line); color: var(--evergreen-dark);
  font-size: 0.85rem; padding: 0.4em 0.9em; border-radius: 999px; margin-bottom: 1.25rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }
.trust-row { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-top: 2.25rem; color: var(--taupe); font-size: 0.9rem; }
.trust-row span { display: flex; align-items: center; gap: 0.4em; }

.hero-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem; box-shadow: 0 2px 0 var(--line);
}
.hero-panel h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.price-line { display: flex; justify-content: space-between; align-items: baseline; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.price-line:last-of-type { border-bottom: none; }
.price-line .amt { font-family: var(--font-display); font-size: 1.3rem; color: var(--seal); }
.price-line .label { color: var(--ink-soft); font-size: 0.92rem; }

/* --- Cards / grid --- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.doc-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: border-color 0.15s ease;
}
.doc-card:hover { border-color: var(--evergreen); }
.doc-card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.doc-card p { font-size: 0.92rem; color: var(--taupe); margin-bottom: 0.75rem; }
.doc-card .go { color: var(--evergreen); font-size: 0.88rem; font-weight: 600; }

.niche-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem;
}
.niche-card h3 { font-size: 1.2rem; }

/* --- Steps (genuine sequence: order → review → deliver → return) --- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 0.5rem; }
.step-num {
  counter-increment: step; font-family: var(--font-display); font-size: 1.6rem; color: var(--brass);
}
.step-num::before { content: counter(step); }
.step h4 { margin-top: 0.4rem; }

/* --- Pricing table --- */
.price-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.price-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.price-table th, .price-table td { text-align: left; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table th { font-family: var(--font-display); font-weight: 600; background: var(--paper-deep); }
.price-table tr:last-child td { border-bottom: none; }
.price-table .price-cell { font-family: var(--font-display); color: var(--seal); font-size: 1.15rem; white-space: nowrap; }
.price-note { font-size: 0.88rem; color: var(--taupe); margin-top: 0.75rem; }

/* --- Banner (price strip on document pages) --- */
.price-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin: 1.5rem 0 2.5rem;
}
.price-banner .big { font-family: var(--font-display); font-size: 1.5rem; color: var(--seal); }

/* --- Callout / info box --- */
.callout {
  background: var(--white); border-left: 4px solid var(--evergreen); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem; margin: 1.5rem 0;
}
.callout.warn { border-left-color: var(--seal); }

/* --- Pill nav (related documents) --- */
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill {
  display: inline-block; background: var(--white); border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; padding: 0.5em 1em; border-radius: 999px; font-size: 0.88rem;
}
.pill:hover { border-color: var(--evergreen); color: var(--evergreen-dark); }

/* --- FAQ --- */
details.faq-item { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
details.faq-item summary { font-family: var(--font-display); font-size: 1.1rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--brass); flex-shrink: 0; }
details.faq-item[open] summary::after { content: '–'; }
details.faq-item p { margin-top: 0.75rem; color: var(--ink-soft); }

/* --- Form --- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 0.7em 0.9em;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--brass); outline-offset: 1px; border-color: var(--evergreen); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; margin: 0; }
fieldset legend { font-weight: 600; padding: 0 0.5em; font-size: 0.92rem; color: var(--ink-soft); }
.radio-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 0.5em; font-weight: 400; color: var(--ink); }

/* --- Footer --- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 4rem; }
.site-footer a { color: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--white); font-size: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.55rem; }
.footer-grid a { text-decoration: none; opacity: 0.85; }
.footer-grid a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(246,239,222,0.15); padding: 1.25rem 0; font-size: 0.85rem; opacity: 0.7;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.footer-brand .brand-mark path, .footer-brand .brand-mark circle { stroke: var(--paper); }

/* --- Badge --- */
.badge { display: inline-block; background: var(--evergreen); color: var(--white); font-size: 0.78rem; padding: 0.25em 0.7em; border-radius: 999px; }

/* --- Utility --- */
.mt-0 { margin-top: 0; }
.text-taupe { color: var(--taupe); }
