/* ============================================================
   PeekRank landing — brutalist/editorial redesign (vanilla)
   Palette: ink black + signal yellow + greige paper + red accent
   Fonts: Archivo (display), Public Sans (body), Martian Mono (labels/nums)
   ============================================================ */
:root {
  --ink: #14140f;
  --paper: #e7e8e2;
  --paper-2: #f1f1ec;
  --paper-3: #fafaf6;
  --yellow: #f5c518;
  --yellow-deep: #e8b900;
  --red: #ee3c21;
  --muted: #5a5a52;
  --line: #14140f;
  --hair: rgba(20, 20, 15, 0.14);
  --card-black: #141410;
  --shadow: 6px 6px 0 var(--ink);
  --mono: "Martian Mono", ui-monospace, monospace;
  --sans: "Public Sans", system-ui, sans-serif;
  --disp: "Archivo", system-ui, sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 17px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- shared type ---------- */
.mono { font-family: var(--mono); }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--yellow);
  padding: 5px 9px;
  font-weight: 600;
}
h1, h2, h3 { font-family: var(--disp); font-weight: 900; letter-spacing: -0.02em; line-height: 0.98; margin: 0; }
.section-title { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.0; letter-spacing: -0.02em; max-width: 18ch; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: #34342e; max-width: 52ch; }
.fine { font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }
.fine--accent { font-size: 14.5px; font-weight: 700; color: var(--red); }
.red { color: var(--red); }
.u-red { color: var(--red); text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--disp); font-weight: 800; font-size: 15px;
  padding: 15px 22px; border: 2px solid var(--ink); cursor: pointer;
  background: var(--paper); color: var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn--primary { background: var(--ink); color: #fff; box-shadow: 0 6px 0 var(--yellow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--yellow); }
.btn--ghost:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); }
.btn--block { width: 100%; justify-content: center; }
.btn--yellow { background: var(--yellow); border-color: var(--ink); color: var(--ink); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 700; letter-spacing: 0.05em; }
.brand__mark { background: var(--yellow); color: var(--ink); width: 26px; height: 26px; display: grid; place-items: center; font-family: var(--disp); font-weight: 900; }
.brand__dim { color: var(--yellow); }
.nav__links { display: flex; gap: 26px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: #cfcfc7; }
.nav__links a:hover { color: var(--yellow); }
.nav__cta { font-family: var(--mono); font-size: 13px; font-weight: 700; background: var(--yellow); color: var(--ink); padding: 8px 12px; letter-spacing: 0.04em; }
.nav__cta span { color: #6b5a00; font-weight: 500; }
@media (max-width: 820px) { .nav__links { display: none; } }

/* ---------- section header bar ---------- */
.bar {
  display: flex; align-items: center; gap: 0; background: var(--ink); color: #fff;
  margin: 0 0 34px;
}
.bar__num { background: var(--yellow); color: var(--ink); font-family: var(--disp); font-weight: 900; padding: 12px 16px; font-size: 15px; }
.bar__title { font-family: var(--disp); font-weight: 800; letter-spacing: 0.02em; padding: 0 16px; font-size: 15px; text-transform: uppercase; }
.bar__meta { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--yellow); letter-spacing: 0.08em; padding: 0 16px; }
@media (max-width: 680px){ .bar__meta { display: none; } }

section { padding: 72px 0; border-top: 2px solid var(--ink); }
section:nth-of-type(even) { background: var(--paper-2); }

/* ============================================================
   HERO
   ============================================================ */
.hero { border-top: none; padding-top: 56px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
.hero__eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(44px, 7vw, 92px); line-height: 0.9; margin-bottom: 26px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 14px; }

/* price tag card */
.pricetag {
  background: var(--yellow); border: 2px solid var(--ink); box-shadow: var(--shadow);
  padding: 26px 28px 30px; transform: rotate(2.4deg); position: relative; margin-top: 8px;
}
.pricetag::before { content: ""; position: absolute; top: 14px; left: 50%; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; transform: translateX(-50%); background: var(--paper); }
.pricetag__label { text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; margin: 18px 0 6px; }
.pricetag__big { text-align: center; font-family: var(--disp); font-weight: 900; font-size: clamp(72px, 10vw, 118px); line-height: 0.85; }
.pricetag__big sup { font-size: 0.4em; vertical-align: 0.9em; }
.pricetag__sub { text-align: center; font-family: var(--disp); font-weight: 800; letter-spacing: 0.02em; margin-top: 4px; }
.pricetag hr { border: none; border-top: 2px solid var(--ink); margin: 18px 0; }
.pt-row { display: flex; align-items: baseline; font-family: var(--mono); font-size: 13px; margin: 8px 0; }
.pt-row .dots { flex: 1; border-bottom: 2px dotted var(--ink); margin: 0 8px; transform: translateY(-3px); }
.pt-row b { font-weight: 700; }
.pricetag__was { text-align: center; font-family: var(--mono); font-size: 12.5px; margin-top: 16px; }
.strike { text-decoration: line-through; color: var(--red); }

/* subscription meter */
.meter { border: 2px solid var(--ink); background: var(--paper-3); box-shadow: var(--shadow); margin-top: 30px; max-width: 620px; }
.meter__head { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; padding: 8px 14px; }
.meter__run { color: var(--red); display: flex; align-items: center; gap: 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.meter__body { display: grid; grid-template-columns: 1fr 1fr; }
.meter__cell { padding: 16px 16px 18px; }
.meter__cell + .meter__cell { border-left: 2px solid var(--ink); }
.meter__cap { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; min-height: 2.4em; }
.meter__val { font-family: var(--mono); font-weight: 700; font-size: 26px; margin-top: 8px; }
.meter__val.is-red { color: var(--red); }

@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } .pricetag { max-width: 420px; } }

