/* ============================================================
   PANDRAS — estúdio de software · v2 "Terminal Panda"
   Dark-first projetado do zero (não paleta invertida).
   Brutalismo tátil: bordas 1px sólidas, cantos quase retos,
   mono estrutural, acento ciano-panda só em interação.
   Tipos: Bricolage Grotesque (display) / Instrument Sans (texto) /
   Spline Sans Mono (esqueleto: nav, números, labels, botões).
   Motion: regras emil-design-eng (ease-out custom, :active scale,
   transições de propriedade específica, hover atrás de media query).
   ============================================================ */

:root {
  --bg: oklch(16% 0.02 250);
  --bg-raise: oklch(20% 0.025 252);
  --bg-well: oklch(12.5% 0.018 250);
  --line: oklch(31% 0.03 250);
  --line-soft: oklch(25% 0.025 250);
  /* contorno de controle de formulário: precisa de 3:1 contra o fundo */
  --line-strong: oklch(50% 0.03 250);
  --text: oklch(93% 0.01 240);
  --text-soft: oklch(71% 0.025 245);
  --brand: oklch(72% 0.14 230);
  --brand-deep: oklch(48% 0.10 245);
  --on-brand: oklch(15% 0.03 250);
  --warm: oklch(80% 0.12 80);
  --signal: oklch(80% 0.12 80);
  --wa: oklch(66% 0.15 155);

  /* marca panda: paleta própria, não deriva de --text/--bg, para que o
     mark não inverta quando o tema muda. No escuro não há contorno. */
  --panda-fur: oklch(93% 0.01 240);
  --panda-ink: oklch(16% 0.02 250);
  --panda-edge: transparent;
  --panda-edge-w: 0;

  /* terminal e artes ficam escuros nos dois temas */
  --term-bg: oklch(12.5% 0.018 250);
  --term-bar: oklch(18% 0.022 250);
  --term-ink: oklch(90% 0.015 240);
  --term-soft: oklch(62% 0.03 245);
  --term-kw: oklch(75% 0.11 235);
  --term-str: oklch(80% 0.1 155);

  /* grades e superfícies de arte */
  --grid-line: oklch(50% 0.03 245 / 0.07);
  --grid-line-art: oklch(50% 0.03 245 / 0.06);
  --art-edge: oklch(100% 0 0 / 0.14);
  --tile-brand: oklch(35% 0.09 245);
  --tile-warm: oklch(24% 0.03 250);

  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --radius: 6px;
  --measure: 62ch;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: oklch(97.5% 0.008 240);
    --bg-raise: oklch(99% 0.005 240);
    --bg-well: oklch(95% 0.012 240);
    --line: oklch(84% 0.02 245);
    --line-soft: oklch(90% 0.014 245);
    --line-strong: oklch(55% 0.03 245);
    --text: oklch(24% 0.045 255);
    --text-soft: oklch(42% 0.035 250);
    --brand: oklch(50% 0.13 235);
    --brand-deep: oklch(38% 0.10 245);
    --on-brand: oklch(98% 0.005 240);
    --wa: oklch(48% 0.13 155);
    /* --warm NÃO é sobrescrito: só aparece sobre superfícies fixas escuras
       (terminal, artes dos cases). O ponto de status usa --signal. */
    --signal: oklch(58% 0.14 60);
    --panda-fur: oklch(99.5% 0.004 240);
    --panda-ink: oklch(19% 0.035 252);
    --panda-edge: oklch(19% 0.035 252);
    --panda-edge-w: 2.6;
    color-scheme: light;
  }
}

/* escolha explícita do visitante: vence a preferência do sistema.
   O tema escuro é o :root base, então data-theme="dark" não precisa de bloco. */
