/* =========================================================
   RAM Advocacia — Rafael Amaral
   Tokens: ink (aubergine), porcelain, blush, oxblood, mauve
   Type: Newsreader (display) · Hanken Grotesk (text) · IBM Plex Mono (labels)
   Signature: the suture line — a stitched path that ties facts together
   ========================================================= */

/* Base theme: neutral, law-office (graphite, stone, deep navy, brass) */
:root {
  --ink: #16191d;
  --ink-2: #353a41;
  --porcelain: #f3f3f1;
  --paper: #ffffff;
  --blush: #e5e3de;       /* stone */
  --blush-deep: #b89d74;  /* brass — accents on dark */
  --oxblood: #1e3448;     /* deep navy — primary action */
  --oxblood-dk: #122230;
  --mauve: #5e636b;
  --line: rgba(22, 25, 29, 0.14);
  --line-soft: rgba(22, 25, 29, 0.08);
  --arch: 2px;
  --arch-sm: 2px;

  --f-display: "Newsreader", "Georgia", "Times New Roman", serif;
  --f-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec: clamp(72px, 10vw, 140px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* Plastic-surgery pages: warmer, feminine palette (porcelain, blush, oxblood) + arched frames */
.theme-rose {
  --ink: #221a20;
  --ink-2: #3a2e36;
  --porcelain: #f6f4f4;
  --paper: #fffdfd;
  --blush: #ecdfdb;
  --blush-deep: #d9c1b9;
  --oxblood: #7a2638;
  --oxblood-dk: #5d1b2a;
  --mauve: #6f606a;
  --line: rgba(34, 26, 32, 0.14);
  --line-soft: rgba(34, 26, 32, 0.08);
  --arch: 240px 240px 2px 2px;
  --arch-sm: 180px 180px 2px 2px;
}
.theme-rose .site-header { background: rgba(246, 244, 244, 0.86); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--porcelain);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
::selection { background: var(--oxblood); color: var(--paper); }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.02;
}
.display em, .h2 em, .h3 em { font-style: italic; color: var(--oxblood); }
.sec--dark .display em, .sec--dark .h2 em { color: var(--blush-deep); }
.h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); line-height: 1.04; }
.h1--page { font-size: clamp(2.3rem, 5.2vw, 4.4rem); line-height: 1.05; }
.h2 { font-family: var(--f-display); font-weight: 500; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.08; letter-spacing: -0.01em; }
.h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.45rem, 2.2vw, 1.9rem); line-height: 1.15; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.28rem); line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.sec--dark .lead { color: rgba(246, 244, 244, 0.78); }
.muted { color: var(--mauve); }

