/* =========================================================
   ACASO STUDIO — landing page
   Estrutura: tokens → base → componentes → secções → motion
   ========================================================= */

/* ---------- Fontes (self-hosted, subset latin) ---------- */
@font-face { font-family: "Geist"; src: url("../fonts/geist-variable.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Paleta oficial — laranja, creme e castanho dominam; ferrugem e sol só em detalhes */
  --orange: #FB714B;
  --cream: #EAE0CC;
  --brown: #191410;
  --rust: #BF5639;
  --sun: #FAAE4B;

  --cream-deep: #E1D5BC;       /* tom do creme para superfícies secundárias */
  --line: rgba(25, 20, 16, .16);
  --line-light: rgba(234, 224, 204, .18);
  --ink-soft: rgba(25, 20, 16, .72);
  --cream-soft: rgba(234, 224, 204, .72);

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-display: var(--f-sans);

  --gutter: clamp(16px, 4.2vw, 64px);
  --maxw: 1440px;
  --radius: 999px;
  --nav-h: 68px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: .25s;
  --t-med: .6s;
  --t-slow: 1.1s;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--f-sans);
  font-size: calc(clamp(16px, 1.05vw + 11px, 18px) * var(--text-g, 1));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* grão de película, quase invisível: remete para o lado audiovisual sem competir com o conteúdo */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 9999; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--orange); color: var(--brown); }

[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--brown); color: var(--cream); padding: 10px 16px; border-radius: 8px; transition: top var(--t-fast); }
.skip-link:focus { top: 12px; }

[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ---------- Tipografia ---------- */
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.4; }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.display { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.06em; line-height: .84; }
.label { color: var(--rust); margin-bottom: clamp(18px, 2.4vw, 32px); }

.h2 {
  font-size: calc(clamp(2.2rem, 5.6vw, 5.4rem) * var(--tscale, 1) * var(--tscale-g, 1));
  line-height: .98;
  font-weight: 700;
  letter-spacing: -.045em;
  max-width: 15ch;
  text-wrap: balance;
}
.h2 .serif { font-weight: 400; letter-spacing: -.02em; }

/* O ponto: o ponto final do logótipo usado como assinatura de cada título */
.dot {
  display: inline-block; width: .3em; height: .235em; margin-left: .06em;
  background: var(--orange);
  clip-path: url(#clip-ponto);
  vertical-align: baseline;
}

/* ---------- Botões ---------- */
.btn {
  --bg: var(--brown); --fg: var(--cream); --dot: var(--orange);
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--radius);
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 15px; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  isolation: isolate; overflow: hidden;
  transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast), color var(--t-fast);
}
.btn::before { /* preenchimento que nasce a partir do ponto */
  content: ""; position: absolute; z-index: -1; left: 22px; top: 50%; width: 10px; height: 8px;
  background: var(--dot); border-radius: 50%; transform: translateY(-50%) scale(0);
  transition: transform .55s var(--ease-out);
}
.btn__dot { width: 10px; height: 8px; flex: none; background: var(--dot); clip-path: url(#clip-ponto); transition: transform var(--t-fast) var(--ease-out); }
.btn:hover::before { transform: translateY(-50%) scale(60); }
.btn:hover { color: var(--brown); }
.btn:hover .btn__dot { transform: scale(1.4); background: var(--brown); }
.btn:active { transform: scale(.97); }

.btn--primary { --bg: var(--orange); --fg: var(--brown); --dot: var(--brown); }
.btn--primary::before { background: var(--brown); }
.btn--primary:hover { color: var(--cream); }
.btn--primary:hover .btn__dot { background: var(--orange); }

.btn--ghost { --bg: transparent; --fg: var(--brown); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost::before { left: 50%; background: var(--brown); }
.btn--ghost:hover { color: var(--cream); }

.btn--dark { --bg: var(--brown); --fg: var(--cream); --dot: var(--orange); }
.btn--dark::before { background: var(--cream); }
.btn--dark:hover .btn__dot { background: var(--orange); }

.btn--outline-dark { --bg: transparent; --fg: var(--brown); box-shadow: inset 0 0 0 1.5px var(--brown); }
.btn--outline-dark::before { left: 50%; background: var(--brown); }
.btn--outline-dark:hover { color: var(--orange); }

.btn--small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn--large { min-height: 60px; padding: 0 30px; font-size: 17px; }

/* ---------- Navegação ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  transition: transform .45s var(--ease-out), background-color .3s, color .3s;
}
.nav.is-scrolled { background: rgba(234, 224, 204, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__logo { display: block; width: 104px; color: var(--brown); margin-right: auto; }
.nav__logo svg { width: 100%; height: auto; }
.nav__links { display: none; gap: 30px; font-size: 15px; }
.nav__links a { position: relative; text-decoration: none; padding: 6px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--orange); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: none; }
.nav__toggle { width: 48px; height: 48px; margin-right: -10px; display: grid; place-items: center; position: relative; z-index: 2; }
.nav__burger { width: 26px; height: 10px; position: relative; display: block; }
.nav__burger i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform .45s var(--ease-out), top .45s var(--ease-out); }
.nav__burger i:first-child { top: 0; }
.nav__burger i:last-child { top: 8px; }
.menu-open .nav { color: var(--cream); background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .nav__logo { color: var(--cream); }
.menu-open .nav__burger i:first-child { top: 4px; transform: rotate(45deg); }
.menu-open .nav__burger i:last-child { top: 4px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--brown); color: var(--cream);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--gutter) calc(28px + env(safe-area-inset-bottom));
  clip-path: circle(0% at calc(100% - 40px) 34px);
  transition: clip-path .7s var(--ease-io), visibility 0s linear .7s;
  visibility: hidden;
}
.menu:not([hidden]) { display: flex; }
.menu-open .menu { clip-path: circle(150% at calc(100% - 40px) 34px); visibility: visible; transition: clip-path .8s var(--ease-io); }
.menu__list { counter-reset: none; }
.menu__list li { border-bottom: 1px solid var(--line-light); overflow: hidden; }
.menu__list a { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; text-decoration: none; font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.05; transform: translateY(105%); transition: transform .7s var(--ease-out), color .2s; }
.menu__list small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; color: var(--orange); font-weight: 400; }
.menu__list a:hover { color: var(--orange); }
.menu-open .menu__list a { transform: none; }
.menu-open .menu__list li:nth-child(2) a { transition-delay: .05s; }
.menu-open .menu__list li:nth-child(3) a { transition-delay: .1s; }
.menu-open .menu__list li:nth-child(4) a { transition-delay: .15s; }
.menu-open .menu__list li:nth-child(5) a { transition-delay: .2s; }
.menu-open .menu__list li:nth-child(6) a { transition-delay: .25s; }
.menu__sign { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; color: var(--cream-soft); }
.menu__sign svg { width: 76px; color: var(--orange); }
.menu-open { overflow: hidden; }

/* ---------- Secções genéricas ---------- */
.section { padding: calc(clamp(88px, 13vw, 200px) * var(--space, 1) * var(--space-g, 1)) var(--gutter); max-width: var(--maxw); margin: 0 auto; }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh;
  padding: calc(var(--nav-h) + 20px) var(--gutter) 40px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start;
  max-width: var(--maxw); margin: 0 auto;
  overflow-x: clip; /* o contorno do "Acaso." pode sair do ecrã sem criar scroll horizontal */
}
.hero__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 12px; }
.hero__meta > span:nth-child(n+2) { display: none; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--rust); }