:root[data-theme="light"] {
  --bg: oklch(97.5% 0.008 240);
  --bg-raise: oklch(99% 0.005 240);
  --bg-well: oklch(95% 0.012 240);
  --line: oklch(84% 0.02 245);
  --line-soft: oklch(90% 0.014 245);
  --line-strong: oklch(55% 0.03 245);
  --text: oklch(24% 0.045 255);
  --text-soft: oklch(42% 0.035 250);
  --brand: oklch(50% 0.13 235);
  --brand-deep: oklch(38% 0.10 245);
  --on-brand: oklch(98% 0.005 240);
  --wa: oklch(48% 0.13 155);
  --signal: oklch(58% 0.14 60);
  --panda-fur: oklch(99.5% 0.004 240);
  --panda-ink: oklch(19% 0.035 252);
  --panda-edge: oklch(19% 0.035 252);
  --panda-edge-w: 2.6;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--brand); color: var(--on-brand); }

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 7.2vw, 5.4rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 750; }
h3 { font-size: 1.28rem; font-weight: 650; line-height: 1.15; }

p { margin: 0; max-width: var(--measure); }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

.lead { font-size: 1.14rem; color: var(--text-soft); }

/* label de seção estilo linha de código */
.sec-line {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 1.1rem;
}
.sec-line::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); align-self: center; }
.sec-line .n { color: var(--brand); font-weight: 600; }

.kicker {
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.08em; color: var(--brand);
  display: inline-block; margin-bottom: 1rem;
}

/* ---------- structure ---------- */

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

section { scroll-margin-top: 76px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--brand); color: var(--on-brand);
  padding: 0.6rem 1rem; border-radius: var(--radius); z-index: 100;
  font-family: var(--font-mono); text-decoration: none;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }

/* grade de fundo sutil do hero (papel milimetrado de engenharia) */
.grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
}

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner { display: flex; align-items: center; gap: 2rem; min-height: 64px; }

.nav-logo { display: inline-flex; align-items: center; text-decoration: none; }
.nav-logo img { height: 24px; width: auto; }

.nav-links {
  display: flex; gap: 1.5rem; align-items: center;
  margin-left: auto; list-style: none; padding: 0; margin-block: 0;
  font-family: var(--font-mono); font-size: 0.84rem;
}
.nav-links a { color: var(--text-soft); text-decoration: none; transition: color 150ms ease; }
.nav-links a::before { content: "./"; color: var(--brand); opacity: 0; transition: opacity 150ms ease; }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::before { opacity: 1; }
.nav-links .btn { font-size: 0.84rem; padding: 0.5rem 1rem; }
.nav-links .btn::before { content: none; }
.nav-links .btn-primary { color: var(--on-brand); }
.nav-links .btn-primary:hover { color: var(--bg); }
.nav-links .btn-ghost { color: var(--text); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 0.45rem 0.7rem;
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--text); cursor: pointer;
  transition: border-color 150ms ease, transform 120ms var(--ease-out);
}
.nav-toggle:active { transform: scale(0.97); }

.theme-btn {
  margin-left: 1.25rem;
  display: inline-flex; align-items: baseline; gap: 0.4ch;
  background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 0.42rem 0.7rem;
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1;
  color: var(--text-soft); cursor: pointer; white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, transform 120ms var(--ease-out);
}
.theme-btn [data-theme-value] { color: var(--brand); }
.theme-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .theme-btn:hover { color: var(--text); border-color: var(--brand); }
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-block; }
  .theme-btn { order: 2; margin-left: auto; }
  .nav-toggle { order: 3; margin-left: 0.6rem; }
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-raise);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1.25rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { display: block; padding: 0.75rem 0.25rem; }
}

/* ---------- buttons (retos, mono, pressáveis) ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.4rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color 180ms ease, color 180ms ease,
              border-color 180ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55; cursor: not-allowed; transform: none;
}
.field input:disabled, .field select:disabled, .field textarea:disabled {
  opacity: 0.55; cursor: not-allowed; background: var(--bg-well);
}

.btn-primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-wa { background: transparent; color: var(--wa); border-color: var(--wa); }
.btn-wa:hover { background: var(--wa); color: var(--on-brand); }

.btn-invert { background: var(--on-brand); color: var(--brand); border-color: var(--on-brand); }
.btn-invert:hover { background: transparent; color: var(--on-brand); border-color: var(--on-brand); }

/* ---------- hero ---------- */

