/* Clínica Mirai, video-hero site.
   Palette and type as the earlier Mirai mock (sites/forma-replica): Warm Ivory ground, Espresso text, Natural Wood
   accent, Taupe for quiet text, Linen bands; Fraunces Light headings, DM Sans text, square uppercase buttons. */
@font-face { font-family: "Fraunces"; src: url(fonts/Fraunces-Light.ttf) format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(fonts/Fraunces-LightItalic.ttf) format("truetype"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(fonts/Fraunces-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(fonts/DMSans-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --ivory: #F3EFE8; --linen: #EDE8E0; --sand: #D9CFC1;
  --espresso: #332B25; --wood: #A77C55; --taupe: #6E6358; --gold: #E6CFA2;
  --text2: #5a4f46;
  --hair: rgba(51, 43, 37, .13);
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --bar-h: 76px;
  --out: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: var(--bar-h); }
/* Smooth only once loaded, so arriving at cirurgias.html#rinoplastia lands on the entry instead of gliding down to it. */
html.ready { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--espresso); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
body.drawer-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--wood); color: var(--ivory); }
:focus-visible { outline: 1.5px solid var(--wood); outline-offset: 3px; }

em { font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--wood); }
.kicker { margin: 0 0 18px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--taupe); }
.kicker.light { color: rgba(243, 239, 232, .8); }
.giant, .big, h1 { font-family: var(--serif); font-weight: 300; letter-spacing: -.02em; margin: 0; }
.giant { font-size: clamp(40px, 6.4vw, 104px); line-height: 1.02; max-width: 15em; }
.big { font-size: clamp(34px, 4.4vw, 68px); line-height: 1.05; }
.lede { color: var(--text2); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.6; margin: 0; max-width: 34em; }
.lede.narrow { max-width: 26em; }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border-radius: 2px;
  background: var(--espresso); color: var(--ivory); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  transition: background .3s, color .3s; white-space: nowrap; }
.btn:hover { background: var(--wood); }
.btn.light { background: var(--ivory); color: var(--espresso); }
.btn.light:hover { background: var(--gold); }
.under { display: inline-flex; align-items: center; gap: 10px; padding-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; border-bottom: 1px solid rgba(167, 124, 85, .6); }
.under.light { color: var(--ivory); border-bottom-color: rgba(243, 239, 232, .55); }
.arr { width: 14px; height: 1px; background: currentColor; position: relative; transition: width .3s var(--out); }
.arr::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.under:hover .arr { width: 22px; }

/* ---------- header bar ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar-h); display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 0 var(--gutter); color: var(--ivory); transition: background-color .45s, color .45s, box-shadow .45s; }
.bar.solid, .bar.mega-open { background: var(--ivory); color: var(--espresso); box-shadow: 0 1px 0 var(--hair); }
.mark { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 15px; letter-spacing: .24em; white-space: nowrap; }
.m-mark { width: 34px; height: 26px; background: currentColor; -webkit-mask: url(mirai-m-mark.svg) center / contain no-repeat; mask: url(mirai-m-mark.svg) center / contain no-repeat; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); }
.links { display: flex; gap: clamp(16px, 2.2vw, 36px); list-style: none; margin: 0; padding: 0; }
.links a, .mega-toggle { display: inline-flex; align-items: center; gap: 8px; height: var(--bar-h); font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.links a:hover, .mega-toggle:hover, .mega-toggle[aria-expanded="true"] { color: var(--wood); }
.bar:not(.solid):not(.mega-open) .links a:hover, .bar:not(.solid):not(.mega-open) .mega-toggle:hover { color: var(--gold); }
.caret { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); transition: transform .3s; }
.mega-toggle[aria-expanded="true"] .caret { transform: translateY(1px) rotate(225deg); }
.chip { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border: 1px solid currentColor; border-radius: 2px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; transition: background .3s, color .3s, border-color .3s; }
.chip:hover { background: var(--espresso); color: var(--ivory); border-color: var(--espresso); }
.bar:not(.solid):not(.mega-open) .chip:hover { background: var(--ivory); color: var(--espresso); border-color: var(--ivory); }
.burger { display: none; width: 40px; height: 40px; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 1px; background: currentColor; transition: transform .35s var(--out), top .35s var(--out); }
.burger span:first-child { top: 16px; } .burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* mega menu: the five Tratamentos columns */
.mega { position: absolute; inset: var(--bar-h) 0 auto; background: var(--ivory); color: var(--espresso); border-top: 1px solid var(--hair);
  box-shadow: 0 30px 60px -30px rgba(51, 43, 37, .35); animation: drop .35s var(--out); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.mega-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 48px); padding: 40px var(--gutter) 48px; max-width: 1480px; margin: 0 auto; }
