/* ============================================================
   AIPocket.fun — design tokens + base styles
   Coconut Cream canvas, spice accents, sticker shadows.
   ============================================================ */

:root {
  /* Surface */
  --coconut: #F8F2E8;
  --rice: #FDFAF4;
  --bone: #EFE9DD;
  --dust: #C9C0B2;
  --ink: #1A1714;
  --charcoal: #2A2521;
  --slate: #5C544A;
  --granite: #867D72;

  /* Spice */
  --mango: #FF6B35;
  --mango-deep: #C44A1E;
  --jade: #0F7B6C;
  --jade-deep: #0A574D;
  --hibiscus: #D63862;
  --hibiscus-deep: #A82347;
  --mangosteen: #4B2D5C;
  --mangosteen-deep: #2E1A3A;
  --turmeric: #F4B400;
  --turmeric-deep: #C68E00;
  --lagoon: #1B7E94;
  --lagoon-deep: #115F70;

  /* Type */
  --display: "Bricolage Grotesque", "Fraunces", Georgia, serif;
  --body: "General Sans", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Shadows */
  --shadow-1: 0 4px 24px rgba(26,23,20,0.06);
  --shadow-2: 0 24px 48px rgba(26,23,20,0.08);
  --shadow-4: 0 40px 80px rgba(26,23,20,0.18);

  /* Layout */
  --gutter: 48px;
  --max: 1280px;
  color-scheme: light;
}

[data-theme="dark"] {
  --coconut: #15120F;
  --rice: #1E1A16;
  --bone: #2A2521;
  --dust: #3C342D;
  --ink: #F4ECDC;
  --charcoal: #E6DCC8;
  --slate: #B5A993;
  --granite: #8A8073;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--coconut);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 450;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 380ms cubic-bezier(.2,.7,.2,1), color 380ms cubic-bezier(.2,.7,.2,1);
}

/* ============================================================
   Typography utilities
   ============================================================ */

.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.0;
}

h1, h2, h3, h4 {
  font-family: var(--body);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(32px, 4vw, 40px); }
h3 { font-size: 24px; letter-spacing: -0.015em; line-height: 1.2; }
h4 { font-size: 18px; line-height: 1.3; }

p { margin: 0; text-wrap: pretty; }

.lead { font-size: 20px; line-height: 1.5; letter-spacing: -0.005em; color: var(--ink); opacity: 0.86; }
.muted { color: var(--slate); }
.small { font-size: 14px; line-height: 1.5; }

/* Eyebrow with sticker accent dot */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mango);
  flex-shrink: 0;
}
.eyebrow.on-color { color: var(--coconut); }
.eyebrow .bracket {
  font-weight: 500;
  opacity: 0.6;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--coconut);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--mango);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--coconut);
}
.btn-accent {
  background: var(--mango);
  color: var(--ink);
  border-color: var(--mango);
}
.btn-accent:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--ink);
}

/* Sticker CTA */
.sticker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--turmeric);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--body);
  text-decoration: none;
  transform: rotate(-2deg);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.sticker-btn:hover {
  transform: rotate(-2deg) translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}
.sticker-btn:active {
  transform: rotate(-2deg) translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

/* Satellite micro-CTA */
.satellite {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--coconut);
  border: 1.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), background 160ms;
  cursor: pointer;
}
.satellite:hover {
  background: var(--mango);
  transform: rotate(-45deg) scale(1.05);
}

/* ============================================================
   Sticker badge
   ============================================================ */

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  font-family: var(--body);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--turmeric);
  color: var(--ink);
}
.sticker.rot-pos { transform: rotate(2deg); }
.sticker.rot-neg { transform: rotate(-3deg); }
.sticker.mango { background: var(--mango); }
.sticker.hibiscus { background: var(--hibiscus); color: var(--coconut); }
.sticker.jade { background: var(--jade); color: var(--coconut); }
.sticker.lagoon { background: var(--lagoon); color: var(--coconut); }
.sticker.mangosteen { background: var(--mangosteen); color: var(--coconut); }
.sticker.cream { background: var(--coconut); }