.hero { position: relative; padding-block: clamp(2.4rem, 5.5vh, 4rem) clamp(3.6rem, 9vh, 6.5rem); overflow: clip; }

.hero-status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.4rem 0.8rem; margin-bottom: 2rem;
}
.hero-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal);
  animation: pulse 2.4s var(--ease-in-out) infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero h1 { max-width: 12ch; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { margin-top: 1.6rem; max-width: 46ch; }

.hero-cta { display: flex; gap: 0.9rem; margin-top: 2.4rem; flex-wrap: wrap; }
@media (max-width: 540px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
}
.hero-note { margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-soft); }

.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem); align-items: end;
}
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; align-items: start; } }

/* panda { . . } — a marca como personagem */
.panda-mark { width: clamp(120px, 16vw, 176px); margin-bottom: 1.8rem; }
.panda-mark .brace { fill: var(--brand); }
/* halo: cópia da silhueta atrás das formas de pelagem. Só ela leva contorno,
   então o traço aparece na borda externa e nunca cruza o interior da cabeça. */
.panda-mark .panda-halo { fill: var(--panda-edge); stroke: var(--panda-edge); stroke-width: var(--panda-edge-w); stroke-linejoin: round; }
.panda-mark .face { fill: var(--panda-fur); }
.panda-mark .patch, .panda-mark .nose { fill: var(--panda-ink); }
.panda-mark .pupil { fill: var(--panda-fur); transition: transform 80ms linear; }
.panda-mark .lid { fill: var(--panda-fur); transform-origin: center; transform: scaleY(0); }
.panda-mark.can-blink .lid { animation: blink-lid 7s steps(1) infinite; }
@keyframes blink-lid {
  0%, 94.5%, 97.5%, 100% { transform: scaleY(0); }
  95%, 97% { transform: scaleY(1); }
}

/* terminal — sempre escuro, borda dura, sombra sólida (tátil, não difusa) */
.term {
  background: var(--term-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 0 var(--line-soft);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.85rem; line-height: 1.7;
}
.term-bar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: var(--term-bar);
  border-bottom: 1px solid var(--line-soft);
  color: var(--term-soft); font-size: 0.76rem;
}
.term-bar img { height: 16px; width: auto; }
.term-lang {
  margin-left: auto; letter-spacing: 0.06em;
  padding: 0.1rem 0.45rem; border: 1px solid var(--line-soft); border-radius: 3px;
  color: var(--term-soft); font-size: 0.68rem;
}

.term-body { padding: 1.1rem 1.2rem 1.4rem; min-height: 15.5em; color: var(--term-ink); }
.term-body .ln { display: block; white-space: pre; }
.tok-kw { color: var(--term-kw); }
.tok-str { color: var(--term-str); }
.tok-cm { color: var(--term-soft); font-style: italic; }
.tok-fn { color: var(--warm); }

.caret {
  display: inline-block; width: 0.55em; height: 1.05em;
  background: var(--warm); vertical-align: -0.15em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- stack strip (letreiro contínuo) ---------- */

.stack-strip { border-block: 1px solid var(--line); overflow: hidden; }
.stack-strip .rail {
  display: flex; width: max-content;
  animation: rail 28s linear infinite;
}
.stack-strip ul {
  display: flex; gap: 0; list-style: none; margin: 0; padding: 0;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-soft);
}
.stack-strip li { padding: 1rem 1.6rem; border-right: 1px solid var(--line-soft); white-space: nowrap; }
.stack-strip li::before { content: "{ "; color: var(--brand); }
.stack-strip li::after { content: " }"; color: var(--brand); }
@keyframes rail { to { transform: translateX(-50%); } }

/* ---------- serviços: bento 1px ---------- */

