/* ==========================================================
   Vedoo — portfólio de Gustavo Azevedo
   Paleta: Cobre × Petróleo + vermelho  ·  Tipos: Bebas Neue, Inter, Instrument Serif
   ========================================================== */

@font-face { font-family: "Bebas Neue"; src: url("assets/fonts/bebas-neue-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-700-classic.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --deep: #081013;
  --pet: #0E3A45;
  --cobre: #B8552B;
  --red: #E5383B;
  --osso: #F2EBE1;
  --mute: rgba(242, 235, 225, .64);
  --line: rgba(242, 235, 225, .14);
  --panel: #0c171b;

  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 2.5vw, 36px);
  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--deep);
  color: var(--osso);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--red); letter-spacing: -.01em; text-transform: none; }
:focus-visible { outline: 2px solid var(--osso); outline-offset: 3px; }
::selection { background: var(--red); color: var(--osso); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--osso); color: var(--deep); padding: 10px 14px; border-radius: 4px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.eyebrow { margin: 0 0 10px; font-family: var(--display); font-size: 22px; letter-spacing: .06em; color: var(--red); line-height: 1; }
.display { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(56px, 8vw, 120px); line-height: .88; letter-spacing: .005em; text-wrap: balance; }
.display em { font-size: .92em; }
.display sup { font-family: var(--text); font-size: 18px; font-weight: 600; color: var(--red); vertical-align: top; margin-left: 8px; letter-spacing: 0; }

