/* Public landing page layout. Tokens only — see tokens.css.
   The page is white; brick marks the top bar, the buttons, the two dark bands
   and the accents inside them. Nothing here carries a raw hex or a magic pixel. */

.wrap {
  width: 100%;
  max-width: var(--width-page);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* ---- Top bar ----------------------------------------------------------- */

.topbar {
  background-color: var(--color-accent);
  color: var(--color-accent-contrast);
  font-size: var(--text-xs);
}

.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-5);
  padding-block: var(--space-2);
}

.topbar p { margin: 0; max-width: none; }
.topbar .topbar-end { margin-left: auto; opacity: 0.85; }

/* ---- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: var(--border);
  background-color: var(--color-surface);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
}
.brand:visited { color: var(--color-text); }

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
  box-shadow: inset -0.45rem 0 0 var(--color-accent-2);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-left: auto;
  font-size: var(--text-sm);
}

.site-nav a:not(.btn) { color: var(--color-text-muted); text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--color-link-hover); text-decoration: underline; }
.site-nav .btn { text-decoration: none; }

/* The header CTA is the one pill on the page, matching the reference layout. */
.btn-pill { border-radius: var(--radius-pill); }

/* ---- Shared section furniture ------------------------------------------ */

section { padding-block: var(--space-section); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 0.7rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-accent);
  box-shadow: inset -0.7rem 0 0 var(--color-accent-2);
}

.section-title { font-size: var(--text-3xl); margin-bottom: var(--space-3); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.section-head > div { max-width: 34ch; }
.section-head .section-title { margin-bottom: 0; }

.tinted { background-color: var(--color-accent-2-soft); }

/* ---- Image frames ------------------------------------------------------ */

/* Each frame crops its own source, so one photo can sit in two places without
   reading as a repeat. */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-sunken);
}

.frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.hero { padding-block: var(--space-7) var(--space-section); }

.hero .wrap {
  display: grid;
  gap: var(--space-7) var(--space-6);
  align-items: center;
}

.hero h1 {
  font-size: var(--text-display);
  max-width: 19ch;
  margin-bottom: var(--space-4);
}

.hero-lede {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 46ch;
}

.hero-actions { margin-block: var(--space-5) var(--space-4); }


/* Three frames offset against each other, with the seal pinned to the seam. */
.collage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  grid-template-rows: repeat(2, minmax(7rem, 1fr));
  gap: var(--space-3);
  aspect-ratio: 1 / 0.92;
}

.collage .frame:nth-child(1) { grid-column: 1; grid-row: 1; margin-top: var(--space-6); }
.collage .frame:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
.collage .frame:nth-child(3) { grid-column: 1; grid-row: 2; margin-bottom: var(--space-6); }

.collage .frame:nth-child(1) img { object-position: 52% 28%; }
.collage .frame:nth-child(2) img { object-position: 60% 40%; }
.collage .frame:nth-child(3) img { object-position: 42% 35%; }

.seal {
  position: absolute;
  left: 0;
  bottom: var(--space-4);
  width: 6rem;
  height: 6rem;
  transform: translateX(-35%);
  border-radius: var(--radius-pill);
  background-color: var(--color-accent-2);
  color: var(--color-accent-2-contrast);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
}

.seal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.seal text { font-size: 9px; /* viewBox units */ font-weight: var(--weight-semibold); letter-spacing: 0.1em; fill: currentColor; }
.seal-spin { transform-origin: center; animation: seal-spin 22s linear infinite; }

.seal-arrow {
  width: 1.5rem;
  height: 1.5rem;
  transform: rotate(-45deg);
  background-color: currentColor;
  mask: var(--icon-arrow) center / contain no-repeat;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
}

@keyframes seal-spin { to { transform: rotate(360deg); } }

/* ---- Marquee ----------------------------------------------------------- */

.marquee {
  overflow: hidden;
  background-color: var(--color-band);
  color: var(--color-band-text);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee ul {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin: 0;
  padding: var(--space-4) 0;
  padding-right: var(--space-5);
  list-style: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee li { display: flex; align-items: center; gap: var(--space-5); }
.marquee li::after { content: "✳"; color: var(--color-band-accent); font-size: var(--text-md); }

@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- The three agencies ------------------------------------------------ */

.centered { text-align: center; }
.centered .eyebrow { justify-content: center; }
.centered .section-title { margin-inline: auto; max-width: 20ch; }

.agencies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.agency-mark {
  margin: 0 0 var(--space-1);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--color-accent);
}

.agency h3 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

/* ---- The questions section -------------------------------------------- */

/* The page is white end to end. What used to be a dark band is now a section
   like any other; green appears on the one filled card and on the marks. */
.qcards { display: grid; gap: var(--space-4); }

.qcard {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.qcard h3 { font-size: var(--text-lg); margin: 0; }
.qcard p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); max-width: 38ch; }

/* The provenance card is the one this system is built around, so it is the one
   that carries the green fill and the photograph. */
.qcard-feature {
  background-color: var(--color-accent-2);
  color: var(--color-accent-2-contrast);
}
.qcard-feature h3 { color: var(--color-accent-2-contrast); }
.qcard-feature p { color: var(--color-accent-2-contrast); opacity: 0.9; }
.qcard-feature .frame { margin-top: auto; aspect-ratio: 16 / 10; }
.qcard-feature .frame img { object-position: 45% 40%; }

/* ---- Limits and the closing call --------------------------------------- */

.band-foot {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: var(--border);
}

.limits-title,
.band-cta h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }

.limits { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }

.limits li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 48ch;
}

.limits li::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.35rem;
  background-color: var(--color-accent-2);
  mask: var(--icon-arrow) center / contain no-repeat;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
}

.band-cta p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); max-width: 40ch; }
.band-cta .hero-actions { margin: var(--space-4) 0 0; }

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

.site-footer {
  border-top: var(--border);
  background-color: var(--color-surface);
  padding-block: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  justify-content: space-between;
}

.site-footer p { margin: 0; max-width: 44ch; }

/* ---- Wide layouts ------------------------------------------------------ */

@media (min-width: 60rem) {
  .hero .wrap { grid-template-columns: 1.05fr 1fr; }

  .qcards { grid-template-columns: repeat(3, 1fr); }
  .qcard-feature { grid-column: 2; grid-row: 1 / span 2; }
  .band-foot { grid-template-columns: 1.1fr 1fr; gap: var(--space-7); }
}

@media (max-width: 38rem) {
  /* Three lines of a phone's first screen spent restating the page. The footer
     already says "decision support … not a regulator, not a law firm" and
     "Sources: CBN, NRS and CAC", and the hero lede names the three agencies in
     its second sentence — so on a small screen this band is the same claim a
     third time, above the thing it is a caveat about. It stays on wider
     screens, where it costs a strip nobody was reading anyway. */
  .topbar { display: none; }

  /* The header nav duplicated the hero. "Create an account" and "Sign in" sit
     directly below it in the same screen, and the two section links jump to
     content a thumb reaches in one flick — so the row cost two lines and the
     heading paid for it. The brand stays; the hero carries the actions.
     Theme follows the phone's own dark-mode setting here, which
     prefers-color-scheme already handles, and the switch is still on the
     signed-in pages. */
  .site-nav { display: none; }

  .collage { aspect-ratio: 1 / 1.05; }
  .seal { width: 4.5rem; height: 4.5rem; transform: translateX(-15%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .seal-spin { animation: none; }
}