.services { padding-block: clamp(4rem, 9vh, 7rem); }
.services-head { max-width: 680px; margin-bottom: 2.6rem; }
.services-head p { margin-top: 1rem; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cell {
  background: var(--bg);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  position: relative;
  display: flex; flex-direction: column; gap: 0.8rem;
  transition: background-color 180ms ease;
}
.cell-num { font-family: var(--font-mono); font-size: 0.8rem; color: var(--brand); font-weight: 600; }
.cell p { color: var(--text-soft); font-size: 0.98rem; }
.cell-tags { margin-top: auto; padding-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cell-tags span {
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.22rem 0.6rem; border: 1px solid var(--line);
  border-radius: 3px; color: var(--text-soft);
}
.cell-a { grid-column: span 4; grid-row: span 2; }
.cell-b { grid-column: span 2; }
.cell-c { grid-column: span 2; }
.cell-d { grid-column: span 3; }
.cell-e { grid-column: span 3; }
.cell-a h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 14ch; }
.cell-a .cell-art {
  margin-top: auto; font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-soft); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 0.9rem 1.1rem;
  overflow-x: auto; white-space: pre;
}
.cell-a .cell-art b { color: var(--brand); font-weight: 600; }

@media (hover: hover) and (pointer: fine) {
  .cell:hover { background: var(--bg-raise); }
}
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-a, .cell-b, .cell-c, .cell-d, .cell-e { grid-column: span 2; grid-row: auto; }
}

/* ---------- processo: git log ---------- */

.process { background: var(--bg-well); border-block: 1px solid var(--line); padding-block: clamp(4rem, 9vh, 6.5rem); }

.process-track { margin-top: 2.6rem; max-width: 720px; }
.process-step {
  position: relative;
  padding: 0 0 2.2rem 2.4rem;
  border-left: 1px solid var(--line);
}
.process-step:last-child { padding-bottom: 0; border-left-color: transparent; }
.process-step::before {
  content: "";
  position: absolute; left: -6px; top: 6px;
  width: 11px; height: 11px;
  background: var(--bg-well);
  border: 1px solid var(--brand);
  transform: rotate(45deg);
}
.process-step .hash {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--brand);
}
.process-step h3 { margin-top: 0.3rem; font-size: 1.15rem; }
.process-step p { margin-top: 0.45rem; font-size: 0.98rem; color: var(--text-soft); }

/* ---------- projetos ---------- */

.work { padding-block: clamp(4rem, 9vh, 7rem); }
.work-head { max-width: 680px; margin-bottom: 3rem; }
.work-head p { margin-top: 1rem; }

.case {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: 2.6rem;
}
.case + .case { border-top: 1px solid var(--line-soft); }
.case:nth-child(even) .case-art { order: 2; }
@media (max-width: 820px) {
  .case { grid-template-columns: 1fr; }
  .case:nth-child(even) .case-art { order: 0; }
}

.case-art {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 5 / 3.3;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  background:
    linear-gradient(to right, var(--grid-line-art) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-art) 1px, transparent 1px),
    var(--term-bg);
  background-size: 32px 32px, 32px 32px, auto;
}
/* aparelho: chassi desenhado em CSS, tela = screenshot real do app.
   Sangra pela borda de baixo (superfície contínua, não glifo cortado)
   para a arte não virar mais um retângulo centrado numa caixa. */
.case-art { align-items: end; }

.case-shot {
  position: relative;
  align-self: end;
  width: clamp(150px, 45%, 240px);
  padding: 7px 7px 0;
  border: 1px solid var(--art-edge);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: var(--term-bar);
  translate: 0 10%;
  box-shadow: 0 18px 40px oklch(0% 0 0 / 0.35);
  overflow: hidden;
}
.case-shot::before {
  content: ""; position: absolute; top: 3px; left: 50%; translate: -50% 0;
  width: 32%; height: 4px; border-radius: 999px;
  background: var(--art-edge);
}
.case-shot img { border-radius: 15px 15px 0 0; width: 100%; height: auto; }

/* pan lento e contínuo do próprio conteúdo do app dentro do aparelho:
   só nos cases com screenshot real. Os cases banner (RVV Admin, AGROffice)
   não têm tela de app para rolar, então não entram nesta regra. */