.label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mauve);
  display: inline-block;
}
.sec--dark .label { color: var(--blush-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--f-text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--oxblood); color: var(--paper); }
.btn--primary:hover { background: var(--oxblood-dk); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--blush); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 243, 241, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark {
  font-family: var(--f-display); font-size: 2rem; line-height: 1; letter-spacing: 0.02em;
  font-weight: 500;
}
.brand-mark i { font-style: italic; color: var(--oxblood); }
.brand-name {
  font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase;
  line-height: 1.5; color: var(--mauve); border-left: 1px solid var(--line); padding-left: 14px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav > ul { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-size: 0.92rem; font-weight: 500; text-decoration: none;
  border-radius: 999px; background: none; border: 0; cursor: pointer;
  transition: background .25s;
}
.nav-link:hover, .nav-link[aria-current="page"] { background: rgba(34, 26, 32, 0.05); }
.nav-link[aria-current="page"] { color: var(--oxblood); }
.nav-link .chev { width: 10px; height: 10px; transition: transform .3s var(--ease); }

.has-sub { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 12px); left: -12px; width: 360px;
  background: var(--paper); border: 1px solid var(--line-soft);
  box-shadow: 0 30px 60px -30px rgba(34, 26, 32, 0.35);
  padding: 10px; border-radius: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.has-sub:hover .submenu, .has-sub:focus-within .submenu, .has-sub.is-open .submenu { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .chev, .has-sub.is-open .chev { transform: rotate(180deg); }
.submenu a { display: block; padding: 12px 14px; border-radius: 4px; text-decoration: none; }
.submenu a:hover { background: var(--porcelain); }
.submenu a strong { display: block; font-weight: 600; font-size: .94rem; }
.submenu a small { display: block; color: var(--mauve); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.submenu .sub-hub { border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; padding-bottom: 14px; }

.header-cta { flex: none; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1240px) {
  .nav-link { padding: 10px 10px; }
}
@media (max-width: 1140px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    position: fixed; top: 84px; left: 0; right: 0; height: calc(100vh - 84px); height: calc(100dvh - 84px); background: var(--porcelain);
    flex-direction: column; align-items: stretch; padding: 24px var(--gutter) 40px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--line-soft); }
  .nav-link { width: 100%; justify-content: space-between; padding: 18px 4px; font-family: var(--f-display); font-size: 1.5rem; border-radius: 0; }
  .nav-link:hover, .nav-link[aria-current="page"] { background: none; }
  .submenu {
    position: static; width: auto; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: transparent; padding: 0 0 12px; display: none;
  }
  .has-sub:hover .submenu { display: none; }
  .has-sub.is-open .submenu { display: block; }
  .submenu a { padding: 10px 4px; }
}

/* ---------- Sections ---------- */
.sec { padding: var(--sec) 0; position: relative; }
.sec--tight { padding: calc(var(--sec) * .6) 0; }
.sec--paper { background: var(--paper); }
.sec--blush { background: var(--blush); }
.sec--dark { background: var(--ink); color: var(--porcelain); }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 780px; }
.sec-head--split { max-width: none; grid-template-columns: 1fr 1fr; align-items: end; gap: 40px; }
@media (max-width: 860px) { .sec-head--split { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- Stitch (signature) ---------- */
.stitch { position: absolute; pointer-events: none; overflow: visible; }
.stitch path.thread {
  fill: none; stroke: var(--oxblood); stroke-width: 1.4; stroke-linecap: round;
}
.stitch path.marks {
  fill: none; stroke: var(--oxblood); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1 14;
}
.stitch-divider { display: block; width: 100%; height: 28px; color: var(--oxblood); }
.stitch-divider line { stroke: currentColor; stroke-width: 1.2; }
.stitch-divider .cross { stroke-dasharray: 0; }
.js .draw path.thread { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); transition: stroke-dashoffset 2.4s var(--ease) .2s; }
.js .draw.is-in path.thread { stroke-dashoffset: 0; }
.js .draw path.marks { opacity: 0; transition: opacity 1s ease 1.8s; }
.js .draw.is-in path.marks { opacity: .55; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 110px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy .label { margin-bottom: 28px; }
.hero-copy .h1 { margin-bottom: 28px; }
.hero-copy .lead { margin-bottom: 36px; }
.hero-sign { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: .88rem; color: var(--mauve); }
.hero-sign strong { color: var(--ink); font-weight: 600; }
.hero-sign .dot { width: 4px; height: 4px; background: var(--blush-deep); border-radius: 50%; }

.hero-media { position: relative; }
.hero-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--arch); background: var(--blush); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 2.4s var(--ease); }
.js .hero-photo img { transform: scale(1.12); }
.js .is-loaded .hero-photo img { transform: scale(1.04); }
.hero-note {
  position: absolute; left: clamp(-56px, -4vw, -24px); bottom: 40px; z-index: 3;
  background: var(--paper); padding: 22px 24px; max-width: 290px;
  box-shadow: 0 30px 60px -30px rgba(34, 26, 32, .4); border-radius: 2px;
}
.hero-note .label { margin-bottom: 8px; }
.hero-note p { margin: 0; font-family: var(--f-display); font-size: 1.2rem; line-height: 1.3; }
.hero .stitch { left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%; z-index: 1; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; margin: 12px auto 0; width: 100%; }
  .hero-note { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(36px, 5vw, 72px) 0 clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.crumbs { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mauve); margin-bottom: 36px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--oxblood); }