.hero__title {
  font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .84;
  /* --hero-ch = nº de letras da linha mais longa (calculado no build); cada letra mede ~.63em,
     por isso o título nunca transborda, mesmo que o texto seja alterado no painel */
  --fit: calc((100vw - 2 * var(--gutter)) / (var(--hero-ch, 11) * .64));
  font-size: calc(min(var(--fit), 11.6rem) * min(var(--tscale, 1) * var(--tscale-g, 1), 1));
  position: relative; z-index: 2;
}
.hero__line { display: block; overflow: hidden; padding: .14em 0 .04em; margin-top: -.14em; }
.hero__line > span { display: inline-block; }
.hero__line--last { display: flex; align-items: flex-end; overflow: visible; }
.hero__script {
  width: 2.25em; height: auto; color: var(--orange);
  margin: 0 0 -.28em -.1em; flex: none;
  /* escrita da esquerda para a direita */
  clip-path: inset(0 100% 0 0);
}

/* Fotografia recortada, de pé sobre a faixa laranja, com o "Acaso." em contorno por trás
   (a mesma linguagem do beacons e do primeiro post do Instagram) */
.hero__visual { position: relative; z-index: 1; display: grid; justify-items: center; align-content: end; margin-bottom: -40px; }
.hero__outline {
  position: absolute; z-index: 0; left: 50%; top: 18%; width: 150%; max-width: none;
  transform: translate(-50%, calc(var(--depth, 0) * 90px)) rotate(-6deg);
  fill: none; stroke: var(--orange); stroke-width: 2px; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.hero__photo { position: relative; z-index: 1; display: block; width: 100%; }
.hero__img { display: block; width: 100%; height: auto; max-height: 72svh; object-fit: contain; object-position: 50% 100%; }
.hero__visual figcaption { position: absolute; z-index: 2; left: 0; bottom: 52px; color: var(--ink-soft); background: var(--cream); padding: 4px 8px; border-radius: 4px; }

.seal { position: absolute; width: clamp(92px, 24vw, 150px); aspect-ratio: 1; left: 0; top: 6%; z-index: 3; color: var(--brown); }
.seal__ring { width: 100%; height: 100%; animation: spin 22s linear infinite; }
.seal__ring text { font-family: var(--f-mono); font-size: 15.5px; letter-spacing: .06em; fill: currentColor; }
.seal__mark { position: absolute; inset: 31%; width: 38%; color: var(--orange); }
.seal::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--cream); z-index: -1; }

