/* =========================================================
   FRAMEWORK — Free Online Presence Assessment landing page (/assessment)
   Builds on styles.css (tokens, .section, .eyebrow, .btn, .field/.input, .split, .rows, .success).
   Everything here is scoped with an `as-` prefix.
   ========================================================= */

@media (prefers-reduced-motion: no-preference) { html:has(.as) { scroll-behavior: smooth; } }

.as .eyebrow::before { content: ""; }
.as-num { display: inline-block; margin-right: 14px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.02em; color: var(--ink); }
.section--ink .as-num { color: var(--paper); }

/* ---------- Reveal on scroll (content stays visible without JS) ---------- */
.as-js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.22,.8,.2,1); }
.as-js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .as-js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hero ---------- */
.as-hero { padding-top: clamp(40px, 5.5vw, 80px); padding-bottom: clamp(64px, 8vw, 112px); }
.as-hero .display { margin-bottom: 26px; max-width: 12em; font-size: clamp(42px, 5.3vw, 78px); }
.as-sub {
  max-width: 24em;
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.as-hero .lead { max-width: 33em; color: var(--slate); }

.as-scope { grid-column: 9 / -1; align-self: end; border-top: 1px solid var(--ink); }
.as-scope__title { margin: 0; padding: 14px 0; font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }
.as-scope__list { list-style: none; margin: 0; padding: 0; }
.as-scope__list li { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--hairline); font-weight: 500; font-size: 16px; }
.as-scope__list .index { flex: none; width: 24px; }
.as-scope__foot { margin: 0; padding: 14px 0 0; border-top: 1px solid var(--hairline); font-size: 13px; color: var(--slate); }
@media (max-width: 960px) {
  .as-scope { grid-column: 1 / -1; max-width: 520px; }
}
@media (max-width: 640px) {
  .as-hero { padding-top: 40px; }
  .as-hero .display { font-size: clamp(40px, 11.5vw, 56px); margin-bottom: 20px; }
  .as-sub { margin-bottom: 16px; }
  .as-hero .lead { font-size: 16px; }
  .as-hero .btn-row { margin-top: 28px; }
  .as-hero .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- 02 Problem ---------- */
.as .split__side p + p { margin-top: 18px; }
.as-signals { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; border-top: 1px solid var(--ink); }
.as-signals li { padding: 20px 20px 0 0; font-weight: 500; font-size: 16px; line-height: 1.3; }
.as-signals .index { display: block; margin-bottom: 28px; }
@media (max-width: 860px) {
  .as-signals { grid-template-columns: repeat(2, 1fr); }
  .as-signals li { padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }
  .as-signals .index { margin-bottom: 10px; }
}

/* ---------- 03 What we assess ---------- */
.as-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
}
.as-row p { margin: 0; color: var(--slate); }
@media (max-width: 700px) {
  .as-row { grid-template-columns: 48px 1fr; row-gap: 6px; }
  .as-row p { grid-column: 2; }
}

/* ---------- 04 What you receive ---------- */
.as-receive__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 56px; align-items: start; }
.as-receive__copy { grid-column: 1 / span 5; }
.as-receive__copy .h2 { margin-bottom: 28px; }
.as-receive__copy p { color: var(--stone); max-width: 32em; }
.as-includes { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid rgba(255,255,255,.25); }
.as-includes li { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 16px; color: var(--paper); }
.as .as-fineprint { margin-top: 28px; font-size: 14px; color: var(--stone); }
.as-report { grid-column: 7 / -1; margin: 0; }
@media (max-width: 960px) {
  .as-receive__copy, .as-report { grid-column: 1 / -1; }
}

