/* MADI Construtora — sistema visual
   concreto claro + grafite-noite + laranja tijolo (herdado da chaminé do logo) */
:root {
  --paper: #ebe7e0;
  --paper-2: #e1dcd3;
  --ink: #15191f;
  --ink-2: rgba(21, 25, 31, .66);
  --ink-3: rgba(21, 25, 31, .42);
  --line: rgba(21, 25, 31, .14);
  --night: #11161d;
  --night-2: #1a212a;
  --on-night: #efebe4;
  --on-night-2: rgba(239, 235, 228, .62);
  --line-night: rgba(239, 235, 228, .14);
  --accent: #e2531d;
  --accent-ink: #fff7f2;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.87, 0, .13, 1);
  --gut: clamp(16px, 4vw, 56px);
  --max: 1560px;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 clamp(16px, 1.05vw, 18px)/1.6 var(--f-display);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 999; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
[data-theme="dark"] { background: var(--night); color: var(--on-night); }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); flex: none; }
[data-theme="dark"] .eyebrow { color: var(--on-night-2); }

/* ---------- logo ---------- */
.logo { height: 38px; width: auto; color: currentColor; overflow: visible; }
.logo-chim { fill: var(--accent); }
.logo-word { font: 800 24px var(--f-display); font-variation-settings: "wdth" 118; letter-spacing: .02em; fill: currentColor; }
.logo-sub { font: 600 7px var(--f-display); letter-spacing: .22em; fill: currentColor; opacity: .7; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 32px; padding: 0 var(--gut);
  color: var(--on-night); transition: background .5s var(--ease), color .5s var(--ease), transform .6s var(--ease), height .4s var(--ease);
}
.nav.is-solid { background: rgba(235, 231, 224, .86); color: var(--ink); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px); height: 64px; }
.nav.is-solid.on-dark { background: rgba(17, 22, 29, .82); color: var(--on-night); }
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-light-page:not(.is-solid) { color: var(--ink); }
.nav-logo { margin-right: auto; display: flex; }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 500; }
.nav-links > a, .nav-drop > button { position: relative; padding: 6px 0; }
.nav-links > a::after, .nav-drop > button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav-links > a:hover::after, .nav-links > a[aria-current]::after, .nav-drop:hover > button::after { transform: scaleX(1); transform-origin: left; }
.nav-drop { position: relative; }
.nav-drop ul {
  position: absolute; top: calc(100% + 14px); left: -20px; min-width: 300px; padding: 10px;
  background: var(--paper); color: var(--ink); border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.35);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .45s var(--ease);
}
.nav-drop:hover ul, .nav-drop:focus-within ul, .nav-drop.is-open ul { opacity: 1; visibility: visible; transform: none; }
.nav-drop li a { display: flex; gap: 14px; padding: 12px 14px; border-radius: 3px; transition: background .3s; }
.nav-drop li a span { color: var(--accent); font-weight: 600; font-size: 12px; padding-top: 3px; }
.nav-drop li a:hover { background: var(--paper-2); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600;
  padding: 11px 18px; border: 1px solid currentColor; border-radius: 100px; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3ccf6e; box-shadow: 0 0 0 0 rgba(60,207,110,.6); animation: ping 2.2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(60,207,110,0); } 100% { box-shadow: 0 0 0 0 rgba(60,207,110,0); } }