.hero__body { display: grid; gap: 24px; max-width: 34rem; }
.hero__lead { font-size: clamp(1.05rem, 1.25vw + .6rem, 1.3rem); line-height: 1.45; color: var(--ink-soft); letter-spacing: -.01em; }
.hero__lead em { font-family: var(--f-serif); font-size: 1.18em; color: var(--brown); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__body { order: 1; }
.hero__visual { order: 2; }
.hero__scroll { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAIXA ---------- */
.band { background: var(--orange); color: var(--brown); overflow: hidden; padding: 14px 0; border-block: 1px solid var(--brown); }
.band__track { display: flex; align-items: center; gap: 22px; width: max-content; animation: marquee 48s linear infinite; }
.band__track span { font-family: var(--f-display); font-weight: 800; letter-spacing: -.04em; text-transform: uppercase; font-size: clamp(1.25rem, 2.6vw, 2.2rem); line-height: 1; white-space: nowrap; }
.band__track svg { width: 22px; height: 17px; color: var(--brown); flex: none; }
.band:hover .band__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- SOBRE ---------- */
.about__grid { display: grid; gap: 48px; }
.about__intro { font-size: clamp(1.5rem, 2.6vw, 2.3rem); line-height: 1.12; margin: 22px 0 26px; max-width: 22ch; color: var(--rust); }
.about__copy { display: grid; gap: 14px; max-width: 34rem; color: var(--ink-soft); }
.about__copy p:first-child { color: var(--brown); font-weight: 500; }

.portrait { position: relative; }
.portrait__frame { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; background: var(--brown); }
.portrait__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait__reveal {
  clip-path: ellipse(0% 0% at var(--mx, 50%) var(--my, 50%));
  transition: clip-path 1s var(--ease-out);
}
.portrait.is-revealed .portrait__reveal { clip-path: ellipse(85% 70% at var(--mx, 50%) var(--my, 50%)); }
.portrait figcaption { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.portrait__name { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1; }
.portrait figcaption .mono { color: var(--ink-soft); }
.portrait--1 { width: 78%; }
.portrait--2 { width: 78%; justify-self: end; margin-top: -18%; }
.about__hint { margin-top: 28px; color: var(--ink-soft); text-align: center; }
.hint-desktop { display: none; }
@media (hover: hover) and (pointer: fine) { .hint-desktop { display: inline; } .hint-touch { display: none; } }

/* ---------- SERVIÇOS ---------- */
.services { padding-bottom: calc(clamp(40px, 6vw, 80px) * var(--space, 1) * var(--space-g, 1)); }
.services__head { margin-bottom: clamp(40px, 6vw, 80px); }
.area {
  position: relative; display: grid; gap: 36px; align-items: center;
  border-radius: calc(28px * var(--radius-g, 1)); padding: clamp(28px, 5vw, 72px); overflow: hidden;
  margin-inline: calc(var(--gutter) * -.5);
}
.area + .area { margin-top: 16px; }
.area--video { background: var(--brown); color: var(--cream); }
.area--design { background: var(--orange); color: var(--brown); }
.area--light { background: var(--cream-deep); color: var(--brown); }

/* Estratégia: a base que antecede vídeo e design */
.strategy {
  display: grid; gap: 14px; margin: 0 calc(var(--gutter) * -.5) 16px; padding: clamp(26px, 4vw, 56px);
  border-radius: calc(28px * var(--radius-g, 1)); box-shadow: inset 0 0 0 1.5px currentColor;
}
.strategy__tag { color: var(--rust); }
.strategy__title { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: .95; }
.strategy__lead { max-width: 40rem; color: var(--ink-soft); }
.strategy__items { display: grid; gap: 0; margin-top: 8px; }
.strategy__items li { display: flex; gap: 14px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 500; }
.strategy__items .mono { color: var(--rust); }
.process__lead { margin-top: 18px; color: var(--cream-soft); font-size: 1.1em; }
.area__tag { opacity: .7; margin-bottom: 14px; }
.area__title { font-size: calc(clamp(3rem, 22vw, 10.5rem) * var(--tscale, 1) * var(--tscale-g, 1)); margin-left: -.04em; white-space: nowrap; }
/* o bloco ganha a largura do título; o texto não conta para essa largura (contain), por isso
   só quebra de linha quando chega ao fim da última letra do título */
.area__head { display: inline-grid; max-width: 100%; }
.area--video .area__title { color: var(--orange); }
.area__lead { contain: inline-size; font-family: var(--f-serif); font-style: italic; font-size: clamp(1.45rem, 2.4vw, 2.1rem); line-height: 1.12; margin: 18px 0 26px; }
.area__list li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 22%, transparent); font-weight: 500; }
.area__list li::before { content: ""; width: 11px; height: 9px; flex: none; background: currentColor; clip-path: url(#clip-ponto); }
.area--video .area__list li::before { background: var(--orange); }
.area__note { margin-top: 22px; display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px currentColor; opacity: .85; }

.area__visual--phone { position: relative; display: grid; place-items: center; padding: 10px 0; }
.phone { width: min(62vw, 300px); aspect-ratio: 9 / 16; border-radius: 30px; overflow: hidden; background: #000; box-shadow: 0 0 0 7px #2a221c, 0 30px 80px -20px rgba(0,0,0,.6); transform: rotate(-3deg); }
.phone__video { width: 100%; height: 100%; object-fit: cover; }
.area__rec { position: absolute; top: 6%; right: 8%; display: flex; align-items: center; gap: 8px; color: var(--cream); }
.area__rec i { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .15; } }

.area__visual--stack { position: relative; height: clamp(320px, 80vw, 520px); }
.area__visual--stack img {
  position: absolute; width: 52%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px;
  left: 50%; top: 50%; box-shadow: 0 24px 50px -18px rgba(25, 20, 16, .55);
  transition: transform .9s var(--ease-out);
}
.area__visual--stack img:nth-child(1) { transform: translate(-95%, -50%) rotate(-9deg); }
.area__visual--stack img:nth-child(2) { transform: translate(-5%, -54%) rotate(7deg); }
.area__visual--stack img:nth-child(3) { transform: translate(-50%, -46%) rotate(-1deg); }
.area--design:hover .area__visual--stack img:nth-child(1) { transform: translate(-112%, -52%) rotate(-13deg); }
.area--design:hover .area__visual--stack img:nth-child(2) { transform: translate(10%, -57%) rotate(11deg); }
.area--design:hover .area__visual--stack img:nth-child(3) { transform: translate(-50%, -48%) rotate(0deg) scale(1.04); }

/* ---------- FORMAS DE TRABALHAR ---------- */
.ways__head { margin-bottom: clamp(36px, 5vw, 64px); }
.ways__lead { margin-top: 20px; max-width: 32rem; color: var(--ink-soft); font-size: 1.1em; }
.ways__body { display: grid; gap: 34px; align-items: center; }
.scope { border-top: 1.5px solid currentColor; }
.scope__head { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.scope__head [data-scope-label] { color: var(--rust); }
.scope__row {
  position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 12px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
  opacity: .32; transition: opacity .5s var(--ease-out);
}
.scope__row .mono { color: var(--ink-soft); }
.scope__name { font-size: clamp(1.05rem, 1.4vw, 1.3rem); font-weight: 600; letter-spacing: -.025em; }
.scope__mark { width: 18px; height: 1.5px; background: var(--brown); align-self: center; transform: scaleX(.4); transform-origin: right; transition: transform .5s var(--ease-out), background-color .5s; }
.scope__row::after { /* sublinhado que se desenha nas linhas incluídas */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--brown);
  transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out);
}
.scope__row.is-in { opacity: 1; }
.scope__row.is-in::after { transform: scaleX(1); }
.scope__row.is-in .scope__mark { transform: scaleX(1); background: var(--rust); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tab { min-height: 46px; padding: 0 18px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 15px; transition: background-color .3s, color .3s, box-shadow .3s; }
.tab:hover { box-shadow: inset 0 0 0 1px var(--brown); }
.tab[aria-selected="true"] { background: var(--brown); color: var(--cream); box-shadow: none; }
.pane { display: grid; gap: 18px; justify-items: start; min-height: 230px; align-content: start; }
.pane[hidden] { display: none; }
.pane__title { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.1; max-width: 22ch; }
.pane__items { color: var(--rust); }
.pane.is-entering { animation: paneIn .6s var(--ease-out); }
@keyframes paneIn { from { opacity: 0; transform: translateY(12px); } }
.ways__note { margin-top: 26px; color: var(--ink-soft); padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- FORMAS: três linhas que abrem ---------- */
.ways__list { border-top: 1.5px solid currentColor; position: relative; z-index: 4; }
.way { border-bottom: 1px solid var(--line); }
.way__h { margin: 0; font: inherit; }
.way__head {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: clamp(14px, 2vw, 28px);
  padding: clamp(18px, 2.4vw, 30px) 0; text-align: left; cursor: pointer;
}
.way__num { color: var(--rust); align-self: start; padding-top: .6em; }
.way__name { font-size: calc(clamp(1.9rem, 4.2vw, 3.9rem) * var(--tscale, 1) * var(--tscale-g, 1)); font-weight: 700; letter-spacing: -.045em; line-height: 1; transition: color .3s, transform .5s var(--ease-out); }
.way__more { color: var(--ink-soft); opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .4s var(--ease-out); }
.way__icon { position: relative; width: 22px; height: 22px; flex: none; }
.way__icon::before, .way__icon::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; transition: transform .45s var(--ease-out); }
.way__icon::after { transform: rotate(90deg); }
.way.is-open .way__icon::after { transform: rotate(0deg); }
.way:hover .way__more, .way.is-open .way__more { opacity: 1; transform: none; }
.way:hover .way__name, .way.is-open .way__name { transform: translateX(6px); }
.way.is-open .way__name { color: var(--rust); }
/* abre com animação de altura (grid 0fr → 1fr) */
.way__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.way.is-open .way__panel { grid-template-rows: 1fr; }
.way__inner { overflow: hidden; display: grid; gap: 16px; justify-items: start; padding-left: calc(2ch + clamp(14px, 2vw, 28px)); }
.way.is-open .way__inner { padding-bottom: clamp(22px, 3vw, 36px); }
.way__desc { font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.15; max-width: 30ch; }
.way__items { color: var(--ink-soft); max-width: 46ch; line-height: 1.7; }
.ways .ways__note { margin-top: 22px; }
@media (min-width: 900px) {
  .ways.layout-linhas .ways__list, .ways.layout-linhas .ways__note { max-width: 58%; }
}

/* ---------- PROCESSO ---------- */
.process {
  max-width: none; background: var(--brown); color: var(--cream);
  border-radius: calc(28px * var(--radius-g, 1)) calc(28px * var(--radius-g, 1)) 0 0;
}
.process > * { max-width: var(--maxw); margin-inline: auto; }
.process .label { color: var(--orange); }
.process__head { margin-bottom: clamp(48px, 7vw, 96px); }
.process__track { position: relative; }
.process__line { display: none; }
.steps { display: grid; gap: 0; position: relative; padding-left: 34px; }
.steps::before { /* linha vertical em mobile */
  content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1.5px;
  background: linear-gradient(var(--orange), var(--orange)) top / 100% calc(var(--progress, 0) * 100%) no-repeat, var(--line-light);
}
.step { position: relative; padding: 0 0 46px; }
.step__dot { position: absolute; left: -34px; top: 4px; width: 18px; height: 14px; color: var(--brown); }
.step__dot svg { width: 100%; height: 100%; overflow: visible; }
.step__dot svg { fill: var(--brown); stroke: var(--orange); stroke-width: 9px; transition: fill .5s var(--ease-out); }
.step.is-active .step__dot svg { fill: var(--orange); }
.step__num { display: block; font-size: 2.6rem; line-height: 1; color: var(--orange); margin-bottom: 8px; }
.step__title { font-size: clamp(1.6rem, 2.4vw, 2.2rem); letter-spacing: -.04em; font-weight: 700; margin-bottom: 10px; }
.step p { color: var(--cream-soft); max-width: 28ch; }
.step { opacity: .45; transition: opacity .6s var(--ease-out); }
.step.is-active { opacity: 1; }

/* ---------- TRABALHOS ---------- */
.work { max-width: none; background: var(--brown); color: var(--cream); padding-top: 0; }
.work > * { max-width: var(--maxw); margin-inline: auto; }
.work__head { border-top: 1px solid var(--line-light); padding-top: calc(clamp(72px, 10vw, 140px) * var(--space, 1) * var(--space-g, 1)); margin-bottom: clamp(32px, 4vw, 56px); display: grid; gap: 0; }
.work .label { color: var(--orange); }
.filters { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.filter { min-height: 42px; padding: 0 18px; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line-light); font-size: 14px; font-weight: 600; transition: background-color .3s, color .3s; }
.filter:hover { box-shadow: inset 0 0 0 1px var(--cream); }
.filter[aria-pressed="true"] { background: var(--cream); color: var(--brown); }

.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 12px; grid-auto-flow: dense; }
.card { position: relative; grid-column: span 1; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.card.is-hidden { display: none; }
.card--wide { grid-column: span 2; }
.card__btn { display: block; width: 100%; text-align: left; border-radius: 6px; }
.card__media { position: relative; overflow: hidden; border-radius: 6px; background: #241d18; aspect-ratio: var(--ar, 4 / 5); }
.card__media img, .card__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), opacity .5s; }
.card__media video { opacity: 0; }
.card.is-playing .card__media video { opacity: 1; }
.card__btn:hover .card__media img { transform: scale(1.04); }
.card__type { position: absolute; left: 10px; top: 10px; padding: 5px 9px; border-radius: var(--radius); background: rgba(25, 20, 16, .72); color: var(--cream); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 10.5px; }
.card__play { position: absolute; right: 10px; bottom: 10px; width: 26px; height: 20px; background: var(--orange); clip-path: url(#clip-ponto); display: grid; place-items: center; transition: transform .4s var(--ease-out); }
.card__play::after { content: ""; border-left: 6px solid var(--brown); border-top: 4px solid transparent; border-bottom: 4px solid transparent; margin-left: 2px; }
.card__btn:hover .card__play { transform: scale(1.15); }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 12px; }
.card__title { font-size: clamp(1.05rem, 1.3vw, 1.35rem); font-weight: 650; letter-spacing: -.03em; line-height: 1.15; }
.card__sub { color: var(--cream-soft); font-size: 11px; text-align: right; }

/* caso em destaque: Ana Tadeu (vídeo + design) */
.card--feature { grid-column: 1 / -1; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature .card__media { aspect-ratio: 4 / 5; }

/* espaço reservado para futuros projetos */
.card--slot .card__media { display: grid; place-items: center; text-align: center; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-light); background-image: radial-gradient(circle at 1px 1px, var(--line-light) 1px, transparent 0); background-size: 18px 18px; }
.slot__inner { display: grid; gap: 14px; justify-items: center; padding: 20px; }
.slot__inner svg { width: 46px; color: var(--orange); }
.slot__inner p { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.05; max-width: 12ch; }
.card--slot a { text-decoration: none; display: block; }
.card--slot a:hover .card__media { box-shadow: inset 0 0 0 1.5px var(--orange); }

/* ---------- FEEDBACKS ---------- */
.feedbacks__head { margin-bottom: clamp(40px, 6vw, 80px); }
/* mobile: deslizar na horizontal, um testemunho de cada vez */
.feedbacks__list {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 8px;
}
.feedbacks__list::-webkit-scrollbar { display: none; }
/* cada testemunho é um card: logótipo em cima, texto em Geist, nome em itálico (como na proposta) */
.quote {
  scroll-snap-align: start; display: flex; flex-direction: column; gap: 22px; margin: 0;
  padding: clamp(22px, 2.6vw, 34px); border-radius: calc(14px * var(--radius-g, 1));
  background: var(--cream-deep); box-shadow: inset 0 0 0 1px var(--line);
}
.quote__logo { width: clamp(64px, 6vw, 88px); aspect-ratio: 1; border-radius: calc(4px * var(--radius-g, 1)); overflow: hidden; background: var(--brown); flex: none; }
.quote__logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.quote blockquote { margin: 0; flex: 1; }
.quote blockquote p { font-family: var(--f-sans); font-weight: 400; font-size: clamp(1.05rem, 1.25vw, 1.25rem); line-height: 1.45; letter-spacing: -.01em; }
.quote figcaption { font-family: var(--f-sans); font-style: italic; font-size: 1.02em; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- PORTFÓLIO EM CARROSSEL ---------- */
.work .card__play { display: none; }
.card__cta {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 11px; border-radius: 999px; background: var(--orange); color: var(--brown);
  font: 600 13px/1 var(--f-sans); letter-spacing: -.01em; white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); transition: transform .35s var(--ease-out), background-color .25s;
}
.card__cta i { position: relative; width: 16px; height: 16px; border-radius: 50%; background: var(--brown); flex: none; }
.card__cta i::after { /* seta ↗ para designs */
  content: ""; position: absolute; left: 5px; top: 5px; width: 5px; height: 5px; border-top: 1.5px solid var(--orange); border-right: 1.5px solid var(--orange);
}
.card__cta--video i::after { /* ▶ para vídeos */
  left: 6px; top: 4.5px; width: 0; height: 0; border: 0; border-left: 6px solid var(--orange); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
}
.card__btn:hover .card__cta, .card__btn:focus-visible .card__cta { transform: translateY(-3px); background: var(--cream); }

.work .work__grid {
  display: flex; gap: clamp(12px, 1.6vw, 22px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  padding: 4px var(--gutter) 10px; margin-inline: calc(var(--gutter) * -1); cursor: grab;
}
.work .work__grid::-webkit-scrollbar { display: none; }
.work .work__grid:focus-visible { outline-offset: -2px; }
.work .work__grid.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.work .work__grid.is-dragging .card { pointer-events: none; }
.work .work__grid img { -webkit-user-drag: none; user-select: none; }
.work .card { flex: 0 0 clamp(236px, 25vw, 370px); scroll-snap-align: start; }
.work.layout-carrossel-grande .card { flex-basis: clamp(280px, 38vw, 540px); }
.work .card--slot .card__media { aspect-ratio: 4 / 5; }
.work__controls { display: flex; align-items: center; gap: 14px; margin-top: clamp(18px, 2.4vw, 30px); }
.work__progress { flex: 1; height: 2px; background: var(--line-light); border-radius: 2px; overflow: hidden; }
.work__progress i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--orange); transition: width .35s var(--ease-out); }
.work__hint { color: var(--cream-soft); white-space: nowrap; }
.work__arrow {
  width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 18px;
  box-shadow: inset 0 0 0 1.5px currentColor; transition: background-color .25s, color .25s, opacity .25s;
}
.work__arrow:hover:not(:disabled) { background: var(--orange); color: var(--brown); box-shadow: none; }
.work__arrow:disabled { opacity: .3; cursor: default; }
@media (max-width: 639px) { .work__hint { display: none; } .work .card { flex-basis: 74vw; } }

/* ---------- CONTACTO ---------- */
.contact {
  position: relative; background: var(--orange); color: var(--brown);
  padding: calc(clamp(88px, 12vw, 180px) * var(--space, 1) * var(--space-g, 1)) var(--gutter) calc(clamp(60px, 8vw, 120px) * var(--space, 1) * var(--space-g, 1));
  display: grid; gap: 48px; overflow: hidden;
}
.contact .label { color: var(--brown); opacity: .75; }
.contact__inner { position: relative; z-index: 2; max-width: var(--maxw); }
.contact__title { font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .88; font-size: calc(clamp(2.8rem, 10.5vw, 9.4rem) * var(--tscale, 1) * var(--tscale-g, 1)); }
.contact__title span { display: block; }
.contact__title .serif { text-transform: none; font-weight: 400; letter-spacing: -.035em; color: var(--cream); line-height: .95; padding-top: .05em; }
.contact__lead { margin: 30px 0 34px; max-width: 30rem; font-size: 1.1em; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__visual { width: min(70%, 340px); justify-self: end; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; transform: rotate(4deg); box-shadow: 0 0 0 10px var(--cream), 0 30px 60px -24px rgba(25, 20, 16, .5); }
.contact__visual img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- RODAPÉ (referência "Final") ---------- */
.footer { background: var(--brown); color: var(--cream); overflow: hidden; }
.footer__brand { background: var(--orange); color: var(--brown); text-align: center; padding: clamp(28px, 4vw, 52px) var(--gutter) 0; }
.footer__brand .footer__k { margin: 0 0 clamp(8px, 2vw, 24px); color: var(--brown); }
/* o "Acaso." fica cortado pela banda castanha, como na referência */
.footer__script { position: relative; z-index: 1; display: block; width: min(80%, 1180px); margin: 0 auto -6.5%; color: var(--brown); }
.footer__base {
  position: relative; z-index: 2; background: var(--brown); display: grid; gap: 36px;
  padding: clamp(36px, 5vw, 76px) var(--gutter) clamp(28px, 4vw, 56px); max-width: none;
}
.footer__name { font-weight: 650; font-size: clamp(1.9rem, 3.6vw, 3.4rem); letter-spacing: -.035em; line-height: 1; }
.footer__sub { font-size: clamp(1.25rem, 2vw, 1.9rem); margin-top: 6px; color: var(--cream); }
.footer__info { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 22px clamp(28px, 5vw, 72px); margin: 0; align-content: start; }
.footer__info dt { font-size: .85em; color: var(--cream-soft); margin-bottom: 2px; }
.footer__info dd { margin: 0; font-size: 1.02em; }
.footer__info a { text-decoration: none; transition: color .2s; }
.footer__info a:hover { color: var(--orange); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 16px var(--gutter) calc(18px + env(safe-area-inset-bottom)); color: var(--cream-soft); border-top: 1px solid var(--line-light); }
.footer__bottom a { text-decoration: none; }
.footer__bottom a:hover { color: var(--orange); }

/* ---------- ABERTURA EM BANNER (referência "Início") ---------- */
.hero.hero--banner { display: block; padding-bottom: 0; overflow: hidden; }
.hb__tags { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--orange); padding-top: 6px; }
.hb__title {
  position: relative; z-index: 4; margin-top: clamp(20px, 3vw, 44px);
  font-weight: 400; text-transform: uppercase; letter-spacing: -.01em; line-height: .98;
  font-size: calc(clamp(1.9rem, 4.4vw, 4.8rem) * var(--tscale, 1) * var(--tscale-g, 1));
  color: var(--hb-title, var(--brown));
}
.hb__title .hero__line { padding: .1em 0 .02em; margin-top: -.1em; }
.hb__title .hero__line--last .hero__script { width: 2.7em; margin: 0 0 -.32em -.18em; }
.hb__body { position: relative; z-index: 4; margin-top: clamp(20px, 2.6vw, 36px); max-width: 30rem; }
.hb__stage { position: relative; height: 118vw; margin: 28px calc(var(--gutter) * -1) 0; z-index: 1; }
.hb__big { position: absolute; z-index: 1; left: -4%; bottom: -12%; width: 112%; color: var(--orange); }
.hb__a { position: absolute; z-index: 1; right: 2%; top: 0; width: 44%; fill: none; stroke: var(--orange); stroke-width: 1.6px; vector-effect: non-scaling-stroke; stroke-dasharray: 1; }
.hb__stage .hero__photo { position: absolute; z-index: 2; right: 0; bottom: 0; height: 88%; width: auto; }
.hb__stage .hero__img { height: 100%; width: auto; max-height: none; max-width: none; object-fit: contain; object-position: 100% 100%; }
.hb__stage .seal { left: var(--gutter); right: auto; top: 10%; bottom: auto; }
.hb__caption { position: absolute; z-index: 3; right: var(--gutter); bottom: 14px; margin: 0; color: var(--brown); background: var(--cream); padding: 4px 8px; border-radius: 4px; }

@media (min-width: 900px) {
  .hero.hero--banner { min-height: 100svh; padding-top: calc(var(--nav-h) + 26px); }
  .hb__tags { display: grid; grid-template-columns: repeat(3, max-content); column-gap: clamp(60px, 11vw, 190px); }
  .hb__title { max-width: 72%; }
  .hb__body { max-width: min(30rem, 40%); }
  /* o palco ocupa a secção inteira por trás do texto */
  .hb__stage { position: absolute; inset: 0; height: auto; margin: 0; pointer-events: none; }
  .hb__stage > * { pointer-events: auto; }
  .hb__big { left: -3%; bottom: -15%; width: 94%; }
  .hb__a { right: 2%; top: 6%; width: 27%; }
  .hb__stage .hero__photo { right: 2%; height: 84%; }
  .hb__stage .seal { left: auto; right: 34%; top: auto; bottom: 16%; }
  .hb__caption { right: var(--gutter); bottom: 18px; }
  .footer__base { grid-template-columns: 1fr auto; align-items: start; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .hb__big { clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--ease-io) .35s; }
  .is-loaded .hb__big { clip-path: inset(-10% -5% -10% -5%); }
  .js .hb__a { stroke-dashoffset: 1; transition: stroke-dashoffset 2.2s var(--ease-io) .8s; }
  .is-loaded .hb__a { stroke-dashoffset: 0; }
  .js .hb__tags, .js .hb__stage .hero__photo { opacity: 0; transition: opacity 1s var(--ease-out) .5s; }
  .is-loaded .hb__tags, .is-loaded .hb__stage .hero__photo { opacity: 1; }
}

/* ---------- CTA fixo (mobile) ---------- */
.sticky-cta {
  position: fixed; z-index: 80; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom));
  justify-content: center; box-shadow: 0 14px 30px -12px rgba(25, 20, 16, .55);
  transform: translateY(160%); transition: transform .5s var(--ease-out);
}
.sticky-cta.is-visible { transform: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(25, 20, 16, .97); color: var(--cream); display: grid; grid-template-rows: auto 1fr; }
.lightbox[hidden] { display: none; }
.lightbox__bar { display: flex; align-items: center; gap: 16px; padding: 14px var(--gutter); border-bottom: 1px solid var(--line-light); }
.lightbox__title { font-weight: 650; letter-spacing: -.02em; margin-right: auto; }
.lightbox__close { width: 44px; height: 44px; font-size: 30px; line-height: 1; border-radius: 50%; display: grid; place-items: center; }
.lightbox__close:hover { background: var(--orange); color: var(--brown); }
.lightbox__stage { display: grid; place-items: center; padding: 16px; min-height: 0; }
.lightbox__stage img, .lightbox__stage video { max-width: 100%; max-height: calc(100svh - 120px); width: auto; height: auto; object-fit: contain; border-radius: 6px; animation: paneIn .5s var(--ease-out); }
.lightbox__nav { position: absolute; top: 50%; width: 52px; height: 52px; border-radius: 50%; background: var(--cream); color: var(--brown); font-size: 20px; display: grid; place-items: center; transform: translateY(-50%); }
.lightbox__nav:hover { background: var(--orange); }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox__nav[hidden] { display: none; }

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor {
    display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none;
    width: 14px; height: 11px; margin: -5.5px 0 0 -7px; background: var(--orange); clip-path: url(#clip-ponto);
    transition: width .4s var(--ease-out), height .4s var(--ease-out), margin .4s var(--ease-out), opacity .3s;
    will-change: transform; opacity: 0;
  }
  .has-cursor .cursor.is-big { width: 54px; height: 42px; margin: -21px 0 0 -27px; opacity: 1; }
  .cursor span { font-family: var(--f-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--brown); opacity: 0; transition: opacity .2s; }
  .cursor.is-big span { opacity: 1; }
  .cursor.is-hidden { opacity: 0; }
}