.page-hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 5vw, 80px); align-items: end; }
.page-hero .h1--page { margin: 22px 0 26px; }
.page-hero .lead { margin-bottom: 34px; }
.page-hero-photo { aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--arch-sm); background: var(--blush); }
.page-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-photo { max-width: 360px; aspect-ratio: 4 / 3; }
}

/* ---------- Fact strip ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.facts ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 26px 24px; border-left: 1px solid var(--line-soft); display: grid; gap: 4px; }
.facts li:first-child { border-left: 0; }
.facts strong { font-family: var(--f-display); font-size: 1.35rem; font-weight: 400; line-height: 1.2; }
.facts span { font-size: .86rem; color: var(--mauve); }
@media (max-width: 860px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 480px) { .facts li { padding: 20px 14px; } .facts strong { font-size: 1.12rem; } }

/* ---------- Questions (home) ---------- */
.questions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.question { padding: 40px 36px 8px 0; border-right: 1px solid var(--line-soft); }
.question + .question { padding-left: 36px; }
.question:last-child { border-right: 0; }
.question .qmark { font-family: var(--f-display); font-style: italic; font-size: 4.2rem; line-height: .8; color: var(--oxblood); display: block; margin-bottom: 18px; }
.question h3 { margin-bottom: 16px; }
.question p { color: var(--ink-2); }
@media (max-width: 900px) {
  .questions { grid-template-columns: 1fr; }
  .question, .question + .question { padding: 32px 0 8px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
}

/* ---------- Topic cards ---------- */
.topics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.topic {
  position: relative; display: grid; grid-template-columns: 180px 1fr; gap: 0; min-height: 240px;
  background: var(--paper); text-decoration: none; overflow: hidden; border-radius: 2px;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.topic:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -36px rgba(34, 26, 32, .45); }
.topic-img { position: relative; overflow: hidden; background: var(--blush); }
.topic-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.topic:hover .topic-img img { transform: scale(1.06); }
.topic-body { padding: 30px 30px 28px; display: flex; flex-direction: column; gap: 12px; }
.topic-body p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.topic-body .link-arrow { margin-top: auto; align-self: flex-start; color: var(--oxblood); }
@media (max-width: 960px) { .topics { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .topic { grid-template-columns: 1fr; }
  .topic-img { aspect-ratio: 16 / 9; }
}

/* ---------- Split / media ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--top { align-items: start; }
.split-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--blush); border-radius: 2px; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media--wide { aspect-ratio: 5 / 4; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split-media { aspect-ratio: 4 / 3; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 0;
  border-top: 1.4px dashed rgba(236, 223, 219, .35);
}
.step { position: relative; padding-right: 32px; }
.step-num {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1.4px solid var(--blush-deep); color: var(--blush-deep); background: var(--ink);
  display: grid; place-items: center; font-family: var(--f-mono); font-size: .8rem; margin-bottom: 28px;
}
.step h3 { margin-bottom: 12px; color: var(--porcelain); }
.step p { color: rgba(246, 244, 244, .72); font-size: .96rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps::before { left: 23px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1.4px dashed rgba(236, 223, 219, .35); }
  .step { padding: 0 0 0 76px; }
  .step-num { position: absolute; left: 0; top: 0; }
}

/* ---------- Lists (situations) ---------- */
.xlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.xlist li {
  display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line-soft); font-size: 1.02rem;
}
.xlist li::before {
  content: ""; width: 14px; height: 14px; transform: translateY(2px);
  background:
    linear-gradient(45deg, transparent 45%, var(--oxblood) 45%, var(--oxblood) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--oxblood) 45%, var(--oxblood) 55%, transparent 55%);
}
.xlist--one { grid-template-columns: 1fr; }
@media (max-width: 720px) { .xlist { grid-template-columns: 1fr; } }

