/* ==========================================================================
   ai-assurance.html — page styles on top of site.css. Mobile-first.
   ========================================================================== */

.aa .nav-links a[aria-current="page"] { color: var(--ink); }

/* ---------- document SVG typography (shared by every inline report svg) ---------- */
.d-kick, .d-sec, .d-label, .d-note, .d-field, .d-foot, .d-log, .d-pill { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.d-kick { font-size: 9.5px; letter-spacing: 2px; fill: #8a837a; }
.d-wine { fill: #7a2040; }
.d-rule { stroke: #000; stroke-opacity: 0.12; stroke-width: 1; fill: none; }
.d-sec { font-size: 12px; fill: #7a2040; letter-spacing: 1px; }
.aa svg .d-title { font-family: "Josefin Sans", system-ui, sans-serif; font-size: 25px; font-weight: 600; fill: #1a1715; }
.d-label { font-size: 8.5px; letter-spacing: 1.6px; fill: #8a837a; }
.aa svg .d-value { font-family: "Josefin Sans", system-ui, sans-serif; font-size: 16px; font-weight: 600; fill: #1a1715; }
.aa svg .d-row { font-family: "Josefin Sans", system-ui, sans-serif; font-size: 14.5px; fill: #1a1715; }
.aa svg .d-row-lg { font-family: "Josefin Sans", system-ui, sans-serif; font-size: 19px; font-weight: 600; fill: #1a1715; }
.d-note { font-size: 9.5px; fill: #8a837a; }
.d-field { font-size: 12px; fill: #3a3632; }
.d-foot { font-size: 8px; fill: #8a837a; }
.d-log { font-size: 9.5px; fill: #3a3632; }
.d-pill { font-size: 9.5px; font-weight: 700; letter-spacing: 1.4px; fill: #fff; }
.aa svg .d-big { font-family: "Josefin Sans", system-ui, sans-serif; font-size: 28px; font-weight: 600; fill: #1a1715; }
.aa svg .d-big-s { font-family: "Josefin Sans", system-ui, sans-serif; font-size: 20px; font-weight: 600; fill: #1a1715; }
.d-cell { fill: #f3efe6; stroke: #000; stroke-opacity: 0.06; }
.d-card { fill: #f3efe6; stroke: #000; stroke-opacity: 0.07; }
.d-bar { fill: #e3dccd; }

/* ---------- hero ---------- */
.aa-hero { padding-top: calc(var(--nav-h) + clamp(36px, 7vh, 72px)); padding-bottom: clamp(56px, 9vh, 110px); }
.aa-hero-grid { display: grid; gap: clamp(40px, 7vw, 72px); align-items: center; }
.aa-hero-copy { display: grid; gap: 24px; min-width: 0; }
.aa-h { font-size: clamp(36px, 4.7vw, 68px); line-height: 1; }
.aa-lede { max-width: 44ch; }
.aa-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.aa-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.aa-trust li {
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.aa-trust li::before { content: "— "; color: var(--wine); }
.aa-cover { margin: 0; justify-self: center; width: min(100%, 440px); }
.aa-cover svg { width: 100%; height: auto; }

@media (min-width: 980px) {
  .aa-hero { min-height: 100svh; display: flex; align-items: center; }
  .aa-hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .aa-cover { justify-self: end; transform: rotate(2deg); }
}

/* ---------- four moves (sticky scrollytelling) ---------- */
.moves-head { display: grid; gap: 20px; padding-bottom: clamp(20px, 4vh, 40px); }
.moves-head .gate { margin-bottom: 18px; }
.moves-track { position: relative; height: 520svh; background: var(--paper-2); border-block: 1px solid var(--line); }
.moves-stage {
  position: sticky; top: 0; height: 100svh; overflow: clip;
  display: flex; flex-direction: column;
  padding-top: calc(var(--nav-h) + 12px);
}
.moves-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px;
  padding-bottom: 12px;
}

/* the document */
.moves-grid > * { min-width: 0; }
.mv-doc-wrap { grid-row: 1; min-height: 0; display: grid; place-items: center; container-type: size; }
.mv-doc {
  position: relative; aspect-ratio: 520 / 700;
  width: min(100cqw, 100cqh * 520 / 700, 550px); height: auto;
}
.pg {
  position: absolute; inset: 0;
  background-color: #fbf9f4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .26 0 0 0 0 .2 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 3px rgba(0, 0, 0, 0.06), 0 24px 44px -24px rgba(0, 0, 0, 0.35);
  will-change: transform;
}
.pg svg { width: 100%; height: 100%; }

/* captions */
.mv-caps { grid-row: 2; position: relative; min-height: 0; }
.mv-cap { display: none; }
.mv-cap.is-active { display: grid; gap: 8px; animation: fadeUp var(--d-base) var(--ease); }
.mv-cap .mv-n b { color: var(--wine); font-weight: 600; }
.mv-cap p:not(.meta) { font-size: 16px; line-height: 1.55; }
.mv-in { color: var(--muted); font-size: 12.5px !important; }
.mv-in a { color: var(--ink); border-bottom: 1px solid var(--hair); }
.mv-in a:hover { color: var(--wine); border-color: var(--wine); }

.mv-ticks { display: flex; gap: 6px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.mv-ticks i { flex: 1; height: 2px; background: var(--hair); position: relative; overflow: hidden; }
.mv-ticks i.on { background: var(--ink); }

@media (min-width: 900px) {
  .moves-stage { padding-top: calc(var(--nav-h) + 24px); }
  .moves-grid {
    grid-template-rows: none; grid-template-columns: minmax(280px, 0.8fr) 1.2fr;
    align-items: center; gap: clamp(32px, 5vw, 80px); padding-bottom: 24px;
  }
  .mv-doc-wrap { grid-row: auto; grid-column: 2; height: 100%; }
  .mv-caps { grid-row: auto; grid-column: 1; display: grid; gap: 4px; }
  .mv-cap, .mv-cap.is-active {
    display: grid; gap: 6px; animation: none;
    padding: 18px 0 18px 22px; border-left: 2px solid var(--hair);
    transition: border-color var(--d-base) var(--ease);
  }
  .mv-cap .h3, .mv-cap p { transition: color var(--d-base) var(--ease); }
  .mv-cap:not(.is-active) .h3 { color: var(--dim); }
  .mv-cap:not(.is-active) p:not(.meta) { color: var(--muted); }
  .mv-cap:not(.is-active) .mv-in { display: none; }
  .mv-cap.is-active { border-left-color: var(--wine); }
  .mv-ticks { display: none; }
}

/* ---------- what you get: the thread (scroll-drawn, six cards) ---------- */
.toc-sect { padding-block: clamp(90px, 14vh, 160px) clamp(70px, 11vh, 130px); overflow: hidden; }
.toc-sect .h2 { margin: 20px 0 18px; }
.toc-lede { max-width: 54ch; margin-bottom: clamp(40px, 7vh, 80px); }

.flow { position: relative; }
.flow-wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.flow-track { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.flow-ink { fill: none; stroke: var(--wine); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow-dot { fill: var(--wine); }
.flow-halo { fill: var(--wine); opacity: 0.14; }
.flow-node { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; transition: fill var(--d-fast) var(--ease), stroke var(--d-fast) var(--ease); }
.flow-node.on { fill: var(--wine); stroke: var(--wine); }
.flow-head { opacity: 0; transition: opacity var(--d-fast) var(--ease); }
.flow.is-live .flow-head { opacity: 1; }

.flow-list { position: relative; z-index: 1; display: grid; gap: 22px; padding-left: 30px; }
.fc {
  position: relative; display: grid; gap: 10px; align-content: start;
  padding: clamp(20px, 2.4vw, 30px); background: var(--sheet);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--nav-h) + 24px);
  transition: border-color var(--d-base) var(--ease), box-shadow var(--d-base) var(--ease),
              transform var(--d-slow) var(--ease), opacity var(--d-slow) var(--ease);
}
.fc::before { /* wine edge that fills when the thread arrives */
  content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; border-radius: 3px;
  background: var(--wine); transform: scaleY(1); transform-origin: 50% 0;
  transition: transform var(--d-slow) var(--ease);
}
.fc-kick { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.fc-n { color: var(--wine); }
.fc-t { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; color: var(--ink); transition: color var(--d-base) var(--ease); }
.fc-d { color: var(--body); font-weight: 300; max-width: 46ch; }
.fc-art {
  width: 100%; height: auto; margin-top: 8px; background: #fbf9f4;
  border: 1px solid var(--hair-2); border-radius: 8px;
}

/* resting (not yet reached) — only once JS runs, so no-JS shows everything */
.flow.is-live .fc:not(.on) { opacity: 0.5; transform: translateY(18px); box-shadow: none; }
.flow.is-live .fc:not(.on)::before { transform: scaleY(0); }
.flow.is-live .fc:not(.on) .fc-t { color: var(--muted); }

/* the little drawings wake up with their card */
.fc-art * { transition: transform 0.9s var(--ease), opacity 0.6s var(--ease), fill 0.6s var(--ease); transform-box: fill-box; }
.fa-hit { fill: #7a2040; } .fa-hit-t { fill: #fff; }
.fa-arrow { stroke: #1a1715; stroke-opacity: 0.45; stroke-width: 1.4; fill: none; }
.fa-pg { fill: #fff; stroke: #000; stroke-opacity: 0.16; }
.fa-pg-2 { fill: #f6f3ec; } .fa-pg-3 { fill: #efebe2; }
.fa-cv-t { font-family: "Josefin Sans", system-ui, sans-serif; font-size: 15px; font-weight: 600; fill: #1a1715; }
.fa-who { fill: #e3dccd; stroke: #1a1715; stroke-opacity: 0.2; }
.fa-seal { fill: none; stroke: #3f7a55; stroke-width: 2; }
.fa-tick { fill: none; stroke: #3f7a55; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.flow.is-live .fc:not(.on) .fa-hit { fill: #e3dccd; }
.flow.is-live .fc:not(.on) .fa-hit-t { fill: #8a837a; }
.flow.is-live .fc:not(.on) .fa-why rect,
.flow.is-live .fc:not(.on) .fa-grow { transform: scaleX(0); }
.flow.is-live .fc:not(.on) .fa-pop { opacity: 0; transform: scale(0.6); }
.flow.is-live .fc:not(.on) .fa-share { opacity: 0; transform: translateX(-10px); }
.flow.is-live .fc:not(.on) .fa-stack { opacity: 0; }
.flow.is-live .fc:not(.on) .fa-stamp { opacity: 0; transform: scale(1.6); }
.fa-why rect, .fa-grow { transform-origin: 0 50%; }
.fa-pop, .fa-stamp { transform-origin: 50% 50%; }
/* stagger inside a card */
.fc.on .fc-art [style*="--i"] { transition-delay: calc(var(--i) * 70ms + 150ms); }
.fc.on .fa-share { transition-delay: 0.35s; } .fc.on .fa-stack { transition-delay: 0.2s; } .fc.on .fa-stamp { transition-delay: 0.45s; }

@media (min-width: 900px) {
  .flow-list { padding-left: 0; gap: 0; }
  .fc { width: calc(50% - clamp(24px, 3vw, 44px)); }
  .fc:nth-child(even) { justify-self: end; }
  .fc + .fc { margin-top: calc(-1 * var(--lift, 150px)); }
}

@media (prefers-reduced-motion: reduce) {
  .fc, .fc::before, .fc-art * { transition: none !important; }
}

/* ---------- crosswalk ---------- */
.xw-sect { padding-block: clamp(60px, 10vh, 120px); border-top: 1px solid var(--hair); }
.xw-grid { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
.xw-copy { display: grid; gap: 20px; }
.xw-art svg { width: 100%; height: auto; }
.xw-h { display: none; }
.xw-v { max-width: 420px; margin-inline: auto; }
.xw-line { fill: none; stroke: #1a1715; stroke-opacity: 0.55; stroke-width: 1.4; }
@media (min-width: 760px) {
  .xw-h { display: block; }
  .xw-v { display: none; }
}
@media (min-width: 1100px) {
  .xw-grid { grid-template-columns: 0.8fr 1.2fr; }
}

/* ---------- deliverable preview ---------- */
.pv-sect { padding-block: clamp(60px, 10vh, 120px); background: var(--paper-2); border-block: 1px solid var(--line); }
.pv-grid { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
.pv-art { position: relative; margin: 0; max-width: 560px; width: 100%; justify-self: center; }
.pv-art svg { width: 100%; height: auto; }
.pv-lock {
  position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px; white-space: nowrap;
  background: #fff; border: 1px solid var(--line);
  padding: 8px 16px 8px 8px; border-radius: 100px;
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.45);
}
.pv-lock .meta { color: var(--ink); font-size: 12px; }
.pv-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--wine); display: grid; place-items: center; flex: none; }
.pv-copy { display: grid; gap: 20px; }
.pv-p { color: var(--body); font-weight: 300; font-size: clamp(17px, 1.6vw, 19px); max-width: 46ch; }
.pv-note { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; max-width: 52ch; }
@media (min-width: 980px) {
  .pv-grid { grid-template-columns: 1.05fr 0.95fr; }
}

/* ---------- CTA band ---------- */
.aa-cta-wrap { padding-block: clamp(40px, 7vh, 80px) clamp(40px, 7vh, 72px); }
.aa-cta {
  background: var(--night); color: var(--night-muted);
  border-radius: 20px; padding: clamp(36px, 7vw, 80px) clamp(24px, 6vw, 72px);
  display: grid; gap: 22px; justify-items: start;
}
.aa-cta .h2 { color: var(--night-ink); max-width: 18ch; }
.aa-cta p { font-weight: 300; font-size: clamp(17px, 1.6vw, 20px); max-width: 52ch; color: var(--night-muted); }
.aa-note { margin-top: 26px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* footer meta row (not in site.css yet) */
.aa .foot-meta { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(236, 230, 219, 0.1); }
.aa .foot .meta { color: var(--night-muted); }

/* crosswalk diagram renders ~0.8× — keep its small text legible */
.xw-art .d-note { font-size: 12px; }
.xw-art .d-label { font-size: 12px; }

/* v6: the drawn report pages stay legible on phones (their small print was ~8 px) */
@media (max-width: 700px) {
  .fc-art .d-kick, .fc-art .d-note, .xw-art .d-note { font-size: 12.5px; }
  .fc-art .d-label { font-size: 11.5px; }
}
/* v6: the report-preview pill wraps and stays inside the screen on phones */
@media (max-width: 560px) {
  .pv-lock { white-space: normal; left: 12px; right: 12px; transform: none; bottom: 3%; border-radius: 16px; }
  .pv-lock .meta { letter-spacing: 0.1em; line-height: 1.4; }
}
