/* Palette pulled from the logo. One accent (mango), the rest are logo flavours used only inside illustrations. */
:root {
  --bg: #131218;
  --bg-2: #1a1920;
  --line: #2a2932;
  --text: #ecebef;
  --muted: #9a98a6;
  --mango: #ff9d1c;
  --mango-soft: #ffc966;
  --coral: #ff5a45;
  --leaf: #22b3a3;
  --radius: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Be Vietnam Pro", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--mango); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }

/* Grain lives on a fixed layer so scrolling never repaints it */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.05;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--mango); color: #1b1408;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform 0.4s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { background: var(--mango-soft); }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--bg-2); border-color: #3a3944; }
.btn--small { height: 38px; padding: 0 16px; font-size: 14px; }
.btn svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(19 18 24 / 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgb(255 255 255 / 0.05);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.wordmark { font: 500 17px var(--mono); color: #cfcdd6; letter-spacing: -0.01em; }
.wordmark b { font-weight: 500; color: var(--mango); }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav__links a:not(.btn) { color: var(--muted); transition: color 0.2s; }
.nav__links a:not(.btn):hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center;
  min-height: min(calc(100dvh - 68px - 64px), 860px);
  padding-block: 64px 48px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px var(--mono); color: var(--muted);
  padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 999px;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--leaf);
  animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(2.8); opacity: 0; } }

.hero h1 { margin-top: 28px; font-size: clamp(2.3rem, 4.6vw, 3.9rem); max-width: 15ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 44px; }

.hero__art { position: relative; justify-self: end; width: min(100%, 480px); }
.hero__logo {
  aspect-ratio: 1; border-radius: 40px; overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.06);
  box-shadow: 0 40px 80px -30px rgb(255 140 20 / 0.18), inset 0 1px 0 rgb(255 255 255 / 0.06);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px) rotate(-0.6deg); } }

.term {
  position: absolute; left: -48px; bottom: -28px; width: min(320px, 78%);
  background: rgb(26 25 32 / 0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgb(255 255 255 / 0.09); border-radius: 16px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 24px 48px -20px rgb(0 0 0 / 0.6);
}
.term__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.term__bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a3944; }
.term__bar span { margin-left: 8px; font: 12px var(--mono); color: var(--muted); }
.term__body { margin: 0; padding: 14px 16px 16px; font: 13px/1.5 var(--mono); color: var(--text); white-space: pre-wrap; min-height: 52px; }
.term__prompt { color: var(--mango); }
.caret { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--mango); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; flex-shrink: 0; }
.marquee li { font: 500 15px var(--mono); color: var(--muted); padding-inline: 28px; white-space: nowrap; display: flex; align-items: center; gap: 28px; }
.marquee li::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #3a3944; margin-right: -28px; margin-left: 28px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding-block: 128px 0; }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.tile--web, .tile--ai { grid-column: span 3; }
.tile--mobile, .tile--game { grid-column: span 2; }
.tile { display: flex; flex-direction: column; gap: 24px; }
.tile__visual {
  position: relative; height: 280px; overflow: hidden;
  display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
  transition: border-color 0.4s var(--ease), transform 0.5s var(--ease);
}
.tile:hover .tile__visual { border-color: #3a3944; transform: translateY(-3px); }
.tile__text { padding-inline: 4px; }
.tile h3 { font-size: 21px; }
.tile p { margin-top: 8px; color: var(--muted); max-width: 48ch; }

/* Web: browser skeleton */
.browser { width: 78%; max-width: 440px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.browser__bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.browser__bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a3944; }
.browser__bar span { flex: 1; height: 14px; margin-left: 10px; border-radius: 6px; background: var(--bg-2); }
.browser__body { display: grid; gap: 10px; padding: 18px; }
.browser__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; margin-top: 6px; }
.sk {
  height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, #24232c 0%, #34333d 40%, #24232c 80%) 0 0 / 300% 100%;
  animation: shimmer 2.4s linear infinite;
}
.sk--title { width: 55%; height: 16px; background-color: var(--mango); background-image: linear-gradient(90deg, var(--mango) 0%, var(--mango-soft) 40%, var(--mango) 80%); }
.sk--short { width: 70%; }
.sk--block { height: 62px; border-radius: 10px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* Mobile: phone + toast */
.phone {
  position: relative; width: 150px; height: 300px; margin-top: 90px;
  border: 1px solid #3a3944; border-radius: 30px; background: var(--bg);
  padding: 46px 14px 0;
}
.phone__notch { position: absolute; top: 10px; left: 50%; width: 52px; height: 14px; margin-left: -26px; border-radius: 10px; background: var(--bg-2); }
.phone__list { display: grid; gap: 10px; }
.phone__list i { height: 34px; border-radius: 10px; background: var(--bg-2); }
.toast {
  position: absolute; top: 34px; left: 50%; width: 200px; margin-left: -100px;
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: #23222b; border: 1px solid rgb(255 255 255 / 0.08); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), 0 12px 24px -10px rgb(0 0 0 / 0.5);
  animation: toast 4.5s var(--ease) infinite;
}
.toast__dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--leaf); }
@keyframes toast {
  0%, 8% { transform: translateY(-70px) scale(0.9); opacity: 0; }
  18% { transform: translateY(4px) scale(1.03); opacity: 1; }
  24%, 76% { transform: translateY(0) scale(1); opacity: 1; }
  88%, 100% { transform: translateY(-70px) scale(0.9); opacity: 0; }
}