/* ---------- Case file (pillars) — tabbed dossier ---------- */
.dossier { position: relative; }
.dossier-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; }
.dossier-tabs::-webkit-scrollbar { display: none; }
.dossier-tab {
  flex: none; border: 0; cursor: pointer; background: var(--blush-deep); color: var(--ink);
  padding: 14px 22px 12px; border-radius: 8px 8px 0 0;
  font-family: var(--f-mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  transition: background .25s, transform .25s var(--ease);
  transform: translateY(4px);
}
.dossier-tab:hover { transform: translateY(0); }
.dossier-tab[aria-selected="true"] { background: var(--paper); color: var(--oxblood); transform: translateY(0); }
.dossier-panel {
  background: var(--paper); padding: clamp(32px, 5vw, 64px); border-radius: 0 6px 6px 6px;
  box-shadow: 0 40px 80px -50px rgba(34, 26, 32, .5);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 56px); align-items: start;
  min-height: 260px;
}
.dossier-panel[hidden] { display: none; }
.dossier-index { font-family: var(--f-display); font-style: italic; font-size: clamp(4rem, 9vw, 7.5rem); line-height: .8; color: var(--mauve); }
.dossier-panel h3 { margin-bottom: 16px; }
.dossier-panel .q { font-family: var(--f-display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.3; margin-bottom: 16px; }
.dossier-panel p { color: var(--ink-2); max-width: 58ch; }
.dossier-foot { margin-top: 28px; font-family: var(--f-display); font-style: italic; font-size: 1.3rem; }
@media (max-width: 640px) { .dossier-panel { grid-template-columns: 1fr; } .dossier-index { font-size: 3.4rem; } }
.no-js .dossier-panel[hidden] { display: grid; margin-top: 12px; }

/* ---------- Document checklist (interactive) ---------- */
.checklist-box { background: var(--paper); padding: clamp(28px, 4vw, 48px); border-radius: 2px; box-shadow: 0 40px 80px -60px rgba(34, 26, 32, .6); }
.checklist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0 28px; }
.check {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
  font-size: .95rem; transition: border-color .2s, background .2s; user-select: none;
}
.check:hover { border-color: var(--mauve); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  flex: none; width: 20px; height: 20px; border: 1.4px solid var(--mauve); border-radius: 3px;
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.check .box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s var(--ease); }
.check input:checked + .box { background: var(--oxblood); border-color: var(--oxblood); }
.check input:checked + .box svg { opacity: 1; transform: none; }
.check:has(input:checked) { border-color: var(--oxblood); background: rgba(122, 38, 56, .04); }
.check input:focus-visible + .box { outline: 2px solid var(--oxblood); outline-offset: 2px; }
.checklist-status { font-size: .9rem; color: var(--mauve); margin: 16px 0 0; }
@media (max-width: 860px) { .checklist { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .checklist { grid-template-columns: 1fr; } }

/* ---------- Surgery index (hub) ---------- */
.surg-list { border-top: 1px solid var(--line); }
.surg-row {
  display: grid; grid-template-columns: 1.1fr 1.4fr auto; gap: 32px; align-items: center;
  padding: 32px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: padding .4s var(--ease), background .4s;
}
.surg-row:hover { padding-left: 16px; padding-right: 16px; background: var(--paper); }
.surg-row .h3 { transition: color .3s; }
.surg-row:hover .h3 { color: var(--oxblood); }
.surg-row p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.surg-row .tags { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mauve); margin-top: 8px; display: block; }
.surg-row .arrow { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s; }
.surg-row:hover .arrow { background: var(--oxblood); color: var(--paper); border-color: var(--oxblood); }
@media (max-width: 800px) {
  .surg-row { grid-template-columns: 1fr auto; gap: 16px; }
  .surg-row p { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Two-block (subpages) ---------- */
.block { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 80px); padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; padding-top: 0; }
.block-head .label { margin-bottom: 18px; }
.block-head .h2 { margin-bottom: 18px; }
.block-note { margin-top: 28px; padding: 22px 24px; background: var(--blush); border-left: 2px solid var(--oxblood); color: var(--ink-2); font-size: .98rem; }
.block-note p:last-child { margin: 0; }
@media (max-width: 860px) { .block { grid-template-columns: 1fr; } }

/* ---------- Closing (shared across surgery pages) ---------- */
.closing { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
.closing-qs { counter-reset: q; border-top: 1px solid rgba(236, 223, 219, .2); }
.closing-qs li {
  counter-increment: q; display: grid; grid-template-columns: 48px 1fr; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid rgba(236, 223, 219, .2);
  font-family: var(--f-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.3;
}
.closing-qs li::before { content: counter(q, upper-roman) "."; font-family: var(--f-mono); font-size: .8rem; color: var(--blush-deep); }
@media (max-width: 860px) { .closing { grid-template-columns: 1fr; } }

/* ---------- Chain / timeline ---------- */
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; margin-top: 32px; }
.chain li { display: flex; align-items: center; font-family: var(--f-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.chain li span { padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.chain li + li::before { content: ""; width: 28px; height: 0; border-top: 1.4px dashed var(--oxblood); margin: 0 4px; }
.sec--dark .chain li span { background: transparent; border-color: rgba(236, 223, 219, .3); color: var(--porcelain); }

/* ---------- Area grid ---------- */
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.area { background: var(--porcelain); padding: 36px 32px 32px; display: flex; flex-direction: column; gap: 12px; }
.area .tags { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--oxblood); }
.area p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.area-items { display: grid; gap: 0; margin-top: 8px; }
.area-items li { padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: .93rem; }
.area-items li strong { display: block; font-weight: 600; }
.area-items li span { color: var(--ink-2); }
.sec--paper .area { background: var(--paper); }
@media (max-width: 960px) { .areas { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .areas { grid-template-columns: 1fr; } }

/* ---------- About / Dr. ---------- */
.about-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--blush); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px;
  background: linear-gradient(transparent, rgba(34, 26, 32, .8)); color: var(--porcelain);
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
}
.about-copy .h2 { margin: 18px 0 24px; }
.about-copy p { color: var(--ink-2); }
.signature { font-family: var(--f-display); font-style: italic; font-size: 2rem; margin-top: 24px; color: var(--oxblood); }

/* ---------- Video / Instagram ---------- */
.reels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.reel {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--ink-2); border-radius: 4px;
  text-decoration: none; color: var(--porcelain);
}
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: transform 1s var(--ease), opacity .4s; }
.reel:hover img { transform: scale(1.05); opacity: .6; }
.reel .play { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 253, 253, .9); display: grid; place-items: center; color: var(--ink); }
.reel .play svg { width: 14px; height: 14px; margin-left: 2px; }
.reel p { position: absolute; left: 16px; right: 16px; bottom: 16px; margin: 0; font-family: var(--f-display); font-size: 1.15rem; line-height: 1.25; }
.reel::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(34, 26, 32, .85)); }
.reel p, .reel .play { z-index: 2; }
@media (max-width: 900px) {
  .reels { grid-template-columns: repeat(4, 64%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
  .reel { scroll-snap-align: start; }
}
@media (min-width: 560px) and (max-width: 900px) { .reels { grid-template-columns: repeat(4, 40%); } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font-family: var(--f-display); font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; position: relative; transition: background .3s, border-color .3s; }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.4px; background: var(--ink); transform: translate(-50%, -50%); transition: transform .3s var(--ease), background .3s; }
.faq summary .pm::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] summary .pm { background: var(--oxblood); border-color: var(--oxblood); }
.faq details[open] summary .pm::before, .faq details[open] summary .pm::after { background: var(--paper); }
.faq details[open] summary .pm::after { transform: translate(-50%, -50%) rotate(0); }
.faq .answer { padding: 0 0 28px; max-width: 72ch; color: var(--ink-2); }