/* =========================================================
   Breakpoints
   ========================================================= */
@media (min-width: 640px) {
  .hero__meta > span:nth-child(n+2) { display: inline; }
  .hero__meta > span:last-child { margin-left: auto; }
  .work__grid { grid-template-columns: repeat(3, 1fr); gap: 32px 18px; }
  .card--wide { grid-column: span 2; }
  .about__grid { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .about__text { grid-column: 1 / -1; }
  .portrait--1, .portrait--2 { width: auto; justify-self: stretch; margin-top: 0; }
  .portrait--2 { margin-top: 18%; }
}

@media (min-width: 900px) {
  :root { --nav-h: 80px; }
  .nav__logo { width: 124px; }
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
  .menu { display: none !important; }

  .hero {
    grid-template-columns: 1.12fr .88fr; grid-template-rows: auto 1fr auto;
    column-gap: clamp(24px, 3vw, 56px); row-gap: 0; align-items: start;
    padding-bottom: 56px;
  }
  .hero__meta { grid-column: 1 / -1; margin-bottom: clamp(28px, 4vh, 56px); }
  .hero__title { grid-column: 1 / -1; grid-row: 2; font-size: calc(min(var(--fit), clamp(5rem, 10.6vw, 11.6rem)) * min(var(--tscale, 1) * var(--tscale-g, 1), 1)); }
  .hero__visual { grid-column: 2; grid-row: 2 / 4; align-self: end; margin: 0 0 -56px -6%; order: 0; }
  .hero__body { grid-column: 1; grid-row: 3; align-self: end; padding-top: 36px; order: 0; }
  .hero__img { max-height: calc(100svh - var(--nav-h) - 90px); }
  .hero__title .hero__line:nth-child(3) { padding-left: 0; }
  .hero__scroll { display: flex; align-items: center; gap: 12px; position: absolute; left: var(--gutter); bottom: 18px; color: var(--ink-soft); }
  .hero__scroll i { width: 48px; height: 1px; background: currentColor; transform-origin: left; animation: scrollHint 2.4s var(--ease-io) infinite; }
  @keyframes scrollHint { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); transform-origin: left; } 50.1% { transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }
  .seal { left: auto; right: -2%; top: auto; bottom: 14%; }
  .hero__visual figcaption { left: 4%; right: auto; bottom: 80px; }

  .about__grid { grid-template-columns: 1.1fr .8fr .8fr; gap: clamp(20px, 2.6vw, 40px); align-items: start; }
  .about__text { grid-column: auto; grid-row: span 2; padding-right: 4vw; }
  .portrait--1, .portrait--2 { width: auto; justify-self: stretch; }
  .portrait--1 { margin-top: 18%; }
  .portrait--2 { margin-top: 0; }
  .about__hint { text-align: right; }

  .area { grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); margin-inline: 0; min-height: 640px; }
  .area__visual--stack { height: 560px; }
  .area--design .area__visual { order: 0; }

  .ways__body { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); }
  .strategy { grid-template-columns: .9fr 1.1fr; column-gap: clamp(32px, 5vw, 80px); margin-inline: 0; align-items: start; }
  .strategy__tag, .strategy__title { grid-column: 1; }
  .strategy__lead { grid-column: 2; grid-row: 1 / 3; align-self: end; }
  .strategy__items { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .strategy__items li { flex-direction: column; gap: 6px; }

  .process__line { display: block; position: absolute; left: 0; right: 0; top: -64px; width: 100%; height: 160px; overflow: visible; }
  .process__path { fill: none; stroke: var(--orange); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--progress, 0)); stroke-linecap: round; }
  .steps { grid-template-columns: repeat(var(--steps, 4), 1fr); gap: clamp(20px, 3vw, 48px); padding: 70px 0 0; }
  .steps::before { display: none; }
  .step { padding: 0; }
  .step__dot { left: 0; top: -50px; width: 26px; height: 20px; }

  .work__head { grid-template-columns: 1fr auto; align-items: end; }
  .work__head .label { grid-column: 1 / -1; }
  .filters { margin-top: 0; }
  .work__grid { grid-template-columns: repeat(4, 1fr); gap: 44px 22px; }
  .card--wide { grid-column: span 2; }
  .feature { grid-template-columns: 1.15fr .85fr 1fr; }
  .feature .card__media:nth-child(2) { margin-top: 18%; }

  .feedbacks__list { grid-auto-flow: row; grid-template-columns: repeat(min(var(--count), 3), 1fr); overflow: visible; margin-inline: 0; padding: 0; gap: clamp(24px, 3vw, 48px); }
  .quote:nth-child(3n+2) { margin-top: 48px; }
  .quote:nth-child(3n+3) { margin-top: 96px; }

  .contact { grid-template-columns: minmax(0, 1.55fr) minmax(0, .75fr); align-items: center; column-gap: 4vw; }
  .contact__title { font-size: calc(clamp(4rem, 7.2vw, 8.6rem) * var(--tscale, 1) * var(--tscale-g, 1)); }
  .contact__visual { width: 100%; max-width: 420px; }


  .sticky-cta { display: none; }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .hero__body { max-width: 100%; }
  .hero__visual { margin-left: 0; }
}