.mega-head { display: block; font-family: var(--serif); font-size: clamp(19px, 1.5vw, 23px); line-height: 1.15; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--hair); }
.mega-head:hover { color: var(--wood); }
.mega-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.mega-col li a { font-size: 14.5px; color: var(--text2); transition: color .2s; }
.mega-col li a:hover { color: var(--wood); }

/* mobile drawer */
.drawer { position: fixed; inset: var(--bar-h) 0 0; z-index: 49; background: var(--ivory); overflow-y: auto; padding: 12px var(--gutter) 40px; display: grid; align-content: start; gap: 28px; }
.drawer-list { list-style: none; margin: 0; padding: 0; }
.drawer-list > li { border-bottom: 1px solid var(--hair); }
.drawer-list > li > a, .drawer-list summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-family: var(--serif); font-size: 24px; cursor: pointer; list-style: none; }
.drawer-list summary::-webkit-details-marker { display: none; }
.drawer-list summary::after { content: "+"; font-family: var(--sans); font-weight: 300; font-size: 22px; color: var(--taupe); }
.drawer-list details[open] > summary::after { content: "–"; }
.drawer-list .sub { margin-left: 4px; }
.drawer-list .sub summary { font-size: 18px; padding: 10px 0; }
.drawer-list .sub ul { list-style: none; margin: 0 0 12px; padding: 0 0 0 2px; display: grid; gap: 8px; }
.drawer-list .sub a { color: var(--text2); font-size: 15px; }
.drawer .btn { width: 100%; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--espresso); color: var(--ivory); }
.hero-media, .hero-shade { position: absolute; inset: 0; }
/* The first film's still shows from the first paint (before site.js or any video arrives); stills mode reuses it. */
.hero-media { background: var(--espresso) url("../media/final-1080p/microagulhamento.jpg") center / cover no-repeat; isolation: isolate; }
@media (max-width: 820px) { .hero-media { background-image: url("../media/mobile-720p/microagulhamento.jpg"); } }
.hero-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s ease; }
.hero-still.is-on { opacity: 1; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s ease; }
.hero-video.is-on { opacity: 1; }
/* The incoming film or still fades in on top of the outgoing one, which stays opaque underneath, so the background
   (the first film's still) never shows through halfway. .hero-media isolates this z-index, so the films stay under
   the shade and the copy. */
.hero-video.is-top, .hero-still.is-top { z-index: 1; }
.hero-shade { background:
  linear-gradient(180deg, rgba(51, 43, 37, .55) 0%, rgba(51, 43, 37, 0) 22%),
  linear-gradient(0deg, rgba(36, 30, 26, .82) 0%, rgba(36, 30, 26, .35) 45%, rgba(36, 30, 26, 0) 70%),
  linear-gradient(90deg, rgba(36, 30, 26, .45) 0%, rgba(36, 30, 26, 0) 60%); }
.hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(96px, 15vh, 150px); max-width: 920px; }
.hero h1 { font-size: clamp(42px, 6.2vw, 100px); line-height: 1.02; }
.hero h1 em { color: var(--gold); }
.hero-lede { margin: 22px 0 0; max-width: 30em; font-size: clamp(16px, 1.3vw, 19px); color: rgba(243, 239, 232, .86); }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: 34px; }
.hero-index { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 32px; display: flex; align-items: center; gap: 24px; }
.now { margin: 0; flex: 0 1 auto; min-width: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-label { color: rgba(243, 239, 232, .6); }
.now-title { color: var(--gold); font-weight: 500; }
.ticks { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 10px; }
.ticks button { display: grid; gap: 6px; width: clamp(38px, 4.4vw, 64px); padding: 6px 0; text-align: left; }
.tick-n { font-size: 10px; letter-spacing: .12em; color: rgba(243, 239, 232, .5); transition: color .3s; font-variant-numeric: tabular-nums; }
.ticks li.on .tick-n, .ticks button:hover .tick-n { color: var(--ivory); }
.tick-bar { height: 1px; background: rgba(243, 239, 232, .28); overflow: hidden; }
.tick-bar i { display: block; height: 100%; background: var(--ivory); transform: scaleX(0); transform-origin: left; }
.pause { width: 34px; height: 34px; flex: none; border: 1px solid rgba(243, 239, 232, .45); border-radius: 50%; display: grid; place-items: center; }
.pause span { width: 8px; height: 10px; border: solid var(--ivory); border-width: 0 2px; }
.pause.is-paused span { width: 0; height: 0; border: solid transparent; border-width: 5px 0 5px 9px; border-left-color: var(--ivory); margin-left: 3px; }

/* ---------- sections ---------- */
.block { padding: clamp(80px, 13vh, 160px) var(--gutter); }
.block.tint { background: var(--linen); }
.block.dark { background: var(--espresso); color: var(--ivory); }
.block.dark em { color: var(--gold); }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; margin-bottom: clamp(40px, 7vh, 80px); }

.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 110px); margin-top: clamp(40px, 7vh, 90px); align-items: start; }
.figs { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.figs dt { font-family: var(--serif); font-weight: 300; font-size: clamp(48px, 5vw, 80px); line-height: 1; }
.figs dd { margin: 10px 0 0; font-size: 13px; color: var(--taupe); }

.areas { display: grid; gap: clamp(56px, 9vh, 110px); }
.area { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 96px); align-items: center; }
.area:nth-child(even) .area-media { order: 2; }
.area-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }
.area-media img, .area-media video { width: 100%; height: 100%; object-fit: cover; }
.area-media img { object-position: center 30%; }
.area-body .n { font-size: 11px; letter-spacing: .14em; color: var(--taupe); font-variant-numeric: tabular-nums; }
.area-body h3 { margin: 10px 0 14px; font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3vw, 48px); line-height: 1.05; letter-spacing: -.02em; }
.area-text { margin: 0 0 22px; color: var(--text2); max-width: 32em; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 13px; border: 1px solid var(--hair); border-radius: 2px; font-size: 13.5px; color: var(--text2); background: rgba(243, 239, 232, .6); }


.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3.5vw, 48px) clamp(28px, 4vw, 72px); }
.member { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 2vw, 28px); align-items: start; padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--hair); }
/* Circular portrait frame; --z / --oy zoom a photo shot wider than the others (set inline per member). */
.m-photo { display: block; width: clamp(88px, 8vw, 116px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--linen);
  box-shadow: 0 0 0 1px var(--ivory), 0 0 0 2px rgba(167, 124, 85, .55); }
.m-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(var(--z, 1)); transform-origin: 50% var(--oy, 20%); }
.member h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; }
.m-role { margin: 4px 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--wood); }
.m-bio { margin: 0; font-size: 15px; color: var(--text2); max-width: 36em; }
.m-label { margin: 14px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--taupe); }
.m-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; color: var(--text2); }
.m-list li { padding-left: 14px; position: relative; }
.m-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 1px; background: var(--wood); }
@media (max-width: 820px) { .team { grid-template-columns: 1fr; } }

.units { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(40px, 7vh, 80px); }
.unit { border-top: 1px solid rgba(243, 239, 232, .22); padding-top: 26px; display: grid; gap: 12px; align-content: start; justify-items: start; }
.unit h3 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 2.6vw, 40px); }
.unit p { margin: 0; color: rgba(243, 239, 232, .78); }
.unit p a:hover { color: var(--gold); }
.unit .btn, .unit .under { margin-top: 10px; }