.nav-burger { display: none; width: 44px; height: 44px; position: relative; }
.nav-burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; transition: transform .5s var(--ease); }
.nav-burger span:first-child { top: 17px; } .nav-burger span:last-child { top: 25px; }
.menu-open .nav-burger span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .nav-burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--night); color: var(--on-night);
  display: flex; flex-direction: column; justify-content: center; gap: 36px; padding: 90px var(--gut) 40px;
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease-io); visibility: hidden;
}
.menu-open .menu { clip-path: inset(0); visibility: visible; }
.menu-open .nav { color: var(--on-night); background: transparent; backdrop-filter: none; }
.menu li a { display: block; font-size: clamp(30px, 8vw, 46px); font-weight: 700; font-variation-settings: "wdth" 85; line-height: 1.12; letter-spacing: -.02em; }
.menu .btn { align-self: flex-start; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 52px; padding: 0 26px; border-radius: 100px; font-size: 15px; font-weight: 600;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s, transform .4s var(--ease);
  will-change: transform;
}
.btn i { font-style: normal; transition: transform .5s var(--ease); }
.btn:hover i { transform: translateX(5px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--on-night); color: var(--ink); }
.btn--ghost { border: 1px solid currentColor; }
.btn--ghost:hover { background: var(--on-night); color: var(--ink); border-color: var(--on-night); }
.btn--big { height: 64px; padding: 0 34px; font-size: 16px; }
.link-arrow { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.link-arrow i { font-style: normal; transition: transform .5s var(--ease); }
.link-arrow:hover i { transform: translateX(6px); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media, .case-hero-media { position: absolute; inset: -6% 0 0 0; }
.hero-img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(17,22,29,.72) 0%, rgba(17,22,29,.35) 45%, rgba(17,22,29,0) 75%),
  linear-gradient(180deg, rgba(17,22,29,.55) 0%, rgba(17,22,29,.1) 30%, rgba(17,22,29,.3) 60%, rgba(17,22,29,.94) 100%); }
