/* WhyRep landing page
   Palette and type are locked to brand/BRANDKIT.md. Never add colors. */

:root {
  --graphite: #1C1E22;
  --bone: #F5F3EF;
  --signal: #2E6FF2;
  --amber: #E8A33D;
  --slate: #6B7280;

  --bone-deep: #ECE9E3;      /* bone, one step darker, for card fills (derived, not new hue) */
  --hairline: rgba(107, 114, 128, 0.25); /* slate at low opacity for dividers */

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --max-w: 1080px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  overflow-x: clip;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--graphite);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

::selection { background: var(--signal); color: #fff; }

/* ---------- Spot (mascot) ---------- */
.spot { display: block; height: auto; user-select: none; pointer-events: none; }

/* ---------- lens mark (THE logo) ----------
   The real SVG asset, not a CSS approximation: gradient hard stops alias at
   small sizes, the vector stays crisp at any size and DPR. Same file as
   brand/logos/lens-mark.svg — keep the two copies identical. */
.lens {
  display: inline-block; border-radius: 50%;
  background: url("assets/lens-mark.svg") center / contain no-repeat;
}
.lens-mark { width: 28px; height: 28px; }
.lens-live {
  width: 42px; height: 42px;
  box-shadow: 0 0 18px rgba(46, 111, 242, 0.35);
  animation: lens-breathe 3.2s ease-in-out infinite;
}
@keyframes lens-breathe {
  0%, 100% { box-shadow: 0 0 14px rgba(46, 111, 242, 0.3); }
  50%      { box-shadow: 0 0 26px rgba(46, 111, 242, 0.55); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 14px 20px;
  background: color-mix(in srgb, var(--bone) 88%, transparent);
  backdrop-filter: blur(8px);
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--graphite); }
.nav-wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 13px 22px; border-radius: 10px;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease);
  touch-action: manipulation;
  text-decoration: none; text-align: center;
}
.btn-primary { background: var(--signal); color: #fff; }
.btn-primary:hover { background: #2159C9; box-shadow: 0 6px 18px rgba(46, 111, 242, 0.28); transform: translateY(-1px); }
.btn-light { background: var(--bone); color: var(--graphite); }
.btn-light:hover { background: #fff; transform: translateY(-1px); }
.btn-small { padding: 9px 16px; font-size: 0.9rem; }
.btn:active { transform: translateY(0) scale(0.98); }

.nav.is-scrolled { border-bottom: 1px solid var(--hairline); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr; gap: 48px;
  max-width: var(--max-w); margin: 0 auto; padding: 56px 20px 84px;
}
@media (min-width: 880px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; align-items: center; padding-top: 72px; }
}

.eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.6rem); font-weight: 700; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero-sub { font-size: 1.13rem; color: var(--slate); max-width: 34em; margin-bottom: 32px; }

/* ---------- waitlist form ---------- */
.waitlist-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 480px; }
.waitlist-form input[type="email"] {
  flex: 1 1 220px; min-height: 48px;
  font: inherit; color: var(--graphite);
  padding: 12px 16px; border-radius: 10px;
  border: 1.5px solid var(--hairline); background: #fff;
}
.waitlist-form input[type="email"]::placeholder { color: var(--slate); }
.waitlist-form input[type="email"]:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 3px rgba(46, 111, 242, 0.2); }
.form-note { flex-basis: 100%; font-size: 0.85rem; color: var(--slate); }
.form-note.is-success { color: var(--graphite); font-weight: 600; }
.form-note.is-error { color: #B4232A; font-weight: 600; }
/* Entrance for submit feedback; script.js resets the class + forces reflow so it replays. */
.form-note.is-success, .form-note.is-error { animation: note-in 380ms var(--ease) both; }
@keyframes note-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- hero stage: bloom + Spot presenting the decision card ---------- */
.hero-stage { position: relative; margin-top: clamp(84px, 10vw, 110px); }
@media (min-width: 880px) { .hero-stage { margin-top: 0; } }
.hero-bloom {
  position: absolute; inset: -12% 0;
  background: radial-gradient(ellipse at 62% 40%, rgba(46, 111, 242, 0.14) 0%, rgba(46, 111, 242, 0.05) 45%, transparent 70%);
  pointer-events: none;
}
/* Spot peeks over the top edge of the decision card (z-index below the card) */
.spot-hero {
  position: absolute; z-index: 0;
  width: clamp(140px, 15vw, 180px);
  top: calc(clamp(140px, 15vw, 180px) * -0.58);
  left: 26px;
}
@media (max-width: 879px) {
  .spot-hero { width: 130px; top: -76px; left: 18px; }
}

/* ---------- decision card (signature) ---------- */
.decision-card {
  position: relative; z-index: 1;
  background: var(--graphite); color: var(--bone);
  border-radius: var(--radius); padding: 26px 26px 18px;
  box-shadow: 0 24px 60px rgba(28, 30, 34, 0.22);
}
.decision-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.decision-exercise { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; }
.decision-verdict { font-size: 0.85rem; color: #A7ADB8; display: flex; align-items: center; gap: 7px; }
.verdict-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; }
.decision-call { font-size: 1.05rem; line-height: 1.5; margin-bottom: 18px; }

.trace-toggle {
  background: none; border: 1.5px solid rgba(245, 243, 239, 0.3); color: var(--bone);
  font: inherit; font-weight: 600; font-size: 0.9rem;
  padding: 10px 16px; border-radius: 8px; cursor: pointer; min-height: 44px;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
  touch-action: manipulation;
}
.trace-toggle::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 320ms var(--ease);
}
.trace-toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
.trace-toggle:hover { border-color: var(--signal); background: rgba(46, 111, 242, 0.12); }
.trace-toggle[aria-expanded="true"] { border-color: var(--signal); color: #fff; }
/* Gentle pulse until the first open — this button is the whole pitch */
.trace-toggle.is-nudging { animation: why-nudge 2.8s ease-in-out infinite; }
@keyframes why-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 111, 242, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(46, 111, 242, 0.16); border-color: var(--signal); }
}

