/*
 * Avatorial homepage — direction A ("The Approval Desk").
 *
 * Reads only from tokens.css, so the page, the nav, the app and the image
 * renderers cannot drift apart. Namespaced .avh-* alongside the nav's .av-*.
 *
 * The organising idea: colour carries approval STATE, never decoration.
 * Green means a human signed off, amber means it is waiting for one, red
 * means it came back. Everything else is navy, ink or paper.
 */

.avh-hero, .avh-section, .avh-strip, .avh-footer { font-family: var(--font-sans); }
.avh-wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--sp-lg); }

/* ---- shared type -------------------------------------------------------- */
.avh-h1 {
  margin: 18px 0 0; font-size: var(--fs-4xl); font-weight: 800;
  line-height: 1.06; letter-spacing: -0.02em; color: var(--c-ink);
}
.avh-green { color: var(--c-approve); }
.avh-h2 {
  margin: 0 0 10px; font-size: var(--fs-2xl); font-weight: 800;
  line-height: 1.2; letter-spacing: -0.01em; color: var(--c-ink);
}
.avh-h3 { margin: 0 0 8px; font-size: var(--fs-lg); font-weight: 700; color: var(--c-ink); }
.avh-sub { margin: 0 0 var(--sp-xl); font-size: 17px; line-height: 1.55; color: var(--c-ink-muted); max-width: 62ch; }
.avh-lede { margin: 18px 0 26px; font-size: var(--fs-lg); line-height: 1.5; color: var(--c-ink-muted); max-width: 36ch; }
.avh-note { font-size: 14px; color: var(--c-ink-muted); margin: 0; }
.avh-centre-note {
  margin: var(--sp-lg) auto 0; max-width: 70ch; text-align: center;
  font-size: 13.5px; line-height: 1.6; color: var(--c-ink-muted);
}

/* ---- buttons ------------------------------------------------------------ */
.avh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border: 0; border-radius: var(--r-pill);
  font-weight: 700; font-size: 16px; line-height: 1; font-family: inherit;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.avh-btn-sm { min-height: 44px; padding: 0 20px; font-size: 15px; }
.avh-btn-primary { background: var(--c-primary); color: var(--c-on-primary); }
.avh-btn-primary:hover { background: var(--c-primary-hover); }
.avh-btn-ghost { background: transparent; color: var(--c-ink); box-shadow: inset 0 0 0 2px var(--c-border); }
.avh-btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--c-primary); color: var(--c-primary); }
.avh-btn-onnavy { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.34); }
.avh-btn-onnavy:hover { background: rgba(255,255,255,.1); }
.avh-btn-approve { background: var(--c-approve); color: var(--c-on-approve); }
.avh-btn-quiet { background: transparent; color: var(--c-ink-muted); box-shadow: inset 0 0 0 2px var(--c-border-subtle); }

/* ---- hero --------------------------------------------------------------- */
.avh-hero { background: var(--c-canvas); padding: var(--sp-2xl) 0; }
.avh-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-xl); align-items: center; }
.avh-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--c-approve-soft); color: #15803D;
  font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: var(--r-pill);
}
.avh-eyebrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.avh-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* The product's actual moment, shown rather than described. */
.avh-review {
  position: relative; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--r-xl);
  box-shadow: var(--shadow-raised); padding: 26px;
}
.avh-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: var(--r-pill);
}
.avh-chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.avh-chip-pending { background: var(--c-pending-soft); color: #92400E; }
.avh-review-meta { margin: 16px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c-ink-muted); }
.avh-review-body { margin: 10px 0 22px; font-size: 15.5px; line-height: 1.62; color: var(--c-ink); }
.avh-review-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.avh-review-actions .avh-btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.avh-review-mascot { position: absolute; right: -26px; bottom: -30px; width: 132px; height: auto; pointer-events: none; }