/* Booking form (posts to /api/lead → a lead in Pabau). Underlined fields on the espresso band. */
.lead-form { margin-top: clamp(36px, 6vh, 64px); max-width: 980px; }
.lead-intro { margin: 0 0 28px; color: rgba(243, 239, 232, .78); font-size: clamp(16px, 1.2vw, 18px); }
.lead-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px clamp(24px, 3vw, 48px); }
.field { display: grid; gap: 8px; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(243, 239, 232, .7); }
.field small, .check small { text-transform: none; letter-spacing: 0; color: rgba(243, 239, 232, .5); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 17px; color: var(--ivory); background: transparent;
  border: 0; border-bottom: 1px solid rgba(243, 239, 232, .3); border-radius: 0; padding: 8px 0 10px; transition: border-color .3s; }
.field textarea { resize: vertical; min-height: 3.2em; }
.field select { appearance: none; cursor: pointer; padding-right: 24px;
  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' fill='none' stroke='%23F3EFE8' stroke-opacity='.7'/%3E%3C/svg%3E") no-repeat right 4px center; }
.field select option, .field select optgroup { color: var(--espresso); background: var(--ivory); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field [aria-invalid="true"] { border-bottom-color: #E8A48C; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: 14px; line-height: 1.5; color: rgba(243, 239, 232, .82); cursor: pointer; }
.lead-grid + .check { margin-top: 32px; }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); cursor: pointer; }
.check.invalid span { color: #E8A48C; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-send { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.lead-send .btn[disabled] { opacity: .6; cursor: progress; }
.lead-status { margin: 0; font-size: 15px; color: rgba(243, 239, 232, .85); max-width: 36em; }
.lead-status.error { color: #E8A48C; }
.lead-form.sent .lead-grid, .lead-form.sent .check, .lead-form.sent .btn { display: none; }
.lead-form.sent .lead-status { font-family: var(--serif); font-weight: 300; font-size: clamp(22px, 2vw, 30px); color: var(--ivory); }

.foot { background: var(--espresso); color: rgba(243, 239, 232, .6); padding: 28px var(--gutter); border-top: 1px solid rgba(243, 239, 232, .1); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12px; letter-spacing: .08em; }

/* ---------- small screens ---------- */
@media (max-width: 1080px) {
  .links, .nav > .chip { display: none; }
  .burger { display: block; }
  body.drawer-open .bar { background: var(--ivory); color: var(--espresso); }
}
@media (max-width: 820px) {
  :root { --bar-h: 64px; }
  .about { grid-template-columns: 1fr; }
  .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .area { grid-template-columns: 1fr; }
  .area:nth-child(even) .area-media { order: 0; }
  .units { grid-template-columns: 1fr; }
  .lead-grid { grid-template-columns: 1fr; }
  .lead-send .btn { width: 100%; }
  .hero-index { gap: 14px; }
  .now-label { display: none; }
  .ticks { gap: 6px; }
  .ticks button { width: 18px; }
  .tick-n { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.ready { scroll-behavior: auto; }
  .hero-video { transition: none; }
}

/* ---------- page transitions ----------
   Cross-document View Transitions where supported (html.vt): the header holds still, the old page lifts away, the new one
   rises in, and an area's media travels between its home card and its page head (view-transition-name: area-<slug>).
   Other browsers (html.no-vt) fade out in site.js and fade in here. */
@view-transition { navigation: auto; }
.bar { view-transition-name: bar; }
::view-transition-group(*) { animation-duration: .7s; animation-timing-function: var(--out); }
::view-transition-old(root) { animation: page-out .35s var(--out) both; }
::view-transition-new(root) { animation: page-in .7s var(--out) .1s both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-16px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes fade-in { from { opacity: 0; } }
html.no-vt body { animation: fade-in .55s var(--out) both; }
html.leaving body { opacity: 0; transition: opacity .26s ease; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html.no-vt body { animation: none; }
}

/* ---------- home: area cards lead to their pages ---------- */
a.area-media { display: block; }
/* Window effect: the picture or film is 20% taller than its frame and drifts slower than the page (site.js sets --py). */
.areas .area-media { position: relative; }
.areas .area-media img, .areas .area-media video { position: absolute; left: 0; top: -10%; height: 120%; will-change: transform;
  transform: translate3d(0, var(--py, 0px), 0); }
/* Reveal: the frame opens from the side nearest the middle of the screen to its outer edge (site.js adds .reveal, then
   .is-open once the card is in view). Left frames open leftwards, right frames rightwards; one column opens both ways. */
.areas .area-media.reveal { clip-path: inset(0 0 0 100%); transition: clip-path 1.2s var(--out); }
.areas .area:nth-child(even) .area-media.reveal { clip-path: inset(0 100% 0 0); }
.areas .area-media.reveal.is-open, .areas .area:nth-child(even) .area-media.reveal.is-open { clip-path: inset(0 0 0 0); }
.areas .area-media.reveal.no-anim { transition: none; }  /* already on screen when the page appeared */
html.vt-arrive .areas .area-media.reveal, html.vt-arrive .areas .area:nth-child(even) .area-media.reveal { clip-path: inset(0 0 0 0); transition: none; }  /* arrived via a page transition */
@media (max-width: 820px) {
  .areas .area-media.reveal, .areas .area:nth-child(even) .area-media.reveal { clip-path: inset(0 50% 0 50%); }
  .areas .area-media.reveal.is-open, .areas .area:nth-child(even) .area-media.reveal.is-open { clip-path: inset(0 0 0 0); }
.areas .area-media.reveal.no-anim { transition: none; }  /* already on screen when the page appeared */
html.vt-arrive .areas .area-media.reveal, html.vt-arrive .areas .area:nth-child(even) .area-media.reveal { clip-path: inset(0 0 0 0); transition: none; }  /* arrived via a page transition */
}
.area-body h3 a:hover { color: var(--wood); }
.chips a { display: block; padding: 7px 13px; border: 1px solid var(--hair); border-radius: 2px; font-size: 13.5px; color: var(--text2);
  background: rgba(243, 239, 232, .6); transition: border-color .25s, color .25s, background .25s; }
.chips a:hover { border-color: var(--wood); color: var(--espresso); background: var(--ivory); }
.chips li:has(a) { padding: 0; border: 0; background: none; }
.area-body > .under { margin-top: 26px; }
.drawer-list .sub a.all { color: var(--wood); font-weight: 500; }

/* ---------- area pages ---------- */
.area-page { padding-top: var(--bar-h); }
.ph { padding: clamp(28px, 5vh, 56px) var(--gutter) clamp(56px, 9vh, 110px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--taupe); margin-bottom: clamp(32px, 6vh, 72px); }
.crumbs a:hover { color: var(--wood); }
.crumbs [aria-current] { color: var(--espresso); }
.ph-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 96px); align-items: end; }
.ph h1 { font-size: clamp(48px, 7vw, 112px); line-height: 1; }
.ph .lede { margin-top: 24px; }
.ph-count { margin: 28px 0 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--wood); }

.tx-wrap { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: clamp(32px, 5vw, 96px); padding: 0 var(--gutter) clamp(80px, 12vh, 140px);
  border-top: 1px solid var(--hair); }
/* Capped to the viewport so the whole list stays reachable on short screens (it scrolls inside itself when needed). */
.toc { position: sticky; top: calc(var(--bar-h) + 32px); align-self: start; padding-top: clamp(40px, 6vh, 64px);
  max-height: calc(100vh - var(--bar-h) - 48px); overflow-y: auto; overscroll-behavior: contain; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.toc a { display: block; padding: 5px 0 5px 14px; border-left: 1px solid var(--hair); font-size: 14px; color: var(--taupe); transition: color .25s, border-color .25s; }
.toc a:hover, .toc a.on { color: var(--espresso); border-left-color: var(--wood); }
.tx { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(16px, 3vw, 56px); align-items: start;
  padding: clamp(40px, 7vh, 72px) 0; border-bottom: 1px solid var(--hair); }
.tx .n { padding-top: 12px; font-size: 11px; letter-spacing: .14em; color: var(--taupe); font-variant-numeric: tabular-nums; }
.tx h2 { margin: 0 0 16px; font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3vw, 46px); line-height: 1.05; letter-spacing: -.02em; }
.tx-text { margin: 0 0 22px; color: var(--text2); }
.tx-meta { margin: 0 0 26px; padding-top: 16px; border-top: 1px solid var(--hair); }
.tx-meta dt { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--taupe); margin-bottom: 6px; }
.tx-meta dd { margin: 0; font-size: 15px; }
.tx-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--linen); }
.tx-media img, .tx-media video { width: 100%; height: 100%; object-fit: cover; }
.tx-media.is-empty { background: linear-gradient(135deg, var(--linen), var(--sand)); }
.tx-note { margin: 32px 0 0; font-size: 13px; color: var(--taupe); }

