/* ============================================================
   StickyBunch web — same tokens as the app (src/theme/tw-colors.js)
   Bubblegum Candy + Chunky 3D: navy surface, candy blue + grape,
   die-cut stroke headings, extruded slab buttons.
   ============================================================ */

:root {
  --primary: #34beec;
  --primary-light: #a8e6ff;
  --primary-dark: #0697c7;
  --secondary: #9654f3;
  --secondary-light: #e1cfff;
  --surface: #000000; /* matches the app's updated black surface */
  --surface-low: #142435;
  --surface-container: #1e3145;
  --surface-high: #273c52;
  --surface-highest: #314861;
  --base: #0b1119; /* extruded slab — just lighter than black so depth reads */
  --text: #eaf6ff;
  --text-2: #9dbbcf;
  --text-3: #5e7b90;
  --success: #2fb888;
  --error: #e23d72;
  --hairline: rgba(255, 255, 255, 0.08);

  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-logo: "OrangeGummy", "Baloo 2", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;

  --radius: 20px;
  --radius-lg: 28px;
  --depth: 6px; /* 3D extrude thickness */
  --measure: 46rem; /* legal text column */
}

@font-face {
  font-family: "OrangeGummy";
  src: url("assets/fonts/OrangeGummy.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  /* block, not swap: a fallback face wearing the logo's 10px stroke + glow
     looks broken during load — invisible-for-a-beat reads as intentional. */
  font-display: block;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text-2);
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(150, 84, 243, 0.16), transparent 60%),
    radial-gradient(50rem 35rem at -10% 30%, rgba(52, 190, 236, 0.12), transparent 55%),
    var(--surface);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* ---------- die-cut sticker headings (StrokeText, web edition) ---------- */
.sticker-text {
  /* The app logo, verbatim: OrangeGummy, thick white die-cut, soft glow. */
  font-family: var(--font-logo);
  font-weight: normal;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--primary);
  /* em units: stroke and glow scale WITH the glyphs, so the halo reads the
     same at phone sizes as on desktop (fixed px looked twice as strong). */
  -webkit-text-stroke: 0.1em #fff;
  paint-order: stroke fill;
  text-shadow:
    0 0 0.2em rgba(255, 255, 255, 0.26),
    0 0.1em 0.22em rgba(0, 0, 0, 0.55);
}
.sticker-text.grape {
  color: var(--secondary);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.78);
  border-bottom: 1px solid var(--hairline);
}
.site-header .bar {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: var(--font-logo);
  font-weight: normal;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  -webkit-text-stroke: 0.18em #fff;
  paint-order: stroke fill;
}
.wordmark .sticky { color: var(--primary); }
.wordmark .bunch { color: var(--secondary); }
.site-nav {
  display: flex;
  gap: 1.5rem;
}
@media (max-width: 480px) {
  .site-header .bar { padding: 0.7rem 0.9rem; }
  .site-nav { gap: 0.8rem; }
  .site-nav a { font-size: 0.85rem; }
  .wordmark { font-size: 1rem; }
}
.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 160ms ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* ---------- 3D slab button (Button3D, web edition) ---------- */
.btn3d {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 1rem 2.1rem;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  box-shadow: 0 var(--depth) 0 0 var(--primary-dark);
  cursor: pointer;
  transform: translateY(0);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 160ms ease;
}
.btn3d:hover {
  filter: brightness(1.06);
}
.btn3d:active {
  transform: translateY(var(--depth));
  box-shadow: 0 0 0 0 var(--primary-dark);
}
.btn3d:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.btn3d.grape {
  background: var(--secondary);
  box-shadow: 0 var(--depth) 0 0 #6b39b8;
}
.btn3d.grape:active {
  box-shadow: 0 0 0 0 #6b39b8;
}
.btn3d.ghost {
  background: var(--surface-highest);
  box-shadow: 0 var(--depth) 0 0 var(--base);
}
.btn3d.ghost:active {
  box-shadow: 0 0 0 0 var(--base);
}

/* ---------- cards ---------- */
.card {
  background: var(--surface-low);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: 0 var(--depth) 0 0 var(--base);
  padding: 2rem;
}

/* Support tiles read as stickers slapped on the page: each sits a touch
   rotated and straightens up when you hover it. */