/* ---- navy invariant strip ----------------------------------------------- */
.avh-strip { background: var(--c-primary); color: #fff; padding: var(--sp-xl) 0; }
.avh-strip-in { display: flex; gap: var(--sp-xl); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.avh-strip-title { margin: 0 0 8px; font-size: 21px; font-weight: 700; }
.avh-strip-body { margin: 0; font-size: 15.5px; line-height: 1.6; color: #A9BDD4; max-width: 62ch; }

/* ---- sections ----------------------------------------------------------- */
.avh-section { padding: var(--sp-2xl) 0; background: var(--c-surface); }
.avh-alt { background: var(--c-canvas); }
.avh-dark { background: var(--c-primary); }
.avh-dark .avh-h2 { color: #fff; }
.avh-dark .avh-sub { color: #A9BDD4; }

/* ---- split paths -------------------------------------------------------- */
.avh-paths { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
.avh-path {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-card);
}
.avh-path-team { border-color: var(--c-primary); }
.avh-badge {
  display: inline-block; margin-bottom: 12px; padding: 5px 12px;
  background: var(--c-surface-muted); color: var(--c-primary);
  font-size: 12px; font-weight: 700; border-radius: var(--r-pill);
}
.avh-who { margin: 0 0 18px; font-size: 15px; color: var(--c-ink-muted); }
.avh-list { margin: 0 0 22px; padding: 0; list-style: none; }
.avh-list li { position: relative; padding-inline-start: 26px; margin-bottom: 10px; font-size: 15px; line-height: 1.5; }
.avh-list li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 6px;
  width: 14px; height: 8px; border-inline-start: 2px solid var(--c-approve);
  border-bottom: 2px solid var(--c-approve); transform: rotate(-45deg);
}
.avh-price { margin: 14px 0 0; font-size: 14px; color: var(--c-ink-muted); }

/* ---- how it works ------------------------------------------------------- */
.avh-step {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--sp-xl);
  align-items: center; margin-bottom: var(--sp-2xl);
}
.avh-step:last-child { margin-bottom: 0; }
/* Explicit class, not :nth-child: the steps share a parent with the section
   heading and lead-in, so nth-child counts those too and flipped the wrong
   ones. Text always comes first in the DOM; only the visual order swaps. */
.avh-step-flip .avh-shot { order: -1; }
.avh-step-text p { margin: 0; font-size: 16px; line-height: 1.68; color: var(--c-ink-muted); }
.avh-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 14px; border-radius: 50%;
  background: var(--c-primary); color: #fff; font-weight: 800; font-size: 17px;
}
.avh-shot {
  margin: 0; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card);
}
.avh-shot-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: var(--c-canvas); border-bottom: 1px solid var(--c-border-subtle);
}
.avh-shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-border); }
.avh-shot-bar span { margin-inline-start: 10px; font-size: 12px; color: var(--c-ink-muted); }
.avh-shot img { display: block; width: 100%; height: auto; }

/* ---- state row ---------------------------------------------------------- */
.avh-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.avh-state {
  background: var(--c-surface); border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-md); padding: 18px 20px;
}
.avh-state strong { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.avh-state i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.avh-state span { display: block; margin-top: 6px; font-size: 14px; color: var(--c-ink-muted); }
.avh-state-pending i { background: var(--c-pending); }
.avh-state-approve i { background: var(--c-approve); }
.avh-state-attention i { background: var(--c-attention); }
.avh-state-draft i { background: var(--c-border); }

/* ---- example output ----------------------------------------------------- */
.avh-example { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--sp-lg); align-items: start; }
.avh-post { padding: 20px; background: var(--c-surface); }
.avh-post p { margin: 12px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--c-ink); }
.avh-post p:first-of-type { margin-top: 0; }
.avh-post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.avh-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--c-surface-muted); flex: none; }
.avh-post-head strong { display: block; font-size: 13px; color: var(--c-ink); }
.avh-post-head span span { display: block; font-size: 11px; color: var(--c-ink-muted); }
.avh-ig {
  background: var(--c-primary); color: #fff; border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow-card);
}
.avh-ig-bar { display: block; width: 52px; height: 5px; border-radius: 3px; background: var(--c-approve); }
.avh-ig h3 { margin: 18px 0 16px; font-size: 21px; line-height: 1.25; color: #fff; }
.avh-ig ul { margin: 0; padding: 0; list-style: none; }
.avh-ig li { position: relative; padding-inline-start: 22px; margin-bottom: 11px; font-size: 14.5px; line-height: 1.5; color: #C7D6E6; }
.avh-ig li::before { content: ''; position: absolute; inset-inline-start: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--c-approve); }
.avh-ig-foot { display: block; margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); font-size: 12.5px; color: #8FA8C4; }

/* ---- cards -------------------------------------------------------------- */
.avh-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.avh-cards-4 { grid-template-columns: repeat(4, 1fr); }
.avh-card {
  background: var(--c-surface); border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-md); padding: 22px;
}
.avh-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--c-ink); }
.avh-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--c-ink-muted); }
.avh-card-dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.avh-card-dark h3 { color: #fff; }
.avh-card-dark p { color: #A9BDD4; }

/* ---- FAQ ---------------------------------------------------------------- */
.avh-faq { max-width: 780px; margin: 0 auto; }
.avh-faq details { border-bottom: 1px solid var(--c-border-subtle); background: var(--c-surface); }
.avh-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 4px; cursor: pointer;
  font-size: 16.5px; font-weight: 650; color: var(--c-ink); list-style: none;
}
.avh-faq summary::-webkit-details-marker { display: none; }
.avh-faq summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--c-ink-muted); }
.avh-faq details[open] summary::after { content: '−'; }
.avh-faq p { margin: 0 4px 20px; font-size: 15.5px; line-height: 1.68; color: var(--c-ink-muted); }