.as-report__sheet { background: var(--paper); color: var(--ink); padding: clamp(20px, 3vw, 36px); }
.as-report__bar { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.as-report__bar span:last-child { font-weight: 500; color: var(--slate); text-align: right; }
.as-report__sample { margin-top: 12px; display: inline-block; padding: 5px 9px; border: 1px solid var(--ink); font-weight: 600; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.as-report__label { display: block; font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); }
.as-report__hero { padding: 26px 0 22px; border-bottom: 1px solid var(--hairline); }
.as-report__score { display: block; margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: clamp(64px, 9vw, 104px); line-height: .95; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.as-report__score small { font-size: .3em; letter-spacing: 0; font-weight: 600; color: var(--slate); margin-left: 6px; }
.as-report__cats { padding: 8px 0 20px; border-bottom: 1px solid var(--hairline); }
.as-report__cats > div { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 28px; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.as-report__cats > div:last-child { border-bottom: 0; }
.as-report__cats i { position: relative; display: block; height: 3px; background: var(--hairline); }
.as-report__cats i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ink); transform-origin: left; }
.as-js .as-report:not(.is-in) .as-report__cats i::after { transform: scaleX(0); }
.as-report.is-in .as-report__cats i::after { transform: none; transition: transform 1.2s cubic-bezier(.22,.8,.2,1) .3s; }
.as-report__cats b { font-family: var(--font-display); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.as-report__split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 22px; }
.as-report__recs, .as-report__road { list-style: none; margin: 12px 0 0; padding: 0; }
.as-report__recs li, .as-report__road li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.as-report__recs b { flex: none; width: 14px; font-family: var(--font-display); font-weight: 600; font-size: 12px; color: var(--slate); }
.as-report__road b { flex: none; width: 70px; font-weight: 600; font-size: 11px; color: var(--slate); }
.as-report__recs i, .as-report__road i { flex: 1; height: 7px; background: var(--mist); }
.as-report__recs li:nth-child(2) i { max-width: 82%; } .as-report__recs li:nth-child(3) i { max-width: 91%; }
.as-report__recs li:nth-child(4) i { max-width: 70%; } .as-report__recs li:nth-child(5) i { max-width: 78%; }
.as-report__road li:nth-child(2) i { max-width: 86%; } .as-report__road li:nth-child(3) i { max-width: 72%; }
.as-report figcaption { margin-top: 14px; font-size: 13px; color: var(--stone); }
@media (max-width: 520px) {
  .as-report__split { grid-template-columns: 1fr; gap: 22px; }
  .as-report__cats > div { grid-template-columns: 1fr 28px; row-gap: 8px; }
  .as-report__cats i { grid-column: 1 / -1; grid-row: 2; }
  .as-report__bar span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .as-js .as-report:not(.is-in) .as-report__cats i::after { transform: none; }
}

/* ---------- 05 How it works ---------- */
.as-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.as-steps li { padding: 28px 32px 8px 0; }
.as-steps .index { display: block; margin-bottom: 56px; }
.as-steps .h3 { margin-bottom: 12px; max-width: 12em; }
.as-steps p { margin: 0; color: var(--slate); font-size: 16px; max-width: 24em; }
.as-note { margin: clamp(32px, 4vw, 48px) 0 0; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 15px; color: var(--slate); }
@media (max-width: 860px) {
  .as-steps { grid-template-columns: 1fr; }
  .as-steps li { padding: 24px 0; border-bottom: 1px solid var(--hairline); display: grid; grid-template-columns: 48px 1fr; column-gap: 0; }
  .as-steps .index { margin: 4px 0 0; grid-row: 1 / span 2; }
  .as-steps .h3, .as-steps p { grid-column: 2; }
}

/* ---------- 06 Form ---------- */
.as-form-section { background: var(--mist); }
.as-form__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; align-items: start; }
.as-form__intro { grid-column: 1 / span 4; position: sticky; top: 104px; }
.as-form__intro .h2 { margin-bottom: 20px; }
.as .as-fineprint-dark { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--ink); font-size: 15px; font-weight: 500; }
.as-form__panel { grid-column: 6 / -1; background: var(--paper); border: 1px solid var(--ink); padding: clamp(24px, 4vw, 48px); }
@media (max-width: 960px) {
  .as-form__intro { grid-column: 1 / -1; position: static; }
  .as-form__panel { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .as-form__panel { margin: 0 calc(var(--gutter) * -1); border-left: 0; border-right: 0; }
}

.as-form__legend-note { margin: 0 0 28px; font-size: 14px; color: var(--slate); }
.as .optional { font-weight: 500; color: var(--slate); font-size: .92em; } /* slate, not stone: stone is under 3:1 on white */
.as-group { margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.as-group legend { display: block; width: 100%; margin: 0 0 22px; padding: 0 0 12px; border-bottom: 1px solid var(--ink); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.as-group + .as-group { margin-top: 40px; }
.as .input { font-size: 16px; } /* 16px stops iOS zooming into fields */
.as .as-short { min-height: 0; }
.as .field__error::before { content: none; }
.as .field__error { color: var(--ink); }
.as .input[aria-invalid="true"] { border-color: var(--ink); border-width: 2px; }
.as .field.has-error > label { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.as-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.as-consent-fields { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--hairline); }
.as-check { position: relative; display: grid; grid-template-columns: 24px 1fr; column-gap: 14px; margin-bottom: 20px; }
.as-check input { grid-row: 1; grid-column: 1; appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 2px 0 0; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); cursor: pointer; }
.as-check input:checked { background: var(--ink); box-shadow: inset 0 0 0 4px var(--paper); }
.as-check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.as-check input[aria-invalid="true"] { border-width: 3px; }
.as-check label { grid-column: 2; display: block; margin: 0; font-weight: 400; font-size: 15px; line-height: 1.5; cursor: pointer; }
.as-check label a { text-decoration: underline; text-underline-offset: 3px; }
.as-check .field__error { grid-column: 2; }

.as-turnstile { margin: 8px 0 24px; min-height: 65px; }
.as-turnstile[hidden] { display: none; }
.as .form-status { margin: 4px 0 20px; }
.as-submit { width: 100%; margin-top: 8px; font-size: 16px; min-height: 58px; }
.as-submit[aria-busy="true"] { cursor: progress; }
.as-submit__note { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--slate); }

.as-success { border: 0; padding: clamp(8px, 2vw, 16px) 0; }
.as-success[hidden] { display: none; }
.as-success .h2 { margin-bottom: 20px; }
.as-success .muted { max-width: 30em; }

/* ---------- 07 Reassurance ---------- */
.as-reassure .h2 { max-width: 14em; margin-bottom: clamp(40px, 5vw, 64px); }
.as-reassure__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.3); }
.as-reassure__list li { padding: 24px 28px 8px 0; }
.as-reassure__list .index { display: block; margin-bottom: 40px; }
.as-reassure__list .h3 { margin-bottom: 10px; }
.as-reassure__list p { margin: 0; font-size: 15px; color: var(--stone); max-width: 18em; }
@media (max-width: 960px) { .as-reassure__list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .as-reassure__list { grid-template-columns: 1fr; }
  .as-reassure__list li { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  .as-reassure__list .index { margin-bottom: 12px; }
}

/* ---------- Mobile sticky CTA + consent notice ---------- */
.as-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  /* Side padding keeps the button's corners clear of the rounded screen corners of modern phones. */
  padding: 10px max(var(--gutter), 36px) calc(10px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--ink);
  transform: translateY(0); transition: transform .25s ease;
}
.as-sticky[hidden] { display: none; }
.as-sticky .btn { width: 100%; }
@media (min-width: 861px) { .as-sticky { display: none; } }

