/* Zip Labs — site. Regras visuais em design.md (raiz). */

/* site sempre no tema claro, mesmo com o sistema no escuro */
:root {
  --header-h: 64px; color-scheme: light;
  /* espaçamento vertical padrão: seções, títulos de seção e blocos (diminui no tablet e no celular) */
  --space-section: 104px; --space-head: 40px; --space-block: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Page scrolls by wheel, touch and keyboard without visible scrollbars.
   overflow-x: clip keeps full-bleed 100vw backgrounds from adding horizontal scroll and, unlike hidden, keeps sticky working. */
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); overflow-x: clip; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--zl-text);
  background: var(--zl-bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -0.02em; line-height: 1.05; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.01em; }
h3 { font-size: 20px; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--zl-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--zl-focus, var(--zl-violet-400)); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  padding: 8px 16px; border-radius: 8px;
  background: var(--zl-accent); color: var(--zl-on-accent); font-weight: 500;
}
.skip-link:focus { top: 8px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--zl-bg) 92%, transparent);
  border-bottom: 1px solid var(--zl-border);
  backdrop-filter: saturate(1.2) blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { flex: none; }
.brand img { width: 136px; height: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--zl-text-muted); font-weight: 500; font-size: 14px; }
.nav a:not(.btn):hover { color: var(--zl-text); text-decoration: none; }
.nav-toggle {
  display: none; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: 1px solid var(--zl-border); border-radius: 8px; background: transparent; cursor: pointer;
  font: 500 14px/1 "Outfit", system-ui, sans-serif; color: var(--zl-text);
}
/* duas linhas que viram um X quando o menu abre */
.nav-toggle-icon { position: relative; width: 14px; height: 8px; }
.nav-toggle-icon::before, .nav-toggle-icon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor;
  transition: transform .2s ease-out, top .2s ease-out;
}
.nav-toggle-icon::before { top: 0; }
.nav-toggle-icon::after { top: 6.5px; }
.nav.is-open .nav-toggle-icon::before { top: 3.25px; transform: rotate(45deg); }
.nav.is-open .nav-toggle-icon::after { top: 3.25px; transform: rotate(-45deg); }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 8px;
  font: 500 16px/1 "Outfit", system-ui, sans-serif; cursor: pointer;
  transition: background-color .15s ease-out, border-color .15s ease-out;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--zl-accent); color: var(--zl-on-accent); }
.btn-primary:hover { background: var(--zl-accent-hover); }
.btn-secondary { border-color: var(--zl-border); color: var(--zl-text); background: transparent; }
.btn-secondary:hover { border-color: var(--zl-text-muted); }
.link-arrow { font-weight: 500; }
.link-arrow::after { content: " →"; }

.eyebrow { font-size: 14px; font-weight: 500; color: var(--zl-accent); margin-bottom: 16px; }
.lead { font-size: 20px; color: var(--zl-text-muted); max-width: 560px; margin-top: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

/* hero: texto fixo à esquerda; a seção tem ~1,7 tela de altura e o scroll dentro dela controla o tubo */
.hero-story { --story-h: 170vh; position: relative; height: var(--story-h); }
@supports (height: 1svh) { .hero-story { --story-h: 170svh; } }
.hero-sticky {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; overflow: hidden;
}
/* sem scroll-snap: no toque ele puxava a página de volta para o hero ao entrar na seção seguinte */
.hero-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 7fr 5fr; gap: 32px; align-items: center;
}
.display {
  font-size: clamp(36px, 4.6vw, 60px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04;
  max-width: 13em;
}
.hero-text .lead { font-size: 19px; max-width: 30em; }
/* argumentos complementares: uma linha discreta, sem cara de etapa */
.hero-facts {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 14px; color: var(--zl-text-muted);
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--zl-accent); }