/* ---- comparison --------------------------------------------------------- */
/* Scrolls inside its own box so the page body never scrolls sideways. */
.avh-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.avh-compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14.5px; }
.avh-compare th, .avh-compare td { padding: 15px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--c-border-subtle); }
.avh-compare thead th { font-size: 13px; font-weight: 700; color: var(--c-ink-muted); }
.avh-compare tbody th { font-weight: 600; color: var(--c-ink); }
.avh-compare .avh-us { background: var(--c-canvas); }
.avh-compare thead .avh-us { color: var(--c-primary); font-size: 15px; }
.avh-compare td span { display: block; margin-top: 3px; font-size: 13px; color: var(--c-ink-muted); }
.avh-yes, .avh-no, .avh-part { display: inline-block; font-weight: 800; }
.avh-yes { color: var(--c-approve); }
.avh-no { color: var(--c-attention); }
.avh-part { color: var(--c-pending); }

/* ---- closing CTA -------------------------------------------------------- */
.avh-end {
  background: var(--c-canvas); border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-xl); padding: var(--sp-xl); text-align: center;
}
.avh-end p { margin: 10px 0 24px; font-size: 16px; color: var(--c-ink-muted); }

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .avh-hero-grid, .avh-step, .avh-paths, .avh-example { grid-template-columns: 1fr; }
  /* The screenshot follows its explanation on a phone, never precedes it. */
  .avh-step-flip .avh-shot { order: 0; }
  .avh-cards, .avh-cards-4 { grid-template-columns: 1fr 1fr; }
  .avh-states { grid-template-columns: 1fr 1fr; }
  .avh-foot-top { grid-template-columns: 1fr 1fr; }
  .avh-h1 { font-size: var(--fs-3xl); }
  .avh-lede { max-width: none; }
  .avh-review-mascot { width: 104px; right: -14px; bottom: -20px; }
}
@media (max-width: 560px) {
  .avh-hero, .avh-section { padding: var(--sp-xl) 0; }
  .avh-cards, .avh-cards-4, .avh-states, .avh-foot-top { grid-template-columns: 1fr; }
  .avh-h1 { font-size: 2rem; }
  .avh-h2 { font-size: var(--fs-xl); }
  .avh-btn { width: 100%; }
  .avh-review-actions .avh-btn { width: auto; }
}

/* The mascot is decoration; a mirrored sheep is fine, a clipped one is not. */
[dir='rtl'] .avh-review-mascot { right: auto; left: -26px; transform: scaleX(-1); }
[dir='rtl'] .avh-list li::before { transform: rotate(-45deg) scaleX(-1); }

@media print {
  .avh-strip, .avh-end, .avh-review-mascot { display: none; }
  .avh-section, .avh-hero { padding: 12px 0; }
  .avh-dark, .avh-footer { background: #fff; color: #000; }
}