/* ---------- People (associados) ---------- */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.person { background: var(--paper); padding: 28px; display: grid; grid-template-columns: 136px 1fr; align-content: start; gap: 8px 28px; border-radius: 2px; }
.person > :not(.person-mono) { grid-column: 2; }
.person-mono {
  grid-column: 1; grid-row: 1 / span 3; width: 136px; height: 170px; border-radius: 2px; background: var(--blush);
  display: grid; place-items: center; overflow: hidden;
}
.person-mono img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.person .role { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--oxblood); }
.person p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.person--lead { grid-column: span 2; display: grid; grid-template-columns: 280px 1fr; gap: 48px; padding: 0; overflow: hidden; }
.person.person--lead > * { grid-column: auto; grid-row: auto; }
.person--lead .person-photo { aspect-ratio: 4 / 5; background: var(--blush); }
.person--lead .person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person--lead .person-body { padding: 40px 40px 40px 0; display: flex; flex-direction: column; gap: 14px; justify-content: center; }

@media (max-width: 640px) {
  .people { grid-template-columns: 1fr; }
  .person { grid-template-columns: 96px 1fr; gap: 6px 18px; padding: 22px; }
  .person-mono { width: 96px; height: 120px; }
  .person--lead { grid-column: auto; grid-template-columns: 1fr; gap: 0; }
  .person--lead .person-body { padding: 28px; }
}

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: end; }
.cta-band .h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.cta-band .cta-side { display: grid; gap: 18px; justify-items: start; }
.cta-band .cta-side p { margin: 0; color: rgba(246, 244, 244, .75); }
.cta-band .stitch { left: 0; top: 0; width: 100%; height: 100%; z-index: 1; }
.cta-band .stitch path.thread, .cta-band .stitch path.marks { stroke: var(--blush-deep); }
@media (max-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr; } }

