/* ============================================================
   PsySlop landing page
   Type: Sora (display) + Hanken Grotesk (body) + Spline Sans Mono (figures)
   Palette: near-black ink, with the app's own substance-curve colours as accents.
   ============================================================ */

@font-face {
  font-family: "Sora";
  src: url("fonts/sora-var.woff2") format("woff2");
  font-weight: 600 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hankengrotesk-var.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("fonts/splinesansmono-var.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
}

:root {
  /* surfaces — true dark greys, faintly cool, layered by elevation */
  --ink:      #0b0a0f;
  --ink-2:    #100e16;
  --surface:  #16141e;
  --surface-2:#1d1a27;
  --border:   #2a2636;
  --border-2: #38334a;

  /* text */
  --fg:    #eceaf3;
  --fg-2:  #c4bfd4;
  --muted: #9891ac;   /* ≥ 5.8:1 on --ink */

  /* substance-curve accents (mirror the app) */
  --red:    #ff5d63;
  --gold:   #e0a83f;
  --violet: #a479ff;
  --green:  #55c483;
  --cyan:   #4fd0ef;

  /* semantic */
  --link:   var(--cyan);     /* calm / navigation */
  --action: var(--violet);   /* product actions */
  --risk-hi:  #ff6b70;
  --risk-mid: #f0b445;

  /* spacing scale (8px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  --maxw: 1080px;
  --radius: 16px;
  --shot-radius: 16px;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* faint film grain over everything */
  position: relative;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer, .disclosure { position: relative; z-index: 1; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s5); }

/* ---- type ---- */
h1, h2, h3, h4 {
  font-family: "Sora", system-ui, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: clamp(1.65rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; }
h4 { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.01em; }
p  { text-wrap: pretty; }
a  { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.mono {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
code {
  font-family: "Spline Sans Mono", ui-monospace, monospace;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.1em 0.4em; font-size: 0.88em; color: var(--fg);
}

/* ---- disclosure bar (orange, exact copy) ---- */
.disclosure {
  display: grid; place-items: center; text-align: center; min-height: 152px;
  font-size: 0.95rem; line-height: 1.5; font-weight: 500; letter-spacing: 0.01em;
  color: #ffa25a;
  background: rgba(255, 138, 61, 0.10);
  border-bottom: 1px solid rgba(255, 138, 61, 0.30);
  padding: var(--s5) var(--s4);
}

/* ---- screenshot presentation ---- *
   Portrait app screens shown at natural aspect. No fixed heights, no cover,
   nothing clips. This is the whole cut-off fix: the image sets its own height. */
.shot { display: block; margin: 0; }
.shot img {
  display: block; width: 100%; height: auto;
  border-radius: var(--shot-radius);
  border: 1px solid var(--border);
  background: #f4f3f8;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
/* landscape card (the live notification) sits on its own, no phone chrome */
.card-shot img {
  width: 100%; height: auto; display: block;
  border-radius: 14px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.65);
}

/* ============================================================
   HERO
   ============================================================ */
.hero { overflow: clip; }
.hero-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: clip;
}
/* violet glow anchored where the logo sits (top-left of copy) */
.hero-glow::before {
  content: ""; position: absolute; left: -6%; top: -30%;
  width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle at center, rgba(164, 121, 255, 0.28), transparent 62%);
  filter: blur(6px);
}
/* the overlapping effect-curve motif, faint, product-derived */
.hero-curves {
  position: absolute; right: -4%; top: 8%; width: min(58vw, 640px);
  z-index: 0; opacity: 0.5; pointer-events: none;
}
.hero-curves path { fill: none; stroke-width: 2; }

.hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: var(--s8); align-items: center;
  padding: var(--s8) var(--s5);
}

.brand { display: inline-flex; align-items: center; gap: var(--s3); margin-bottom: var(--s6); }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 20px rgba(164,121,255,0.4); }
.brand span { font-family: "Sora"; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 3.9rem);
  font-weight: 800;
  color: #f6f3ff;
}
.hero h1 .accent { color: var(--risk-hi); }
.hero .lede {
  color: var(--fg-2); font-size: 1.18rem; margin: var(--s5) 0 0; max-width: 30ch;
}
.hero .meta {
  margin: var(--s5) 0 0; color: var(--muted); font-size: 0.9rem;
  display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap;
}
.hero .meta .mono { color: var(--fg-2); }