/* Botões: calmos, sem movimento. Só a cor muda no hover. */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 99px; border: 0;
  background: var(--osso); color: var(--deep);
  font: 600 15px/1 var(--text); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .3s, color .3s;
}
.btn:hover { background: #fff; }
.btn--red { background: var(--red); color: var(--osso); }
.btn--red:hover { background: #cf2f32; }
.btn--ghost { background: transparent; color: var(--osso); border: 1px solid var(--line); }
.btn--ghost:hover { background: transparent; border-color: var(--osso); }

/* ---------------- Cabeçalho ---------------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) var(--gutter) 22px;
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled { background: rgba(8, 16, 19, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 14px; padding-top: calc(env(safe-area-inset-top, 0px) + 14px); border-color: var(--line); }
.header__logo img { width: 132px; height: auto; }
.header__logo { display: inline-flex; align-items: center; gap: 16px; text-decoration: none; justify-self: start; }
.header__by { padding-left: 16px; border-left: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--mute); white-space: nowrap; transition: color .3s; }
.header__logo:hover .header__by { color: var(--osso); }
@media (max-width: 480px) { .header__by { display: none; } }
.header__nav { display: flex; gap: 44px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.header__nav a { text-decoration: none; position: relative; }
.header__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.header__nav a:hover::after, .header__nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: inline-flex; justify-self: end; align-items: center; gap: 10px; background: none; border: 0; color: var(--osso); font-family: var(--display); font-size: 24px; letter-spacing: .02em; cursor: pointer; padding: 4px 0; }
@media (min-width: 961px) { .menu-toggle { display: none; } }
.menu-toggle__lines { width: 30px; height: 8px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }

/* ---------------- Hero ----------------
   A composição do desktop é uma "prancha" de 1440 × 900 (foto + nome no mesmo SVG).
   Ela escala inteira e aparece sempre completa (16:10, igual à miniatura da mesa): --sw é a largura da prancha e --u é 1px da prancha.
   Em telas mais largas que 16:10 a prancha fica mais estreita que a tela e as laterais recebem a própria foto desfocada. */
.hero {
  /* A prancha aparece inteira (16:10); em telas mais largas cresce um pouco (corte de até ~7% embaixo)
     pra foto, que tem 1600 de largura, cobrir as laterais. */
  --sw: min(100vw, max(100svh * 1.6, min(100vw * .9, 100svh * 1.72)));
  --u: calc(var(--sw) / 1440);
  --edge: calc((100vw - var(--sw)) / 2);
  position: relative; overflow: hidden; isolation: isolate;
  height: min(100svh, var(--u) * 900);
  min-height: 560px;
  background: var(--deep);
}
.hero::before {
  content: ""; position: absolute; inset: -60px; z-index: -2;
  background: url("assets/foto-principal.webp") center top / cover no-repeat;
  filter: blur(40px) brightness(.55) saturate(1.1);
}
.hero__stage {
  /* O palco é 1600 × 900: a prancha de 1440 no meio e a sobra da foto (80 de cada lado) aparecendo nas laterais. */
  position: absolute; z-index: -1; top: 0; left: 50%; translate: -50% 0;
  width: calc(var(--sw) * 1600 / 1440); aspect-ratio: 16 / 9;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.hero__stage svg { display: block; width: calc(100% * 1440 / 1600); height: 100%; margin: 0 auto; overflow: visible; }
.hero__art--tall { display: none; }
.hero__photo { transform-box: fill-box; transform-origin: 50% 40%; }
.hero__name { font-family: var(--display); fill: var(--osso); }
.hero__stroke { fill: none; stroke: var(--red); stroke-width: 1; vector-effect: non-scaling-stroke; }

.hero__year { position: absolute; left: calc(var(--edge) + var(--u) * 36); top: max(84px, var(--u) * 118); margin: 0; font-family: var(--display); font-size: max(30px, var(--u) * 52); line-height: 1; }
.hero__year span { color: var(--red); }
.hero__services { position: absolute; right: calc(var(--edge) + var(--u) * 36); top: max(84px, var(--u) * 100); margin: 0; padding: 0; list-style: none; text-align: right; font-size: max(12px, var(--u) * 14); font-weight: 600; line-height: 1.6; }
.hero__intro { position: absolute; left: calc(var(--edge) + var(--u) * 36); bottom: max(28px, var(--u) * 42); width: max(300px, var(--u) * 430); }
.hero__intro .eyebrow { font-size: max(16px, var(--u) * 21); }
.hero__intro p:last-child { margin: 0; font-size: max(14px, var(--u) * 16); font-weight: 600; line-height: 1.45; }
.hero__cta { position: absolute; left: 50%; translate: -50% 0; bottom: max(28px, var(--u) * 44); font-size: max(13px, var(--u) * 15); }

@media (max-aspect-ratio: 4/5) {
  .hero { height: 100svh; min-height: 640px; }
  .hero::before, .hero__stage { display: none; }
  .hero__art--tall { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
  .hero__services { display: none; }
  .hero__year { left: var(--gutter); top: 92px; font-size: 44px; }
  .hero__intro { left: var(--gutter); right: var(--gutter); width: auto; bottom: 112px; }
  .hero__cta { left: var(--gutter); translate: none; bottom: 40px; }
}

/* ---------------- Abertura ---------------- */
.intro { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .js:not(.no-intro) .intro {
    display: grid; place-items: center;
    position: fixed; inset: 0; z-index: 100;
    background: var(--deep);
    animation: curtain .8s var(--ease-io) 1s forwards;
    pointer-events: none;
  }
  .intro__mark { width: clamp(90px, 12vw, 140px); overflow: visible; }
  .intro__ring { fill: none; stroke: var(--osso); stroke-width: 60; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) .1s forwards; }
  .intro__ring--b { animation-delay: .25s; }
  .intro__lens { fill: var(--red); opacity: 0; animation: fadein .3s ease .75s forwards; }

  .js:not(.no-intro) .hero__photo { animation: settle 1.6s var(--ease) .9s both; }
  .js:not(.no-intro) .hero__name { animation: rise .95s var(--ease) 1.2s both; }
  .js:not(.no-intro) .hero__art--wide .hero__stroke { stroke-dasharray: 2600; animation: trace 1.3s var(--ease-io) 1.9s both; --len: 2600; }
  .js:not(.no-intro) .hero__art--tall .hero__stroke { stroke-dasharray: 1100; animation: trace 1.3s var(--ease-io) 1.9s both; --len: 1100; }
  .js:not(.no-intro) .hero .reveal-up,
  .js:not(.no-intro) .header { animation: fadeup .8s var(--ease) 2.1s both; }
  .js:not(.no-intro) .hero__services { animation-delay: 2.2s; }
  .js:not(.no-intro) .hero__cta { animation-delay: 2.3s; }
}
@keyframes curtain { to { transform: translateY(-101%); visibility: hidden; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes settle { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes rise { from { transform: translateY(460px); } to { transform: translateY(0); } }
@keyframes trace { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Depois da abertura, as animações de CSS saem de cena para o GSAP poder mexer nesses elementos. */
.js.is-live:not(.no-intro) .hero .reveal-up, .js.is-live:not(.no-intro) .header,
.js.is-live:not(.no-intro) .hero__name, .js.is-live:not(.no-intro) .hero__photo { animation: none; }
.js.is-live:not(.no-intro) .hero__stroke { animation: none; stroke-dasharray: none; }

/* Lenis (rolagem suave) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* Cabeçalho some ao descer */
.header { transition: background .4s, padding .4s, border-color .4s, transform .5s var(--ease); }
.header.is-hidden { transform: translateY(-110%); }

/* Palavras que sobem (GSAP) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .14em .06em .1em; margin: -.14em -.06em -.1em; }
.wi { display: inline-block; will-change: transform; }

/* ---------------- Seções ---------------- */
main > section:not(.hero) { padding: clamp(64px, 8vw, 120px) var(--gutter); position: relative; }
.section-head { display: grid; grid-template-columns: 1fr minmax(0, 340px); grid-template-areas: "label label" "title note"; align-items: end; gap: 22px 40px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .label { grid-area: label; }
.section-head .display { grid-area: title; }
.section-head__note { grid-area: note; margin: 0; color: var(--mute); font-size: 15px; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; grid-template-areas: "label" "title" "note"; } }

/* Revelar ao rolar (só quando o JS está ativo) */
@media (prefers-reduced-motion: no-preference) {
  .motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .motion .reveal.is-in { opacity: 1; transform: none; }
}

/* Manifesto */
.manifesto { border-top: 1px solid var(--line); }
.knockout { position: relative; container-type: inline-size; margin: clamp(28px, 4vw, 48px) 0 clamp(40px, 6vw, 80px); font-family: var(--display); line-height: .8; white-space: nowrap; }
.knockout__word, .knockout__ghost { font-size: calc(100cqi / 2.66); }
.knockout__word { display: block; color: transparent; background: url("assets/impacto.webp") 30% 30% / 108.7% auto no-repeat; -webkit-background-clip: text; background-clip: text; }
.knockout__ghost { position: absolute; left: 0; top: 0; color: transparent; -webkit-text-stroke: 1.2px rgba(224, 48, 63, .55); transform: translate(.023em, .023em); }
@media (max-width: 600px) { .knockout__ghost { -webkit-text-stroke-width: 1px; } }
@media (prefers-reduced-motion: no-preference) {
  .motion .knockout .knockout__word { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease-io); }
  .motion .knockout.is-in .knockout__word { clip-path: inset(0 0 0 0); }
  .motion .knockout .knockout__ghost { opacity: 0; transition: opacity 1s ease .8s; }
  .motion .knockout.is-in .knockout__ghost { opacity: 1; }
}
.manifesto__body { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 32px 60px; align-items: end; }
.manifesto__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.6vw, 80px); line-height: 1; letter-spacing: -.015em; text-wrap: balance; }
.manifesto__side { margin: 0; color: var(--mute); font-size: 16px; }
@media (max-width: 760px) { .manifesto__body { grid-template-columns: 1fr; } }

/* Processo */
.process__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step { --draw: 1; position: relative; padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform: scaleX(var(--draw)); transform-origin: left; }
.step__n { font-size: 13px; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.step h3 { margin: 28px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(38px, 3.6vw, 52px); line-height: .9; letter-spacing: .01em; }
.step p { margin: 0; color: var(--mute); font-size: 15px; max-width: 32ch; }
.motion .step:nth-child(2) { transition-delay: .08s; } .motion .step:nth-child(3) { transition-delay: .16s; } .motion .step:nth-child(4) { transition-delay: .24s; }
@media (max-width: 900px) { .process__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 16px; } }
@media (max-width: 520px) { .process__steps { grid-template-columns: 1fr; } .step h3 { margin-top: 12px; } }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-size: 14px; color: var(--mute); }

/* Chamada final (todas as páginas) */
.cta-band { display: flex; flex-direction: column; align-items: center; gap: clamp(28px, 3vw, 40px); text-align: center; border-top: 1px solid var(--line); }
.cta-band__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(48px, 7vw, 104px); line-height: .9; letter-spacing: .005em; text-wrap: balance; }
.cta-band__title em { font-size: .9em; }

/* ---------------- Páginas internas ---------------- */
.page-inner main > section.page-hero { padding-top: calc(clamp(112px, 12vw, 168px) + env(safe-area-inset-top, 0px)); padding-bottom: clamp(48px, 5vw, 80px); }
.page-hero { display: grid; gap: clamp(20px, 2.4vw, 32px); }
.page-hero__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(64px, 11vw, 176px); line-height: .86; letter-spacing: .005em; }
.page-hero__title em { font-size: .84em; }
.page-hero__note { margin: 0; max-width: 46ch; color: var(--mute); font-size: 17px; }
.page-inner main > section + section:not(.cta-band) { border-top: 1px solid var(--line); }
.page-inner main > .page-hero + section { border-top: 0; padding-top: 0; }

/* Sobre */
.bio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.bio__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--panel); }
.bio__photo--empty { display: grid; place-content: center; justify-items: center; gap: 16px; border: 1px dashed var(--line); color: var(--mute); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.bio__photo--empty img { width: 72px; opacity: .5; }
.bio__text { display: grid; gap: 18px; font-size: 17px; line-height: 1.65; }
.bio__text p { margin: 0; max-width: 54ch; color: var(--mute); }
.bio__text .bio__lead { color: var(--osso); font-family: var(--serif); font-size: clamp(28px, 3vw, 42px); line-height: 1.12; letter-spacing: -.01em; }
/* Sobre: fatos, foto, história, ferramentas e fora do código */
.facts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 0; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.facts li { display: flex; align-items: center; }
.facts li + li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin: 0 16px; }
.bio__figure { margin: 0; position: relative; }
.bio__figure .bio__photo { display: block; height: auto; }
.story__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; }
.story__list::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: var(--line); }
.story__list li { position: relative; padding-top: 34px; display: grid; gap: 10px; align-content: start; }
.story__list li::before { content: ""; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--deep); border: 1.5px solid var(--red); }
.story__list li:last-child::before { background: var(--red); box-shadow: 0 0 0 6px rgba(224, 48, 63, .18); }
.story__when { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.story__list h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3vw, 44px); line-height: .95; }
.story__list p { margin: 0; color: var(--mute); font-size: 15px; max-width: 32ch; }
.tools { overflow: hidden; }
.tools__marquee { display: flex; width: max-content; border-block: 1px solid var(--line); }
.tools__track { list-style: none; margin: 0; padding: 0; display: flex; flex: none; }
.tools__track li { display: flex; align-items: center; gap: 14px; padding: 26px 36px; font-family: var(--display); font-size: clamp(26px, 2.4vw, 36px); line-height: 1; white-space: nowrap; color: var(--osso); }
.tools__track svg { width: 28px; height: 28px; fill: currentColor; opacity: .55; transition: opacity .3s, fill .3s; flex: none; }
.tools__track li:hover svg { opacity: 1; fill: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .tools__marquee { animation: marquee 48s linear infinite; }
  .tools__marquee:hover { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tools__marquee { width: auto; }
  .tools__track { flex-wrap: wrap; }
  .tools__track[aria-hidden] { display: none; }
}
.offcode__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.offcode__card { margin: 0; display: grid; gap: 14px; }
.offcode__card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--panel); filter: saturate(.85); transition: filter .4s, transform .6s var(--ease); }
.offcode__card:hover img { filter: none; transform: translateY(-4px); }
.offcode__card:nth-child(1) { rotate: -1.5deg; }
.offcode__card:nth-child(3) { rotate: 1.5deg; margin-top: clamp(24px, 4vw, 64px); }
.offcode__card p { margin: 0; color: var(--mute); font-size: 15px; }
.offcode__card--text { aspect-ratio: 4 / 5; align-content: end; padding: clamp(24px, 3vw, 40px); border-radius: 4px; background: var(--red); color: var(--osso); margin-top: clamp(12px, 2vw, 32px); }
.offcode__card--text p { color: rgba(242, 235, 225, .85); max-width: 28ch; }
.offcode__card--text .offcode__big { font-family: var(--display); font-size: clamp(48px, 5.4vw, 84px); line-height: .9; color: var(--osso); }
.offcode__card--text .offcode__big em { color: var(--deep); }
@media (max-width: 860px) {
  .story__list { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .story__list::before { display: none; }
}
@media (max-width: 760px) {
  .facts { font-size: 11px; }
  .facts li + li::before { margin: 0 10px; }
  .story__list { grid-template-columns: 1fr; gap: 32px; padding-left: 24px; }
  .story__list::before { display: block; left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .story__list li { padding-top: 0; }
  .story__list li::before { left: -24px; top: 2px; }
  .offcode__grid { grid-template-columns: 1fr; }
  .offcode__card:nth-child(n) { rotate: none; margin-top: 0; }
  .offcode__card--text { aspect-ratio: auto; min-height: 260px; }
  .tools__track li { padding: 18px 24px; }
}

.name-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); grid-template-areas: "label label" "title text"; gap: 24px clamp(32px, 6vw, 96px); align-items: end; }
.name-story .label { grid-area: label; }
.name-story__title { grid-area: title; margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(48px, 6.4vw, 96px); line-height: .9; }
.name-story__text { grid-area: text; margin: 0; color: var(--mute); font-size: 16px; }
.services__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services__list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 40px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); }
.services__list h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.6vw, 52px); line-height: 1; }
.services__list p { margin: 0; color: var(--mute); max-width: 44ch; }
.principles__list { list-style: none; margin: 0 0 clamp(40px, 5vw, 64px); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.principles__list li { padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.principles__list span { font-size: 13px; font-weight: 600; color: var(--red); font-variant-numeric: tabular-nums; }
.principles__list h3 { margin: 18px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.2vw, 46px); line-height: .95; }
.principles__list p { margin: 0; color: var(--mute); font-size: 15px; max-width: 34ch; }
@media (max-width: 860px) {
  .bio, .name-story { grid-template-columns: 1fr; }
  .name-story { grid-template-areas: "label" "title" "text"; }
  .bio__photo { max-width: 420px; }
  .services__list li { grid-template-columns: 1fr; }
  .principles__list { grid-template-columns: 1fr; gap: 36px; }
}

/* Projetos: grade de cards grandes */
.page-inner main > section.work { padding-top: 0; border-top: 0; }
.work__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(16px, 2vw, 28px); }
.work__card { display: grid; gap: 18px; text-decoration: none; color: inherit; }
.work__item:nth-child(even) { margin-top: clamp(0px, 8vw, 120px); }
.work__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--panel); }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
a.work__card:hover .work__media img { transform: scale(1.03); }
.work__media--empty { display: grid; place-content: center; justify-items: center; gap: 14px; background: radial-gradient(80% 90% at 70% 100%, rgba(14, 58, 69, .9), transparent 70%), var(--panel); }
.work__media--empty img { width: 64px; height: auto; opacity: .35; transition: none; }
.work__media--empty span { font-family: var(--display); font-size: 28px; letter-spacing: .04em; color: var(--mute); }
.work__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.work__name { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(32px, 3vw, 44px); line-height: 1; }
.work__info { margin: 0; color: var(--mute); font-size: 14px; text-align: right; }
.work__item--next .work__media { border: 1px dashed var(--line); background: transparent; display: grid; place-content: center; text-align: center; padding: 24px; }
.work__item--next .work__media p { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3vw, 44px); line-height: 1.05; }
.work__item--next .work__media span { display: block; margin-top: 18px; font: 600 14px/1 var(--text); color: var(--mute); }
.work__item--next a.work__card:hover .work__media { border-color: var(--osso); }
@media (max-width: 760px) {
  .work__grid { grid-template-columns: 1fr; }
  .work__item:nth-child(even) { margin-top: 0; }
}