.w.br { display: block; height: 0; }
.hero-inner { position: relative; padding-top: 140px; padding-bottom: clamp(48px, 7vw, 96px); }
.hero-eyebrow { color: var(--on-night-2); margin-bottom: 28px; }
.hero-title {
  font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase;
  font-size: clamp(46px, 9.4vw, 172px); line-height: .88; letter-spacing: -.035em; word-spacing: .1em;
}
.hero-title em { text-transform: none; font-size: 1.04em; letter-spacing: -.03em; color: #fff; }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: clamp(32px, 4vw, 56px); flex-wrap: wrap; }
.hero-foot p { max-width: 46ch; color: var(--on-night-2); font-size: clamp(16px, 1.15vw, 19px); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-caption { position: absolute; right: var(--gut); top: calc(var(--nav-h) + 26px); font-size: 12px; color: var(--on-night-2); max-width: 260px; text-align: right; }
.hero-caption span { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 2px 8px; border-radius: 2px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 10px; margin-right: 6px; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; width: 1px; height: 46px; background: var(--line-night); overflow: hidden; }
.scroll-cue span { position: absolute; inset: 0; background: var(--on-night); animation: cue 2.4s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* split-text lines */
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: block; will-change: transform; }

/* ---------- manifesto ---------- */
.manifesto { padding: clamp(100px, 14vw, 220px) 0 clamp(80px, 10vw, 160px); }
.manifesto-text {
  margin-top: 36px; font-size: clamp(28px, 4.1vw, 68px); line-height: 1.08; letter-spacing: -.025em;
  font-weight: 500; font-variation-settings: "wdth" 92; max-width: 22ch; text-wrap: balance;
}
.manifesto-text .w { opacity: .14; transition: opacity .2s; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.stat { padding: 30px 30px 0 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 30px; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: clamp(56px, 7vw, 120px); font-weight: 800; font-variation-settings: "wdth" 70; line-height: .9; letter-spacing: -.04em; }
.stat span { display: block; margin-top: 14px; color: var(--ink-2); max-width: 24ch; }

/* ---------- restauro (assinatura) ---------- */
.restauro { position: relative; background: var(--night); color: var(--on-night); }
.restauro-pin { position: relative; height: 100vh; overflow: hidden; display: grid; grid-template-columns: 1.55fr 1fr; }
.restauro-stage { position: relative; overflow: hidden; }
.restauro-stage figure { position: absolute; inset: 0; }
.restauro-stage img { width: 100%; height: 100%; object-fit: cover; }
.restauro-a img { filter: saturate(.7) contrast(1.05); }
.restauro-b { clip-path: inset(0 0 0 100%); }
.restauro-line { position: absolute; top: 0; bottom: 0; left: 100%; width: 2px; background: var(--accent); box-shadow: 0 0 30px 4px rgba(226,83,29,.55); }
.restauro-copy { display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 80px clamp(24px, 4vw, 72px); }
.restauro-title { font-size: clamp(44px, 6vw, 110px); font-weight: 800; font-variation-settings: "wdth" 70; text-transform: uppercase; line-height: .9; letter-spacing: -.035em; }
.restauro-copy p { color: var(--on-night-2); max-width: 40ch; }
.restauro-labels { display: flex; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.restauro-labels span { padding: 7px 12px; border: 1px solid var(--line-night); border-radius: 100px; transition: all .4s var(--ease); }
.restauro-labels span.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- sections ---------- */
.sec-head { margin-bottom: clamp(48px, 6vw, 96px); }
.sec-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.sec-title { margin-top: 22px; font-size: clamp(38px, 5.6vw, 96px); font-weight: 750; font-variation-settings: "wdth" 78; line-height: .96; letter-spacing: -.035em; text-wrap: balance; }
.sec-title em { font-weight: 400; }

.segs { padding: clamp(100px, 12vw, 200px) 0; }
.seg-list { border-top: 1px solid var(--line); }
.seg {
  position: relative; display: grid; grid-template-columns: 80px 1.1fr 1fr 60px; gap: 30px; align-items: center;
  padding: clamp(28px, 3.2vw, 48px) 0; border-bottom: 1px solid var(--line);
}
.seg-num { font-size: 13px; font-weight: 600; color: var(--accent); }
.seg-title { font-size: clamp(30px, 3.8vw, 64px); font-weight: 700; font-variation-settings: "wdth" 80; letter-spacing: -.03em; line-height: 1; transition: transform .7s var(--ease); }
.seg p { color: var(--ink-2); max-width: 44ch; }
.seg-go { font-size: 28px; justify-self: end; transition: transform .6s var(--ease); }
.seg-img {
  position: absolute; right: 12%; top: 50%; width: clamp(220px, 22vw, 360px); aspect-ratio: 4/3; z-index: 3; pointer-events: none;
  overflow: hidden; border-radius: 3px; opacity: 0; transform: translate(0, -50%) scale(.85) rotate(-3deg); transition: opacity .5s var(--ease), transform .7s var(--ease);
}
.seg-img img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (min-width: 1000px) {
  .seg:hover .seg-img { opacity: 1; transform: translate(0, -50%) scale(1) rotate(2deg); }
  .seg:hover .seg-title { transform: translateX(16px); }
  .seg:hover .seg-go { transform: translateX(8px) rotate(-45deg); color: var(--accent); }
}

/* work grid */
.work { padding: clamp(80px, 10vw, 180px) 0; }
.work--all { padding-top: 40px; }
.grid-work { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(36px, 4vw, 64px) clamp(16px, 2vw, 32px); }
.card { grid-column: span 6; display: block; }
.card--big { grid-column: span 12; }
.grid-work .card:nth-child(3n+2) { margin-top: clamp(0px, 8vw, 140px); }
.card-media { overflow: hidden; border-radius: 3px; aspect-ratio: 4/3; background: var(--paper-2); }
.card--big .card-media { aspect-ratio: 16/8; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.2s var(--ease); }
.card:hover .card-media img { transform: scale(1); }
.card-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.tag { color: var(--accent); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.card-title { margin-top: 6px; font-size: clamp(24px, 2.3vw, 38px); font-weight: 650; font-variation-settings: "wdth" 85; letter-spacing: -.025em; line-height: 1.05; }
.card.is-hidden { display: none; }

/* schools marquee */
.schools { padding: clamp(100px, 12vw, 200px) 0 clamp(70px, 8vw, 120px); overflow: hidden; }
.marquee { margin-top: clamp(50px, 6vw, 90px); display: flex; overflow: hidden; user-select: none; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee + .marquee { margin-top: 10px; }
.marquee-track { display: flex; align-items: center; gap: 34px; flex: none; padding-right: 34px; animation: marq 70s linear infinite; }
.marquee--rev .marquee-track { animation-direction: reverse; animation-duration: 90s; }
.marquee span { font-size: clamp(34px, 5vw, 84px); font-weight: 700; font-variation-settings: "wdth" 75; letter-spacing: -.03em; white-space: nowrap; }
.marquee--rev span { color: transparent; -webkit-text-stroke: 1px var(--on-night-2); }
.marquee i { font-style: normal; color: var(--accent); font-size: 22px; }
@keyframes marq { to { transform: translateX(-50%); } }

/* process */
.process { padding: clamp(100px, 12vw, 200px) 0; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--ink); }
.steps li { padding: 26px 24px 0 0; border-right: 1px solid var(--line); }
.steps li + li { padding-left: 24px; }
.steps li:last-child { border-right: 0; }
.steps span { font-family: var(--f-serif); font-style: italic; font-size: 44px; color: var(--accent); line-height: 1; }
.steps h3 { margin: 30px 0 10px; font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.steps p { color: var(--ink-2); font-size: 15px; }

/* CTA */
.cta { padding: clamp(110px, 14vw, 230px) 0; }
.cta-title { word-spacing: .1em; margin-top: 28px; font-size: clamp(42px, 7.4vw, 136px); font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; line-height: .9; letter-spacing: -.04em; max-width: 15ch; }
.cta-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; margin-top: clamp(40px, 5vw, 80px); padding-top: 34px; border-top: 1px solid var(--line-night); }
.cta-row p { color: var(--on-night-2); max-width: 36ch; }

/* footer */
.foot { position: relative; overflow: hidden; padding-top: clamp(70px, 8vw, 120px); border-top: 1px solid var(--line-night); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; }
.foot-brand p { margin-top: 20px; color: var(--on-night-2); max-width: 34ch; }
.foot h3 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-night-2); font-weight: 600; margin-bottom: 18px; }
.foot li { margin-bottom: 9px; font-size: 15px; }
.foot li a { transition: color .3s; } .foot li a:hover { color: var(--accent); }
.foot-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 70px; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid var(--line-night); font-size: 13px; color: var(--on-night-2); }
.foot-mega { font-weight: 900; font-variation-settings: "wdth" 125; font-size: 26vw; line-height: .74; letter-spacing: -.05em; text-align: center; color: var(--night-2); margin-bottom: -2vw; user-select: none; }
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 14px 30px -8px rgba(0,0,0,.35);
  transition: transform .5s var(--ease);
}
.wa-float:hover { transform: scale(1.08) rotate(-6deg); }

/* ---------- inner pages ---------- */
.page-head { padding: calc(var(--nav-h) + clamp(60px, 9vw, 150px)) 0 clamp(40px, 5vw, 80px); }
.page-title { margin-top: 26px; font-size: clamp(64px, 13vw, 240px); font-weight: 800; font-variation-settings: "wdth" 70; text-transform: uppercase; line-height: .86; letter-spacing: -.045em; }
.page-title em { text-transform: none; }
.page-lead { margin-top: 30px; max-width: 48ch; color: var(--ink-2); font-size: clamp(17px, 1.3vw, 21px); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 46px; }
.chip { height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 100px; font-size: 14px; font-weight: 500; transition: all .35s var(--ease); }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.case-hero { position: relative; min-height: 92svh; display: flex; align-items: flex-end; overflow: hidden; }
.case-hero-inner { position: relative; padding-top: 150px; padding-bottom: clamp(44px, 6vw, 90px); }
.case-hero .eyebrow a { border-bottom: 1px solid currentColor; }
.case-title { word-spacing: .1em; margin-top: 24px; font-size: clamp(46px, 8.4vw, 156px); font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; line-height: .9; letter-spacing: -.04em; max-width: 16ch; text-wrap: balance; }
.case-loc { margin-top: 20px; color: var(--on-night-2); }
.case-intro { padding: clamp(80px, 10vw, 170px) 0; }
.case-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.case-lead { font-size: clamp(24px, 2.8vw, 46px); line-height: 1.15; letter-spacing: -.02em; font-weight: 500; font-variation-settings: "wdth" 92; text-wrap: pretty; }
.case-lead .w { opacity: .14; }
.case-facts { border-top: 1px solid var(--ink); }
.case-facts > div { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.case-facts dt { color: var(--ink-3); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding-top: 3px; }
.case-facts li { padding: 2px 0; }
.case-facts--row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 30px; }
.case-facts--row > div { grid-template-columns: 1fr; gap: 6px; }
.case-story { padding-bottom: clamp(80px, 10vw, 160px); }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 90px); }
.story-grid > div { padding-top: 26px; border-top: 1px solid var(--line); }
.story-k { display: block; font-family: var(--f-serif); font-style: italic; font-size: clamp(32px, 3vw, 48px); color: var(--accent); margin-bottom: 18px; line-height: 1; }
.story-grid p { font-size: clamp(17px, 1.25vw, 20px); color: var(--ink-2); max-width: 52ch; }

