/* ==========================================================================
   Noval: main stylesheet
   Tokens, base, layout, components, pages, motion
   ========================================================================== */

/* ---------- Fonts (self-hosted Geist, Latin subset, OFL) ---------- */
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback keeps layout steady while fonts load */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("Helvetica");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #07080a;
  --bg-2: #0e1013;
  --bg-3: #15181c;
  --text: #edeef0;
  --muted: #a4a7ae;
  --faint: #8a8e96;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.16);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  --ember: #ff6a2b;
  --ember-soft: rgba(255, 106, 43, 0.14);
  --ok: #4ade80;
  --wa: #25d366;

  --sans: "Geist", "Geist Fallback", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-hero: clamp(3.2rem, 1.4rem + 7.2vw, 7.75rem);
  --fs-h1: clamp(2.5rem, 1.3rem + 5vw, 5.5rem);
  --fs-h2: clamp(2rem, 1.25rem + 3.2vw, 4rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --fs-lead: clamp(1.075rem, 1rem + 0.4vw, 1.3rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.75rem);
  --max: 80rem;
  --space: clamp(5rem, 3rem + 8vw, 10rem);
  --r: 14px;
  --r-sm: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --header-h: 4.25rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  color-scheme: dark;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
:where(ul[class], ol[class], nav ul, nav ol) { list-style: none; padding: 0; margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ember); color: #07080a; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 0.75rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Type ---------- */
.hero-title, .h1, .h2, .h3 {
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-wrap: balance;
}
.hero-title { font-size: var(--fs-hero); line-height: 0.92; letter-spacing: -0.055em; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); line-height: 1; letter-spacing: -0.045em; }
.h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.025em; font-weight: 550; }
.grad {
  background: linear-gradient(180deg, #fff 30%, #9da1a9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad .dim { color: transparent; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--muted); max-width: 40ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.prose { max-width: 62ch; color: var(--muted); text-wrap: pretty; }
.prose > * + * { margin-top: 1.1em; }
.prose strong { color: var(--text); font-weight: 550; }
.prose ul { padding-left: 1.1em; }
.prose li + li { margin-top: 0.45em; }
.prose a { color: var(--text); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--space); position: relative; }
.section + .section { padding-top: 0; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.5rem var(--gutter); }
.grid > * { grid-column: 1 / -1; }
@media (min-width: 56em) {
  .col-l { grid-column: 1 / span 5; }
  .col-r { grid-column: 7 / -1; }
  .col-main { grid-column: 1 / span 8; }
  .col-side { grid-column: 9 / -1; }
}

.sec-intro { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.sec-intro .lead { max-width: 46ch; }
@media (min-width: 56em) {
  .sec-intro.split { grid-template-columns: 1.1fr 1fr; align-items: end; column-gap: var(--gutter); }
  .sec-intro.split .eyebrow { grid-column: 1 / -1; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 0.6rem; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); }

/* Background texture */
.gridbg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 25%, transparent 80%);
}
.halo {
  position: absolute; left: 50%; top: -32vh; width: 130vw; height: 85vh; transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 106, 43, 0.34), rgba(194, 65, 12, 0.12) 40%, transparent 70%);
}