/* Game: hopping sprite collecting coins */
.stage { position: relative; width: 82%; height: 180px; }
.ground { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: repeating-linear-gradient(90deg, #3a3944 0 10px, transparent 10px 18px); }
.sprite {
  position: absolute; left: 14%; bottom: 2px; width: 34px; height: 34px;
  background: var(--mango); border-radius: 9px 9px 6px 6px;
  box-shadow: inset -7px -6px 0 rgb(0 0 0 / 0.14);
  animation: hop 1.6s cubic-bezier(0.3, 0, 0.4, 1) infinite;
}
.sprite::before { content: ""; position: absolute; top: 10px; right: 7px; width: 5px; height: 5px; background: var(--bg); border-radius: 1px; }
.sprite::after { content: ""; position: absolute; top: -9px; left: 12px; width: 10px; height: 8px; background: var(--leaf); border-radius: 8px 0; }
@keyframes hop {
  0%, 100% { transform: translateY(0) scaleY(1); }
  8% { transform: translateY(0) scale(1.12, 0.86); }
  45% { transform: translateY(-96px) scale(0.94, 1.06); }
  88% { transform: translateY(0) scale(1.1, 0.9); }
}
.coin {
  position: absolute; bottom: 70px; left: 62%; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--mango-soft);
  animation: drift 4.8s linear infinite;
}
.coin--2 { bottom: 104px; left: 74%; animation-delay: -1.6s; }
.coin--3 { bottom: 52px; left: 86%; border-color: var(--coral); animation-delay: -3.2s; }
@keyframes drift { from { transform: translateX(160px); } to { transform: translateX(-340px); } }

/* AI: prompt + streaming answer */
.chat { width: 78%; max-width: 440px; display: grid; gap: 14px; }
.chat__q {
  justify-self: end; max-width: 85%; padding: 12px 16px;
  background: #2a2420; color: var(--mango-soft); border: 1px solid rgb(255 157 28 / 0.18);
  border-radius: 18px 18px 4px 18px; font-size: 14px;
}
.chat__a { display: grid; gap: 10px; padding: 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; }
.shimmer {
  height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, #24232c 0%, rgb(34 179 163 / 0.55) 45%, #24232c 90%) 0 0 / 300% 100%;
  animation: shimmer 2s linear infinite;
}
.shimmer--short { width: 62%; animation-delay: -0.4s; }

/* ---------- Contact ---------- */
.contact {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
  width: calc(100% - 48px); max-width: 1192px; margin-top: 128px; padding: 64px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 36px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04);
}
.contact.section { padding-top: 64px; }
.contact h2 { max-width: 16ch; }
.contact__actions { display: grid; gap: 14px; justify-items: start; }
.mail {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 clamp(1.15rem, 2.2vw, 1.6rem) var(--mono); color: var(--mango);
  padding-bottom: 6px; border-bottom: 1px solid rgb(255 157 28 / 0.35);
  transition: border-color 0.3s;
}
.mail:hover { border-color: var(--mango); }
.mail svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease); }
.mail:hover svg { transform: translate(3px, -3px); }
.copy.is-done { border-color: var(--leaf); color: var(--leaf); }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 48px; margin-top: 64px; color: var(--muted); font-size: 14px; }
.footer .wordmark { font-size: 15px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-block: 48px 72px; gap: 64px; }
  .hero__art { justify-self: center; width: min(100%, 380px); }
  .term { left: -12px; }
  .bento { grid-template-columns: 1fr; }
  .tile--web, .tile--ai, .tile--mobile, .tile--game { grid-column: auto; }
  .contact { grid-template-columns: 1fr; padding: 40px 28px; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .nav__links { gap: 18px; }
  .nav__links li:not(:last-child) { display: none; }
  .section { padding-top: 96px; }
  .contact { width: calc(100% - 32px); margin-top: 96px; border-radius: 28px; }
  .contact.section { padding-top: 40px; }
  .tile__visual { height: 240px; }
  .phone { margin-top: 110px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .toast { opacity: 1; }
}