@media (min-width: 1200px) {
  .hero { grid-template-columns: 1.2fr .8fr; }
  .hero__visual { margin-left: -10%; }
}

@media (max-width: 899px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature .card__media:nth-child(3) { display: none; }
}


/* =========================================================
   Temas e variantes (escolhidos no editor visual / painel)
   ========================================================= */
/* Temas: fundo de ponta a ponta mesmo em secções com largura máxima */
[class*="theme-"] { background: var(--tb); color: var(--tc); box-shadow: 0 0 0 100vmax var(--tb); clip-path: inset(0 -100vmax); border-radius: 0; }
.theme-creme { --tb: var(--cream); }
.theme-areia { --tb: var(--cream-deep); }
.theme-laranja { --tb: var(--orange); }
.theme-castanho { --tb: var(--brown); }
.theme-creme, .theme-areia, .theme-laranja {
  --tc: var(--brown);
  --ink-soft: rgba(25, 20, 16, .72); --cream-soft: rgba(25, 20, 16, .72);
  --line: rgba(25, 20, 16, .16); --line-light: rgba(25, 20, 16, .16);
}
.theme-castanho {
  --tc: var(--cream);
  --ink-soft: rgba(234, 224, 204, .72); --cream-soft: rgba(234, 224, 204, .72);
  --line: rgba(234, 224, 204, .18); --line-light: rgba(234, 224, 204, .18);
}
.theme-creme .label, .theme-areia .label { color: var(--rust); }
.theme-laranja .label, .theme-laranja .strategy__tag, .theme-laranja .pane__items { color: var(--brown); }
.theme-castanho .label, .theme-castanho .strategy__tag { color: var(--orange); }
.theme-castanho .tab[aria-selected="true"], .theme-castanho .filter[aria-pressed="true"] { background: var(--cream); color: var(--brown); }
.theme-creme .filter[aria-pressed="true"], .theme-areia .filter[aria-pressed="true"], .theme-laranja .filter[aria-pressed="true"] { background: var(--brown); color: var(--cream); }
.theme-creme .tab, .theme-areia .tab, .theme-laranja .tab { box-shadow: inset 0 0 0 1px var(--line); }
.theme-laranja .btn--primary { --bg: var(--brown); --fg: var(--cream); --dot: var(--orange); }
.theme-laranja .btn--primary::before { background: var(--cream); }
.theme-laranja .btn--primary:hover { color: var(--brown); }
.theme-laranja .dot { background: var(--brown); }
.theme-castanho .btn--ghost, .theme-castanho .btn--outline-dark { --fg: var(--cream); box-shadow: inset 0 0 0 1.5px var(--cream); }
.theme-castanho .contact__title .serif { color: var(--orange); }
.theme-castanho .hero__lead em, .theme-castanho .about__copy p:first-child { color: var(--cream); }
.theme-castanho .seal::before { background: var(--brown); }
.theme-castanho .hero__visual figcaption { background: var(--brown); }