/* ============================================================
   Layout helpers
   ============================================================ */

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (max-width: 767px) {
  :root { --gutter: 24px; }
}

section {
  padding: 96px 0;
  position: relative;
}
@media (max-width: 767px) {
  section { padding: 64px 0; }
}

.section-head {
  margin-bottom: 56px;
  max-width: 720px;
}
.section-head h2 { margin-top: 16px; }
.section-head .lead { margin-top: 16px; }

/* Color-block sections */
.color-block {
  padding: 112px 0;
}
.color-block.jade { background: var(--jade); }
.color-block.hibiscus { background: var(--hibiscus); }
.color-block.mangosteen { background: var(--mangosteen); }
.color-block.lagoon { background: var(--lagoon); }
.color-block.mango { background: var(--mango); }
.color-block .ink-text,
.color-block * { color: var(--coconut); }
.color-block .lead { opacity: 1; }
.color-block.mango *, .color-block.turmeric * { color: var(--ink); }

/* Ghost watermark */
.ghost {
  position: absolute;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  line-height: 0.9;
  color: rgba(0,0,0,0.05);
}
.color-block.jade .ghost { color: rgba(255,255,255,0.07); }
.color-block.hibiscus .ghost { color: rgba(255,255,255,0.08); }
.color-block.mangosteen .ghost { color: rgba(255,255,255,0.07); }
.color-block.lagoon .ghost { color: rgba(255,255,255,0.08); }

/* ============================================================
   Marquee
   ============================================================ */

.marquee {
  overflow: hidden;
  background: var(--ink);
  color: var(--coconut);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  position: relative;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  padding: 18px 0;
  white-space: nowrap;
  animation: marquee 48s linear infinite;
  will-change: transform;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.marquee-item .sep {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mango);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   Floating Nav
   ============================================================ */

.nav-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 1080px;
  pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 24px;
  background: color-mix(in srgb, var(--coconut) 78%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
}
.nav-pill .logo-mark {
  font-family: var(--body);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-pill .links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 24px;
  flex: 1;
}
.nav-pill .links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.86;
  transition: opacity 140ms;
}
.nav-pill .links a:hover { opacity: 1; }
.nav-pill .right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-pill .login {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.7;
}
.nav-pill .login:hover { opacity: 1; }

@media (max-width: 860px) {
  .nav-pill .links { display: none; }
}

/* ============================================================
   Hero — shared
   ============================================================ */

.hero {
  position: relative;
  padding: 140px 0 96px;
  overflow: hidden;
}

.hero .eyebrow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.hero h1.display {
  font-size: clamp(56px, 8.6vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-family: var(--display);
  font-weight: 600;
  max-width: 14ch;
}

.hero .lead {
  margin-top: 28px;
  max-width: 56ch;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
}

.hero .cta-row {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero .fineprint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--slate);
  letter-spacing: 0;
}

/* ============================================================
   Hero v1 — editorial: portrait + sticker
   ============================================================ */

.hero-v1 .grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 1000px) {
  .hero-v1 .grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Portrait composition */
.portrait-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 560px;
  justify-self: end;
}
.portrait-circle {
  position: absolute;
  inset: 8% 8% 8% 8%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--mango);
}
.portrait-art {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffd2a8 0%, #ff8c52 38%, #c94f1f 100%);
}
/* placeholder portrait illustration */
.portrait-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.32), transparent 35%),
    radial-gradient(circle at 70% 78%, rgba(26,23,20,0.18), transparent 45%);
}
.portrait-circle .person {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  height: 92%;
}
.portrait-satellite {
  position: absolute;
  bottom: 4%; right: 4%;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--coconut);
  border: 1.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 24px;
  z-index: 2;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1), background 160ms;
}
.portrait-satellite:hover {
  background: var(--mango);
  transform: rotate(-45deg);
}