/* ---------- Sibling nav ---------- */
.siblings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sibling { padding: 26px 26px 24px; background: var(--paper); text-decoration: none; display: grid; gap: 10px; border-radius: 2px; transition: transform .4s var(--ease), box-shadow .4s; }
.sibling:hover { transform: translateY(-3px); box-shadow: 0 24px 50px -34px rgba(34, 26, 32, .5); }
.sibling .label { font-size: .64rem; }
.sibling .h3 { font-size: 1.35rem; }
@media (max-width: 860px) { .siblings { grid-template-columns: 1fr; } }

/* ---------- Disclaimer ---------- */
.disclaimer { font-size: .82rem; color: var(--mauve); max-width: 80ch; line-height: 1.6; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(246, 244, 244, .78); padding: clamp(64px, 8vw, 110px) 0 32px; font-size: .94rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(236, 223, 219, .14); }
.footer-brand .brand-mark { color: var(--porcelain); font-size: 2.6rem; }
.footer-brand .brand-mark i { color: var(--blush-deep); }
.footer-brand p { margin: 18px 0 0; max-width: 34ch; }
.site-footer .footer-h { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blush-deep); margin-bottom: 18px; font-weight: 400; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: .8rem; color: rgba(246, 244, 244, .5); }
.footer-bottom .disclaimer { color: rgba(246, 244, 244, .5); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 22px 0 18px; border-radius: 999px;
  background: var(--oxblood); color: var(--paper); text-decoration: none; font-weight: 600; font-size: .92rem;
  box-shadow: 0 20px 40px -16px rgba(93, 27, 42, .7);
  transform: translateY(120%); opacity: 0; transition: transform .5s var(--ease), opacity .5s, background .3s;
}
.wa-float.is-visible { transform: none; opacity: 1; }
.wa-float:hover { background: var(--oxblood-dk); }
.wa-float svg { width: 24px; height: 24px; }
/* Celular: barra fixa de WhatsApp, visível desde a primeira tela */
@media (max-width: 1140px) {
  .wa-float { left: 12px; right: 12px; bottom: 12px; height: 54px; justify-content: center; transform: none; opacity: 1; }
  body { padding-bottom: 78px; }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; }