.others { padding-top: clamp(64px, 10vh, 120px); padding-bottom: clamp(64px, 10vh, 120px); background: var(--linen); }
.others-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
.others-list a { display: grid; gap: 10px; padding: 24px 0 0; border-top: 1px solid rgba(51, 43, 37, .25); }
.others-list .n { font-size: 11px; letter-spacing: .14em; color: var(--taupe); }
.others-list .o-title { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.2vw, 34px); line-height: 1.1; transition: color .25s; }
.others-list .o-count { font-size: 13px; color: var(--taupe); }
.others-list a:hover .o-title { color: var(--wood); }
.others-list a:hover .arr { width: 22px; }

@media (max-width: 1080px) {
  .tx { grid-template-columns: 36px minmax(0, 1fr); }
  .tx-media { grid-column: 2; grid-row: 1; margin-bottom: 8px; }
  .tx-body { grid-column: 2; }
  .others-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .ph-grid { grid-template-columns: 1fr; }
  .ph-media { order: -1; }
  .tx-wrap { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; padding: 28px 0 8px; max-height: none; overflow: visible; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 8px; }
  .toc a { padding: 6px 12px; border: 1px solid var(--hair); border-radius: 2px; font-size: 13px; }
  .tx { grid-template-columns: 1fr; }
  .tx .n { display: none; }
  .tx-media, .tx-body { grid-column: 1; }
  .others-list { grid-template-columns: 1fr; }
}

