/* Card Glance boards, Webflow edition. Light ground, dusk blue accent, warm neutrals — the
   Webflow Base collection, deliberately distinct from cardglance.app, which keeps the original
   navy and teal. Jost stands in for the app's Futura wordmark. */

/* Jost, self-hosted. Two variable fonts cover 100-900 in both styles, so there is no Google
   Fonts request and no third-party connection for a visitor's browser to make. */
@font-face {
  font-family: Jost;
  src: url("fonts/jost-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Jost;
  src: url("fonts/jost-italic-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* The Webflow Base collection, light theme. Same variable names as the Firebase site so the
     rules below are unchanged; only the values differ. Kept deliberately distinct from
     cardglance.app, which stays on the original navy and teal. */
  --navy: #ECEBF6;        /* Lavender Lighter  - page ground */
  --navy-2: #E8DED7;      /* Pale Oak Lighter  - raised surface */
  --card: #E8DED7;        /* Pale Oak Lighter  - card fill (opaque now; a white wash reads as nothing on a light ground) */
  --line: #C3B8B6;        /* Lilac Ash Light   - every border and rule */
  --ink: #141A2A;         /* Charcoal Blue Darker - headings and strong */
  --dim: #383F51;         /* Charcoal Blue     - body copy */
  --dimmer: #463C3A;      /* Lilac Ash Darker  - captions and fine print */
  --teal: #3C4F76;        /* Dusk Blue         - accent */
  --teal-dark: #697EA8;   /* Dusk Blue Light   - accent rule */
  --top: #3C4F76;         /* Dusk Blue         - top rank. Pale Oak Darker sat within a shade of
                             --dimmer on a light ground, so the number one row stopped reading as
                             highlighted at all; the accent is the only value with enough separation. */
  --on-accent: #ECEBF6;   /* text on a Dusk Blue fill */
  --scrim: rgba(236, 235, 246, 0.86);   /* sticky header over the ground */
  --accent-hover: #24355A;              /* a darker accent; on light, "brighter" reads as fading out */
  --accent-wash: rgba(60, 79, 118, 0.10);
  --shadow: rgba(20, 26, 42, 0.14);
  --bad: #A33417;                       /* error text */
  --radius: 16px;
  --wrap: 1080px;
  --sans: Jost, "Futura", "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  /* Jost throughout, matching the Webflow site, where .page-body carries the family for the
     whole page. The Firebase copy of this stylesheet keeps the system stack on the body and
     puts Jost only on the headings and wordmark — the two sites differ here deliberately. */
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .wordmark, .display {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); margin: 0 0 14px; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 0 0 12px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }

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

header.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--scrim);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }

.wordmark { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 1.22rem; }
.wordmark:hover { text-decoration: none; }
/* The mark is the card, scan line and coin on clear ground — no tile, so no radius.
   Its card reads at roughly the cap height of the wordmark's "C". */
.wordmark img.mark { width: 31px; height: 33px; border-radius: 0; position: relative; top: 1px; }

nav.site { margin-left: auto; display: flex; align-items: center; gap: 22px; }
nav.site a { color: var(--dim); font-size: 0.94rem; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--ink); text-decoration: none; }

@media (max-width: 620px) {
  nav.site { gap: 14px; }
  nav.site a { font-size: 0.86rem; }
  nav.site .hide-sm { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 0;
  font: 600 0.98rem/1 var(--sans);
  background: var(--teal); color: var(--on-accent); cursor: pointer;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal-dark); }
.btn.ghost:hover { background: var(--accent-wash); }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* Quiet links into a page, as distinct from a call to action.
   The leaderboard and the hall of fame are places to go and look at, and giving them the hero's
   pill treatment made them read as a second call to action arriving immediately before the real
   one — two outlined pills floating under a screenshot with nothing to do with signing up. */
.page-links { display: flex; flex-wrap: wrap; gap: 10px 30px; margin-top: 24px; }
.page-links a {
  display: inline-flex; align-items: baseline; gap: 8px;
  color: var(--ink); font-weight: 600; font-size: 0.98rem; text-decoration: none;
  border-bottom: 1px solid var(--line); padding-bottom: 3px;
}
.page-links a::after { content: "\2192"; color: var(--teal); }
.page-links a:hover { color: var(--teal); border-bottom-color: var(--teal); text-decoration: none; }