.js .reveal-d2 { transition-delay: .16s; }
.js .reveal-d3 { transition-delay: .24s; }

/* ---------- Legal text ---------- */
.prose { max-width: 72ch; }
.prose h2 { font-family: var(--f-display); font-size: 1.7rem; margin: 48px 0 14px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .draw path.thread { stroke-dashoffset: 0; }
  .js .draw path.marks { opacity: .55; }
}

/* ---------- Pill index (in-page procedure links) ---------- */
.pill-index { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill-index a {
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  font-size: .88rem; font-weight: 500; background: var(--porcelain); transition: border-color .2s, background .2s, color .2s;
}
.pill-index a:hover { border-color: var(--oxblood); color: var(--oxblood); }

/* ---------- Reel modal (Instagram player) ---------- */
.reel-modal {
  padding: 0; border: 0; background: transparent; overflow: visible;
  width: min(400px, 92vw); max-height: 92vh;
}
.reel-modal::backdrop { background: rgba(22, 25, 29, .82); backdrop-filter: blur(4px); }
.reel-frame { background: var(--paper); border-radius: 8px; overflow: hidden; height: min(740px, 86vh); }
.reel-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.reel-close {
  position: absolute; top: -48px; right: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.reel-close:hover { background: rgba(255, 255, 255, .12); }

/* Texto secundário legível sobre fundo escuro */
.sec--dark .muted, .site-footer .muted { color: rgba(243, 243, 241, .66); }

/* <picture> nao cria caixa propria: as regras de img dos containers continuam valendo */
picture { display: contents; }

/* ---------- Trust line (junto aos botões de contato) ---------- */
.trust { margin: 16px 0 0; font-size: .86rem; color: var(--mauve); letter-spacing: .01em; }
.sec--dark .trust { color: rgba(243, 243, 241, .66); }

/* Linha de sutura das paginas internas ocupa toda a area do topo (antes encolhia no celular) */
.page-hero .stitch { left: 0; top: 0; width: 100%; height: 100%; z-index: 0; }
.page-hero > .wrap { position: relative; z-index: 1; }

/* ---------- Cookie notice (LGPD) ---------- */
.cookie-bar {
  position: fixed; left: 20px; bottom: 20px; z-index: 70; max-width: 420px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 20px; box-shadow: 0 24px 50px -24px rgba(22, 25, 29, .45);
  display: grid; gap: 14px; font-size: .88rem; line-height: 1.5;
}
.cookie-bar p { margin: 0; color: var(--ink-2); }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 1140px) {
  .cookie-bar { left: 12px; right: 12px; bottom: 78px; max-width: none; }
}

/* Foto dos associados preenche o quadro inteiro (sem faixa cinza no topo) */
.person-mono { position: relative; }
.person-mono img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }


/* ---------- Guias gratuitos (PDF) ---------- */
.guias { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.guia { display: grid; grid-template-columns: 200px 1fr; gap: 32px; background: var(--porcelain); padding: 32px; border-radius: 4px; align-items: start; }
.guia-capa { display: block; transform: rotate(-2deg); transition: transform .5s var(--ease); }
.guia-capa:hover { transform: rotate(0) translateY(-4px); }
.guia-capa img { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 30px 50px -26px rgba(34, 26, 32, .5); }
.guia-body { display: grid; gap: 12px; justify-items: start; }
.guia-body p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.guia-itens { counter-reset: gi; display: grid; gap: 6px; margin: 4px 0 10px; }
.guia-itens li { counter-increment: gi; font-size: .9rem; display: grid; grid-template-columns: 26px 1fr; }
.guia-itens li::before { content: counter(gi, decimal-leading-zero); font-family: var(--f-mono); font-size: .72rem; color: var(--oxblood); padding-top: 3px; }
@media (max-width: 1100px) { .guias { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .guia { grid-template-columns: 1fr; padding: 24px; } .guia-capa { max-width: 200px; } }

/* ---------- Revisão de alinhamentos (2026-09-29) ---------- */
/* 1. Faixa de números: primeiro item alinhado com a margem do conteúdo */
@media (min-width: 861px) { .facts li:first-child { padding-left: 0; } }
/* 2. Checklist dentro de colunas: 2 colunas para os textos não quebrarem em 3 linhas */
.split .checklist { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .split .checklist { grid-template-columns: 1fr; } }
/* 3. "Veja também": link sempre no rodapé do cartão */
.sibling { grid-template-rows: auto 1fr auto; }
.sibling .link-arrow { align-self: end; }
/* 4. Selos lado a lado em coluna estreita: sem traço de ligação, só espaço, para não sobrar traço no início da linha */
.split .chain { gap: 10px 8px; }
.split .chain li + li::before { display: none; }
/* 5. Atalhos dos procedimentos cabem numa linha */
.sec-head:has(.pill-index) { max-width: none; }
/* 6. Guias: botões de download na mesma altura */
.guia { align-items: stretch; }
.guia-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.guia-capa { align-self: start; }
.guia-body .btn { margin-top: auto; }

/* ---------- Artigos (blog) ---------- */
.byline { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mauve); }
.artigo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(40px, 6vw, 96px); align-items: start; }
.artigo { max-width: 68ch; font-size: 1.06rem; }
.artigo > .lead { max-width: none; margin-bottom: 1.2em; }
.artigo h2 { margin-top: 56px; }
.artigo a { color: var(--oxblood); text-underline-offset: 3px; }
.artigo ul { list-style: disc; padding-left: 1.2em; display: grid; gap: 6px; }
.artigo strong { color: var(--ink); font-weight: 600; }
.artigo .table-wrap { overflow-x: auto; margin: 8px 0 22px; }
.artigo table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.artigo th, .artigo td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.artigo th { font-family: var(--f-mono); font-weight: 500; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mauve); border-bottom-color: var(--line); }
.artigo td:first-child { color: var(--ink); font-weight: 500; }
.artigo-nota { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: .88rem; }
.artigo-aside { position: sticky; top: 112px; display: grid; gap: 16px; }
.artigo-card { background: var(--blush); padding: 28px 26px; display: grid; gap: 14px; justify-items: start; border-radius: 2px; }
.artigo-card .h3 { font-size: 1.45rem; margin: 0; }
.artigo-card p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.artigo-card .btn { width: 100%; justify-content: center; }
.artigo-card .trust { margin: 0; }
.artigo-guia { display: grid; gap: 8px; padding: 20px 26px; border: 1px solid var(--line); text-decoration: none; border-radius: 2px; font-size: .95rem; transition: border-color .3s; }
.artigo-guia:hover { border-color: var(--oxblood); }
.artigos-lista { grid-template-columns: repeat(2, 1fr); }
.artigos-lista .sibling p, .siblings .sibling p { margin: 0; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 960px) {
  .artigo-grid { grid-template-columns: 1fr; }
  .artigo-aside { position: static; }
}
@media (max-width: 860px) { .artigos-lista { grid-template-columns: 1fr; } }

.sibling:has(> p) { grid-template-rows: auto auto 1fr auto; }
.artigo-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.sec.artigo-sec { padding-bottom: calc(var(--sec) * .35); }
@media (max-width: 960px) { .artigo-grid { grid-template-columns: minmax(0, 1fr); } }
.artigo-card .btn { white-space: normal; text-align: center; }