.as-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--paper); border-top: 1px solid var(--paper);
}
.as-consent[hidden] { display: none; }
.as-consent p { margin: 0; max-width: 46em; font-size: 14px; line-height: 1.5; }
.as-consent p + p { margin-top: 6px; }
.as-consent a { text-decoration: underline; text-underline-offset: 3px; }
.as-consent__status { color: var(--stone); font-size: 13px; }
.as-consent__status:empty { display: none; }
.as-consent__actions { display: flex; gap: 10px; }
/* Allow and No thanks carry the same visual weight on purpose: declining must be as easy as accepting. */
.as-consent .btn { min-height: 44px; padding: 0 22px; border-color: var(--paper); color: var(--paper); background: transparent; }
.as-consent .btn:hover { background: var(--paper); color: var(--ink); }
.as-consent .btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.as-linkbtn { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.as-linkbtn:hover { text-decoration: underline; text-underline-offset: 4px; }
.as-linkbtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 560px) { .as-consent__actions { width: 100%; } .as-consent .btn { flex: 1; } }

/* ---------- Privacy notice page ---------- */
.as-prose { max-width: 44em; }
.as-prose h2 { margin: 48px 0 14px; font-size: 22px; letter-spacing: -.01em; }
.as-prose p, .as-prose li { color: var(--slate); }
.as-prose ul { padding-left: 20px; }
.as-prose li { margin-bottom: 8px; }
.as-prose a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

/* ---------- Privacy policy page ---------- */
.as-policy h3 { margin: 28px 0 10px; font-size: 17px; letter-spacing: -.005em; }
.as-policy-meta { margin: 24px 0 0; font-size: 14px; color: var(--slate); }
.as-policy li strong { color: var(--ink); }
.as-prefs { margin: 32px 0 8px; padding: 24px 0 8px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hairline); }
.as-prefs h3 { margin-top: 0; }
.as-prefs__status { margin: 0 0 16px; font-weight: 600; color: var(--ink) !important; }
.as-prefs__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.as-prefs .btn { min-height: 48px; }
.as-prefs .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.as-prefs .btn:disabled { opacity: .45; cursor: not-allowed; }
.as-prefs__note { margin: 0 0 12px; font-size: 14px; }
.as-prefs [hidden] { display: none; }
.as-policy ul { list-style: disc; padding-left: 1.25em; }
.as-policy li::marker { color: var(--ink); }

/* Accessibility on the policy/assessment pages: the shared "stone" grey (#A3A3A3) on white is 2.5:1, below the 4.5:1 minimum for small text. Use the slate grey here.
   The policy footer headings are h3 (they follow h2 sections, so no heading level is skipped) and keep the footer's look. */
.as .eyebrow, .as .site-footer h4 { color: var(--slate); }
.as .site-footer h3 { margin-bottom: 16px; font-family: var(--font-body); font-weight: 600; font-size: 13px; line-height: 1.4; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate); }