/* Copy on the left, a screenshot beside it.
   Same column proportions and the same collapse point as the hero, so the page reads with one
   two-column rhythm rather than two slightly different ones.

   Four children on an explicit three-row grid, because each one wants something different:
   the heading spans the full width like every other section heading on the site; the paragraph
   and the links stack in the left column; and the screenshot stands beside them, top-aligned
   with the paragraph rather than centred against the whole block. Placing them explicitly is
   also what lets one source order — heading, paragraph, screenshot, links — give both the wide
   layout and the stacked one. */
.side-by-side { display: grid; grid-template-columns: 1.12fr 0.88fr; column-gap: 40px; align-items: start; }
.side-by-side > .sbs-head { grid-column: 1 / -1; grid-row: 1; }
.side-by-side > .sbs-copy { grid-column: 1; grid-row: 2; }
/* Spanning both body rows on purpose. Left to auto-placement the screenshot would take the whole
   of row 2 and push the links below it, opening a void between the paragraph and the links. */
.side-by-side > .shot-fig { grid-column: 2; grid-row: 2 / span 2; }
.side-by-side > .page-links { grid-column: 1; grid-row: 3; }
.side-by-side > .sbs-head > :first-child { margin-top: 0; }
/* The 30px it carries when it sits under a paragraph would drop it below the paragraph's top. */
.side-by-side .shot.tall { margin: 0 auto; }
/* Grid aligns the column boxes, and the paragraph's own top margin then sits inside its box —
   which left the screenshot 18px higher than the text it is supposed to line up with. */
.side-by-side > .sbs-copy > :first-child { margin-top: 0; }

@media (max-width: 900px) {
  /* Back to one column, in source order, which puts the screenshots between the copy and the
     links exactly as they were before. */
  .side-by-side { grid-template-columns: 1fr; }
  /* Spelled out rather than `> *`: the placements above are two-class selectors, so a
     one-class reset loses on specificity and the children stay in column 2 — which quietly
     recreates a second column out of an implicit track. */
  .side-by-side > .sbs-head,
  .side-by-side > .sbs-copy,
  .side-by-side > .shot-fig,
  .side-by-side > .page-links { grid-column: auto; grid-row: auto; }
  .side-by-side .shot.tall { margin: 30px auto 0; }
  .shot-stack { margin: 30px auto 0; }
}

/* Two screenshots stacked in the right column, matched in height so the pair reads as one
   object rather than two unrelated sizes. */
.shot-stack { display: grid; gap: 14px; max-width: 260px; margin: 0 auto; }
.shot-stack .shot { margin: 0; }
/* policies.jpg is already a crop of one panel (640x707); collection.jpg is a whole screen
   (720x1303), so at the same width it would stand two-thirds taller. It is cropped from the top
   here rather than in the file — the original stays usable elsewhere and there is no re-encode. */
.shot-stack .shot.crop { aspect-ratio: 640 / 707; }
/* The achievements screen sits under the Chase card in the same stack, so it is cropped to the
   Chase card's shape: at full height a 640x1047 screen next to a 640x878 one reads as two
   unrelated objects rather than a pair. */
.shot-stack .shot.crop.tall-crop { aspect-ratio: 640 / 878; }
.shot-stack .shot.crop img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Sections & cards ---------- */

section { padding: 58px 0; }
section.tight { padding: 38px 0; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 10px;
}
.lede { font-size: 1.12rem; color: var(--dim); max-width: 62ch; }
/* In a column that is already narrow, the 62ch measure just makes it narrower again. */
.narrow .lede { max-width: none; }

.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .g3, .g2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card p { color: var(--dim); margin: 0; }
.card .icon { color: var(--teal); margin-bottom: 12px; }
.card .icon svg { width: 26px; height: 26px; display: block; }

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

.hero { padding: 66px 0 34px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: -30% 40% 40% -10%; pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-wash), transparent);
}
.hero .cols { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; position: relative; }
@media (max-width: 900px) { .hero .cols { grid-template-columns: 1fr; } }

/* Screenshots sit in a plain rounded frame rather than a phone bezel, so crops of a screen
   (rather than whole screens) still look deliberate. */