/* Collapsed by default; the 0fr -> 1fr grid row animates the height open */
.trace-wrap {
  display: grid; grid-template-rows: 0fr;
  border-top: 1px solid transparent;
  transition: grid-template-rows 480ms var(--ease), margin-top 480ms var(--ease),
              border-top-color 480ms var(--ease);
}
.trace-wrap.is-open { grid-template-rows: 1fr; margin-top: 16px; border-top-color: rgba(245, 243, 239, 0.14); }
.trace { list-style: none; overflow: hidden; min-height: 0; }
.trace-step {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 11px 2px; border-bottom: 1px solid rgba(245, 243, 239, 0.09);
  font-size: 0.92rem;
  opacity: 0; transform: translateY(6px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.trace-wrap.is-open .trace-step { opacity: 1; transform: none; }
.trace-wrap.is-open .trace-step:nth-child(2) { transition-delay: 100ms; }
.trace-wrap.is-open .trace-step:nth-child(3) { transition-delay: 200ms; }
.trace-wrap.is-open .trace-step:nth-child(4) { transition-delay: 300ms; }
.trace-wrap.is-open .trace-step:nth-child(5) { transition-delay: 400ms; }
.trace-cite {
  flex-shrink: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: #9FB8EE; border: 1px solid rgba(46, 111, 242, 0.5); border-radius: 999px; padding: 3px 9px;
}
.trace-outcome .trace-data { font-weight: 600; }
.trace-cite-outcome { color: var(--amber); border-color: rgba(232, 163, 61, 0.55); }
.decision-disclaimer { margin-top: 14px; font-size: 0.75rem; color: #8A909B; }

/* ---------- shared section rhythm ---------- */
.problem, .product, .how, .trust { max-width: var(--max-w); margin: 0 auto; padding: 84px 20px; }
.problem h2, .product h2, .how h2, .trust h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 40px; max-width: 22em; }
.problem .eyebrow, .product .eyebrow, .how .eyebrow, .trust .eyebrow { margin-bottom: 12px; }
.trust-head h2 { margin-bottom: 40px; }
.cta { margin-top: 40px; }
.problem { border-top: 1px solid var(--hairline); }

/* ---------- problem + product (the two main features) ---------- */
.product { border-top: 1px solid var(--hairline); }
.problem-grid, .product-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .problem-grid, .product-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .product-grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
.problem-card, .product-card {
  background: var(--bone-deep); border-radius: var(--radius); padding: 28px;
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.problem-card:hover, .product-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(28, 30, 34, 0.08); }
.problem-card h3, .product-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.problem-card p, .product-card p { color: var(--slate); }
.product-card { border-top: 3px solid var(--signal); border-radius: 0 0 var(--radius) var(--radius); background: var(--bone); border-left: 1.5px solid var(--hairline); border-right: 1.5px solid var(--hairline); border-bottom: 1.5px solid var(--hairline); }
.problem-thesis { margin-top: 40px; font-family: var(--font-display); font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 600; max-width: 26em; }
.problem-thesis strong { color: var(--signal); }

/* ---------- how it works (a real sequence, numbers carry meaning) ---------- */
.how { border-top: 1px solid var(--hairline); }
.how-steps { list-style: none; display: grid; gap: 20px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 820px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
.how-step {
  position: relative; padding: 28px 24px 24px; border: 1.5px solid var(--hairline); border-radius: var(--radius);
  background: var(--bone);
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.how-step:hover { transform: translateY(-3px); border-color: rgba(46, 111, 242, 0.45); box-shadow: 0 14px 30px rgba(28, 30, 34, 0.07); }
.how-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--graphite); color: var(--bone);
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  margin-bottom: 16px;
}
.how-step h3 { font-size: 1.1rem; margin-bottom: 10px; }
.how-step p { color: var(--slate); font-size: 0.97rem; }

/* ---------- trust ---------- */
.trust { border-top: 1px solid var(--hairline); }
.trust-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.spot-trust { width: clamp(96px, 12vw, 150px); margin-bottom: 12px; }
.trust-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item h3 { font-size: 1.08rem; margin-bottom: 10px; padding-top: 14px; border-top: 3px solid var(--signal); display: inline-block; }
.trust-item p { color: var(--slate); font-size: 0.97rem; }

/* ---------- final CTA ---------- */
.cta { padding: 24px 20px 96px; max-width: var(--max-w); margin: 0 auto; }
.cta { overflow: visible; }
.cta-inner {
  position: relative;
  background: var(--graphite); color: var(--bone);
  border-radius: calc(var(--radius) + 6px); padding: clamp(36px, 6vw, 64px);
}
.spot-cta {
  position: absolute;
  width: clamp(104px, 13vw, 170px);
  right: clamp(16px, 5vw, 56px); top: calc(clamp(104px, 13vw, 170px) * -0.52);
  filter: drop-shadow(0 12px 20px rgba(28, 30, 34, 0.35));
}
.cta-inner h2, .cta-inner .cta-sub, .cta-inner .waitlist-form { position: relative; }
.cta-inner h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); max-width: 18em; margin-bottom: 14px; }
.cta-sub { color: #A7ADB8; margin-bottom: 28px; max-width: 36em; }
.cta-inner .waitlist-form input[type="email"] { border-color: transparent; }
.cta-inner .form-note { color: #8A909B; }
.cta-inner .form-note.is-success { color: var(--bone); }
.cta-inner .form-note.is-error { color: var(--amber); }

/* ---------- footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; padding: 26px 20px 40px;
  border-top: 1px solid var(--hairline);
  font-size: 0.86rem; color: var(--slate);
}
.footer-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; color: var(--graphite); }
.footer-brand .lens-mark { width: 21px; height: 21px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .trace-step { opacity: 1; transform: none; transition: none; }
  .btn, .trace-toggle, .trace-toggle::after, .trace-wrap, .problem-card, .how-step { transition: none; }
  .lens-live, .trace-toggle.is-nudging, .form-note.is-success, .form-note.is-error { animation: none; }
}
