/* Tokens ---------------------------------------------------------------- */
:root {
  --bg: #0c0c0b;
  --bg-2: #151513;
  --bg-3: #1e1d1a;
  --line: rgba(242, 237, 228, 0.09);
  --ivory: #f2ede4;
  --mute: #a39d92;
  --ink: #0c0c0b;

  --lime: #d6f45b;
  --peach: #ffb38a;
  --butter: #f1dc8a;
  --sage: #a7c9a0;
  --ice: #a8c5ff;
  --rose: #f2a7b8;

  --small: 0.9375rem;
  --body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --lead: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  --h2: clamp(2.75rem, 1.4rem + 4.8vw, 5.75rem);
  --tile: clamp(44px, 8.6vw, 148px);

  --m: clamp(16px, 3vw, 40px);
  --r: 24px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --serif: "Instrument Serif", Georgia, serif;
  --kn: "Baloo Tamma 2", "Noto Sans Kannada", system-ui, sans-serif;
  --kn-yellow: #ffd31a;
  --kn-red: #e0261d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: var(--body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
[id] { scroll-margin-top: 88px; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 200;
  padding: 12px 18px; border-radius: 999px; background: var(--lime); color: var(--ink);
  font-weight: 600; text-decoration: none; transition: top 0.2s ease;
}
.skip:focus { top: 16px; }
.progress {
  position: fixed; left: 0; top: 0; right: 0; z-index: 60; height: 3px;
  background: var(--lime);
  transform-origin: left; transform: scaleX(var(--p, 0));
}

/* Film grain over everything: the "printed" finish */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain {
  25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -5%); }
  75% { transform: translate(-2%, -3%); } 100% { transform: translate(4%, 2%); }
}

.h2 {
  font-size: var(--h2);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 15ch;
}
.h2 em, .hello-h em { font-size: 1.08em; color: var(--lime); }

/* Split headings */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.split .w > span { display: inline-block; transform: translateY(110%) rotate(5deg); transition: transform 1s var(--spring); transition-delay: calc(var(--wi) * 55ms); }
.split.in .w > span { transform: none; }

html.paused *, html.paused *::before, html.paused *::after { animation-play-state: paused !important; }
.anim-zone:not(.inview) *, .anim-zone:not(.inview) { animation-play-state: paused; }

/* Buttons --------------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 28px;
  border-radius: 999px;
  background: var(--lime); color: var(--ink);
  font-weight: 600; text-decoration: none;
  transition: transform 0.35s var(--spring), color 0.3s ease;
}
/* fill wipes up from the bottom on hover */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--ivory); transform: translateY(101%); transition: transform 0.45s var(--ease);
}
.btn:hover::before { transform: none; }
.btn:active { transform: scale(0.96); }
.btn > span[aria-hidden] { margin-left: 0.4em; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: var(--small); }
.btn-ghost { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 1.5px rgba(242, 237, 228, 0.35); }
.btn-ghost:hover { color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--ivory); }
.btn-dark::before { background: var(--ivory); }
.btn-dark:hover { color: var(--ink); }