.ba-sec { padding-bottom: clamp(80px, 10vw, 160px); }
.ba { position: relative; margin-top: 26px; aspect-ratio: 16/9; overflow: hidden; border-radius: 3px; background: var(--night); --p: 50%; }
.ba figure { position: absolute; inset: 0; }
.ba img { width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 calc(100% - var(--p)) 0 0); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 4; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--p); width: 2px; background: var(--accent); transform: translateX(-1px); z-index: 3; pointer-events: none; }
.ba-handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--accent); }
.ba-handle i { position: absolute; top: 50%; z-index: 1; transform: translateY(-50%); font-style: normal; color: #fff; font-weight: 700; }
.ba-handle i:first-child { right: 6px; } .ba-handle i:last-child { left: 6px; }
.ba-tag { position: absolute; top: 18px; z-index: 2; padding: 6px 12px; border-radius: 100px; background: rgba(17,22,29,.7); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; backdrop-filter: blur(6px); }
.ba-tag--l { left: 18px; } .ba-tag--r { right: 18px; }
.ba-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

.gallery { padding-bottom: clamp(80px, 10vw, 160px); }
.gal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 24px); }
.gal-item { overflow: hidden; border-radius: 3px; aspect-ratio: 4/3; }
.gal-item--wide { grid-column: span 2; aspect-ratio: 16/8; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }

.next { position: relative; display: block; overflow: hidden; padding: clamp(90px, 12vw, 200px) 0; }
.next-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; transform: scale(1.08); transition: transform 1.4s var(--ease), opacity .8s var(--ease); }
.next:hover .next-img { transform: scale(1); opacity: .45; }
.next .wrap { position: relative; }
.next-title { display: block; margin-top: 20px; font-size: clamp(40px, 7vw, 128px); font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; line-height: .9; letter-spacing: -.04em; }
.next-title i { font-style: normal; color: var(--accent); display: inline-block; transition: transform .6s var(--ease); }
.next:hover .next-title i { transform: translateX(14px); }

.pains { padding: clamp(90px, 11vw, 180px) 0; }
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 50px); }
.pain { padding-top: 26px; border-top: 2px solid var(--accent); }
.pain h3 { font-size: clamp(22px, 2vw, 32px); font-weight: 650; font-variation-settings: "wdth" 85; letter-spacing: -.02em; line-height: 1.1; margin-bottom: 14px; }
.pain p { color: var(--ink-2); }
[data-theme="dark"] .pain p { color: var(--on-night-2); }
.services, .values { padding: clamp(90px, 11vw, 180px) 0; }
.serv-list { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-night); }
.serv-list li { display: flex; gap: 22px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line-night); font-size: clamp(20px, 2vw, 32px); font-weight: 600; font-variation-settings: "wdth" 85; letter-spacing: -.02em; }
.serv-list li:nth-child(odd) { padding-right: 30px; }
.serv-list span { font-size: 13px; color: var(--accent); font-weight: 600; }
.school-list { padding: clamp(90px, 10vw, 160px) 0 0; }
.names { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 30px; }
.names li { padding: 10px 18px; border: 1px solid var(--line); border-radius: 100px; font-size: 15px; font-weight: 500; }