/* ============================================================
   01 · THE MATH
   ============================================================ */
.tiers { border: 2px solid var(--ink); background: var(--paper-3); margin: 28px 0; }
.tier { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 16px 18px; border-bottom: 2px solid var(--hair); align-items: center; }
.tier:last-child { border-bottom: none; }
.tier--us { background: var(--yellow); }
.tier__name { font-family: var(--disp); font-weight: 800; }
.tier__desc { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.tier__sum { font-family: var(--mono); font-weight: 700; font-size: 20px; text-align: right; white-space: nowrap; }
.youkeep { background: var(--ink); color: #fff; padding: 26px; display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; margin: 24px 0; }
.youkeep__label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--yellow); }
.youkeep__num { font-family: var(--disp); font-weight: 900; font-size: clamp(48px, 8vw, 88px); line-height: 0.85; color: var(--yellow); }
.youkeep__note { font-family: var(--sans); color: #d7d7cf; max-width: 40ch; font-size: 15px; }
.statrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.stat { border: 2px solid var(--ink); padding: 16px; background: var(--paper-3); }
.stat__k { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat__v { font-family: var(--disp); font-weight: 900; font-size: 40px; margin-top: 6px; }
@media (max-width: 720px){ .statrow { grid-template-columns: 1fr; } }

/* ============================================================
   02 · MODULES
   ============================================================ */
.bigstats { display: flex; gap: 30px; flex-wrap: wrap; margin: 22px 0 30px; }
.bigstat { font-family: var(--disp); }
.bigstat b { display: block; font-weight: 900; font-size: 54px; line-height: 1; }
.bigstat span { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.group-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; display: flex; gap: 10px; }
.group-label b { color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { border: 2px solid var(--ink); background: var(--paper-3); padding: 20px; transition: transform .1s, box-shadow .1s; }
.card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.card h3 { font-size: 20px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: #3c3c36; margin: 0; }
@media (max-width: 720px){ .cards { grid-template-columns: 1fr; } }

/* ============================================================
   03 · AI SEARCH
   ============================================================ */
.models { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 26px; }
.model-chip { font-family: var(--mono); font-size: 13px; border: 2px solid var(--ink); padding: 8px 14px; background: var(--paper-3); font-weight: 500; }
.panel { border: 2px solid var(--ink); background: var(--paper-3); margin: 18px 0; }
.panel__head { background: var(--ink); color: #fff; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; padding: 8px 14px; display: flex; justify-content: space-between; }
.panel__head .yl { color: var(--yellow); }
.sov { padding: 18px; display: grid; gap: 12px; }
.sov__row { display: grid; grid-template-columns: 160px 1fr auto; align-items: center; gap: 12px; font-family: var(--mono); font-size: 13px; }
.sov__bar { height: 14px; background: var(--yellow); border: 2px solid var(--ink); }
.sov__row--muted .sov__bar { background: var(--paper); }
table.prompts { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12.5px; }
table.prompts th, table.prompts td { border: 1px solid var(--hair); padding: 9px 10px; text-align: center; }
table.prompts th { background: var(--ink); color: #fff; font-weight: 500; letter-spacing: 0.04em; }
table.prompts td:first-child, table.prompts th:first-child { text-align: left; }
.prompts-wrap { overflow-x: auto; }
.win { color: var(--red); font-weight: 700; }

/* ============================================================
   04 · RECEIPT
   ============================================================ */
.receipt-lead { display: flex; gap: 26px; flex-wrap: wrap; margin: 22px 0 28px; }
.receipt-lead .stat { flex: 1; min-width: 160px; }
.receipt {
  background: var(--paper-3); border: 2px solid var(--ink); box-shadow: var(--shadow);
  max-width: 560px; margin: 0 auto; font-family: var(--mono); font-size: 13px;
}
.receipt__head { text-align: center; padding: 20px 20px 14px; border-bottom: 2px dashed var(--ink); }
.receipt__head b { font-family: var(--disp); font-weight: 900; letter-spacing: 0.02em; }
.receipt__body { padding: 16px 20px; }
.r-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; align-items: baseline; }
.r-line small { color: var(--muted); display: block; font-size: 11px; }
.r-line.total { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 12px; font-family: var(--disp); font-weight: 900; font-size: 18px; }
.r-sec { margin-top: 14px; padding-top: 10px; border-top: 2px dashed var(--ink); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.r-foot { text-align: center; padding: 16px; border-top: 2px dashed var(--ink); letter-spacing: 0.1em; }

/* ============================================================
   05 · FAQ
   ============================================================ */
.faq { display: grid; gap: 0; border: 2px solid var(--ink); background: var(--paper-3); }
.faq details { border-bottom: 2px solid var(--hair); }
.faq details:last-child { border-bottom: none; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-family: var(--disp); font-weight: 800; font-size: 18px; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq p { padding: 0 20px 20px; margin: 0; color: #3c3c36; font-size: 15px; max-width: 70ch; }

/* ============================================================
   WAITLIST / FINAL CTA
   ============================================================ */
.final { background: var(--ink); color: #fff; }
.final .section-title { color: #fff; max-width: 20ch; }
.final__grid { display: grid; grid-template-columns: 1fr 0.9fr; gap: 48px; align-items: center; }
.final .lead { color: #d7d7cf; }
.wcard { background: var(--paper-3); color: var(--ink); border: 2px solid var(--yellow); box-shadow: 0 8px 0 var(--yellow-deep); padding: 24px; }
.wcard__head { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); display: flex; justify-content: space-between; border-bottom: 2px dashed var(--ink); padding-bottom: 12px; margin-bottom: 16px; }
.field { margin-bottom: 12px; }
.field input[type=email] {
  width: 100%; font-family: var(--mono); font-size: 15px; padding: 14px 14px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
}
.field input[type=email]:focus { outline: none; box-shadow: 0 0 0 3px var(--yellow); }
/* custom segment select */
.cselect { position: relative; }
.cselect__btn { width: 100%; text-align: left; font-family: var(--mono); font-size: 14px; padding: 13px 14px; border: 2px solid var(--ink); background: #fff; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.cselect__list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 2px solid var(--ink); z-index: 5; display: none; }
.cselect.open .cselect__list { display: block; }
.cselect__opt { font-family: var(--mono); font-size: 14px; padding: 11px 14px; cursor: pointer; }
.cselect__opt:hover { background: var(--yellow); }
.cselect__chev { width: 16px; }
.cf-turnstile { margin: 12px 0; }
.msg { font-family: var(--mono); font-size: 13px; margin-top: 12px; min-height: 1.2em; }
.msg.ok { color: #1a7f37; }
.msg.err { color: var(--red); }
.wfine { color: #8a8a82; margin-top: 12px; }
.final__cta2 { margin-top: 18px; display: flex; gap: 14px; flex-wrap: wrap; }
.final .btn--ghost { background: transparent; color: #fff; border-color: #fff; }
@media (max-width: 900px){ .final__grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { background: #0d0d0a; color: #9a9a90; padding: 40px 0; font-family: var(--mono); font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer a:hover { color: var(--yellow); }
.footer__links { display: flex; gap: 20px; }

/* ---------- hero side (pricetag + meter stacked) ---------- */
.hero__side { display: flex; flex-direction: column; }
.hero__side .meter { max-width: none; margin-top: 26px; }

/* ---------- nav cta as button ---------- */
button.nav__cta { border: none; cursor: pointer; font-family: var(--mono); }

/* ---------- final CTA band (centered) ---------- */
.final__center { max-width: 760px; margin: 0 auto; text-align: center; }
.final__center .section-title { margin: 0 auto 18px; max-width: 16ch; }
.final__center .lead { margin: 0 auto 24px; }
.final__center .final__cta2 { justify-content: center; }

/* ---------- registration modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(12, 12, 8, 0.72); backdrop-filter: blur(3px); }
.modal__card {
  position: relative; z-index: 1; width: 100%; max-width: 440px;
  background: var(--paper-3); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--yellow-deep);
  padding: 24px; animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__x { position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink); font-family: var(--sans); }
.modal__x:hover { color: var(--red); }
html.modal-open { overflow: hidden; }

/* ---------- reveal (progressive enhancement: only hide when JS is present) ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js [data-reveal] { opacity: 1; transform: none; transition: none; } .dot { animation: none; } }