.orbit-arc {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-sticker {
  position: absolute;
  z-index: 3;
}

/* ============================================================
   Hero v2 — futurist: language orbit + token stream
   ============================================================ */

.hero-v2 {
  background: var(--coconut);
}
.hero-v2 .grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 1000px) {
  .hero-v2 .grid { grid-template-columns: 1fr; gap: 40px; }
}

.orbit-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 600px;
  justify-self: end;
}

.orbit-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: var(--ink);
  color: var(--coconut);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6%;
  box-shadow: 0 30px 80px rgba(26,23,20,0.25);
  z-index: 5;
}
.orbit-core .pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--mango);
  margin-bottom: 12px;
  box-shadow: 0 0 0 0 var(--mango);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,53,.7); }
  70%  { box-shadow: 0 0 0 18px rgba(255,107,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); }
}
.orbit-core .core-label {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
.orbit-core .core-title {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

/* rotating rings */
.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 24%, transparent);
  animation: spin 60s linear infinite;
}
.orbit-ring.r2 { inset: 12%; border-style: solid; border-color: color-mix(in srgb, var(--mango) 36%, transparent); animation-duration: 42s; animation-direction: reverse; }
.orbit-ring.r3 { inset: 24%; border-color: color-mix(in srgb, var(--ink) 12%, transparent); animation-duration: 80s; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* language chips on the orbit */
.lang-chip {
  position: absolute;
  top: 50%; left: 50%;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  padding: 8px 14px;
  background: var(--rice);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
  transform-origin: center;
  animation: chip-spin 60s linear infinite;
  will-change: transform;
}
.lang-chip.fast { animation-duration: 42s; animation-direction: reverse; }
.lang-chip.slow { animation-duration: 80s; }
.lang-chip.accent-mango { background: var(--mango); }
.lang-chip.accent-jade { background: var(--jade); color: var(--coconut); }
.lang-chip.accent-hibiscus { background: var(--hibiscus); color: var(--coconut); }
.lang-chip.accent-turmeric { background: var(--turmeric); }
.lang-chip.accent-lagoon { background: var(--lagoon); color: var(--coconut); }
.lang-chip.accent-mangosteen { background: var(--mangosteen); color: var(--coconut); }

@keyframes chip-spin {
  to { transform: translate(-50%, -50%) rotate(360deg) translateX(var(--r)) rotate(-360deg); }
}

/* Token stream — code-like ticker behind orbit */
.token-stream {
  position: absolute;
  inset: -8% -8% -8% -8%;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 11px;
  color: color-mix(in srgb, var(--ink) 30%, transparent);
  overflow: hidden;
  z-index: 1;
}
.token-line {
  position: absolute;
  white-space: nowrap;
  animation: token-drift 28s linear infinite;
}

@keyframes token-drift {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}

/* sparkline / waveform under hero */
.heartbeat {
  margin-top: 32px;
  height: 64px;
  display: flex;
  align-items: center;
}
.heartbeat svg { width: 100%; height: 100%; }
.heartbeat .line { stroke: var(--ink); stroke-width: 1.5; fill: none; opacity: 0.4; }
.heartbeat .pulse-line { stroke: var(--mango); stroke-width: 2; fill: none; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw-line 4s ease-in-out infinite; }
@keyframes draw-line {
  0% { stroke-dashoffset: 600; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -600; }
}

/* Live readout strip under hero v2 */
.readout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}
.readout-cell {
  padding: 20px 4px;
  border-right: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.readout-cell:last-child { border-right: 0; }
.readout-cell .k {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.readout-cell .v {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 6px;
}
.readout-cell .v .unit { font-size: 0.5em; opacity: 0.6; font-family: var(--body); font-weight: 500; }
@media (max-width: 700px) {
  .readout { grid-template-columns: repeat(2, 1fr); }
  .readout-cell:nth-child(2) { border-right: 0; }
  .readout-cell:nth-child(1),
  .readout-cell:nth-child(2) { border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
}

/* ============================================================
   Three-pillar
   ============================================================ */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  position: relative;
}
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; gap: 40px; }
}
.pillar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pillar-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 24px;
}
.pillar-portrait .satellite {
  position: absolute;
  bottom: 6%;
  right: 6%;
  z-index: 2;
}
.pillar-portrait.chat { background: var(--mango); }
.pillar-portrait.create { background: var(--lagoon); }
.pillar-portrait.connect { background: var(--hibiscus); }