.shot {
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 44px var(--shadow);
  background: var(--navy-2);
}
.shot.hero-shot { max-width: 330px; margin: 0 auto; }
.shot.wide { max-width: 520px; margin: 26px auto 0; }
.shot.tall { max-width: 300px; margin: 30px auto 0; }
/* Two screenshots side by side — front and back of the same card. */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; margin: 30px auto 0; align-items: start; }
.two-up.wide-two { max-width: 660px; }
@media (max-width: 560px) { .two-up { grid-template-columns: 1fr; max-width: 300px; } }
figure.shot-fig { margin: 0; }
figure.shot-fig figcaption { color: var(--dimmer); font-size: 0.86rem; text-align: center; margin-top: 10px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; align-items: center; }
.note { color: var(--dimmer); font-size: 0.88rem; }

/* ---------- Steps ---------- */

ol.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { ol.steps { grid-template-columns: 1fr; } }
ol.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
ol.steps li::before {
  content: counter(s); display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 12px;
  background: var(--teal); color: var(--on-accent); font-weight: 700; font-size: 0.95rem;
}
ol.steps h3 { margin-bottom: 4px; }
ol.steps p { color: var(--dim); margin: 0; }

/* ---------- Pricing ---------- */

.plans { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }

.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.plan.lead { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.plan .tag {
  position: absolute; top: -11px; left: 20px; background: var(--teal); color: var(--on-accent);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.plan .name { font-family: Jost, Futura, sans-serif; font-size: 1.3rem; font-weight: 500; }
.plan .price { font-size: 1.9rem; font-variant-numeric: tabular-nums; margin: 6px 0 2px; font-family: Jost, Futura, sans-serif; }
.plan .per { color: var(--dimmer); font-size: 0.85rem; }
.plan .scans { color: var(--teal); font-weight: 600; margin: 12px 0 2px; }
.plan ul { list-style: none; padding: 0; margin: 12px 0 0; }
@media (min-width: 1001px) { .plan .scans { min-height: calc(2 * 1.65em); } }
.plan li { color: var(--dim); font-size: 0.94rem; padding-left: 22px; position: relative; margin-bottom: 6px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

/* ---------- Signup ---------- */

form.signup { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 8px; }
form.signup input {
  flex: 1 1 260px; min-width: 0; padding: 12px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--navy-2); color: var(--ink);
  font-size: 1rem;
}
form.signup input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.form-msg { min-height: 1.4em; font-size: 0.92rem; color: var(--teal); }
.form-msg.bad { color: var(--bad); }

/* ---------- Tables (leaderboard) ---------- */

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.tab {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); font: 600 0.9rem/1 var(--sans); cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }

table.board { width: 100%; border-collapse: collapse; }
table.board th, table.board td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.board th { color: var(--dimmer); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
table.board td.rank { width: 46px; color: var(--dimmer); font-variant-numeric: tabular-nums; }
table.board.ranked tbody tr:first-child td.rank { color: var(--top); font-weight: 700; }
table.board td.count { text-align: right; font-variant-numeric: tabular-nums; }
table.board .lvl {
  font-size: 0.74rem; color: var(--teal); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 8px; margin-left: 8px; white-space: nowrap;
}
.anon { font-style: italic; color: var(--dim); }
.empty { color: var(--dimmer); padding: 26px 0; }

/* ---------- Prose (legal, support) ---------- */

.prose { max-width: 74ch; }
.prose h2 { margin-top: 38px; }
.prose h3 { margin-top: 26px; }
.prose p, .prose li { color: var(--dim); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.updated { color: var(--dimmer); font-size: 0.9rem; }

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

footer.site { border-top: 1px solid var(--line); padding: 34px 0 46px; margin-top: 40px; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
footer.site a { color: var(--dim); font-size: 0.92rem; }
footer.site .fine { color: var(--dimmer); font-size: 0.84rem; width: 100%; margin: 0; }

/* Steps that carry a screenshot. A two-column grid so the number and the step's name sit on
   one line at the top, with the screenshot and the copy spanning both columns beneath. */
ol.steps.shots li {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 12px;
  align-items: center;    /* the number and the step's name share a baseline */
  align-content: start;   /* ...and the rows pack to the top, so all three cards line up */
}
ol.steps.shots li::before { grid-column: 1; grid-row: 1; margin-bottom: 0; }
ol.steps.shots h3 { grid-column: 2; grid-row: 1; margin: 0; }
ol.steps.shots .shot {
  grid-column: 1 / -1; grid-row: 2;
  margin: 16px 0 14px; background: var(--navy-2);
}
ol.steps.shots .shot img { width: 100%; }
ol.steps.shots p { grid-column: 1 / -1; grid-row: 3; }

/* A two-up where each shot carries its own caption. */
.two-up figure.shot-fig { margin: 0; }
.two-up figure.shot-fig figcaption { margin-top: 8px; font-size: 0.82rem; }

/* Cookie choice bar — sits above the page, never over the nav, and stacks on narrow screens. */
.consent {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  z-index: 60;
  width: calc(100% - 32px);
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px var(--shadow);
}
.consent p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--dim);
}
.consent p a { color: var(--teal); }
.consent-btns {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}
.consent .btn {
  padding: 9px 14px;
  font-size: 0.84rem;
  white-space: nowrap;
}
.consent .btn.ghost {
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
}
.consent .btn.ghost:hover { color: var(--ink); }
@media (max-width: 620px) {
  .consent { flex-direction: column; align-items: stretch; gap: 12px; }
  .consent-btns { justify-content: stretch; }
  .consent .btn { flex: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .consent { animation: consent-in 0.28s ease-out both; }
  @keyframes consent-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
  }
}

/* The screening/report note under a board's intro: same voice, quieter. */
.lede.small { font-size: 0.84rem; color: var(--dimmer); margin-top: -6px; }

/* ---------- Themes ----------
   The footer switcher sets data-theme on <body>. These blocks redeclare every token that
   differs between themes; a partial set would leave a page mixing two palettes. Declared on
   body rather than :root so they win over the defaults above by being nearer the content. */
body[data-theme="lavender"] {
  --navy: #ECEBF6; --navy-2: #E8DED7; --card: #E8DED7; --line: #C3B8B6;
  --ink: #141A2A; --dim: #383F51; --dimmer: #463C3A;
  --teal: #3C4F76; --teal-dark: #697EA8; --top: #3C4F76; --on-accent: #ECEBF6;
  --scrim: rgba(236, 235, 246, 0.86); --accent-hover: #24355A;
  --accent-wash: rgba(60, 79, 118, 0.10); --shadow: rgba(20, 26, 42, 0.14); --bad: #A33417;
}
body[data-theme="white"] {
  --navy: #FFFFFF; --navy-2: #E8DED7; --card: #E8DED7; --line: #C3B8B6;
  --ink: #141A2A; --dim: #383F51; --dimmer: #463C3A;
  --teal: #3C4F76; --teal-dark: #697EA8; --top: #3C4F76; --on-accent: #FFFFFF;
  --scrim: rgba(255, 255, 255, 0.86); --accent-hover: #24355A;
  --accent-wash: rgba(60, 79, 118, 0.10); --shadow: rgba(20, 26, 42, 0.14); --bad: #A33417;
}
/* The original cardglance.app palette. --top goes back to gold: against a navy ground it has
   all the separation from --dimmer that it lacked on light. */
body[data-theme="navy"] {
  --navy: #0B1F2B; --navy-2: #102C3B; --card: rgba(255, 255, 255, 0.06);
  --line: rgba(79, 195, 195, 0.22);
  --ink: #E8F1F4; --dim: #A9BCC6; --dimmer: #7B909B;
  --teal: #4FC3C3; --teal-dark: #2E8F8F; --top: #FFD166; --on-accent: #04222A;
  --scrim: rgba(11, 31, 43, 0.86); --accent-hover: #63D3D3;
  --accent-wash: rgba(79, 195, 195, 0.12); --shadow: rgba(0, 0, 0, 0.5); --bad: #FF9E80;
}

.theme-pick { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 18px; flex-wrap: wrap; }
.theme-pick span { color: var(--dimmer); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.theme-pick button {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); font: 0.86rem/1 var(--sans); cursor: pointer;
}
.theme-pick button:hover { border-color: var(--teal); }
.theme-pick button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