@keyframes case-shot-pan {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14%); }
}
.case-art:not([data-kind="banner"]) .case-shot img {
  animation: case-shot-pan 16s var(--ease-in-out) infinite;
  animation-play-state: paused;
}
.case.is-in .case-art:not([data-kind="banner"]) .case-shot img {
  animation-play-state: running;
}

/* RVV Admin não tem screenshot de tela, só o banner real da Play Store:
   variante própria em vez de inventar uma tela que não existe. */
.case-art[data-kind="banner"] { align-items: center; }
/* o banner já carrega a identidade do RVV: a chave decorativa atrás dele
   só apareceria pela metade. */
.case-art[data-kind="banner"] .brace-mark { display: none; }
.case-banner {
  width: min(84%, 430px);
  border: 1px solid var(--art-edge);
  border-radius: var(--radius);
  overflow: hidden;
}
.case-banner img { width: 100%; height: auto; }

/* glifo inteiro dentro do painel e fora do aparelho: chave cortada
   pela borda vira rabisco, não marca de marca. */
.case-art .brace-mark {
  position: absolute; font-family: var(--font-mono);
  font-size: 6.5rem; font-weight: 600; opacity: 0.16;
  left: 1.4rem; top: 50%; translate: 0 -50%; line-height: 1.1;
  color: var(--brand);
}
@media (max-width: 560px) { .case-art .brace-mark { display: none; } }
.case-art .chip {
  position: absolute;
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.28rem 0.65rem; border-radius: 3px;
  background: var(--term-bar); color: var(--term-soft);
  border: 1px solid var(--line-soft);
}

.case-art[data-tone="warm"] .brace-mark { color: var(--warm); }

.case-copy .case-kind {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--brand); letter-spacing: 0.06em;
}
.case-copy h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin-top: 0.5rem; }
.case-copy p { margin-top: 0.9rem; color: var(--text-soft); }

.case { transition: opacity 200ms ease; }

@media (hover: hover) and (pointer: fine) {
  .case-shot:hover img { animation-play-state: paused; }
  .work:has(.case:hover) .case:not(:hover) { opacity: 0.55; }
}

/* ---------- quem programa: prova, não depoimento ---------- */

.team { padding-block: clamp(4rem, 9vh, 7rem); border-top: 1px solid var(--line); }
.team .lead { margin-top: 1rem; max-width: 640px; }