.cta { margin-top: var(--s7); }
.btn {
  display: inline-flex; align-items: center; gap: var(--s3);
  font-family: "Sora"; font-weight: 650; font-size: 1.02rem;
  padding: var(--s4) var(--s6); border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn.primary {
  background: var(--action); color: #14101f;
  box-shadow: 0 12px 30px -8px rgba(164, 121, 255, 0.55);
}
.btn.primary:hover {
  text-decoration: none; transform: translateY(-2px);
  background: #b58cff; box-shadow: 0 18px 40px -10px rgba(164, 121, 255, 0.6);
}
.btn.primary svg { transition: transform .2s var(--ease); }
.btn.primary:hover svg { transform: translateY(2px); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* hero figure: phone + real warning card overlapping */
.hero-figure { position: relative; justify-self: center; width: min(300px, 78vw); }
.hero-figure .shot img { border-radius: 22px; }
.warn-card {
  position: absolute; left: -14%; bottom: 12%;
  width: min(280px, 82%);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 14px; padding: var(--s4) var(--s5);
  box-shadow: 0 26px 60px -18px rgba(0, 0, 0, 0.8);
}
.warn-card .wc-head {
  display: flex; align-items: center; gap: var(--s2);
  color: var(--risk-hi); font-weight: 650; font-size: 0.95rem;
}
.warn-card .wc-fig { font-family: "Spline Sans Mono"; font-variant-numeric: tabular-nums; }
.warn-card .wc-sub { color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--border); }
.sec-head { max-width: 62ch; margin-bottom: var(--s7); }
.sec-head h2 { color: #f4f1fb; }
.sec-head p { color: var(--muted); margin: var(--s3) 0 0; font-size: 1.05rem; }
.kicker {
  font-family: "Spline Sans Mono"; font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--violet); display: inline-block; margin-bottom: var(--s3);
}

/* hero feature (the one big one) */
.feature-lead {
  display: grid; grid-template-columns: 0.92fr 1.08fr; gap: var(--s8); align-items: center;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--border); border-radius: 24px;
  padding: var(--s7);
}
.feature-lead .copy h3 { font-size: 1.7rem; color: #f4f1fb; }
.feature-lead .copy p { color: var(--fg-2); margin: var(--s4) 0 0; }
.feature-lead .shot { width: min(280px, 70vw); justify-self: center; }

/* example risk chips (real HTML, crisp) */
.egs { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; gap: var(--s2); }
.egs li {
  display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap;
  font-size: 0.92rem; padding: var(--s2) var(--s3); border-radius: 9px;
  border: 1px solid var(--border);
}
.egs .lbl { font-weight: 600; }
.egs .fig { font-family: "Spline Sans Mono"; font-variant-numeric: tabular-nums; color: var(--fg-2); font-size: 0.85rem; }
.egs .hi  { background: rgba(255, 93, 99, 0.08);  border-color: rgba(255, 93, 99, 0.28); }
.egs .hi .lbl  { color: var(--risk-hi); }
.egs .mid { background: rgba(240, 180, 69, 0.07); border-color: rgba(240, 180, 69, 0.26); }
.egs .mid .lbl { color: var(--risk-mid); }

/* alternating spotlight rows */
.spot { display: grid; grid-template-columns: 260px 1fr; gap: var(--s7); align-items: center; margin-top: var(--s7); }
.spot.flip { grid-template-columns: 1fr 260px; }
.spot.flip .shot { order: 2; }
.spot .shot { width: 260px; }
.spot .copy { max-width: 54ch; }
.spot .copy h3 { color: #f4f1fb; }
.spot .copy p { color: var(--fg-2); margin: var(--s3) 0 0; }

/* the varied grid ("and the rest") */
.rest-title { margin: var(--s8) 0 var(--s5); font-family: "Spline Sans Mono"; font-size: 0.82rem; letter-spacing: 0.02em; color: var(--muted); }
/* uniform tiles: every tile is the same shape. A fixed media box holds the
   screenshot (shown whole via contain, never cropped) or a glyph for the
   text-only features, so image and text tiles read as one consistent set. */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
.tile {
  margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3);
}
.tile .media {
  aspect-ratio: 4 / 3; border-radius: 12px; background: var(--ink-2);
  border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden;
}
.tile .media img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 6px; }
.tile .media .glyph { font-size: 2.6rem; color: var(--cyan); line-height: 1; }
.tile h4 { color: var(--fg); margin-top: var(--s1); }
.tile p { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* ============================================================
   BASE APP CAROUSEL
   ============================================================ */
#base { background: var(--surface); border-top-color: var(--border-2); }
.carousel { position: relative; margin-top: var(--s6); }
.c-track {
  display: flex; gap: var(--s6); overflow-x: auto; scroll-snap-type: x mandatory;
  padding: var(--s2) var(--s1) var(--s5); scrollbar-width: none;
}
.c-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 248px; scroll-snap-align: start; text-align: center; }
.slide .shot { width: 248px; margin: 0 auto; }
.slide figcaption { color: var(--muted); font-size: 0.9rem; margin-top: var(--s4); }
.c-arrow {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--surface-2); color: var(--fg); border: 1px solid var(--border);
  font-family: "Sora"; font-size: 1.4rem; line-height: 1; display: grid; place-items: center;
  transition: border-color .2s, background .2s;
}
.c-arrow:hover { border-color: var(--violet); background: var(--surface); }
.c-arrow:disabled { opacity: 0.32; cursor: default; }
.c-arrow:disabled:hover { border-color: var(--border); background: var(--surface-2); }
.c-arrow.prev { left: -8px; } .c-arrow.next { right: -8px; }
.c-dots { display: flex; gap: var(--s2); justify-content: center; margin-top: var(--s3); }
.c-dot { width: 8px; height: 8px; border-radius: 50%; border: none; cursor: pointer; padding: 0; background: var(--border-2); transition: background .2s, transform .2s; }
.c-dot.on { background: var(--violet); transform: scale(1.3); }