.about { padding: 20px 0 clamp(90px, 11vw, 180px); }
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.about-img { border-radius: 3px; overflow: hidden; aspect-ratio: 4/5; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-copy > p + p { margin-top: 24px; color: var(--ink-2); max-width: 54ch; }
.about-copy .case-lead { margin-bottom: 40px; }
.company { padding: clamp(70px, 8vw, 120px) 0; }

.contact { padding: 20px 0 clamp(90px, 11vw, 180px); }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(40px, 6vw, 110px); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 26px; }
.form .full { grid-column: span 2; }
.form label span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.form label span em { text-transform: none; letter-spacing: 0; font-size: 13px; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink-3);
  padding: 10px 0 12px; border-radius: 0; transition: border-color .3s; -webkit-appearance: none; appearance: none;
}
.form select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2315191f' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 4px center; }
.form textarea { resize: vertical; min-height: 110px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--accent); }
.form .btn { justify-self: start; }
.contact-info { display: grid; gap: 30px; align-content: start; padding-top: 6px; }
.contact-info h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.contact-info a { font-size: clamp(20px, 1.8vw, 28px); font-weight: 600; letter-spacing: -.01em; border-bottom: 1px solid var(--line); word-break: break-word; }
.contact-info a:hover { border-color: var(--accent); }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--night); color: var(--on-night); display: grid; place-items: center; }
.loader svg { width: 120px; height: auto; overflow: visible; }
.loader path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 1s var(--ease) forwards; }
.loader rect { fill: var(--accent); transform-origin: bottom; transform: scaleY(0); animation: grow .5s .7s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes grow { to { transform: scaleY(1); } }

/* reveal defaults (JS sets initial state; without JS, everything visible) */
.js [data-reveal] { opacity: 0; transform: translateY(40px); }
.js [data-load] { opacity: 0; transform: translateY(24px); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li, .steps li + li { padding: 26px 20px 26px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .seg { grid-template-columns: 50px 1fr 40px; }
  .seg p { grid-column: 2 / 3; }
  .restauro-pin { grid-template-columns: 1fr; grid-template-rows: 58vh auto; height: auto; min-height: 100vh; }
  .restauro-copy { padding: 40px var(--gut) 60px; }
}
@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .hero-caption { display: none; }
  .hero-title { font-size: clamp(36px, 11.2vw, 80px); }
  .hero .hero-img { object-position: 78% center; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 26px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .card, .card--big { grid-column: span 12; }
  .grid-work .card:nth-child(3n+2) { margin-top: 0; }
  .card--big .card-media { aspect-ratio: 4/3; }
  .steps { grid-template-columns: 1fr; }
  .case-grid, .story-grid, .pain-grid, .about-grid, .contact-grid, .foot-grid { grid-template-columns: 1fr; }
  .case-facts--row { grid-template-columns: 1fr; }
  .serv-list { grid-template-columns: 1fr; }
  .serv-list li:nth-child(odd) { padding-right: 0; }
  .gal-grid { grid-template-columns: 1fr; }
  .gal-item--wide { grid-column: auto; aspect-ratio: 4/3; }
  .ba { aspect-ratio: 4/3; }
  .form { grid-template-columns: 1fr; }
  .form .full { grid-column: auto; }
  .case-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .seg { grid-template-columns: 1fr 30px; gap: 10px 16px; }
  .seg-num { grid-column: 1 / -1; }
  .seg p { grid-column: 1 / 2; }
  .seg-go { grid-row: 2; grid-column: 2; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-load] { opacity: 1; transform: none; }
  .manifesto-text .w, .case-lead .w { opacity: 1; }
  .restauro-b { clip-path: inset(0 0 0 50%); }
  .restauro-line { left: 50%; }
}

/* ---------- obra recente (residencial) ---------- */
.badge-new { display: inline-block; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; }
.eyebrow .badge-new { margin-right: 4px; }
.recent { padding: clamp(90px, 11vw, 180px) 0 clamp(70px, 8vw, 120px); overflow: hidden; }
.recent-head { margin-bottom: clamp(40px, 5vw, 80px); }
.recent-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.recent-main { position: relative; border-radius: 3px; overflow: hidden; aspect-ratio: 9/14; max-height: 86vh; background: var(--night-2); }
.recent-main video, .recent-mini video, .vid-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.recent-main figcaption, .recent-mini figcaption, .vid-item figcaption {
  position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 100px; font-size: 12px; font-weight: 600;
  background: rgba(17,22,29,.72); color: #fff; backdrop-filter: blur(6px);
}
.recent-copy { display: flex; flex-direction: column; gap: 34px; padding-top: 6px; }
.recent-lead { font-size: clamp(22px, 2.2vw, 36px); line-height: 1.2; letter-spacing: -.02em; font-weight: 500; font-variation-settings: "wdth" 92; }
.recent-scope { border-top: 1px solid var(--line-night); }
.recent-scope li { padding: 14px 0; border-bottom: 1px solid var(--line-night); color: var(--on-night-2); display: flex; gap: 14px; }
.recent-scope li::before { content: "✦"; color: var(--accent); font-size: 12px; padding-top: 3px; }
.recent-minis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.recent-mini { position: relative; aspect-ratio: 9/14; border-radius: 3px; overflow: hidden; background: var(--night-2); }
.recent-copy .link-arrow { align-self: flex-start; }
.strip {
  display: flex; gap: clamp(10px, 1.4vw, 20px); overflow-x: auto; scroll-snap-type: x mandatory; margin-top: clamp(50px, 6vw, 90px);
  padding: 0 var(--gut) 14px; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; cursor: grab;
}
.strip.is-drag { cursor: grabbing; scroll-snap-type: none; }
.strip-item { flex: none; height: clamp(320px, 38vw, 560px); aspect-ratio: 3/4; border-radius: 3px; overflow: hidden; scroll-snap-align: start; }
.strip-item--land { aspect-ratio: 4/3; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.strip-hint { margin-top: 14px; font-size: 13px; color: var(--on-night-2); }

.vids-sec { padding-bottom: clamp(80px, 10vw, 160px); }
.vids { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 24px); margin-top: 26px; }
.vid-item { position: relative; aspect-ratio: 9/16; border-radius: 3px; overflow: hidden; background: var(--night); }
.gal-item--tall { aspect-ratio: 3/4; }
.hero-vid { transform: none !important; }

@media (max-width: 760px) {
  .recent-grid { grid-template-columns: 1fr; }
  .recent-main { max-height: none; aspect-ratio: 4/5; }
  .vids { grid-template-columns: 1fr 1fr; }
  .vid-item:first-child { grid-column: span 2; aspect-ratio: 4/5; }
  .strip-item { height: 380px; }
}

/* ---------- antes/depois no destaque + equipamento ---------- */
.recent-grid--ba { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.recent-ba .ba { margin-top: 0; aspect-ratio: 4/3; }
.recent-ba .ba-note { color: var(--on-night-2); }
.tools { padding: clamp(90px, 11vw, 180px) 0; }
.tools-lead { max-width: 42ch; color: var(--ink-2); }
[data-theme="dark"] .tools-lead { color: var(--on-night-2); }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 32px); }
.tool-img { aspect-ratio: 3/4; overflow: hidden; border-radius: 3px; margin-bottom: 20px; }
.tool-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tool:hover .tool-img img { transform: scale(1.05); }
.tool-n { font-family: var(--f-serif); font-style: italic; font-size: 30px; color: var(--accent); line-height: 1; }
.tool h3 { margin: 10px 0 8px; font-size: clamp(20px, 1.6vw, 26px); font-weight: 650; font-variation-settings: "wdth" 85; letter-spacing: -.02em; }
.tool p { color: var(--ink-2); font-size: 15px; }
[data-theme="dark"] .tool p { color: var(--on-night-2); }
@media (max-width: 1100px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .recent-grid--ba { grid-template-columns: 1fr; } }