.prov { margin: 2.4rem 0 0; max-width: 760px; }
.prov-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem 1.8rem;
  padding-block: 1.4rem; border-top: 1px solid var(--line-soft);
}
.prov-row:last-child { border-bottom: 1px solid var(--line-soft); }
.prov dt { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--brand); }
.prov dd { margin: 0; color: var(--text-soft); }
@media (max-width: 640px) {
  .prov-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- FAQ ---------- */

.faq { background: var(--bg-well); border-block: 1px solid var(--line); padding-block: clamp(4rem, 9vh, 6.5rem); }

.faq-list { margin-top: 2.4rem; max-width: 760px; }

.faq details { border-top: 1px solid var(--line-soft); padding-block: 0.35rem; }
.faq details:last-child { border-bottom: 1px solid var(--line-soft); }

.faq summary {
  display: flex; align-items: center; gap: 1rem;
  cursor: pointer; list-style: none;
  padding-block: 1rem;
  font-family: var(--font-display); font-weight: 650; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: ">";
  font-family: var(--font-mono); color: var(--brand); font-weight: 600;
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::before { transform: rotate(90deg); }
.faq details p { padding: 0 0 1.2rem 1.9rem; color: var(--text-soft); }

/* ---------- CTA band: o momento elétrico ---------- */

.cta-band {
  background: var(--brand); color: var(--on-brand);
  padding-block: clamp(4rem, 10vh, 6.5rem);
  position: relative; overflow: clip;
}
.cta-band .kicker { color: var(--on-brand); }
.cta-band h2 { max-width: 14ch; font-size: clamp(2.4rem, 6vw, 4.2rem); }
.cta-band .lead { color: var(--on-brand); margin-top: 1.2rem; }
.cta-actions { display: flex; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }
.cta-band .btn-wa { color: var(--on-brand); border-color: var(--on-brand); }
.cta-band .btn-wa:hover { background: var(--on-brand); color: var(--brand); }
.cta-band .brace-bg { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-mono); user-select: none; }
/* par { } inteiro na coluna vazia da direita: glifo cortado vira rabisco */
.cta-band .brace-bg span {
  position: absolute; opacity: 0.12; font-weight: 600; color: var(--on-brand);
  font-size: 9.5rem; line-height: 1; top: 50%; translate: 0 -50%;
}
.cta-band .brace-bg span:nth-child(1) { right: 13%; }
.cta-band .brace-bg span:nth-child(2) { right: 4%; }
@media (max-width: 900px) { .cta-band .brace-bg { display: none; } }

/* ---------- footer ---------- */

.footer { padding-block: 3.5rem 2.5rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

.footer img { height: 28px; width: auto; }
.footer h4 {
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: lowercase;
  color: var(--text-soft); margin: 0 0 0.9rem;
}
.footer h4::before { content: "§ "; color: var(--brand); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.footer a:hover { color: var(--brand); }
.footer .muted { color: var(--text-soft); font-size: 0.95rem; }

.footer-base {
  margin-top: 3rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--text-soft);
  font-family: var(--font-mono);
}
.footer-base a { color: var(--text-soft); }

/* ---------- form (orçamento) ---------- */

.form-page { padding-block: clamp(3rem, 8vh, 5rem); position: relative; }
.form-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) { .form-grid { grid-template-columns: 1fr; } }

.form-aside h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.form-aside .lead { margin-top: 1.2rem; }
.form-aside ul {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; gap: 0.9rem; color: var(--text-soft);
}
.form-aside li { display: flex; gap: 0.7rem; align-items: baseline; }
.form-aside li::before { content: "{ }"; font-family: var(--font-mono); color: var(--brand); font-size: 0.8rem; }

.quote-form {
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 0 var(--line-soft);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid; gap: 1.3rem;
}
/* select/input têm largura intrínseca (maior <option>, atributo size):
   sem min-width:0 o grid não encolhe e a página estoura abaixo de ~380px */
.form-grid > *, .quote-form, .field { min-width: 0; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field .hint { font-size: 0.82rem; color: var(--text-soft); font-weight: 400; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--text);
  width: 100%; min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  transition: border-color 150ms ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}
.form-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; }
.form-actions .muted { font-size: 0.85rem; color: var(--text-soft); }

/* ---------- página de texto (privacidade) ---------- */

.prose-page { padding-block: clamp(3rem, 8vh, 5rem); }
.prose-page h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.prose-page h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.prose-page h2::before { content: "§ "; color: var(--brand); font-family: var(--font-mono); }
.prose-page p { margin-top: 1rem; color: var(--text-soft); max-width: 70ch; }

/* ---------- 404 ---------- */

.page-404 {
  min-height: 82vh; display: grid; place-content: center; text-align: center;
  padding-block: 4rem; position: relative;
}
.page-404 .code {
  font-family: var(--font-mono); font-weight: 600;
  font-size: clamp(4rem, 16vw, 9rem); color: var(--brand);
  line-height: 1;
}
.page-404 img { height: 72px; width: auto; margin-inline: auto; margin-bottom: 2rem; }
.page-404 h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 1rem; }
.page-404 p { margin: 1rem auto 2rem; color: var(--text-soft); }
.page-404 .btn { justify-self: center; }

/* ---------- reveals (1x, stagger) ---------- */

.reveal { opacity: 0; transform: translateY(12px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 55ms);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .caret, .hero-status .dot { animation: none; }
  .stack-strip .rail { animation: none; flex-wrap: wrap; width: auto; }
  .stack-strip .rail ul + ul { display: none; }
  .panda-mark.can-blink .lid { animation: none; }
  .case-art:not([data-kind="banner"]) .case-shot img { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 440px) {
  .theme-btn .theme-k { display: none; }
}