/* ============================================================
   INSTALL + PRIVACY + FOOTER
   ============================================================ */
.install { display: flex; gap: var(--s8); align-items: center; flex-wrap: wrap; }
.qr { border-radius: 14px; background: #fff; padding: 12px; flex: 0 0 auto; width: 200px; height: 200px; }
.steps { flex: 1 1 320px; }
.steps ol { padding-left: 1.2em; margin: var(--s4) 0 0; }
.steps li { margin: var(--s3) 0; color: var(--fg-2); }
.steps .note { color: var(--muted); font-size: 0.9rem; margin-top: var(--s5); }
.url { color: var(--cyan); }

#privacy p { max-width: 62ch; color: var(--fg-2); font-size: 1.08rem; }

footer { border-top: 1px solid var(--border); padding: var(--s7) 0 var(--s8); text-align: center; color: var(--muted); }
footer p { margin: var(--s2) 0; }
footer .fine { font-size: 0.82rem; color: #857e97; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--s7); text-align: center; padding-top: var(--s7); }
  .brand { margin-inline: auto; }
  .hero .lede, .hero .meta { margin-inline: auto; }
  .hero .meta { justify-content: center; }
  .hero-curves { display: none; }
  .hero-figure { margin-top: var(--s4); }
  /* the phone shot already shows the warnings full-size on mobile; the floating
     card is desktop-only emphasis, so drop it here rather than let it clip. */
  .warn-card { display: none; }
  .feature-lead { grid-template-columns: 1fr; gap: var(--s6); padding: var(--s6); text-align: center; }
  .feature-lead .egs { text-align: left; }
  .spot, .spot.flip { grid-template-columns: 1fr; gap: var(--s5); justify-items: center; text-align: center; }
  .spot.flip .shot { order: 0; }
  .spot .copy { max-width: 46ch; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .tile.tall { grid-row: auto; }
  .c-arrow { display: none; }
  .install { gap: var(--s6); }
}

/* ============================================================
   MOTION — off by default, enabled only when the user allows it.
   Content is always visible; animation only enhances.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero-figure { animation: settle 0.7s var(--ease) both; }
  .warn-card   { animation: rise 0.7s var(--ease) 0.35s both; }
  @keyframes settle { from { opacity: 0; transform: translateY(14px) rotate(-2deg); } to { opacity: 1; transform: none; } }
  @keyframes rise   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
  @keyframes reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

  .hero-curves path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s var(--ease) 0.2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}