/* Visual mock content inside circular portraits */
.pillar-portrait .scene {
  position: absolute;
  inset: 14%;
  border-radius: 32px;
  background: var(--rice);
  padding: 18px;
  box-shadow: 0 12px 28px rgba(26,23,20,0.12);
  font-family: var(--body);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bubble {
  padding: 8px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--ink);
  max-width: 80%;
}
.bubble.you { align-self: flex-end; background: var(--ink); color: var(--coconut); border-color: var(--ink); }
.bubble.ai { align-self: flex-start; background: var(--rice); color: var(--ink); }

/* ============================================================
   Bento
   ============================================================ */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
}
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(200px, auto); }
}
@media (max-width: 720px) {
  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .tile.span-2x1,
  .tile.span-1x2,
  .tile.span-2x2 {
    grid-column: span 1;
    grid-row: span 1;
  }
  .tile {
    min-height: 220px;
  }
}

.tile {
  position: relative;
  border-radius: 28px;
  padding: 28px;
  background: var(--rice);
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 240ms cubic-bezier(.2,.7,.2,1);
}
.tile:hover { transform: translateY(-3px); }
.tile h3 { font-size: 22px; line-height: 1.1; }
.tile p { margin-top: 8px; font-size: 14px; color: var(--slate); }

.tile.span-2x1 { grid-column: span 2; }
.tile.span-1x2 { grid-row: span 2; }
.tile.span-2x2 { grid-column: span 2; grid-row: span 2; border-radius: 40px; }

/* Decorative inner visuals must not crowd narrow tiles */
@media (max-width: 900px) {
  .tile .tile-viz svg {
    max-width: 45%;
    max-height: 50%;
  }
  .tile.span-2x2 .tile-viz svg,
  .tile.span-1x2 .tile-viz {
    max-width: none;
    max-height: none;
  }
}
@media (max-width: 720px) {
  .tile .tile-viz svg {
    max-width: 38%;
  }
  /* Hide oversized visuals on mobile so body copy gets the whole tile */
  .tile[data-viz="large"] .tile-viz {
    display: none;
  }
  /* Lift text content above any remaining absolute visuals as a safety net */
  .tile > div:not(.tile-viz) {
    position: relative;
    z-index: 2;
  }
  /* When viz is hidden, content can sit at the top instead of pinned to bottom */
  .tile[data-viz="large"] {
    justify-content: flex-start;
    padding-top: 32px;
  }
  .tile[data-viz="large"] > div:not(.tile-viz) {
    margin-top: 0 !important;
  }
}

.tile.mango { background: var(--mango); color: var(--ink); border-color: transparent; }
.tile.mango p { color: var(--ink); opacity: 0.8; }
.tile.jade { background: var(--jade); color: var(--coconut); border-color: transparent; border-radius: 36px; }
.tile.jade p { color: var(--coconut); opacity: 0.8; }
.tile.mangosteen { background: var(--mangosteen); color: var(--coconut); border-color: transparent; border-radius: 32px; }
.tile.mangosteen p { color: var(--coconut); opacity: 0.78; }
.tile.lagoon { background: var(--lagoon); color: var(--coconut); border-color: transparent; border-radius: 24px; }
.tile.lagoon p { color: var(--coconut); opacity: 0.78; }
.tile.cream { background: var(--coconut); }

.tile .tile-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.66; margin-bottom: 6px;
}

/* Decorative tile visuals */
.tile-viz {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.95;
}