/* Cursor ---------------------------------------------------------------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 100;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--ivory);
  pointer-events: none; mix-blend-mode: difference;
  transition: width 0.3s var(--spring), height 0.3s var(--spring), margin 0.3s var(--spring), opacity 0.2s;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
@media (hover: none) { .cursor { display: none; } }

/* Nav ------------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: max(16px, env(safe-area-inset-top)) max(var(--m), env(safe-area-inset-right)) 16px max(var(--m), env(safe-area-inset-left));
  transition: transform 0.4s var(--ease), background-color 0.3s ease;
}
.nav.scrolled { background: rgba(12, 12, 11, 0.92); }
.nav.hide { transform: translateY(-100%); }
.logo { display: flex; gap: 4px; text-decoration: none; }
.logo span {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  font-weight: 800; font-size: 1.2rem; color: var(--ink); transition: transform 0.4s var(--spring);
}
.logo span:first-child { background: var(--lime); }
.logo span:last-child { background: var(--ivory); }
.logo:hover span:first-child { transform: rotate(-12deg) translateY(-3px); }
.logo:hover span:last-child { transform: rotate(12deg) translateY(-3px); }
.nav-links { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(30, 29, 26, 0.8); font-weight: 500; font-size: var(--small); }
.nav-links a { text-decoration: none; padding: 8px 16px; border-radius: 999px; color: var(--mute); transition: color 0.2s, background-color 0.2s; }
.nav-links a:hover { color: var(--ivory); background: var(--bg-3); }
.nav-end { display: flex; align-items: center; gap: 10px; }
.motion-toggle {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--bg-3); color: var(--ivory); cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.motion-toggle:hover { background: var(--ivory); color: var(--ink); transform: rotate(-8deg); }
.mt-icon { width: 11px; height: 13px; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor; }
.motion-toggle[aria-pressed="true"] .mt-icon { width: 0; height: 0; border: 0; border-left: 11px solid currentColor; border-top: 6.5px solid transparent; border-bottom: 6.5px solid transparent; translate: 2px 0; }

/* Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 130px var(--m) 80px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
/* soft light that follows the pointer */
.hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(600px circle at var(--mx, 70%) var(--my, 30%), rgba(214, 244, 91, 0.13), transparent 60%),
    radial-gradient(900px circle at 10% 110%, rgba(168, 197, 255, 0.10), transparent 60%);
  transition: background-position 0.2s;
}
.hero::after {
  /* faint dotted field */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(242, 237, 228, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}

.status {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  margin-bottom: 32px; padding: 8px 16px 8px 12px; border-radius: 999px;
  background: var(--bg-3); color: var(--ivory); font-weight: 500; font-size: var(--small);
  box-shadow: inset 0 0 0 1px var(--line);
  animation: rise 0.7s var(--ease) 0.1s both;
}
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--lime); animation: ping 1.8s ease-out infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }

.hero-name { font-size: calc(var(--tile) * 0.74); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.tiles { display: flex; flex-wrap: wrap; gap: calc(var(--tile) * 0.07); perspective: 900px; transition: opacity 0.1s linear; }
.tile {
  position: relative;
  display: grid; place-items: center;
  width: var(--tile); height: calc(var(--tile) * 1.12);
  border-radius: calc(var(--tile) * 0.2);
  color: var(--ink);
  /* top-light and bottom-shade give each tile a soft, pressed-ceramic depth */
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -6px 0 rgba(0, 0, 0, 0.12),
    0 18px 40px -18px rgba(0, 0, 0, 0.8);
  animation: drop 1s var(--spring) both;
  animation-delay: calc(var(--i) * 70ms + 200ms);
  transition: transform 0.5s var(--spring), background-color 0.4s ease;
  will-change: transform;
  cursor: pointer;
}
.tile:hover { transform: translateY(-14px) rotate(var(--rot, -6deg)); }
.tile.landed { animation: none; }
.tile.landed.pop { animation: tilePop 0.6s var(--spring); }
.gap { width: calc(var(--tile) * 0.35); }
.t1 { --i: 0; background: var(--peach); --rot: -8deg; }
.t2 { --i: 1; background: var(--butter); --rot: 6deg; }
.t3 { --i: 2; background: var(--sage); --rot: -5deg; }
.t4 { --i: 3; background: var(--ice); --rot: 9deg; }
.t5 { --i: 4; background: var(--rose); --rot: -7deg; }
.t6 { --i: 5; background: var(--butter); --rot: 5deg; }
.t7 { --i: 6; background: var(--peach); --rot: -9deg; }
.t8 { --i: 7; background: var(--lime); --rot: 8deg; }
.t9 { --i: 8; background: var(--ivory); --rot: -6deg; }
@keyframes drop {
  0% { opacity: 0; transform: translateY(-140px) rotate(-22deg) scale(0.6); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes tilePop { 0% { transform: scale(1); } 30% { transform: scale(0.82) rotate(-10deg); } 100% { transform: scale(1); } }

.hero-under {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px 64px; align-items: end;
  margin-top: clamp(36px, 5vw, 64px);
  max-width: 1280px;
}
.hero-role { font-size: var(--lead); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; max-width: 24ch; }
.hero-role em { color: var(--lime); font-size: 1.12em; }
.hero-sub { color: var(--mute); max-width: 46ch; }
.hero-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-under > * { animation: rise 0.9s var(--ease) both; }
.hero-role { animation-delay: 0.9s; }
.hero-sub { animation-delay: 1s; }
.hero-actions { animation-delay: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  width: 26px; height: 42px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(242, 237, 228, 0.35);
  display: flex; justify-content: center; padding-top: 8px;
  animation: rise 0.8s var(--ease) 1.4s both;
}
.scroll-hint span { width: 3px; height: 9px; border-radius: 3px; background: var(--ivory); animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(13px); opacity: 0; } 100% { opacity: 0; } }

.hero-stickers { position: absolute; inset: 0; pointer-events: none; }
.sticker {
  position: absolute;
  padding: 9px 18px; border-radius: 999px;
  font-weight: 700; font-size: var(--small); color: var(--ink);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.9);
  animation: pop 0.6s var(--spring) both, bob 4s ease-in-out infinite alternate;
}
.s-a { top: 17%; right: 8%; background: var(--sage); rotate: 8deg; animation-delay: 1.2s, 1.8s; }
.s-b { top: 25%; right: 25%; background: var(--ice); rotate: -6deg; animation-delay: 1.35s, 2.2s; }
.s-c { bottom: 15%; right: 10%; background: var(--rose); rotate: -10deg; animation-delay: 1.5s, 1.4s; }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes bob { from { translate: 0 0; } to { translate: 0 -12px; } }

/* Crossing bands -------------------------------------------------------- */
.bands { position: relative; height: clamp(150px, 16vw, 230px); margin: 20px 0; overflow: hidden; }
.marquee { position: absolute; left: -20px; right: -20px; top: 50%; overflow: hidden; padding: 18px 0; }
.marquee:not(.marquee-2) { background: var(--lime); color: var(--ink); rotate: -3deg; translate: 0 -50%; z-index: 1; }
.marquee-2 { background: var(--bg-3); color: var(--mute); rotate: 3deg; translate: 0 -50%; }
.marquee-skew { transition: transform 0.4s var(--ease); }
.marquee-track { display: flex; align-items: center; gap: 28px; white-space: nowrap; width: max-content; animation: run 34s linear infinite; }
.marquee-track.rev { animation-direction: reverse; animation-duration: 44s; }
.marquee span { font-size: clamp(1.75rem, 1rem + 2.6vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; }
.marquee-2 span { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.marquee b { font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem); display: inline-block; animation: spin 6s linear infinite; }
.marquee-2 b { color: var(--lime); }
@keyframes run { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Build switcher -------------------------------------------------------- */
.build { padding: clamp(100px, 12vw, 180px) var(--m) clamp(80px, 10vw, 140px); }
.build-intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px 64px; align-items: end; }
.build-intro p { color: var(--mute); max-width: 36ch; }

.switch {
  position: relative; display: inline-grid; grid-template-columns: repeat(3, auto);
  margin-top: 56px; padding: 6px; border-radius: 999px; background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.switch button {
  position: relative; z-index: 1;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px;
  background: none; font: inherit; font-weight: 600; color: var(--mute); cursor: pointer;
  transition: color 0.3s ease;
}
.switch button:hover { color: var(--ivory); }
.switch button[aria-selected="true"] { color: var(--ink); }
.switch-pill {
  position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 999px; background: var(--accent, var(--peach));
  transition: transform 0.5s var(--spring), width 0.5s var(--spring), background-color 0.4s ease;
}
.build:has(.modes[data-mode="builder"]) { --accent: var(--peach); }
.build:has(.modes[data-mode="theme"]) { --accent: var(--sage); }
.build:has(.modes[data-mode="headless"]) { --accent: var(--ice); }

.modes {
  position: relative; margin-top: 28px; border-radius: var(--r); padding: clamp(20px, 3vw, 40px);
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.modes::before {
  /* coloured light leaking from the corner, follows the chosen mode */
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle, var(--accent, var(--peach)) 0%, transparent 60%);
  opacity: 0.16; transition: background 0.5s ease;
}
.mode { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px 56px; align-items: center; animation: modeIn 0.6s var(--spring); }
.mode[hidden] { display: none; }
@keyframes modeIn { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }
.mode-copy h3 { font-size: var(--lead); font-weight: 800; letter-spacing: -0.02em; color: var(--accent); }
.mode-copy p { margin-top: 12px; max-width: 42ch; color: var(--mute); }
.ticks { margin-top: 22px; display: grid; gap: 12px; font-weight: 500; }
.ticks li { display: flex; gap: 12px; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); translate: 0 -2px; }

.demo { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; background: var(--bg-3); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }

.demo-builder { display: grid; grid-template-columns: 28% 1fr; }
.palette { background: var(--bg); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chip { padding: 10px 12px; border-radius: 10px; font-size: var(--small); font-weight: 600; color: var(--ink); }
.c-head { background: var(--peach); }
.c-img { background: var(--ice); }
.c-btn { background: var(--lime); }
.canvas { position: relative; padding: 7% 8%; display: flex; flex-direction: column; gap: 6%; }
.blk { border-radius: 10px; animation: place 6s var(--spring) infinite; }
.blk-head { height: 13%; width: 72%; background: var(--peach); }
.blk-img { height: 44%; width: 100%; background: var(--ice); animation-delay: 0.9s; }
.blk-btn { height: 12%; width: 34%; background: var(--lime); border-radius: 999px; animation-delay: 1.8s; }
@keyframes place {
  0%, 6% { opacity: 0; transform: translateX(-70%) rotate(-6deg) scale(0.8); }
  18%, 88% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
.hand {
  position: absolute; width: 24px; height: 24px; border-radius: 50% 50% 50% 0;
  background: var(--ivory); rotate: -45deg; left: 10%; top: 12%;
  animation: hand 6s var(--ease) infinite;
}
@keyframes hand {
  0% { transform: translate(-60px, 0); } 15% { transform: translate(180px, 10px); }
  30% { transform: translate(-40px, 90px); } 45% { transform: translate(260px, 120px); }
  60% { transform: translate(-30px, 200px); } 75% { transform: translate(90px, 230px); }
  100% { transform: translate(-60px, 0); }
}

.demo-theme { color: #d9e6d5; display: flex; align-items: center; }
.demo-theme pre { margin: 0; padding: 7%; font-size: clamp(12px, 1.15vw, 16px); line-height: 1.75; overflow: hidden; white-space: pre; }
.demo-theme i { font-style: normal; color: var(--butter); }
.demo-theme b { font-weight: 400; color: var(--sage); }
.ln { display: block; animation: type 7s steps(1) infinite; }
.ln:nth-child(1) { animation-delay: 0s; } .ln:nth-child(2) { animation-delay: 0.35s; } .ln:nth-child(3) { animation-delay: 0.7s; }
.ln:nth-child(4) { animation-delay: 1.05s; } .ln:nth-child(5) { animation-delay: 1.4s; } .ln:nth-child(6) { animation-delay: 1.75s; }
.ln:nth-child(7) { animation-delay: 2.1s; } .ln:nth-child(8) { animation-delay: 2.45s; } .ln:nth-child(9) { animation-delay: 2.8s; }
@keyframes type { 0% { opacity: 0; } 4%, 90% { opacity: 1; } 100% { opacity: 0; } }

.demo-headless { display: flex; align-items: center; justify-content: center; padding: 6%; }
.node {
  flex: none; display: grid; place-items: center; text-align: center;
  width: 28%; aspect-ratio: 1; border-radius: 50%; padding: 8px; color: var(--ink);
  animation: pulse 2.4s ease-in-out infinite;
}
.node strong { display: block; font-size: clamp(14px, 1.5vw, 22px); font-weight: 800; line-height: 1.1; }
.node span { display: block; font-size: clamp(11px, 1vw, 14px); }
.n-wp { background: var(--ivory); }
.n-api { background: var(--butter); width: 22%; animation-delay: 0.8s; }
.n-next { background: var(--ice); animation-delay: 1.6s; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.pipe { position: relative; flex: 1; height: 4px; border-radius: 4px; background: rgba(242, 237, 228, 0.12); }
.pipe i { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--lime); animation: flow 1.6s linear infinite; }
.pipe i:nth-child(2) { animation-delay: 0.53s; }
.pipe i:nth-child(3) { animation-delay: 1.06s; }
@keyframes flow { from { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } to { left: calc(100% - 10px); opacity: 0; } }

/* Numbers --------------------------------------------------------------- */
.numbers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin: 0 var(--m) clamp(100px, 12vw, 180px);
  border-radius: var(--r); overflow: hidden; background: var(--line);
}
.num { padding: 32px 28px; background: var(--bg); transition: background-color 0.3s; }
.num:hover { background: var(--bg-2); }
.num strong { display: block; font-size: var(--h2); font-weight: 800; line-height: 1; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; color: var(--ivory); }
.num:hover strong { color: var(--lime); }
.num span { display: block; margin-top: 14px; max-width: 22ch; color: var(--mute); }

/* Journey: stacking cards ---------------------------------------------- */
.journey { padding: 0 var(--m) clamp(100px, 12vw, 180px); }
.stack { margin-top: 56px; display: grid; gap: 28px; }
.card {
  position: sticky; top: calc(96px + var(--n) * 22px);
  min-height: 52svh;
  border-radius: var(--r);
  padding: clamp(28px, 4vw, 56px);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; column-gap: 56px;
  color: var(--ink);
  transform-origin: center top;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 -20px 50px -20px rgba(0, 0, 0, 0.7);
}
.card-top { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; }
.when { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.35em; line-height: 1; }
.card h3 { grid-column: 1; margin-top: clamp(32px, 5vw, 72px); font-size: clamp(2rem, 1.2rem + 3vw, 4rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; }
.card .co { grid-column: 1; margin-top: 12px; font-size: var(--lead); font-weight: 600; opacity: 0.75; }
.card > p:last-child { grid-column: 2; grid-row: 2 / 4; align-self: end; max-width: 44ch; }
.k1 { --n: 0; background: var(--lime); }
.k2 { --n: 1; background: var(--peach); }
.k3 { --n: 2; background: var(--ice); }
.k4 { --n: 3; background: var(--butter); }
.k5 { --n: 4; background: var(--sage); }

/* Toolbox: bento -------------------------------------------------------- */
.toolbox { padding: 0 var(--m) clamp(100px, 12vw, 180px); }
.tools {
  margin-top: 56px; display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "wp wp react react"
    "wp wp code ship"
    "speed ai ai ship";
}
.tool {
  position: relative; overflow: hidden;
  min-height: 230px; padding: 28px; border-radius: var(--r);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 0.45s var(--spring), box-shadow 0.3s ease;
}
/* light that follows the pointer inside each tile */
.tool::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(320px circle at var(--tx, 50%) var(--ty, 50%), rgba(242, 237, 228, 0.12), transparent 60%);
}
.tool:hover::before { opacity: 1; }
.tool:hover { box-shadow: inset 0 0 0 1px rgba(242, 237, 228, 0.22); }
.tool h3 { position: relative; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.75rem); font-weight: 800; line-height: 1; letter-spacing: -0.035em; }
.tool p { position: relative; max-width: 34ch; color: var(--mute); }
.tl-wp { grid-area: wp; background: var(--lime); color: var(--ink); }
.tl-wp h3 { font-size: clamp(2.5rem, 1.4rem + 3.6vw, 5rem); }
.tl-wp p, .tl-react p { color: inherit; opacity: 0.8; font-size: var(--lead); line-height: 1.3; }
.tl-react { grid-area: react; background: var(--ice); color: var(--ink); }
.tl-code { grid-area: code; }
.tl-ship { grid-area: ship; }
.tl-speed { grid-area: speed; }
.tl-ai { grid-area: ai; }
.tl-code h3 { color: var(--butter); }
.tl-ship h3 { color: var(--sage); }
.tl-speed h3 { color: var(--rose); }
.tl-ai h3 { color: var(--peach); }

/* Hello ----------------------------------------------------------------- */
.hello {
  position: relative;
  background: var(--lime); color: var(--ink);
  margin: 0 var(--m); border-radius: 36px;
  padding: clamp(48px, 8vw, 120px) clamp(24px, 6vw, 96px);
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
  overflow: hidden;
}
.hello-h { font-size: var(--h2); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; max-width: 14ch; }
.hello-h em { color: var(--ink); }
.hello-sub { margin-top: 24px; max-width: 44ch; color: #2d331a; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 40px; }
.hello-mail {
  font-size: clamp(1.5rem, 0.9rem + 2.6vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; word-break: break-all;
  background: linear-gradient(var(--ink), var(--ink)) left bottom / 0 3px no-repeat;
  transition: background-size 0.4s var(--ease);
}
.hello-mail:hover { background-size: 100% 3px; }
.copy {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: rgba(12, 12, 11, 0.1); color: var(--ink); font: inherit; font-weight: 600; font-size: var(--small); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.3s var(--spring);
}
.copy:hover { background: var(--ink); color: var(--lime); }
.copy:active { transform: scale(0.94); }
.toast { min-height: 1.5em; margin-top: 10px; font-weight: 600; font-size: var(--small); }
.hello-links { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.hello .btn-light { background: var(--ink); color: var(--ivory); }
.hello .btn-light:hover { color: var(--ink); }
.clock { color: #2d331a; }
.clock strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.clock em { display: block; font-family: inherit; font-style: normal; font-size: var(--small); margin-top: 4px; }
.badge {
  position: relative; display: grid; place-items: center;
  width: clamp(150px, 16vw, 220px); aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); color: var(--lime); text-decoration: none;
  transition: transform 0.5s var(--spring);
}
.badge:hover { transform: scale(1.08) rotate(-8deg); }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; }
.badge text { font-size: 19px; font-weight: 700; letter-spacing: 0.08em; fill: var(--lime); }
.badge-arrow { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 800; transition: transform 0.4s var(--spring); }
.badge:hover .badge-arrow { transform: translate(4px, -4px); }

/* Footer ---------------------------------------------------------------- */
.foot { padding: 72px var(--m) 28px; overflow: hidden; }
.foot-mark {
  font-size: 19vw; font-weight: 800; line-height: 0.85; letter-spacing: -0.05em; white-space: nowrap;
  margin-left: -0.04em; color: var(--bg-3);
}
.foot-mark span { display: inline-block; transition: transform 0.4s var(--spring), color 0.3s; }
.foot-mark span:hover { transform: translateY(-10%) rotate(-4deg); color: var(--lime); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; font-size: var(--small); color: var(--mute); }
.foot-row a { font-weight: 600; color: var(--ivory); text-decoration: none; }
.foot-row a:hover { color: var(--lime); }



/* Kannada: footer button and explore dialog ------------------------------ */
:lang(kn) { font-family: var(--kn); }
.kn-btn {
  position: relative; display: inline-block; padding: 2px 2px 0; margin: 0 2px; border: 0; border-radius: 6px;
  /* flag colours painted inside the letters: yellow over red */
  background: linear-gradient(var(--kn-yellow) 52%, var(--kn-red) 52%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  font-size: 1.25em; font-weight: 800; line-height: 1.4; cursor: pointer;
  transition: transform 0.4s var(--spring);
  animation: knNudge 5s var(--ease) 2s infinite;
}
.kn-btn:hover { transform: rotate(-6deg) scale(1.12); animation: none; }
@keyframes knNudge { 0%, 88%, 100% { transform: none; } 92% { transform: rotate(-8deg) scale(1.08); } 96% { transform: rotate(6deg) scale(1.08); } }

.kn-dialog {
  width: min(760px, calc(100vw - 24px)); max-height: min(88svh, 900px);
  padding: 0; border: 0; border-radius: 28px; overflow: hidden;
  background: var(--bg-2); color: var(--ivory);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), inset 0 0 0 1px var(--line);
}
.kn-dialog[open] { display: flex; flex-direction: column; animation: knOpen 0.6s var(--spring); }
.kn-dialog::backdrop { background: rgba(12, 12, 11, 0.75); backdrop-filter: blur(6px); }
.kn-dialog[open]::backdrop { animation: fadeIn 0.3s ease; }
@keyframes knOpen { from { opacity: 0; transform: translateY(40px) scale(0.92) rotate(-1deg); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }

/* The header word carries the flag inside its letters: yellow over red */
.knd-flag {
  position: relative; flex: none;
  display: grid; place-items: center; padding: clamp(28px, 5vw, 44px) 24px 0;
}
.knd-flag span {
  font-size: clamp(4rem, 2rem + 8vw, 7.5rem); font-weight: 800; line-height: 1.15; padding-top: 0.1em;
  background: linear-gradient(var(--kn-yellow) 52%, var(--kn-red) 52%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.knd-flag span:last-child { display: none; }

.knd-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(12, 12, 11, 0.85); color: var(--ivory); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: transform 0.4s var(--spring), background-color 0.2s;
}
.knd-close:hover { background: var(--ink); transform: rotate(90deg); }
.knd-body { padding: clamp(24px, 4vw, 36px) clamp(22px, 4vw, 40px) 8px; min-height: 230px; }
.knd-body.swap > * { animation: cardIn 0.55s var(--spring) both; }
.knd-body.swap > :nth-child(2) { animation-delay: 0.05s; }
.knd-body.swap > :nth-child(3) { animation-delay: 0.1s; }
.knd-body.swap > :nth-child(4) { animation-delay: 0.15s; }
.knd-body.swap > :nth-child(5) { animation-delay: 0.2s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) rotateX(-30deg); } to { opacity: 1; transform: none; } }
.knd-kind {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--bg-3); color: var(--kn-yellow); font-size: var(--small); font-weight: 600;
}
.knd-big { margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem); line-height: 1; color: var(--kn-yellow); }
.knd-big:empty, .knd-kn:empty, .knd-by:empty { display: none; }
.knd-kn { margin-top: 14px; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 800; line-height: 1.35; color: var(--kn-yellow); }
.knd-text { margin-top: 12px; font-size: var(--lead); line-height: 1.3; letter-spacing: -0.01em; max-width: 34ch; }
.knd-by { margin-top: 10px; color: var(--mute); font-size: var(--small); }
.knd-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 20px clamp(22px, 4vw, 40px) clamp(22px, 4vw, 32px); }
.knd-next { background: var(--kn-yellow); }
.knd-next::before { background: var(--kn-red); }
.knd-next:hover { color: var(--kn-yellow); }
.knd-foot span { font-size: 1.1rem; font-weight: 800; color: var(--mute); }
.kn-dialog { width: min(560px, calc(100vw - 24px)); position: fixed; }
@media (max-width: 720px) { .knd-next { flex: 1; } }

/* Reveal ---------------------------------------------------------------- */
.js .rv { opacity: 0; transform: translateY(32px); transition: opacity 0.8s var(--ease), transform 0.8s var(--spring); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }

/* Tablet ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .tools { grid-template-columns: repeat(2, 1fr); grid-template-areas: "wp wp" "react react" "code ship" "speed ai"; }
  .mode { grid-template-columns: 1fr; }
  .s-b { display: none; }
  .nav-links { display: none; }
}

/* Phone ----------------------------------------------------------------- */
@media (max-width: 720px) {
  :root { --tile: 11.4vw; --r: 20px; }
  .scroll-hint { display: none; }
  .hero { padding-top: 104px; justify-content: flex-start; }
  .status { margin-bottom: 22px; }
  .gap { flex-basis: 100%; height: 0; }
  .hero-name { font-size: calc(var(--tile) * 0.78); }
  .tiles { gap: 1.2vw; }
  .t8, .t9 { width: calc(var(--tile) * 1.5); height: calc(var(--tile) * 1.5); font-size: 1.3em; }
  .hero-under { grid-template-columns: 1fr; margin-top: 32px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .s-a { top: auto; bottom: 5%; right: 6%; }
  .s-c { display: none; }
  .build-intro { grid-template-columns: 1fr; }
  .switch { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); margin-top: 36px; }
  .switch button { padding: 0 6px; font-size: 14px; }
  .demo { aspect-ratio: 4 / 3; }
  .demo-builder { grid-template-columns: 32% 1fr; }
  .palette { padding: 10px; gap: 8px; }
  .chip { padding: 8px 6px; font-size: 12px; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .num { padding: 22px 18px; }
  .num span { font-size: var(--small); }
  .tools { grid-template-columns: 1fr; grid-template-areas: "wp" "react" "code" "ship" "speed" "ai"; }
  .tool { min-height: 190px; }
  .card { grid-template-columns: 1fr; top: calc(76px + var(--n) * 14px); min-height: 0; }
  .card > p:last-child { grid-column: 1; grid-row: auto; margin-top: 24px; }
  .card-top { font-size: var(--small); }
  .hello { grid-template-columns: 1fr; margin: 0 10px; border-radius: 26px; }
  .badge { justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; }
  .js .rv { transform: none; transition: opacity 0.3s linear; }
  .marquee-track, .badge svg, .grain { animation: none !important; }
  .blk, .ln { opacity: 1; }
  .split .w > span { transform: none; transition: none; }
  .tile, .tool, .num, .card { transition: none; }
}

.toolbox, .foot { content-visibility: auto; contain-intrinsic-size: auto 900px; }