.hero-visual { position: relative; margin: 0; height: 100%; min-height: 320px; }
.hero-visual canvas { position: relative; display: block; width: 100%; height: 100%; }
.scroll-cue {
  margin: 0 auto; padding: 0 24px 24px; max-width: 1160px; width: 100%;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 500; color: var(--zl-text-muted);
  transition: opacity .3s ease-out;
}
.scroll-cue span { font-size: 20px; color: var(--zl-accent); }
.is-scrolled .scroll-cue { opacity: 0; }

/* seções */
.section { padding: var(--space-section) 0; }
/* seções seguidas no mesmo fundo: um espaçamento só entre elas, não dois somados */
.section + .section { padding-top: 0; }
.section-head { margin-bottom: var(--space-head); }
.section-intro { font-size: 18px; color: var(--zl-text-muted); margin-top: 16px; max-width: 520px; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-block); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tag { font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--zl-border); color: var(--zl-text-muted); }
.tag-accent { border-color: transparent; background: color-mix(in srgb, var(--zl-accent) 12%, transparent); color: var(--zl-accent); }

.field small { font-size: 12px; color: var(--zl-text-muted); }
.field .field-error { color: #B91C1C; }
.field-error:empty { display: none; }
.field input[aria-invalid="true"] { border-color: #B91C1C; }

/* como trabalhamos: lista editorial, uma etapa por linha */
.process { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--zl-border); }
.process li { display: grid; grid-template-columns: 44px 1fr; gap: 2px 12px; padding: 20px 0; border-bottom: 1px solid var(--zl-border); }
.process span { grid-row: span 2; padding-top: 5px; font-size: 14px; font-weight: 500; color: var(--zl-accent); font-variant-numeric: tabular-nums; }
.process h3 { font-size: 22px; }
.process p { color: var(--zl-text-muted); max-width: 520px; }

/* perguntas */
.faq-wrap > * { max-width: 800px; }
.faq-wrap h2 { margin-bottom: var(--space-head); }
.faq details { border-top: 1px solid var(--zl-border); }
.faq details:last-child { border-bottom: 1px solid var(--zl-border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; cursor: pointer; list-style: none; font-size: 18px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 24px; text-align: center;
  font-size: 20px; color: var(--zl-accent); transition: transform .2s ease-out;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--zl-text-muted); padding: 0 40px 24px 0; max-width: 620px; }

/* contato: título grande à esquerda, formulário num cartão branco flutuando à direita */
.contact-grid { display: grid; grid-template-columns: 5fr 6fr; gap: var(--space-block) 64px; align-items: start; }
.contact-intro { padding-top: 40px; }
.contact-intro h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; max-width: 560px; }
.contact-intro h2 em { font-style: normal; color: var(--zl-accent); }
.contact .lead { font-size: 19px; margin: 28px 0 24px; max-width: 420px; }
.contact-direct { color: var(--zl-text-muted); }
.contact-card {
  padding: 40px; border-radius: 12px; background: var(--zl-bg);
  border: 1px solid var(--zl-border);
}
.contact-card-head h3 { font-size: 24px; letter-spacing: -0.01em; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 500; }
.field label span { color: var(--zl-text-muted); font-weight: 400; }
.field input, .field textarea {
  font: 400 15px/1.5 "Outfit", system-ui, sans-serif; color: var(--zl-text);
  background: var(--zl-ink-100); border: 1px solid transparent; border-radius: 8px;
  min-height: 48px; padding: 12px 14px; resize: vertical;
  transition: border-color .15s ease-out, background-color .15s ease-out;
}
.field textarea { min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: var(--zl-ink-300); }
.field input:focus-visible, .field textarea:focus-visible { background: var(--zl-bg); border-color: var(--zl-accent); outline-offset: 0; }
.field :is(input, textarea)::placeholder { color: var(--zl-text-muted); }
.form-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.form-foot .btn { width: 100%; height: 52px; }
.form-status { font-size: 14px; color: var(--zl-text-muted); text-align: center; min-height: 1.5em; }
.form-status:empty { display: none; }
.form-status.is-ok, .form-status.is-error { padding: 12px 14px; border-radius: 8px; text-align: left; color: var(--zl-text); }
.form-status.is-ok { background: color-mix(in srgb, var(--zl-success, #16A34A) 10%, transparent); border-left: 3px solid var(--zl-success, #16A34A); }
.form-status.is-error { background: color-mix(in srgb, var(--zl-danger, #DC2626) 8%, transparent); border-left: 3px solid var(--zl-danger, #DC2626); }

/* rodapé: roxo bem escuro (um passo abaixo do Violet 900) para o "labs" violeta da logo manter contraste (~5.6:1) */
.site-footer {
  --footer-muted: rgb(245 243 255 / .72);
  --footer-line: rgb(245 243 255 / .14);
  background: #2E1065; color: var(--zl-paper);
  padding: var(--space-section) 0 32px; font-size: 14px;
}
.site-footer a { color: var(--zl-paper); }
.site-footer :focus-visible { outline-color: var(--zl-paper); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand img { width: 136px; height: auto; }
.footer-brand p { color: var(--footer-muted); margin-top: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h2 { font-size: 14px; font-weight: 500; color: var(--zl-violet-300); margin-bottom: 8px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  margin-top: var(--space-block); padding-top: 24px; border-top: 1px solid var(--footer-line);
  color: var(--footer-muted); font-size: 12px;
}
.credits a { color: inherit; text-decoration: underline; }

/* admin */
.admin { padding: 72px 0 112px; }
.admin-title { font-size: clamp(28px, 4vw, 40px); }
.admin-note {
  display: inline-block; margin-top: 16px; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; color: var(--zl-text); border-left: 3px solid var(--zl-warning);
  background: color-mix(in srgb, var(--zl-warning) 10%, transparent);
}
.admin-item-title { font-size: 24px; }
.admin-tags { margin-top: 12px; }
.admin-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
@media (max-width: 960px) { .admin-list > li > div:last-child { grid-column: 2; } }

/* responsivo */
@media (max-width: 960px) {
  :root { --space-section: 80px; --space-head: 32px; --space-block: 32px; }
  /* links num painel embaixo do header, abertos pelo botão "Menu" */
  .nav { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px;
    background: var(--zl-bg); border-bottom: 1px solid var(--zl-border);
    box-shadow: 0 16px 32px rgb(20 15 38 / .08);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease-out, transform .2s ease-out, visibility 0s .2s;
  }
  .nav.is-open .nav-links { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav .nav-links a { padding: 14px 0; font-size: 17px; color: var(--zl-text); border-bottom: 1px solid var(--zl-border); }
  .nav .nav-links a:last-child { border-bottom: 0; }
  /* empilhado: texto em cima, desenho embaixo ocupando o resto da tela */
  .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 8px; padding-top: 32px; align-items: stretch; }
  .hero-visual { min-height: 0; }
  .scroll-cue { display: none; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .contact-intro { padding-top: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
/* tablet/notebook baixos: o desenho ficaria pequeno demais preso na tela; vira um bloco normal */
@media (max-width: 960px) and (max-height: 760px) and (min-width: 561px) {
  .hero-story { height: auto; }
  .hero-sticky { position: static; height: auto; }
  .hero-grid { grid-template-columns: 7fr 5fr; grid-template-rows: none; align-items: center; padding: 48px 24px; }
  .hero-visual { height: 360px; }
}
@media (max-width: 560px) {
  :root { --space-section: 64px; --space-head: 24px; --space-block: 28px; }
  .container { padding: 0 20px; }
  .lead { font-size: 18px; margin-top: 16px; }
  .actions { margin-top: 24px; gap: 12px; }
  .actions .btn { flex: 1 1 auto; padding: 0 16px; white-space: nowrap; }
  /* celular: título, texto e botão já na primeira tela; o frasco compacto fica no espaço de baixo */
  .hero-story { --story-h: 190vh; --story-h: 190svh; }
  .hero-grid { padding-top: 24px; }
  .hero-story .display { font-size: clamp(30px, 8.6vw, 36px); }
  .hero-text .lead { font-size: 16px; }
  .hero-facts { display: none; }
  .process li { grid-template-columns: 40px 1fr; }
  .process h3 { font-size: 20px; }
  .contact-form { grid-template-columns: 1fr; gap: 16px; }
  .contact-card { padding: 24px 20px; }
  .contact-card-head h3 { font-size: 21px; }
  .contact .lead { font-size: 17px; margin: 16px 0; }
}
/* Preserve the compact signature's 112px minimum beside the mobile actions. */
@media (max-width: 400px) {
  .header-inner { padding-inline: 16px; gap: 12px; }
  .brand img { width: 112px; }
  .nav { gap: 8px; }
  .nav > .btn, .nav-toggle { padding-inline: 8px; }
}
/* desktop baixo (notebook): compacta o hero */
@media (max-height: 820px) and (min-width: 961px) {
  .display { font-size: clamp(34px, 4vw, 50px); }
  .hero-text .lead { font-size: 17px; margin-top: 18px; }
  .actions { margin-top: 24px; }
  .hero-facts { margin-top: 20px; }
  .scroll-cue { padding-bottom: 16px; }
}
/* telas baixas: hero vira bloco normal, sem a história de scroll */
@media (max-height: 560px) and (min-width: 961px) {
  .hero-story { height: auto; }
  .hero-sticky { position: static; height: auto; min-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero-story { height: auto; }
  .hero-sticky { position: static; height: auto; min-height: calc(100svh - var(--header-h)); }
  .hero-grid { min-height: 520px; }
  .scroll-cue { display: none; }
}

/* Short phones animate in normal document flow, without pinning the text. */
@media (max-width: 560px) and (max-height: 740px) {
  .hero-story { height: auto; }
  .hero-sticky { position: static; height: auto; overflow: visible; }
  .hero-grid { grid-template-rows: auto auto; gap: 24px; padding-bottom: 24px; }
  .hero-visual { height: 240px; min-height: 240px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 960px) {
  .hero-grid { grid-template-rows: auto auto; gap: 24px; padding-bottom: 32px; }
  .hero-visual { height: 280px; min-height: 280px; }
}


.statement {
  position: relative;
  padding: 0 0 var(--space-section);
  background: var(--zl-violet-50);
}
.statement-inner { display: grid; grid-template-columns: 7fr 5fr; gap: 0 48px; }
.statement-stage {
  position: sticky; top: var(--header-h); align-self: start;
  height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
}
.statement-mark { position: relative; padding: 36px 0 36px 96px; }
.statement-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 140px;
  transform: translate(var(--x, 0), var(--y, 0)) skewX(-22deg); transform-origin: bottom left;
  opacity: var(--o, 1);
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .6s ease-out;
}
/* uma camada a mais por etapa: 1 faixa, depois 2, depois 3 (as novas saem de trás da principal) */
.bar-deep { background: var(--zl-violet-800); --o: 0; }
.bar-main { background: var(--zl-accent); }
.bar-light { background: var(--zl-violet-300); --o: 0; }
[data-step="1"] .bar-deep, [data-step="2"] .bar-deep { --o: 1; --x: -26px; --y: -18px; }
[data-step="2"] .bar-light { --o: .9; --x: 34px; --y: 22px; }
.statement-words { position: relative; display: grid; }
.statement-words p {
  grid-area: 1 / 1; margin: 0;
  font-size: clamp(32px, 4.4vw, 60px); font-weight: 600; line-height: 1.02; letter-spacing: -0.01em;
  text-transform: uppercase; white-space: nowrap; color: var(--zl-text);
  opacity: 0; transform: translateY(28px);
  transition: opacity .45s ease-out, transform .7s cubic-bezier(.2, .8, .2, 1);
}
.statement-words p.is-past { transform: translateY(-28px); }
.statement-words p.is-active { opacity: 1; transform: none; transition-delay: .12s; }
/* blocos da direita: um por etapa, cada um com uma tela de altura para o scroll passar por eles */
.statement-copy article {
  min-height: calc(90vh - var(--header-h)); min-height: calc(90svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center; max-width: 480px;
  opacity: .35; transition: opacity .5s ease-out;
}
.statement-copy article:first-child { padding-top: 40vh; min-height: calc(100vh - var(--header-h)); }
.statement-copy article.is-active { opacity: 1; }
.statement-copy :is(h2, h3) { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -0.01em; }
.statement-copy p { margin-top: 16px; font-size: 18px; color: var(--zl-text-muted); }


.hero-tech-grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid, .scroll-cue { position: relative; z-index: 1; }
@media (min-width: 961px) and (min-height: 561px) {
  .hero-story { --story-h: 260vh; --story-h: 260svh; }
}
.statement { overflow: clip; }
.statement-mark { isolation: isolate; }
.statement-bar { z-index: -1; }
.bar-main { background: var(--zl-accent); }
.bar-deep { background: var(--zl-violet-800); --o: 0; }
.bar-light { background: var(--zl-violet-300); --o: 0; }
[data-step="1"] .bar-deep, [data-step="2"] .bar-deep { --o: 1; --x: -24px; --y: -16px; }
[data-step="2"] .bar-light { --o: 1; --x: 32px; --y: 20px; }
.statement-copy article:first-child { padding-top: 0; min-height: calc(90svh - var(--header-h)); }
@media (max-width: 960px) {
  .statement-inner { grid-template-columns: 1fr; height: 260svh; }
  .statement-stage, .statement-copy { grid-area: 1 / 1; position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h)); align-self: start; }
  .statement-stage { align-items: start; justify-content: center; padding-top: 10svh; }
  .statement-mark { padding: 24px 0 24px 48px; }
  .statement-bar { width: 88px; }
  .statement-words p { font-size: clamp(26px, 5.5vw, 44px); }
  .statement-copy { display: grid; align-content: start; padding-top: 44svh; pointer-events: none; }
  .statement-copy article, .statement-copy article:first-child { grid-area: 1 / 1; min-height: 0; padding: 0; opacity: 0; transform: translateY(16px); visibility: hidden; }
  .statement-copy article.is-active { opacity: 1; transform: none; visibility: visible; }
  .statement-copy :is(h2,h3) { font-size: clamp(24px, 4vw, 30px); }
  .statement-copy p { font-size: 16px; }
}
@media (max-height: 600px) and (max-width: 960px) {
  .statement-stage { padding-top: 24px; }
  .statement-mark { padding-block: 16px; }
  .statement-words p { font-size: 26px; }
  .statement-copy { padding-top: 38svh; }
  .statement-copy :is(h2,h3) { font-size: 22px; }
  .statement-copy p { font-size: 15px; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .statement-inner { height: auto; display: block; }
  .statement-stage { display: none; }
  .statement-copy { position: static; display: block; height: auto; padding: 48px 0; }
  .statement-copy article, .statement-copy article:first-child { min-height: 0; padding: 24px 0; opacity: 1; transform: none; visibility: visible; }
}


/* Projects: native sticky cards, inspired by CodyHouse's Stacking Cards.
   Each panel owns its screenshots and copy; no duplicated content or image swapping. */
.projects { padding-top: 0; }
.projects-intro {
  position: relative; isolation: isolate; min-height: 360px;
  display: flex; align-items: center; padding-block: 64px;
  margin-bottom: 0; color: #F5F3FF;
}
.projects-intro::before, .projects-fluid {
  position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw);
  width: 100vw; height: 100%; z-index: -1; pointer-events: none;
}
.projects-intro::before { content: ""; background: #221C38; }
.projects-fluid { opacity: .8; }
.projects-intro-copy { position: relative; max-width: 620px; }
.projects-intro h2 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; letter-spacing: -.04em; }
.projects-intro h2 span { color: #A78BFA; }
.projects-intro .section-intro { max-width: 500px; margin-top: 24px; color: #E2E0E8; }
.case-showcase { padding-top: 64px; scroll-margin-top: 24px; }
.case-showcase + .case-showcase { padding-top: 80px; }
.case-heading { max-width: 880px; margin-bottom: 32px; }
.case-heading h3 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.1; letter-spacing: -.035em; max-width: 17em; }
.case-lead { color: var(--zl-text-muted); font-size: 18px; margin-top: 16px; max-width: 760px; }
.case-stack {
  --stack-inset: 24px; --stack-offset: 12px;
  position: relative; isolation: isolate; list-style: none; padding: 0; margin: 0;
}
.case-card { position: relative; margin: 24px 0 0; }
.case-card:first-child { margin-top: 0; }
.case-panel {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center; gap: 40px; padding: 40px;
  border: 1px solid var(--zl-border); border-radius: 12px; background: #FAFAFC;
  transform-origin: center top;
}
.case-stack.is-stacking { padding-bottom: 48px; }
.is-stacking .case-card {
  position: sticky; top: calc(var(--stack-top) + var(--card-index) * var(--stack-offset));
}
.is-stacking .case-panel { transform: scale(var(--card-scale, 1)); }
.case-visual { min-width: 0; }
.device-pair { position: relative; width: 100%; aspect-ratio: 1.45; }
.case-computer { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 90%; }
.computer-screen { aspect-ratio: 1366 / 900; border: 6px solid #140F26; border-bottom-width: 12px; border-radius: 12px; overflow: hidden; background: #F1F0F5; }
.computer-screen img, .case-phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.computer-stand { display: block; position: relative; height: 28px; width: 20%; background: #140F26; margin: 0 auto 8px; }
.computer-stand::after { content: ""; position: absolute; height: 8px; width: 210%; left: -55%; bottom: -8px; border-radius: 8px 8px 3px 3px; background: #140F26; }
.case-phone { position: absolute; width: 31%; right: 0; bottom: 0; padding: 5px; border: 1px solid #3A3352; border-radius: 24px; background: #140F26; }
.case-phone-screen { aspect-ratio: 390 / 844; border-radius: 18px; overflow: hidden; background: #F1F0F5; }
.case-step-number { display: block; margin-bottom: 24px; color: var(--zl-accent); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.case-copy h4 { margin: 0; font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; line-height: 1.15; letter-spacing: -.025em; text-wrap: balance; }
.case-copy p { margin-top: 16px; color: var(--zl-text-muted); font-size: 17px; }
@media (max-width: 960px) {
  .case-panel { padding: 32px; gap: 32px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .case-copy h4 { font-size: 26px; }
  .case-copy p { font-size: 16px; }
  .case-step-number { margin-bottom: 16px; }
}
@media (max-width: 700px) {
  .case-stack { --stack-inset: 16px; --stack-offset: 8px; }
  .case-panel { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .case-visual { width: 100%; max-width: 360px; margin-inline: auto; }
  .case-copy { max-width: 480px; }
  .case-copy h4 { font-size: 24px; }
  .computer-screen { border-width: 4px; border-bottom-width: 8px; border-radius: 8px; }
  .computer-stand { height: 16px; margin-bottom: 6px; }
  .computer-stand::after { height: 6px; bottom: -6px; }
  .case-phone { padding: 3px; border-radius: 16px; }
  .case-phone-screen { border-radius: 12px; }
}
@media (max-width: 560px) {
  .projects-intro { min-height: 320px; padding-block: 48px; }
  .projects-intro h2 { font-size: clamp(36px, 10vw, 52px); }
  .projects-intro .section-intro { font-size: 16px; }
  .case-showcase { padding-top: 40px; }
  .case-showcase + .case-showcase { padding-top: 48px; }
  .case-heading { margin-bottom: 24px; }
  .case-heading h3 { font-size: 30px; }
  .case-lead { font-size: 16px; }
  .case-panel { padding: 20px; }
  .case-card { margin-top: 16px; }
  .case-step-number { margin-bottom: 12px; }
}
@media (max-width: 700px) and (max-height: 650px) {
  .case-panel { padding: 16px; gap: 16px; }
  .case-visual { max-width: min(100%, 34svh); }
}
@media (prefers-reduced-motion: reduce) {
  .projects-fluid { display: none; }
  .case-stack.is-stacking { padding-bottom: 0; }
  .is-stacking .case-card { position: relative; top: auto; }
  .is-stacking .case-panel { transform: none; }
}


/* Stack band (Bluecore reference): Night surface, dot field pushed by the cursor,
   icon pills that grow and raise a name balloon on hover or focus. */
.stack { position: relative; isolation: isolate; overflow: hidden; background: #0E0B1A; color: #F5F3FF; padding: 96px 0; }
.stack-dots { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.stack-head { max-width: 680px; margin-bottom: 48px; }
.stack-label { display: inline-block; margin-bottom: 16px; font: 500 12px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: #A78BFA; }
.stack-label::before { content: "/* "; }
.stack-label::after { content: " */"; }
.stack-head h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.1; letter-spacing: -.03em; }
.stack-head p { margin-top: 24px; max-width: 560px; font-size: 18px; color: #C2BFCE; }
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stack-group h3 { margin-bottom: 16px; font: 500 12px/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; color: #A78BFA; }
.stack-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack-group li {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px;
  border: 1px solid rgb(167 139 250 / .22); border-radius: 12px; background: #221C38;
  cursor: default; outline: none;
  transition: transform .2s ease-out, border-color .2s ease-out;
}
.stack-group li::before {
  content: ""; width: 20px; height: 20px; background: #E2E0E8;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.stack-group li::after {
  content: attr(aria-label); position: absolute; left: 50%; bottom: calc(100% + 12px); z-index: 2;
  padding: 6px 12px; border: 1px solid rgb(167 139 250 / .45); border-radius: 999px;
  background: #0E0B1A; color: #F5F3FF; white-space: nowrap; pointer-events: none;
  font: 500 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .02em;
  opacity: 0; transform: translate(-50%, 8px) scale(.6); transform-origin: 50% 100%;
  transition: opacity .15s ease-in, transform .15s ease-in;
}
.stack-group li:hover, .stack-group li:focus-visible { transform: scale(1.2); border-color: rgb(167 139 250 / .7); z-index: 1; }
.stack-group li:focus-visible { box-shadow: 0 0 0 2px #0E0B1A, 0 0 0 4px #A78BFA; }
.stack-group li:hover::after, .stack-group li:focus-visible::after {
  opacity: 1; transform: translate(-50%, 0) scale(.84);
  transition: opacity .25s ease-out, transform .32s cubic-bezier(.34, 1.7, .5, 1);
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
/* Phones: one row per group, name on the left and smaller pills on the right. */
@media (max-width: 560px) {
  .stack { padding: 56px 0; }
  .stack-head { margin-bottom: 32px; }
  .stack-label { margin-bottom: 12px; }
  .stack-head h2 { font-size: 28px; }
  .stack-head p { margin-top: 16px; font-size: 16px; }
  .stack-grid { grid-template-columns: 1fr; gap: 0; }
  .stack-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #221C38; }
  .stack-group:last-child { border-bottom: 1px solid #221C38; }
  .stack-group h3 { margin: 0; font-size: 11px; line-height: 1.4; }
  .stack-group ul { gap: 6px; flex-wrap: nowrap; }
  .stack-group li { width: 40px; height: 40px; border-radius: 10px; }
  .stack-group li::before { width: 18px; height: 18px; }
}
@media (max-width: 360px) {
  .stack-group { grid-template-columns: 1fr; gap: 8px; }
  .stack-group ul { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .stack-group li, .stack-group li::after, .stack-group li:hover::after, .stack-group li:focus-visible::after { transition: none; }
  .stack-group li:hover, .stack-group li:focus-visible { transform: none; }
}