/* ---------- Buttons ---------- */
.btn {
  --h: 2.9rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: var(--h); padding: 0 1.15rem;
  border-radius: var(--r-sm); border: 1px solid transparent;
  background: var(--text); color: var(--bg);
  font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: rgba(255, 255, 255, 0.05); color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn--ember { background: var(--ember); color: #07080a; }
.btn--ember:hover { background: #ff8450; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.arrow { width: 1em; height: 1em; flex: none; }
.wa-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 8px rgba(37, 211, 102, 0.7); flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text); font-weight: 500; text-decoration: none; }
.link-arrow:hover { color: var(--ember); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 10, 0.6);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(7, 8, 10, 0.8); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.brand { display: inline-flex; padding-block: 0.75rem; color: var(--text); }
.brand svg { width: 5.75rem; }
.nav-desktop { display: none; }
.nav-desktop ul { display: flex; align-items: center; gap: 0.25rem; }
.nav-desktop a:not(.btn) {
  display: inline-flex; align-items: center; height: 2.25rem; padding: 0 0.85rem; border-radius: 8px;
  font-size: 0.9rem; color: var(--muted); text-decoration: none; transition: color 0.2s, background-color 0.2s;
}
.nav-desktop a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-desktop a[aria-current="page"] { color: var(--text); }
.nav-desktop .btn { --h: 2.4rem; margin-left: 0.75rem; font-size: 0.875rem; padding-inline: 0.95rem; }
.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; padding: 0 0.85rem;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.menu-toggle .bars { display: grid; gap: 5px; width: 16px; }
.menu-toggle .bars span { height: 1.5px; background: currentColor; transition: transform 0.3s var(--ease); }
.menu-toggle[aria-expanded="true"] .bars span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
@media (min-width: 56em) { .nav-desktop { display: block; } .menu-toggle { display: none; } }

.menu-panel {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  background: var(--bg); padding: 1rem var(--gutter) 1.5rem;
  display: flex; flex-direction: column; overflow-y: auto;
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s;
}
.menu-panel.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 0.25s var(--ease), transform 0.25s var(--ease); }
.menu-panel ol { counter-reset: m; }
.menu-panel li { counter-increment: m; border-bottom: 1px solid var(--line); }
.menu-panel li a { display: flex; align-items: baseline; gap: 1rem; padding-block: 1rem; font-size: 1.9rem; font-weight: 550; letter-spacing: -0.04em; text-decoration: none; }
.menu-panel li a::before { content: "0" counter(m); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--faint); min-width: 1.6rem; }
.menu-panel .menu-foot { margin-top: auto; padding-top: 2rem; display: grid; gap: 0.6rem; }
.menu-panel .menu-foot .btn { width: 100%; --h: 3.1rem; }
body.menu-open { overflow: hidden; }
body.menu-open .site-header { background: var(--bg); }
@media (min-width: 56em) { .menu-panel { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(3.5rem, 2rem + 6vw, 7.5rem); text-align: center; isolation: isolate; }
.hero .wrap { position: relative; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: 0.6rem; height: 1.9rem; padding: 0 0.8rem;
  border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04);
  font-family: var(--mono); font-size: 0.75rem; color: #c9cbd0;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px var(--ember); }
.hero .hero-title { margin-top: 1.6rem; }
.hero .lead { margin: 1.5rem auto 0; max-width: 37rem; }
.hero .btn-row { justify-content: center; margin-top: 2rem; }
@media (max-width: 34em) {
  .hero .btn-row { flex-direction: column; align-items: stretch; max-width: 22rem; margin-inline: auto; }
  .hero .btn { --h: 3.1rem; }
}

/* Hero cards */
.hero-cards {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  width: min(74rem, 100%); margin: clamp(3rem, 2rem + 4vw, 5rem) auto 0; padding-inline: var(--gutter);
  text-align: left;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.hero-cards .card:not(.card--main) { display: none; }
@media (min-width: 56em) {
  .hero-cards { grid-template-columns: 1fr 1.35fr 1fr; align-items: end; gap: 1.5rem; }
  .hero-cards .card:not(.card--main) { display: block; margin-bottom: 2rem; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: var(--r);
  background: var(--glass), var(--bg-2);
  border: 1px solid var(--line);
  padding: 1.1rem;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.card--main { background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)), var(--bg-2); border-color: rgba(255, 140, 90, 0.35); }
/* Pointer spotlight (desktop) */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, -999px) var(--my, -999px), rgba(255, 106, 43, 0.12), transparent 45%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover::after { opacity: 1; }
.card .k { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.card .k .live { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ok); }
.card .k .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }

/* UI fragments used inside cards */
.ui-mods { display: grid; gap: 0.55rem; margin-top: 0.9rem; }
.ui-mods li { display: flex; align-items: center; gap: 0.65rem; font-size: 0.8125rem; color: #d5d7db; }
.ui-mods li i { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #4a4f58; flex: none; }
.ui-mods li.on i { background: var(--ember); border-color: var(--ember); box-shadow: 0 0 10px rgba(255, 106, 43, 0.5); }
.ui-title { margin-top: 0.85rem; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; }
.ui-title small { display: block; margin-top: 0.3rem; font-size: 0.8125rem; font-weight: 400; letter-spacing: 0; color: var(--faint); }
.ui-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-top: 0.75rem; }
.ui-seg span { display: grid; place-items: center; height: 2.1rem; border-radius: 8px; border: 1px solid var(--line-2); font-size: 0.8125rem; color: #d5d7db; }
.ui-seg span.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ui-pay { display: grid; place-items: center; height: 2.6rem; margin-top: 0.85rem; border-radius: 9px; background: var(--ember); color: #07080a; font-weight: 600; font-size: 0.875rem; }
.ui-bars { display: flex; align-items: flex-end; gap: 0.45rem; height: 6.5rem; margin-top: 1rem; }
.ui-bars span { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--ember), rgba(255, 106, 43, 0.12)); }
.ui-steps { display: grid; gap: 0.4rem; margin-top: 0.9rem; counter-reset: st; }
.ui-steps li { counter-increment: st; display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.65rem; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 0.8125rem; color: #d5d7db; }
.ui-steps li::before { content: counter(st, decimal-leading-zero); font-family: var(--mono); font-size: 0.6875rem; color: var(--ember); }
.ui-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.9rem; }
.ui-chips span { font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: 99px; border: 1px solid var(--line-2); color: #d5d7db; }
.ui-chips span.on { border-color: rgba(255, 106, 43, 0.6); color: var(--ember); background: var(--ember-soft); }
.ui-brand { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.9rem; }
.ui-brand .tile { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 600; font-size: 1.75rem; letter-spacing: -0.06em; }
.ui-brand .sw { display: grid; grid-template-rows: repeat(3, 1fr); gap: 0.35rem; }
.ui-brand .sw i { border-radius: 8px; }
.ui-browser { margin-top: 0.9rem; border-radius: 10px; border: 1px solid var(--line-2); overflow: hidden; }
.ui-browser .bar { display: flex; gap: 5px; padding: 0.5rem 0.6rem; background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid var(--line); }
.ui-browser .bar i { width: 7px; height: 7px; border-radius: 50%; background: #3a3e45; }
.ui-browser .pg { padding: 0.85rem; display: grid; gap: 0.45rem; }
.ui-browser .pg b { height: 0.7rem; width: 70%; border-radius: 3px; background: #e5e6e8; }
.ui-browser .pg s { height: 0.4rem; border-radius: 3px; background: #2d3137; }
.ui-browser .pg u { margin-top: 0.3rem; height: 1.6rem; width: 42%; border-radius: 6px; background: var(--ember); }
.ui-ab { display: grid; gap: 0.6rem; margin-top: 0.9rem; }
.ui-ab div { display: grid; grid-template-columns: 1.6rem 1fr; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.6875rem; color: var(--faint); }
.ui-ab div span { height: 0.6rem; border-radius: 99px; background: rgba(255, 255, 255, 0.1); position: relative; overflow: hidden; }
.ui-ab div span::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--c, #5b6069); }
.ui-chat { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.ui-chat p { max-width: 88%; padding: 0.6rem 0.8rem; border-radius: 12px 12px 12px 4px; background: rgba(255, 255, 255, 0.06); font-size: 0.8125rem; line-height: 1.45; color: #d5d7db; }
.ui-chat p.me { justify-self: end; border-radius: 12px 12px 4px 12px; background: #134d37; color: #e6f4ec; }
.ui-chat small { justify-self: end; font-family: var(--mono); font-size: 0.625rem; color: var(--faint); }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee ul { display: inline-flex; gap: 2.5rem; padding-block: 1.15rem; padding-left: 2.5rem; }
.marquee li { display: inline-flex; align-items: center; gap: 2.5rem; font-size: 1.05rem; color: var(--muted); }
.marquee li::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ember); }
@media (prefers-reduced-motion: no-preference) {
  .marquee ul { animation: marquee 40s linear infinite; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Statement ---------- */
.statement { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 3.25rem); font-weight: 550; letter-spacing: -0.04em; line-height: 1.1; max-width: 26ch; text-wrap: balance; }
.statement .w { transition: color 0.4s var(--ease); }
.js .statement .w { color: #666a72; }
.js .statement .w.lit { color: var(--text); }
.points { display: grid; gap: 1rem; margin-top: clamp(2.5rem, 2rem + 3vw, 4rem); }
.points .card h3 { font-size: 1.0625rem; font-weight: 550; letter-spacing: -0.015em; margin-top: 0.75rem; }
.points .card p { color: var(--muted); font-size: 0.9375rem; margin-top: 0.4rem; }
@media (min-width: 48em) { .points { grid-template-columns: repeat(3, 1fr); } }

/* ---------- System bento ---------- */
.rail { display: none; }
@media (min-width: 56em) {
  .rail { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; margin-bottom: 1.25rem; }
  .rail a { display: grid; gap: 0.5rem; text-decoration: none; font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); transition: color 0.2s; }
  .rail a::before { content: ""; height: 2px; border-radius: 2px; background: var(--line-2); transition: background-color 0.3s; }
  .rail a.on, .rail a:hover { color: var(--text); }
  .rail a.on::before { background: var(--ember); box-shadow: 0 0 12px rgba(255, 106, 43, 0.6); }
}
.bento { display: grid; gap: 1rem; }
.bento .card { padding: 1.35rem; display: flex; flex-direction: column; scroll-margin-top: calc(var(--header-h) + 5rem); }
.bento .card .h3 { margin-top: 1rem; }
.bento .card > p { margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; max-width: 44ch; }
.bento .card .ui { margin-top: auto; padding-top: 1.25rem; }
.bento .card.is-active { border-color: rgba(255, 140, 90, 0.4); }
@media (min-width: 48em) { .bento { grid-template-columns: repeat(2, 1fr); } .bento .card:last-child { grid-column: 1 / -1; } }
@media (min-width: 64em) {
  .bento { grid-template-columns: repeat(12, 1fr); }
  .bento .card:nth-child(1), .bento .card:nth-child(2), .bento .card:nth-child(3) { grid-column: span 4; }
  .bento .card:nth-child(4) { grid-column: span 5; }
  .bento .card:nth-child(5) { grid-column: span 7; }
  .bento .card:nth-child(6), .bento .card:nth-child(7) { grid-column: span 6; }
}

/* ---------- Audience ---------- */
.audience { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.audience li { background: var(--bg); padding: 1.5rem; display: grid; gap: 0.5rem; align-content: start; transition: background-color 0.3s; }
.audience li:hover { background: var(--bg-2); }
.audience .who { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.04em; }
.audience .what { color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 40em) { .audience { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .audience { grid-template-columns: repeat(3, 1fr); } .audience li { padding: 2rem; min-height: 11rem; } }

/* ---------- Work cards ---------- */
.cards { display: grid; gap: 1.25rem; }
.work-card a { display: grid; gap: 1rem; height: 100%; text-decoration: none; padding: 0.6rem 0.6rem 1.25rem; }
.work-card .cover { aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-3); }
.work-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.work-card a:hover .cover img { transform: scale(1.035); }
.work-card .meta { display: flex; justify-content: space-between; gap: 1rem; padding-inline: 0.6rem; }
.work-card .h3 { padding-inline: 0.6rem; }
.work-card p { padding-inline: 0.6rem; color: var(--muted); font-size: 0.9375rem; }
.work-card .go { padding-inline: 0.6rem; margin-top: auto; }
.work-card.card { padding: 0; }
@media (min-width: 48em) { .cards { grid-template-columns: repeat(2, 1fr); } .cards.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 48em) and (max-width: 63.99em) { .cards.three { grid-template-columns: repeat(2, 1fr); } .cards.three > :first-child { grid-column: 1 / -1; } }
.cards.featured > :first-child .cover { aspect-ratio: 16 / 8; }
@media (min-width: 48em) { .cards.featured > :first-child { grid-column: 1 / -1; } }

/* ---------- Process / timeline ---------- */
.timeline { padding: clamp(1.1rem, 0.8rem + 1.5vw, 2rem); }
.tl-scale { display: grid; grid-template-columns: repeat(12, 1fr); margin: 1.25rem 0 0.75rem; font-family: var(--mono); font-size: 0.625rem; color: var(--faint); }
.tl-scale span { border-left: 1px solid var(--line); padding-left: 0.3rem; }
.tl-rows { display: grid; gap: 0.6rem; }
.tl-row { display: grid; grid-template-columns: repeat(12, 1fr); align-items: center; }
.tl-bar { height: 2.25rem; border-radius: 8px; display: flex; align-items: center; padding: 0 0.75rem; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; overflow: hidden; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line-2); }
.tl-bar.ember { background: linear-gradient(90deg, rgba(255, 106, 43, 0.9), rgba(255, 106, 43, 0.5)); color: #07080a; border-color: transparent; }
.tl-bar.open { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 14px); }
.phases { display: grid; gap: 1rem; margin-top: 1rem; }
.phases .card .h3 { margin-top: 1.25rem; }
.phases .card p { margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 48em) { .phases { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .phases { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 39.99em) { .tl-scale span:nth-child(even) { visibility: hidden; } }

/* ---------- Principles ---------- */
.principles { display: grid; gap: 1rem; }
.principles .card h3 { margin-top: 1rem; font-size: 1.15rem; font-weight: 550; letter-spacing: -0.02em; line-height: 1.3; }
.principles .card p { margin-top: 0.5rem; color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 48em) { .principles { grid-template-columns: repeat(2, 1fr); } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding-block: 1.3rem; cursor: pointer; list-style: none;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); font-weight: 500; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 1.75rem; height: 1.75rem; border-radius: 8px; border: 1px solid var(--line-2);
  background:
    linear-gradient(var(--text), var(--text)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 1.5px 10px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding-bottom: 1.5rem; color: var(--muted); max-width: 62ch; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; padding-block: clamp(5rem, 3rem + 8vw, 9rem); border-top: 1px solid var(--line); isolation: isolate; }
.cta .halo { top: auto; bottom: -45vh; }
.cta .gridbg { -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 100%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 50% 100%, #000 20%, transparent 75%); }
.cta .wrap { position: relative; z-index: 2; display: grid; gap: 3rem; }
.cta .h2 { margin-top: 1.25rem; max-width: 15ch; }
.cta p.lead { margin-top: 1.25rem; }
.cta .btn-row { margin-top: 2rem; }
.cta .card { max-width: 24rem; width: 100%; }
@media (min-width: 56em) { .cta .wrap { grid-template-columns: 1.4fr 1fr; align-items: center; } .cta .card { justify-self: end; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding-top: 4rem; padding-bottom: 6.5rem; font-size: 0.875rem; border-top: 1px solid var(--line); overflow: hidden; }
.site-footer .f-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem var(--gutter); }
.site-footer h2 { margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: 0.5rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer li { color: var(--muted); }
.site-footer .f-mark { margin-top: 4rem; color: var(--text); opacity: 0.9; }
.site-footer .f-mark svg { width: 100%; }
.site-footer .f-mark svg path { fill: url(#fmark); }
.site-footer .f-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--faint); }
@media (min-width: 56em) { .site-footer { padding-bottom: 2.5rem; } .site-footer .f-cols { grid-template-columns: 2fr repeat(3, 1fr); } }
.f-about p { color: var(--muted); max-width: 28ch; margin-top: 1rem; }
.f-about svg { width: 6rem; }

/* ---------- Mobile WhatsApp bar ---------- */
.wa-bar {
  position: fixed; left: 0.75rem; right: 0.75rem; bottom: max(0.75rem, env(safe-area-inset-bottom)); z-index: 45;
  display: flex; gap: 0.5rem;
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
.wa-bar .btn { flex: 1; --h: 3.1rem; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.9); }
.wa-bar .btn--ghost { flex: 0 0 auto; background: rgba(20, 22, 26, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.wa-bar.is-hidden { transform: translateY(150%); opacity: 0; pointer-events: none; }
@media (min-width: 56em) { .wa-bar { display: none; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding-top: clamp(3.5rem, 2rem + 5vw, 7rem); padding-bottom: clamp(3rem, 2rem + 4vw, 5rem); isolation: isolate; }
.page-hero .halo { top: -45vh; opacity: 0.8; }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero .h1 { margin-top: 1.25rem; max-width: 18ch; }
.page-hero .lead { margin-top: 1.5rem; max-width: 44ch; }
.crumb a { color: var(--faint); }
.crumb a:hover { color: var(--text); }

/* ---------- Case study ---------- */
.notice { display: flex; gap: 0.75rem; align-items: flex-start; margin-top: 2rem; max-width: 44rem; padding: 0.9rem 1rem; border-radius: var(--r-sm); border: 1px solid rgba(255, 140, 90, 0.35); background: var(--ember-soft); font-size: 0.875rem; color: #e9d6cc; }
.notice strong { color: var(--text); font-weight: 600; }
.notice::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 0.5rem; border-radius: 50%; background: var(--ember); }
.case-cover { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--bg-3); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 39.99em) { .case-cover { aspect-ratio: 4 / 3; } }
.specs { display: grid; gap: 0; }
.specs div { padding-block: 0.85rem; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs dt { margin-bottom: 0.3rem; }
.specs dd { font-size: 0.9375rem; color: #d5d7db; }
@media (min-width: 56em) { .col-side .card { position: sticky; top: calc(var(--header-h) + 1.5rem); } }
.case-body section + section { margin-top: clamp(3rem, 2rem + 3vw, 5rem); }
.case-body h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; margin-top: 0.6rem; }
.case-body .prose { margin-top: 1.1rem; }
.funnel { display: grid; gap: 0.5rem; margin-top: 1.5rem; counter-reset: f; }
.funnel li { counter-increment: f; position: relative; display: grid; grid-template-columns: 2.25rem 1fr; gap: 0.75rem; align-items: center; padding: 0.85rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--glass), var(--bg-2); font-size: 0.9375rem; color: #d5d7db; }
.funnel li::before { content: counter(f, decimal-leading-zero); font-family: var(--mono); font-size: 0.75rem; color: var(--ember); }
.funnel li + li::after { content: ""; position: absolute; left: 1.55rem; top: -0.55rem; width: 1px; height: 0.55rem; background: var(--line-2); }
.kpis { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.kpis li { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding-block: 0.85rem; border-bottom: 1px solid var(--line); color: #d5d7db; }
.kpis li span:last-child { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); align-self: center; }
.next-case a { display: block; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); text-decoration: none; }
.next-case .h2 { margin-top: 0.75rem; }
.next-case a:hover .h2 { color: var(--ember); }

/* ---------- Approach ---------- */
.phase { display: grid; gap: 1.5rem; padding: clamp(1.4rem, 1rem + 2vw, 2.5rem); }
.phase + .phase { margin-top: 1rem; }
.phase .ph-n { font-family: var(--mono); font-size: 0.75rem; color: var(--ember); }
.phase .h3 { margin-top: 0.75rem; }
.phase p { margin-top: 0.5rem; color: var(--muted); max-width: 40ch; }
.phase ul { display: grid; gap: 0.6rem; }
.phase ul li { display: flex; gap: 0.7rem; font-size: 0.9375rem; color: #d5d7db; }
.phase ul li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 0.3rem; border-radius: 50%; border: 1.5px solid var(--ember); background: radial-gradient(circle, var(--ember) 35%, transparent 40%); }
@media (min-width: 56em) { .phase { grid-template-columns: 1fr 1fr; align-items: start; column-gap: var(--gutter); } }
.list-rows { border-top: 1px solid var(--line); }
.list-rows li { display: grid; gap: 0.25rem; padding-block: 1.05rem; border-bottom: 1px solid var(--line); }
.list-rows strong { font-weight: 550; }
.list-rows span { color: var(--muted); font-size: 0.9375rem; }
@media (min-width: 48em) { .list-rows li { grid-template-columns: 1fr 1.6fr; column-gap: var(--gutter); } }

/* ---------- About ---------- */
.portrait { aspect-ratio: 4 / 5; display: grid; place-items: center; padding: 0; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .mono-t { font-size: clamp(8rem, 5rem + 10vw, 14rem); font-weight: 600; letter-spacing: -0.08em; line-height: 1; }
.portrait figcaption { position: absolute; left: 1rem; bottom: 1rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem var(--gutter); margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.facts dd { margin-top: 0.3rem; color: var(--text); }

/* ---------- Start page ---------- */
.channels { display: grid; gap: 0.75rem; }
.channel a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.2rem 1rem; padding: 1.25rem; text-decoration: none; }
.channel .ch-name { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.04em; display: inline-flex; align-items: center; gap: 0.6rem; }
.channel .ch-note { grid-column: 1; color: var(--muted); font-size: 0.875rem; }
.channel .ch-arrow { grid-row: 1 / span 2; grid-column: 2; width: 2.5rem; height: 2.5rem; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background-color 0.2s, color 0.2s; }
.channel .ch-arrow svg { width: 1rem; height: 1rem; }
.channel a:hover .ch-arrow { background: var(--text); color: var(--bg); }
.composer { display: grid; gap: 1.1rem; padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); }
.composer > p { color: var(--muted); font-size: 0.9375rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.8125rem; font-weight: 500; color: #d5d7db; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 2.9rem; padding: 0.65rem 0.8rem;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.35);
  font-size: 1rem; line-height: 1.4; color: var(--text);
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 50%, calc(100% - 0.8rem) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--bg-2); color: var(--text); }
.field textarea { min-height: 5.5rem; resize: vertical; }
.field ::placeholder { color: #6f747c; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--ember); }
.composer .ui-chat { margin-top: 0.25rem; }
.composer .ui-chat p.me { max-width: 100%; white-space: pre-wrap; }
.composer .btn { width: 100%; --h: 3.1rem; }
.composer .status { font-size: 0.8125rem; color: var(--muted); min-height: 1.3em; }
@media (min-width: 40em) { .composer .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
@media (max-width: 39.99em) { .composer .row-2 { display: grid; gap: 1.1rem; } }

/* ---------- Brand sheet ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.swatch .chip { aspect-ratio: 1.4; border-radius: var(--r-sm); border: 1px solid var(--line); }
.swatch p { margin-top: 0.6rem; font-size: 0.875rem; }
.logo-grid { display: grid; gap: 1rem; }
.logo-tile { display: grid; place-items: center; min-height: 14rem; padding: 2rem; }
.logo-tile svg { width: min(100%, 18rem); }
.logo-tile.light { background: var(--text); color: var(--bg); }
.logo-tile .fav { width: 6rem; }
@media (min-width: 48em) { .logo-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; align-content: center; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
  .hero-cards .card { animation: rise 1.1s var(--ease) both; animation-delay: calc(350ms + var(--i, 0) * 120ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media print {
  .site-header, .wa-bar, .menu-panel, .halo, .gridbg { display: none !important; }
}