/* Contato */
.page-inner main > section.contact-page { padding-top: 0; border-top: 0; }
.contact-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(48px, 8vw, 128px); align-items: start; }
.brief { display: grid; gap: 34px; }
.field { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { padding: 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.field legend { margin-bottom: 14px; }
.field input[type="text"], .field textarea {
  width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--osso); font: 400 clamp(20px, 2vw, 26px)/1.4 var(--text); resize: vertical;
  transition: border-color .3s;
}
.field textarea { font-size: 18px; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(242, 235, 225, .3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--osso); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.options label { cursor: pointer; letter-spacing: 0; text-transform: none; font-size: 15px; font-weight: 400; color: var(--osso); }
.options input { position: absolute; opacity: 0; pointer-events: none; }
.options span { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 99px; transition: background .3s, border-color .3s, color .3s; }
.options label:hover span { border-color: var(--osso); }
.options input:checked + span { background: var(--osso); border-color: var(--osso); color: var(--deep); }
.options input:focus-visible + span { outline: 2px solid var(--osso); outline-offset: 3px; }
.brief__error { margin: -14px 0 0; color: var(--red); font-size: 14px; }
.brief__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.brief__alt { color: var(--mute); font-size: 15px; text-underline-offset: 4px; text-decoration-color: var(--line); }
.brief__alt:hover { color: var(--osso); text-decoration-color: var(--osso); }
.direct { display: grid; gap: 22px; padding-top: 6px; }
.direct__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.direct__list li { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.direct__list span { font-size: 13px; color: var(--mute); }
.direct__list a { font-size: clamp(18px, 1.6vw, 21px); text-decoration: none; overflow-wrap: anywhere; transition: color .3s; }
.direct__list a:hover { color: var(--red); }
@media (max-width: 860px) { .contact-page { grid-template-columns: 1fr; } }

/* Troca de página suave (navegadores que suportam) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* Rodapé */
.footer { padding: clamp(56px, 8vw, 96px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 32px); border-top: 1px solid var(--line); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: clamp(40px, 6vw, 72px); }
.footer__top img { width: clamp(180px, 26vw, 360px); height: auto; }
.footer__tag { margin: 0; font-family: var(--serif); font-size: clamp(28px, 3.4vw, 44px); line-height: 1.05; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; border-top: 1px solid var(--line); padding-top: 22px; font-size: 13px; color: var(--mute); }
.footer__bottom p { margin: 0; }
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__bottom a { text-decoration: none; color: var(--osso); }
.footer__bottom a:hover { color: var(--red); }

/* Menu (celular) */
.menu { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; padding: calc(env(safe-area-inset-top, 0px) + 22px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 28px); background: var(--deep); color: var(--osso); flex-direction: column; }
.menu[open] { display: flex; }
.menu::backdrop { background: rgba(0,0,0,.6); }
.menu__head { display: flex; justify-content: space-between; align-items: center; }
.menu__close { background: none; border: 0; color: var(--osso); font-family: var(--display); font-size: 24px; cursor: pointer; }
.menu__links { display: flex; flex-direction: column; margin-top: auto; }
.menu__links a { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: clamp(56px, 16vw, 96px); line-height: 1; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.menu__links a span { font-size: .4em; color: var(--red); }
.menu__foot { margin: 28px 0 0; font-family: var(--serif); font-size: 26px; }

/* Responsivo do cabeçalho */
@media (max-width: 960px) {
  .header { grid-template-columns: 1fr auto; }
  .header__nav { display: none; }
}
@media (max-width: 600px) {
  .header__logo img { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------------- Mesa (página Projetos) ----------------
   A composição é uma prancha de 1440 × 900 que escala inteira (--s vem do mesa.js).
   As janelas são projetos reais: dá pra arrastar, e ao passar o mouse o print rola. */
/* A página Projetos inteira usa o preto das outras páginas (sem o tom esverdeado). */
.page-mesa { --deep: #0B1114; }
.mesa { position: relative; height: max(100svh, 560px); overflow: hidden; background: var(--deep); }
.mesa::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(242, 235, 225, .075) 1px, transparent 1.2px); background-size: calc(22px * var(--s, 1)) calc(22px * var(--s, 1)); background-position: center; pointer-events: none; }
.mesa__board { --s: 1; position: absolute; left: 50%; top: 50%; width: 1440px; height: 900px; transform: translate(-50%, -50%) scale(var(--s)); }
.mesa__deck { position: absolute; inset: 0; }
.win {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); z-index: var(--z);
  transform: rotate(var(--r)); border-radius: 10px; overflow: hidden; display: block; text-decoration: none; color: inherit;
  background: var(--deep); box-shadow: 0 50px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(242, 235, 225, .08);
  cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none;
  transition: box-shadow .35s var(--ease);
}
.win:hover { box-shadow: 0 60px 110px rgba(0, 0, 0, .6), 0 0 0 1px rgba(242, 235, 225, .22); }
.win.is-dragging { cursor: grabbing; box-shadow: 0 80px 140px rgba(0, 0, 0, .65), 0 0 0 1px rgba(242, 235, 225, .3); }
.win:focus-visible { outline: 2px solid var(--osso); outline-offset: 4px; }
.win__bar { height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: #162428; }
.win__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(242, 235, 225, .25); }
.win__bar i.is-red { background: var(--red); }
.win__bar span { margin-left: 12px; flex: 1; height: 14px; border-radius: 4px; background: rgba(242, 235, 225, .08); font: 10px/14px "JetBrains Mono", ui-monospace, Consolas, monospace; color: rgba(242, 235, 225, .5); padding-left: 8px; white-space: nowrap; overflow: hidden; text-align: left; }
.win--lt .win__bar { background: #e7e2da; }
.win--lt .win__bar i { background: rgba(0, 0, 0, .18); }
.win--lt .win__bar span { background: rgba(0, 0, 0, .06); color: rgba(0, 0, 0, .45); }
.win__body { position: relative; display: block; height: var(--h); overflow: hidden; }
.win__body img { width: 100%; height: auto; max-width: none; pointer-events: none; transition: transform 1.4s var(--ease); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .win:not(.is-dragging):hover .win__body img { transform: translateY(calc(var(--h) - 100%)); transition: transform 7s cubic-bezier(.45, 0, .55, 1) .15s; }
}
.win--empty { background: transparent; box-shadow: none; }
.win--empty .win__body { display: grid; place-items: center; background: rgba(242, 235, 225, .03); border: 1.5px dashed rgba(242, 235, 225, .28); border-top: 0; border-radius: 0 0 10px 10px; transition: background .3s, border-color .3s; }
.win--empty:hover .win__body { background: rgba(242, 235, 225, .07); border-color: rgba(242, 235, 225, .5); }
.win__empty { text-align: center; font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--osso); }
.win__empty em { display: block; }
.win__empty small { display: block; margin-top: 16px; font: 600 12px/1 var(--text); color: var(--mute); }
.cur { position: absolute; z-index: 30; pointer-events: none; left: 0; top: 0; will-change: transform; }
.cur svg { display: block; }
.cur b { position: absolute; left: 18px; top: 18px; padding: 4px 10px; border-radius: 6px; font: 600 12px var(--text); white-space: nowrap; }
.cur--gustavo { transform: translate(1000px, 128px); }
.cur--gustavo b { background: var(--osso); color: var(--deep); }
.cur--voce { transform: translate(1180px, 390px); }
.cur--voce b { background: var(--red); color: var(--osso); }
.mesa__title { position: absolute; left: 40px; bottom: 48px; z-index: 15; margin: 0; font-family: var(--display); font-weight: 400; font-size: 112px; line-height: .86; letter-spacing: 0; pointer-events: none; }
.mesa__title em { display: block; font-size: 96px; letter-spacing: -.01em; }
.mesa__cta { position: absolute; right: 40px; bottom: 52px; z-index: 15; text-align: right; }
.mesa__cta p { margin: 14px 0 0; font-size: 12px; color: var(--mute); }
.page-mesa .header:not(.is-scrolled) { background: transparent; }
/* Processo (página Projetos): bloco claro, cor de papel, com ondas em cima e embaixo.
   As ondas são dois SVGs com o dobro da largura que deslizam meia largura e recomeçam (iguais às do Início). */
.onda { position: relative; height: clamp(44px, 8vw, 120px); overflow: hidden; margin-bottom: -1px; }
.onda--baixo { margin: -1px 0 0; transform: scaleY(-1); }
.onda svg { position: absolute; left: 0; top: 0; width: 200%; height: 100%; fill: #EFEDE8; }
.onda svg:first-child { opacity: .28; }
@media (prefers-reduced-motion: no-preference) {
  .onda svg { animation: onda 22s linear infinite; will-change: transform; }
  .onda svg:first-child { animation-duration: 34s; animation-direction: reverse; }
  .onda--baixo svg { animation-duration: 28s; }
}
@keyframes onda { to { transform: translateX(-50%); } }
.page-mesa main > section.process {
  /* dentro do bloco as cores se invertem: escuro sobre claro */
  --deep: #EFEDE8; --osso: #0B1114; --mute: rgba(11, 17, 20, .64); --line: rgba(11, 17, 20, .18);
  padding-block: clamp(40px, 5vw, 80px) clamp(56px, 7vw, 100px); background: #EFEDE8; color: #0B1114;
}
.page-mesa main > section.cta-band { border-top: 0; }

/* Paginação da mesa: setas e contador, em cima do botão de contato. */
.mesa__pager { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 18px; }
.mesa__pager[hidden] { display: none; }
.mesa__pager p { margin: 0; min-width: 58px; text-align: center; font: 12px/1 "JetBrains Mono", ui-monospace, Consolas, monospace; letter-spacing: .06em; color: var(--mute); }
.mesa__pager p b { font-weight: 400; color: var(--osso); }
.mesa__pager button { appearance: none; cursor: pointer; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(242, 235, 225, .28); border-radius: 50%; background: rgba(8, 16, 19, .55); color: var(--osso); font: 600 15px/1 var(--text); transition: background .25s, border-color .25s, color .25s, transform .2s; }
.mesa__pager button:hover, .mesa__pager button.is-pressed { background: var(--osso); border-color: var(--osso); color: var(--deep); }
.mesa__pager button.is-pressed { transform: scale(.92); }
.mesa__pager button:focus-visible { outline: 2px solid var(--osso); outline-offset: 3px; }
main > section.mesa { padding: 0; }
.mesa__hint-m { display: none; }

/* Celular: as janelas viram um baralho que passa com o dedo. */
@media (max-width: 760px) {
  main > section.mesa { height: auto; padding: calc(env(safe-area-inset-top, 0px) + 96px) 0 56px; }
  .mesa::before { background-size: 22px 22px; }
  .mesa__board { position: static; width: auto; height: auto; transform: none; display: flex; flex-direction: column; gap: 36px; }
  .mesa__deck { position: relative; inset: auto; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 18px var(--gutter) 44px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .mesa__deck::-webkit-scrollbar { display: none; }
  .win { position: relative; left: auto; top: auto; flex: 0 0 80vw; width: 80vw; transform: rotate(calc(var(--r) * .35)); scroll-snap-align: center; cursor: pointer; touch-action: auto; box-shadow: 0 18px 36px rgba(0, 0, 0, .45), 0 0 0 1px rgba(242, 235, 225, .08); }
  .win__body { height: calc(80vw / 1.6); }
  .win__empty { font-size: 30px; }
  .cur { display: none; }
  .mesa__title { position: static; padding: 0 var(--gutter); font-size: clamp(56px, 17vw, 84px); }
  .mesa__title em { font-size: .86em; }
  .mesa__cta { position: static; padding: 0 var(--gutter); text-align: left; }
  .mesa__hint { display: none; }
  .mesa__pager { display: none; }
  .mesa__hint-m { display: inline; }
}

/* Entrada da mesa: as janelas caem na mesa uma a uma. Na página inicial esperam a cortina subir. */
@media (prefers-reduced-motion: no-preference) and (min-width: 761px) {
  .js .mesa { --d0: .15s; }
  .js:not(.no-intro) .mesa { --d0: 1.35s; }
  .js .win { animation: win-drop 1.1s var(--ease) both; animation-delay: calc(var(--d0) + var(--i, 0) * 120ms); }
  .js .cur, .js .mesa__title, .js .mesa__cta { animation: fadeup .9s var(--ease) both; animation-delay: calc(var(--d0) + .6s); }
  .js .cur { animation-name: fadein; animation-delay: calc(var(--d0) + 1s); opacity: 0; }
}
/* Troca de projetos: as janelas da vez saem pra baixo antes das próximas caírem. */
@media (prefers-reduced-motion: no-preference) and (min-width: 761px) {
  .js .win.is-leaving { pointer-events: none; animation: win-out .34s cubic-bezier(.5, 0, .9, .4) both; animation-delay: calc(var(--o, 0) * 40ms); }
}
@keyframes win-out { to { opacity: 0; translate: 0 70px; rotate: -3deg; } }
@keyframes win-drop { from { opacity: 0; translate: 0 -80px; rotate: 5deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }

/* ---------------- Preview de projeto ----------------
   O site abre dentro de uma janela, com as animações dele, sem sair da Vedoo. */
.preview { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: clamp(14px, 3vh, 30px) clamp(16px, 3vw, 40px); border: 0; background: transparent; color: var(--osso); display: none; flex-direction: column; gap: clamp(12px, 2vh, 18px); overflow: hidden; }
.preview[open] { display: flex; }
.preview::backdrop { background: rgba(5, 10, 12, .84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
@media (prefers-reduced-motion: no-preference) { .preview[open]::backdrop { animation: fadein .45s ease both; } }
.preview__top, .preview__bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; max-width: 1280px; margin: 0 auto; flex: none; }
.preview__title { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.4vw, 50px); line-height: .9; letter-spacing: .005em; }
.preview__tipo { margin: 6px 0 0; font-size: 13px; color: var(--mute); }
.preview__tools { display: flex; align-items: center; gap: 12px; }
.preview__devices { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 99px; }
.preview__devices button { background: none; border: 0; color: var(--mute); font: 600 13px/1 var(--text); padding: 9px 14px; border-radius: 99px; cursor: pointer; transition: background .3s, color .3s; }
.preview__devices button[aria-pressed="true"] { background: var(--osso); color: var(--deep); }
.preview__close { background: none; border: 1px solid var(--line); color: var(--osso); font: 600 13px/1 var(--text); padding: 12px 18px; border-radius: 99px; cursor: pointer; transition: border-color .3s; }
.preview__close:hover { border-color: var(--osso); }
.preview__frame { flex: 1; min-height: 0; width: 100%; max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: #0c171b; box-shadow: 0 60px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(242, 235, 225, .1); transition: max-width .55s var(--ease); will-change: transform; }
.preview--mobile .preview__frame { max-width: 420px; }
.preview__frame .win__bar { flex: none; height: 34px; padding: 0 14px; }
.preview__frame .win__bar i { width: 10px; height: 10px; }
.preview__frame .win__bar span { height: 18px; line-height: 18px; font-size: 11px; max-width: 360px; margin-left: 16px; }
.preview__body { position: relative; flex: 1; min-height: 0; background: #0c171b; }
.preview__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.preview__site { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; opacity: 0; transition: opacity .25s ease; }
/* No modo computador o site abre numa tela "virtual" larga (preview.js) e é reduzido pra caber: fica com o caimento de um monitor de verdade. */
.preview__site.is-desktop { inset: auto; left: 0; top: 0; width: var(--pv-w, 100%); height: var(--pv-h, 100%); transform: scale(var(--pv-k, 1)); transform-origin: 0 0; }
.preview__site.is-loaded { opacity: 1; }
.preview--mobile .preview__poster { display: none; }
.preview__hint { margin: 0; font-size: 13px; color: var(--mute); }
.preview__hint span { color: var(--red); margin-right: 6px; }
html.has-preview { overflow: hidden; }
@media (max-width: 760px) {
  .preview { padding: 12px 12px calc(env(safe-area-inset-bottom, 0px) + 12px); }
  .preview__devices, .preview__hint { display: none; }
  .preview__bottom .btn { width: 100%; justify-content: center; }
}

/* ---------------- Contato: conversa ---------------- */
.page-contato main > section.conversa { padding: calc(env(safe-area-inset-top, 0px) + clamp(104px, 12vh, 128px)) var(--gutter) clamp(32px, 5vh, 56px); }
.conversa { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: stretch; background: radial-gradient(70% 70% at 65% 40%, #0f3a44 0%, var(--deep) 72%); position: relative; }
.conversa::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(242, 235, 225, .08) 1px, transparent 1.2px); background-size: 22px 22px; pointer-events: none; }
.conversa > * { position: relative; }
.conversa__intro { display: flex; flex-direction: column; }
.conversa__title { margin: 18px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(96px, 11.8vw, 170px); line-height: .86; }
.conversa__title em { display: block; font-size: .78em; letter-spacing: -.01em; }
.conversa__text { margin: 28px 0 0; max-width: 40ch; font-size: 17px; line-height: 1.55; color: var(--mute); }
.conversa__progress { display: flex; align-items: center; gap: 8px; margin-top: 36px; }
.conversa__progress span { margin-right: 10px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.conversa__progress i { width: 36px; height: 3px; border-radius: 2px; background: var(--line); transition: background .4s; }
.conversa__progress i.is-on { background: var(--red); }
.conversa__direct { list-style: none; margin: auto 0 0; padding: 32px 0 0; display: grid; gap: 10px; font-size: 14px; }
.conversa__direct li { display: flex; gap: 12px; align-items: baseline; }
.conversa__direct span { width: 76px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.conversa__direct a { text-decoration: none; transition: color .3s; }
.conversa__direct a:hover { color: var(--red); }

.chat { display: flex; flex-direction: column; height: min(720px, calc(100svh - 180px)); min-height: 520px; border-radius: 18px; overflow: hidden; background: rgba(12, 23, 27, .88); box-shadow: 0 50px 90px rgba(0, 0, 0, .5), 0 0 0 1px rgba(242, 235, 225, .08); }
.chat__head { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-bottom: 1px solid var(--line); flex: none; }
.chat__head img { width: 44px; height: 44px; border-radius: 50%; }
.chat__head b { display: block; font-size: 16px; }
.chat__head small { font-size: 12px; color: var(--mute); }
.chat__head small i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; margin-right: 6px; }
.chat__msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 26px 24px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scrollbar-width: thin; }
.chat__b { margin: 0; max-width: min(460px, 86%); padding: 14px 18px; border-radius: 18px 18px 18px 4px; background: #162428; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.chat__b--me { align-self: flex-end; background: var(--osso); color: var(--deep); border-radius: 18px 18px 4px 18px; }
.chat__b--big { background: none; padding: 4px 0; font-family: var(--serif); font-size: clamp(26px, 2.2vw, 32px); line-height: 1.1; }
.chat__b--big + .chat__b--big { margin-top: -12px; }
@media (prefers-reduced-motion: no-preference) {
  .chat__b, .chat__quick, .chat__summary { animation: chat-in .45s var(--ease) both; }
}
@keyframes chat-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat__typing { display: flex; gap: 5px; padding: 16px 18px; background: #162428; border-radius: 18px 18px 18px 4px; width: 70px; }
.chat__typing i { width: 8px; height: 8px; border-radius: 50%; background: rgba(242, 235, 225, .5); animation: chat-dot 1s ease-in-out infinite; }
.chat__typing i:nth-child(2) { animation-delay: .15s; } .chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 100% { opacity: .35; transform: none; } 50% { opacity: 1; transform: translateY(-3px); } }
.chat__quick { align-self: flex-end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 92%; }
.chat__chip { padding: 10px 16px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--osso); font: 400 14px var(--text); cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.chat__chip:hover { background: var(--osso); color: var(--deep); border-color: var(--osso); }
.chat__summary { align-self: stretch; margin-top: 6px; padding: 20px 22px; border-radius: 16px; background: rgba(242, 235, 225, .05); border: 1px solid var(--line); }
.chat__summary-k { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.chat__summary pre { margin: 0; white-space: pre-wrap; font: 14px/1.55 "JetBrains Mono", ui-monospace, Consolas, monospace; color: var(--osso); }
.chat__summary-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 18px; }
.chat__alt { background: none; border: 0; padding: 0; color: var(--mute); font: 400 14px var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); cursor: pointer; }
.chat__alt:hover { color: var(--osso); }
.chat__foot { flex: none; display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); transition: opacity .3s; }
.chat__foot input { flex: 1; min-width: 0; padding: 14px 18px; border: 1px solid transparent; border-radius: 99px; background: rgba(242, 235, 225, .06); color: var(--osso); font: 400 16px var(--text); outline: none; transition: border-color .3s; }
.chat__foot input::placeholder { color: rgba(242, 235, 225, .4); }
.chat__foot input:focus { border-color: rgba(242, 235, 225, .3); }
.chat__foot button { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--red); color: var(--osso); font: 700 18px var(--text); cursor: pointer; }
.chat__foot.is-busy { opacity: .55; }
.chat__foot.is-done { opacity: .35; pointer-events: none; }

@media (max-width: 900px) {
  .conversa { grid-template-columns: 1fr; min-height: 0; }
  .conversa__title { font-size: clamp(72px, 22vw, 120px); }
  .conversa { gap: 0; }
  .conversa__intro { display: contents; }
  .conversa__intro > * { order: 0; }
  .chat { order: 1; margin-top: 28px; }
  .conversa__direct { order: 2; margin-top: 28px; padding-top: 0; }
  .conversa__progress { margin-top: 24px; }
  .chat { height: 72svh; min-height: 480px; }
  .chat__msgs { padding: 20px 16px; }
  .chat__foot { padding: 12px; }
}