/* ============================================================
   Pricing teaser
   ============================================================ */

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .price-grid { grid-template-columns: 1fr; }
}
.price-card {
  position: relative;
  background: var(--rice);
  border: 1.5px solid var(--ink);
  border-radius: 32px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.price-card.pop {
  background: var(--mangosteen);
  color: var(--coconut);
  border-color: var(--mangosteen-deep);
}
.price-card.pop * { color: var(--coconut); }
.price-card.pop .price-amount .currency { color: rgba(248,242,232,0.6); }
.price-card .tier-name { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.price-card .price-amount {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.price-card .price-amount .currency { font-size: 14px; font-family: var(--body); font-weight: 500; color: var(--slate); margin-right: 6px; vertical-align: top; }
.price-card .price-amount .per { font-size: 14px; font-family: var(--body); font-weight: 500; color: var(--slate); }
.price-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price-card li { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.price-card li::before {
  content: "✓";
  display: inline-flex;
  width: 18px; height: 18px;
  align-items: center; justify-content: center;
  background: var(--ink); color: var(--coconut);
  border-radius: 50%;
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 2px;
}
.price-card.pop li::before { background: var(--turmeric); color: var(--ink); }

/* ============================================================
   Testimonials
   ============================================================ */

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .testimonials { grid-template-columns: 1fr; }
}
.test-card {
  background: var(--rice);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.test-card.hibiscus { background: var(--hibiscus); color: var(--coconut); }
.test-card.lagoon { background: var(--lagoon); color: var(--coconut); }
.test-card.mango { background: var(--mango); color: var(--ink); }
.test-card.cream { background: var(--rice); }
.test-card .quote {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 500;
}
.test-card .who {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px;
}
.test-card .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--coconut);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

/* ============================================================
   Logo identity section
   ============================================================ */

.logo-system {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
}
@media (max-width: 900px) { .logo-system { grid-template-columns: 1fr; } }
.logo-card {
  background: var(--rice);
  border-radius: 32px;
  padding: 48px;
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.logo-card.dark { background: var(--ink); color: var(--coconut); }
.logo-card.mango { background: var(--mango); }
.logo-card.jade { background: var(--jade); color: var(--coconut); }
.logo-card.cream { background: var(--coconut); }
.logo-card .label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--slate);
}
.logo-card.dark .label, .logo-card.jade .label { color: rgba(248,242,232,0.6); }
.logo-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================================
   CTA Section
   ============================================================ */

.final-cta {
  text-align: center;
  padding: 128px 0;
}
.final-cta h2 {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.03em;
  line-height: 0.96;
  max-width: 16ch;
  margin: 0 auto;
}
.final-cta .sub { margin-top: 20px; max-width: 50ch; margin-left: auto; margin-right: auto; }
.final-cta .cta-stack { margin-top: 40px; display: inline-flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   Footer
   ============================================================ */

footer.site-foot {
  background: var(--ink);
  color: var(--coconut);
  padding: 96px 0 48px;
}
[data-theme="dark"] footer.site-foot { background: #0A0805; }

footer.site-foot h2 {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 18ch;
  color: var(--coconut);
}
footer .columns {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
}
@media (max-width: 900px) {
  footer .columns { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}
footer .col-header {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(248,242,232,0.6);
  margin-bottom: 16px;
}
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
footer li a {
  color: var(--coconut);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.86;
}
footer li a:hover { opacity: 1; }
footer .divider {
  margin-top: 64px;
  height: 1px;
  background: rgba(248,242,232,0.15);
}
footer .bottom {
  margin-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  color: rgba(248,242,232,0.7);
  font-size: 13px;
}
footer .locale-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid rgba(248,242,232,0.4);
  border-radius: 999px;
  font-size: 13px;
  color: var(--coconut);
}
footer .socials {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
footer .socials a {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(248,242,232,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--coconut);
  text-decoration: none;
  font-size: 14px;
}
footer .socials a:hover { background: var(--mango); }

/* ============================================================
   Misc + utilities
   ============================================================ */

.eyebrow-bracket {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--slate);
}

.rule {
  height: 1px;
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  width: 100%;
}

.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--bone);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
}

/* Reveal on load */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 720ms cubic-bezier(.2,.7,.2,1) both; }
.rise.d1 { animation-delay: 80ms; }
.rise.d2 { animation-delay: 160ms; }
.rise.d3 { animation-delay: 240ms; }
.rise.d4 { animation-delay: 320ms; }
.rise.d5 { animation-delay: 400ms; }

[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}

/* ============================================================
   Responsive grid helpers (used by sections with inline grids)
   ============================================================ */

.grid-2col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) {
  .grid-2col { grid-template-columns: 1fr; gap: 40px; }
}