/* Elementos decorativos com posição/tamanho livres (editor visual) */
/* As posições, tamanhos e larguras livres são pensados no computador: só se aplicam a partir de 900 px.
   No telemóvel cada secção usa a sua composição própria, para nada ficar solto ou sobreposto. */
@media (min-width: 900px) {
  [data-el], [data-adj] { translate: var(--dx, 0) var(--dy, 0); scale: var(--sc, 1); }
  /* textos em linha precisam de ser "caixas" para poderem mover/escalar */
  :is(span, a, em, b, strong, small, label)[data-adj] { display: inline-block; }
  /* largura da caixa de texto escolhida no editor (em "em", nunca mais larga do que o ecrã) */
  [data-w] { width: min(calc(var(--w) * 1em), calc(100vw - 2 * var(--gutter))); max-width: none; }
  [data-hide-d] { display: none !important; }
  [style*="--space-d"] { --space: var(--space-d); }
  [style*="--tscale-d"] { --tscale: var(--tscale-d); }
}
/* O mesmo, mas com os ajustes feitos no modo telemóvel do editor (variáveis --m…) */
@media (max-width: 899px) {
  [data-el], [data-adj-m] { translate: var(--mdx, 0) var(--mdy, 0); scale: var(--msc, 1); }
  :is(span, a, em, b, strong, small, label)[data-adj-m] { display: inline-block; }
  [data-mw] { width: min(calc(var(--mw) * 1em), calc(100vw - 2 * var(--gutter))); max-width: none; }
  [data-hide-m] { display: none !important; }
  /* espaço e tamanho dos títulos próprios do telemóvel, quando definidos */
  [style*="--space-m"] { --space: var(--space-m); }
  [style*="--tscale-m"] { --tscale: var(--tscale-m); }
  .free-photo { left: var(--fmx, var(--fx)); top: var(--fmy, var(--fy)); width: var(--fmw, var(--fw)); }
}
.hero__script { transform-origin: 0 70%; }