.tile {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tiles .tile:nth-child(1) { transform: rotate(-1.3deg); }
.tiles .tile:nth-child(2) { transform: rotate(1deg); }
.tiles .tile:nth-child(3) { transform: rotate(-0.7deg); }
.tiles .tile:hover { transform: rotate(0deg) translateY(-4px); }
@media (prefers-reduced-motion: reduce) {
  .tile, .tiles .tile:hover { transform: none; }
}

/* ---------- hero (index) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 56rem);
  /* Flex, not grid: an auto grid track sizes to the text's max-content and
     overflows narrow screens; a stretched flex column wraps normally. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem 1.25rem 4rem;
  text-align: center;
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(3.4rem, 11vw, 6.5rem);
  display: grid;
  line-height: 0.95;
}
.hero h1 .line2 {
  margin-top: -0.08em;
}
.hero .tagline {
  font-family: var(--font-logo);
  font-size: clamp(1.15rem, 3.4vw, 1.7rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000;
  -webkit-text-stroke: 0.2em #fff;
  paint-order: stroke fill;
  text-shadow: 0 0 0.3em rgba(255, 255, 255, 0.4);
  margin-top: 1.4rem;
}
.hero .sub {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  color: var(--text-2);
}
.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.4rem;
}

/* Sticker collage backdrop — the app's home screen, web edition. Rows of
   die-cut stickers tile the hero edge to edge behind a dark scrim. */
.collage {
  position: absolute;
  inset: -3rem -6rem;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.collage-row {
  display: flex;
  gap: clamp(1.4rem, 4vw, 3rem);
  justify-content: center;
}
.collage-row:nth-child(even) {
  transform: translateX(clamp(2.5rem, 6vw, 5rem));
}
.collage-row img {
  width: clamp(5rem, 10vw, 8rem);
  height: auto;
  flex: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}
.collage-row img:nth-child(odd) { rotate: -7deg; }
.collage-row img:nth-child(even) { rotate: 6deg; }
.collage-row img:nth-child(3n) { rotate: 3deg; }
/* Scrim + bottom fade, matching the app (dim for focus, fade so CTAs read). */
.collage-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.5) 45%,
    rgba(0, 0, 0, 0.72) 78%,
    var(--surface) 100%
  );
}

/* ---------- index sections ---------- */
.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem;
}
.tile h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.tile .emoji {
  display: inline-grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.5rem;
  border-radius: 50%;
  background: rgba(52, 190, 236, 0.14);
  border: 2px solid rgba(52, 190, 236, 0.35);
  margin-bottom: 0.9rem;
}
.tile.accent-grape .emoji {
  background: rgba(150, 84, 243, 0.16);
  border-color: rgba(150, 84, 243, 0.4);
}
.tile.accent-mint .emoji {
  background: rgba(47, 184, 136, 0.14);
  border-color: rgba(47, 184, 136, 0.38);
}
.tile a {
  color: var(--primary-light);
  font-weight: 700;
  text-decoration: none;
}
.tile a:hover {
  text-decoration: underline;
}

/* ---------- legal pages ---------- */
.legal-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}
.legal-header {
  grid-column: 1 / -1;
}
.legal-header h1 {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
}
.updated-chip {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-container);
  border: 1px solid var(--hairline);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

.toc {
  position: sticky;
  top: 6rem;
  font-size: 0.92rem;
}
.toc .toc-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.toc ol {
  list-style: none;
  border-left: 2px solid var(--surface-highest);
}
.toc a {
  display: block;
  padding: 0.32rem 0 0.32rem 0.9rem;
  color: var(--text-3);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.toc a:hover {
  color: var(--text);
}
.toc a.active {
  color: var(--primary-light);
  border-left-color: var(--primary);
  font-weight: 700;
}

.legal-body {
  max-width: var(--measure);
}
.legal-body section {
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--hairline);
}
.legal-body section:last-of-type {
  border-bottom: none;
}
.legal-body h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}
.legal-body h2 .no {
  color: var(--primary);
  font-size: 1.05rem;
}
.legal-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin: 1.2rem 0 0.4rem;
}
.legal-body p + p {
  margin-top: 0.85rem;
}
.legal-body ul {
  margin: 0.85rem 0 0.85rem 1.2rem;
}
.legal-body li + li {
  margin-top: 0.45rem;
}
.legal-body strong {
  color: var(--text);
}
.legal-body a {
  color: var(--primary-light);
}
.callout {
  background: var(--surface-low);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
}
.site-footer .inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-3);
}
.site-footer nav {
  display: flex;
  gap: 1.4rem;
}
.site-footer a {
  color: var(--text-2);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--text);
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 600ms ease, translate 600ms ease;
}
.reveal.in {
  opacity: 1;
  translate: 0 0;
}

/* ---------- responsive ---------- */
@media (max-width: 56rem) {
  .legal-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .toc {
    position: static;
    background: var(--surface-low);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
  }
  .floaty { display: none; }
}
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .site-nav { gap: 1rem; }
  .card { padding: 1.4rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floaty { animation: none; }
  .reveal {
    opacity: 1;
    translate: 0 0;
    transition: none;
  }
  .btn3d { transition: none; }
}