/* ---------- casos reais: before/after sliders ---------- */
.cases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
@media (max-width: 820px) { .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ba-card { margin: 0; min-width: 0; }
.ba { position: relative; aspect-ratio: 4 / 3; overflow: hidden; max-width: 100%; background: var(--linen); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after { clip-path: inset(0 0 0 var(--pos)); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--ivory); box-shadow: 0 0 0 1px rgba(51, 43, 37, .18); pointer-events: none; }
.ba-line i { position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; border-radius: 50%; background: var(--ivory);
  box-shadow: 0 2px 10px rgba(51, 43, 37, .28); }
.ba-line i::before, .ba-line i::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -4px; border: solid var(--espresso); border-width: 0 0 1.5px 1.5px; }
.ba-line i::before { left: 8px; transform: rotate(45deg); }
.ba-line i::after { right: 8px; transform: rotate(-135deg); }
.ba-tag { position: absolute; top: 10px; padding: 4px 9px; border-radius: 2px; background: rgba(51, 43, 37, .62); color: var(--ivory); font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; pointer-events: none; transition: opacity .25s; }
.ba-l { left: 10px; } .ba-r { right: 10px; }
.ba { cursor: ew-resize; }
.ba.dragging .ba-tag { opacity: 0; }
/* Visually hidden range for keyboard and screen readers; the pointer is handled on .ba in site.js. */
.ba-range { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.ba:has(.ba-range:focus-visible) { outline: 1.5px solid var(--wood); outline-offset: 3px; }
.ba-card figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 8px; }
.ba-card figcaption span { font-family: var(--serif); font-size: 16px; }
.ba-card figcaption small { font-size: 11px; color: var(--taupe); text-align: right; }
.cases-note { margin: clamp(20px, 3vh, 36px) 0 0; font-size: 13px; color: var(--taupe); }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: 22px; }
.notfound h1 { font-size: clamp(40px, 6vw, 84px); }
.nf-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin: 6px 0 0; }