/* Fotografias livres (acrescentadas no editor) */
.has-free { position: relative; }
.free-photo { position: absolute; z-index: 3; left: var(--fx); top: var(--fy); width: var(--fw); margin: 0; }
.free-photo img { display: block; width: 100%; height: auto; border-radius: calc(6px * var(--radius-g, 1)); }
@media (max-width: 899px) { .free-photo--desktop { display: none; } }

/* Texto livre */
.textblock { display: grid; gap: 40px; align-items: center; }
.textblock__body { display: grid; gap: 14px; margin-top: 24px; max-width: 38rem; color: var(--ink-soft); font-size: 1.05em; }
.textblock__text > .btn { margin-top: 30px; }
.textblock__media { border-radius: calc(6px * var(--radius-g, 1)); overflow: hidden; }
.textblock__media img { width: 100%; height: auto; display: block; }
.textblock.layout-centrado { text-align: center; justify-items: center; }
.textblock.layout-centrado .h2, .textblock.layout-centrado .textblock__body { margin-inline: auto; }
.textblock.layout-centrado .textblock__media { max-width: 760px; }

@media (min-width: 900px) {
  /* Abertura */
  .hero.layout-foto-esquerda { grid-template-columns: .8fr 1.2fr; }
  .hero.layout-foto-esquerda .hero__visual { grid-column: 1; margin: 0 -10% -56px 0; }
  .hero.layout-foto-esquerda .hero__body { grid-column: 2; }
  .hero.layout-foto-esquerda .seal { right: auto; left: -2%; }
  .hero.layout-sem-foto .hero__visual { display: none; }
  .hero.layout-sem-foto { min-height: 80svh; }
  /* Sobre */
  .about.layout-fotos-esquerda .about__grid { grid-template-columns: .8fr .8fr 1.1fr; }
  .about.layout-fotos-esquerda .about__text { grid-column: 3; grid-row: 1 / span 2; padding: 0 0 0 4vw; }
  .about.layout-fotos-esquerda .portrait--1 { grid-column: 1; grid-row: 1; }
  .about.layout-fotos-esquerda .portrait--2 { grid-column: 2; grid-row: 1; }
  .about.layout-fotos-em-baixo .about__grid { grid-template-columns: 1fr 1fr; }
  .about.layout-fotos-em-baixo .about__text { grid-column: 1 / -1; grid-row: auto; max-width: 52rem; }
  .about.layout-fotos-em-baixo .portrait--1 { margin-top: 0; }
  .about.layout-fotos-em-baixo .portrait--2 { margin-top: 12%; }
  /* O que fazemos */
  .services.layout-visual-direita .area__visual { order: 2; }
  .services.layout-visual-esquerda .area__visual { order: -1; }
  /* Formas */
  .ways.layout-lista-direita .scope { order: 2; }
  /* Processo vertical */
  .process.layout-vertical .process__line { display: none; }
  .process.layout-vertical .steps { grid-template-columns: 1fr; padding: 0 0 0 34px; max-width: 760px; }
  .process.layout-vertical .steps::before { display: block; }
  .process.layout-vertical .step { padding: 0 0 46px; }
  .process.layout-vertical .step__dot { left: -34px; top: 4px !important; width: 18px; height: 14px; }
  /* Portfólio */
  .work.layout-3-colunas .work__grid { grid-template-columns: repeat(3, 1fr); }
  /* Feedbacks */
  .feedbacks.layout-alinhado .quote { margin-top: 0 !important; }
  .feedbacks.layout-um-por-linha .feedbacks__list { grid-template-columns: 1fr; max-width: 900px; }
  .feedbacks.layout-um-por-linha .quote { margin-top: 0 !important; }
  .feedbacks.layout-um-por-linha .quote blockquote p { font-size: clamp(1.8rem, 2.8vw, 2.6rem); }
  /* Contacto */
  .contact.layout-foto-esquerda { grid-template-columns: minmax(0, .75fr) minmax(0, 1.55fr); }
  .contact.layout-foto-esquerda .contact__visual { order: -1; justify-self: start; transform: rotate(-4deg); }
  .contact.layout-sem-foto { grid-template-columns: 1fr; }
  .contact.layout-sem-foto .contact__visual { display: none; }
  /* Texto livre */
  .textblock { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); }
  .textblock--noimg, .textblock.layout-centrado { grid-template-columns: 1fr; }
  .textblock.layout-imagem-esquerda .textblock__media { order: -1; }
}
@media (max-width: 899px) {
  .hero.layout-sem-foto .hero__visual, .contact.layout-sem-foto .contact__visual { display: none; }
}