.grid-concepts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .grid-concepts { grid-template-columns: 1fr; }
}

.grid-logo-variants {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 900px) { .grid-logo-variants { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-logo-variants { grid-template-columns: 1fr; } }

.grid-swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin-top: 40px;
}
@media (max-width: 1000px) { .grid-swatches { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px)  { .grid-swatches { grid-template-columns: repeat(2, 1fr); } }

.grid-usecases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .grid-usecases { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-usecases { grid-template-columns: 1fr; } }

/* Color-block: ensure ghost watermark + grid stack cleanly on mobile */
@media (max-width: 860px) {
  .color-block { padding: 80px 0; }
  .color-block .ghost { font-size: clamp(80px, 18vw, 160px) !important; top: 2% !important; right: -10% !important; }
}

/* Hero responsiveness — orbit shrinks gracefully */
@media (max-width: 1000px) {
  .hero { padding-top: 120px; }
  .hero h1.display { font-size: clamp(44px, 9vw, 72px); }
  .orbit-stage { max-width: 520px; margin: 0 auto; }
  .portrait-stage { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .hero { padding-top: 110px; padding-bottom: 48px; }
  .hero h1.display { font-size: clamp(38px, 11vw, 56px); }
  .hero .lead { font-size: 17px; }
  /* Floating stickers — tighten so they don't blow off-screen */
  .floating-sticker { font-size: 10px !important; padding: 6px 10px !important; }
  .lang-chip { font-size: 11px; padding: 6px 10px; }
  .orbit-core { width: 44% !important; }
  .orbit-core .core-title { font-size: 18px !important; }
  .readout { grid-template-columns: repeat(2, 1fr); }
  .readout-cell:nth-child(2) { border-right: 0; }
  .readout-cell:nth-child(1),
  .readout-cell:nth-child(2) { border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
  .readout-cell .v { font-size: 26px; }
  /* Hide the dense token stream on mobile so the orbit reads */
  .token-stream { opacity: 0.35; }
  .token-line { font-size: 9.5px; }
}

/* Nav: make sure floating pill stays usable on small screens */
@media (max-width: 540px) {
  .nav-pill { padding: 8px 10px 8px 16px; gap: 12px; }
  .nav-pill .logo-mark { font-size: 14px; }
  .nav-pill .login { display: none; }
  .nav-pill .right .sticker-btn { font-size: 11px; padding: 8px 14px; }
}

/* Pillars circular portraits — keep aspect ratio reasonable when stacked */
@media (max-width: 900px) {
  .pillar-portrait { max-width: 420px; }
}

/* Pricing card scale */
@media (max-width: 560px) {
  .price-card { padding: 24px; }
  .price-card .price-amount { font-size: 44px; }
}

/* Final CTA scale */
@media (max-width: 600px) {
  .final-cta { padding: 80px 0; }
  .final-cta h2 { font-size: clamp(36px, 10vw, 64px); }
}

/* Stat marquee — tighten on mobile */
@media (max-width: 560px) {
  .marquee-item { font-size: 14px; }
  .marquee-track { gap: 32px; padding: 14px 0; }
}

/* ============================================================
   END responsive helpers
   ============================================================ */

/* Squiggle underline */
.squiggle {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'><path d='M0 6 Q 15 0 30 6 T 60 6 T 90 6 T 120 6' fill='none' stroke='%23FF6B35' stroke-width='3' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 8px;
  padding-bottom: 8px;
}
