@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f4f4f2;
  --surface: #fbfbfa;
  --ink: #151514;
  --muted: #595955;
  --line: #dcdcd7;
  --accent: #ff5a36;
  --accent-ink: #b9351a;
  --on-accent: #151514;
  --code-bg: #161615;
  --code-ink: #e9e9e4;
  --radius: 14px;
  --shadow: 0 24px 60px -24px rgb(40 30 20 / .28);
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", monospace;
  --pad: clamp(16px, 4vw, 48px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d;
    --surface: #171716;
    --ink: #ececE8;
    --muted: #a2a29c;
    --line: #2b2b29;
    --accent: #ff6a48;
    --accent-ink: #ff8f74;
    --code-bg: #1b1b1a;
    --shadow: 0 24px 60px -24px rgb(0 0 0 / .7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; z-index: 30; }
.skip:focus { left: 8px; }

/* Buttons: pill shape everywhere */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; white-space: nowrap; padding: .85em 1.5em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .2s cubic-bezier(.16,1,.3,1), background-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: .55em 1.1em; font-size: 15px; }
.btn-big { font-size: 20px; padding: 1em 2.2em; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; padding: 0 var(--pad); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 700; font-size: 22px; letter-spacing: -0.04em; }
.brand-side { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.nav nav { display: flex; gap: 28px; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 15px; transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav nav { display: none; } }
@media (max-width: 420px) { .brand-side { display: none; } }

/* Hero and 3D stage */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: clamp(32px, 5vw, 72px); max-width: 1400px; margin: 0 auto; padding: 0 var(--pad); }
.stage > .hero-copy, .stage > .chapter { grid-column: 1; }
.hero-copy { min-height: calc(100svh - 68px); display: flex; flex-direction: column; justify-content: center; padding: 48px 0; }
.hero h1, .hero-copy h1 { font-size: clamp(40px, 4.4vw, 64px); letter-spacing: -0.045em; line-height: 1.02; max-width: 14ch; text-wrap: balance; }
.lede { margin-top: 24px; font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); max-width: 40ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.stage-visual { grid-column: 2; grid-row: 1 / span 4; position: sticky; top: 68px; height: calc(100svh - 68px); align-self: start; margin-right: calc(var(--pad) * -1);
  /* Fade the edges so close-ups never end in a hard crop */
  -webkit-mask: linear-gradient(90deg, transparent, #000 12% 94%, transparent), linear-gradient(transparent, #000 6% 86%, transparent); -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent, #000 12% 94%, transparent), linear-gradient(transparent, #000 6% 86%, transparent); mask-composite: intersect; }
.stage-visual canvas, .poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster { object-fit: contain; opacity: 0; transition: opacity .6s ease; }
.poster.is-on { opacity: 1; }
.stage-visual canvas { opacity: 0; transition: opacity .8s ease; touch-action: pan-y; }
.stage.gl-ready canvas { opacity: 1; }
.stage.gl-ready .poster { opacity: 0; }
.chapter { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 48px 0; }
.chapter h2 { font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -0.04em; max-width: 18ch; text-wrap: balance; }
.chapter > p { color: var(--muted); font-size: 18px; max-width: 46ch; }
.chapter a { color: var(--accent-ink); }
.chapter .tag { margin-bottom: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 8px 0 0; }
.stats div { border-top: 1px solid var(--line); padding-top: 14px; min-width: 7ch; }
.stats dt { font-family: var(--mono); font-weight: 500; font-size: clamp(32px, 3.4vw, 46px); letter-spacing: -0.04em; line-height: 1; }
.stats dd { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
  .stage { display: block; }
  .hero-copy { min-height: 0; padding: clamp(40px, 10vw, 72px) 0 24px; }
  .stage-visual { top: 68px; height: 46svh; z-index: 0; margin: 0 calc(var(--pad) * -1); -webkit-mask: linear-gradient(#000 80%, transparent); mask: linear-gradient(#000 80%, transparent); }
  .chapter { position: relative; z-index: 1; min-height: 0; margin: 0 0 40svh; padding: 24px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .chapter:last-child { margin-bottom: 0; }
}

/* Sections */
.section { max-width: 1400px; margin: 0 auto; padding: clamp(80px, 11vw, 140px) var(--pad) 0; }
.h2 { font-size: clamp(34px, 4.4vw, 58px); letter-spacing: -0.04em; max-width: 18ch; }
.h3 { font-size: 20px; margin: 0 0 18px; }
.intro { margin-top: 18px; color: var(--muted); font-size: 19px; max-width: 58ch; }
.tag { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); margin-bottom: 14px; }
.small { font-size: 15px; color: var(--muted); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 48px; }
.tile { position: relative; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 3vw, 36px); overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.tile h3 { font-size: clamp(22px, 2vw, 28px); }
.tile p { color: var(--muted); }
.tile-tvsh { grid-column: span 7; grid-row: span 2; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tile-tvsh h3 { font-size: clamp(28px, 3vw, 40px); max-width: 16ch; }
.tile-tvsh p { color: color-mix(in srgb, var(--bg) 72%, var(--ink)); max-width: 52ch; }
.tile-tvsh .tag { color: var(--accent); }
.tile-chiedza, .tile-chenai { grid-column: span 5; }
.tile-chiedza b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.tile-tickets { grid-column: span 4; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tile-tickets p, .tile-tickets .tag { color: color-mix(in srgb, var(--on-accent) 80%, var(--accent)); }
.tile-portal, .tile-chicks { grid-column: span 4; padding: 0; }
.tile-portal img, .tile-chicks img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; border-bottom: 1px solid var(--line); }
.tile-body { padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; gap: 12px; }
.points { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.points li { padding-left: 22px; position: relative; color: color-mix(in srgb, var(--bg) 82%, var(--ink)); max-width: 52ch; }
.points li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--accent); }
.points b { font-family: var(--mono); font-weight: 500; color: var(--bg); }
.pipeline { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; font-family: var(--mono); font-size: 14px; }
.pipeline li { padding: 6px 14px; border: 1px solid color-mix(in srgb, var(--bg) 30%, var(--ink)); border-radius: 999px; }
.pipeline li + li::before { content: "\2192"; margin-right: 10px; color: var(--accent); }
.pipeline li:last-child { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (max-width: 900px) {
  .bento > * { grid-column: 1 / -1; grid-row: auto; }
}

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 40px 20px; margin-top: 48px; }
.site { text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.s-wide { grid-column: span 8; } .s-narrow { grid-column: span 4; } .s-third { grid-column: span 4; } .s-half { grid-column: span 6; }
.site figure { position: relative; margin: 0 0 12px; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.site figure > img:first-child { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.site .phone { position: absolute; right: 5%; bottom: 0; width: 23%; border-radius: 14px 14px 0 0; border: 4px solid var(--ink); border-bottom: 0; box-shadow: var(--shadow); transform: translateY(102%); transition: transform .6s cubic-bezier(.16,1,.3,1); }
.site:hover figure > img:first-child { transform: scale(1.03); }
.site:hover .phone, .site:focus-visible .phone { transform: translateY(18%); }
.site h3 { font-size: 20px; display: flex; align-items: baseline; gap: 10px; }
.site h3 span { font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--accent-ink); letter-spacing: 0; }
a.site h3::after { content: "\2197"; font-weight: 400; color: var(--muted); transition: transform .3s; }
a.site:hover h3::after { transform: translate(2px, -2px); color: var(--accent-ink); }
.site p { color: var(--muted); font-size: 15.5px; max-width: 48ch; }
.gallery > .site-more { grid-column: 1 / -1; }
.site-more { justify-content: center; border-radius: var(--radius); border: 1px dashed var(--line); padding: 28px; }
.credit { margin-top: 40px; font-size: 14px; color: var(--muted); }
@media (hover: none) { .site .phone { display: none; } }
@media (max-width: 900px) { .gallery > * { grid-column: span 6; } }
@media (max-width: 620px) { .gallery > * { grid-column: 1 / -1; } }

/* Code */
.code-wrap > * { min-width: 0; }
.code-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 24px; margin-top: 48px; align-items: start; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.tabs button { text-align: left; font: 500 16px/1.3 var(--sans); color: var(--muted); background: none; border: 0; border-left: 2px solid var(--line); padding: 14px 18px; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-left-color: var(--accent); background: var(--surface); }
.panel > p { font-size: 18px; color: var(--muted); max-width: 64ch; margin-bottom: 20px; }
.panel pre { margin: 0; background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius); padding: 24px 26px; overflow-x: auto; font: 400 14px/1.7 var(--mono); border: 1px solid var(--line); }
.panel .c { color: #8c8c86; }
.panel .s { color: #ffb29c; }
.panel:not([hidden]) { animation: fade .45s cubic-bezier(.16,1,.3,1); }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 860px) {
  .code-wrap { grid-template-columns: 1fr; }
  .tabs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; padding-bottom: 4px; }
  .tabs button { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; white-space: nowrap; scroll-snap-align: start; }
  .tabs button[aria-selected="true"] { border-color: var(--accent); }
}

/* Automations */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 48px; }
.defs { margin: 0; display: grid; gap: 22px; }
.defs dt { font-weight: 600; }
.defs dd { margin: 4px 0 0; color: var(--muted); max-width: 54ch; }
.stack { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 12px; }
.stack li { padding: 14px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 15.5px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-size: 13.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Approach */
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 48px clamp(32px, 6vw, 96px); margin-top: 48px; }
.principle { border-top: 2px solid var(--ink); padding-top: 22px; }
.principle h3 { font-size: clamp(22px, 2.2vw, 30px); }
.principle p { margin-top: 12px; color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }

/* Contact */
.contact { max-width: 1400px; margin: clamp(96px, 12vw, 160px) auto 0; padding: clamp(64px, 9vw, 120px) var(--pad); text-align: center; border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(38px, 5.6vw, 80px); letter-spacing: -0.045em; max-width: 15ch; margin: 0 auto; }
.contact > p { margin: 20px auto 36px; color: var(--muted); font-size: 19px; max-width: 46ch; }
.contact .mail { margin: 18px 0 0; font-family: var(--mono); font-size: 15px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px var(--pad); color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* Reveal on scroll (only when JS runs and motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
  .js .reveal.in { opacity: 1; transform: none; }
  .hero-copy > * { animation: rise .9s cubic-bezier(.16,1,.3,1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .stage-visual { animation: rise 1.1s cubic-bezier(.16,1,.3,1) .15s both; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
}