/* ---------- Telemóvel: composições próprias ---------- */
@media (max-width: 899px) {
  /* Abertura em banner: foto ao centro, "Acaso." gigante legível por trás, "A." atrás das cabeças, selo a ancorar à esquerda */
  .hb__stage { height: 138vw; margin-top: 24px; }
  .hb__big { left: -6%; right: auto; top: 11%; bottom: auto; width: 112%; }
  .hb__a { display: none; }   /* com o "Acaso." grande, o "A." em contorno competia: fica só no computador */
  .hb__stage .hero__photo { left: 50%; right: auto; bottom: 0; height: 86%; transform: translateX(-46%); }
  .hb__stage .seal { left: calc(var(--gutter) - 4px); top: auto; bottom: 22%; width: 88px; }
  .hb__caption { left: var(--gutter); right: auto; bottom: 12px; }

  /* Quem somos: as fotos não se sobrepõem às legendas */
  .portrait--1, .portrait--2 { margin-top: 0; }
  .portrait--2 { margin-top: 28px; }

  /* Rodapé: "Acaso." grande, a sair pelas bordas e cortado pela banda escura, como no computador */
  .footer__brand { padding-top: 36px; overflow: hidden; }
  .footer__script { width: calc(100% + 2 * var(--gutter)); max-width: none; margin: 0 calc(var(--gutter) * -1) -8.8%; }
}

/* =========================================================
   Motion: entradas (só com JS ativo e sem preferência por menos movimento)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  .js .hero__line > span { transform: translateY(105%); transition: transform 1.1s var(--ease-out); }
  .js .hero__line:nth-child(3) > span { transition-delay: .08s; }
  .js .hero__line:nth-child(4) > span { transition-delay: .16s; }
  .js .hero__meta, .js .hero__body, .js .hero__visual { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease-out) .45s, transform 1s var(--ease-out) .45s; }
  .js .hero__visual { transition-delay: .25s; }
  .js .hero__script { transition: clip-path 1.3s var(--ease-io) .55s; }
  .is-loaded .hero__line > span, .is-loaded .hero__meta, .is-loaded .hero__body, .is-loaded .hero__visual { transform: none; opacity: 1; }
  .is-loaded .hero__script { clip-path: inset(0 -5% -20% -5%); }
  .js .hero__outline { stroke-dashoffset: 1; transition: stroke-dashoffset 2.6s var(--ease-io) .7s; }
  .is-loaded .hero__outline { stroke-dashoffset: 0; }
}
.no-js .hero__script, html:not(.js) .hero__script { clip-path: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero__script { clip-path: none; }
  .band__track { animation: none; }
  .seal__ring { animation: none; }
  .portrait__reveal { clip-path: none; }
  .portrait__frame img:first-child { display: none; }
  .process__path { stroke-dashoffset: 0; }
  .step { opacity: 1; }
  .step .step__dot svg { fill: var(--orange); }
  .steps::before { background: var(--orange); }
}
