/* Page-level structure from b-marquise-1955: container, centered-split header,
 * sheet menu, inner-page hero, section rhythm, RG band, footer. */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── header: centered split ───────────────────────────────────────────── */
.hd-slot--solid { height: 92px; }
.hd-slot--overlay { height: 0; }

.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: var(--z-header);
  color: var(--color-text);
}
.site-header--overlay { color: #fff; }
.site-header--solid { position: absolute; border-bottom: 1px solid var(--color-border); }
.site-header__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 92px; gap: var(--space-24);
  transition: height var(--dur-base) var(--ease);
}

/* docked after scroll (app.js adds .is-stuck) */
.site-header.is-stuck {
  position: fixed; color: var(--color-text);
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--color-border);
  animation: hd-drop var(--dur-slow) var(--ease) both;
}
.site-header.is-stuck .site-header__inner { height: 68px; }
.site-header.is-stuck .logo__word { font-size: 24px; }
@keyframes hd-drop { from { transform: translateY(-100%); } to { transform: none; } }

.hd-nav { display: flex; gap: 26px; font-size: var(--fs-ui); font-weight: 500; align-items: center; }
.hd-nav--right { justify-content: flex-end; }
.hd-nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 0; text-decoration: none; white-space: nowrap; cursor: pointer;
}
/* signature motion: hairline drawn from the left */
.hd-nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.hd-nav__link:hover::after, .hd-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.hd-nav__more .icon { width: 14px; height: 14px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #3FB67F; box-shadow: 0 0 0 0 rgba(63,182,127,.6); animation: live-pulse 1.8s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(63,182,127,0); } 100% { box-shadow: 0 0 0 0 rgba(63,182,127,0); } }

.logo {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center; line-height: 1; text-decoration: none; color: inherit;
}
.logo__word { font: 400 30px/1 var(--font-display); letter-spacing: .01em; white-space: nowrap; transition: font-size var(--dur-base) var(--ease); }
.logo__word i { font-style: italic; }
.logo__sub {
  font: 600 10px/1 var(--font-body); letter-spacing: .32em; text-transform: uppercase; opacity: .85;
  display: flex; align-items: center; gap: 8px;
}
.logo__sub::before, .logo__sub::after { content: ""; width: 18px; height: 1px; background: currentColor; }
.logo--lg .logo__word { font-size: 40px; }
.logo--lg { align-items: flex-start; }

.menu-btn {
  display: none; justify-self: end; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid currentColor; background: none; color: inherit; place-items: center; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.site-header--overlay:not(.is-stuck) .menu-btn { border-color: rgba(255,255,255,.55); }
.menu-btn:hover { background: var(--color-text); color: var(--color-bg); }
.menu-btn .icon { width: 20px; height: 20px; }

/* ── sheet menu (drops from the top — mockup's .sheet) ─────────────────── */
.overlay--sheet { place-items: stretch; padding: 0; background: rgba(20,22,24,.35); }
.overlay--sheet .sheet {
  width: 100%; max-height: 100vh; height: auto; align-self: start;
  border-radius: 0 0 0 0; border-bottom-left-radius: var(--curve-xl);
  background: var(--color-bg); color: var(--color-text);
  padding: var(--space-24) var(--container-pad) var(--space-48);
  transform: translateY(-100%); transition: transform var(--dur-slow) var(--ease);
}
.overlay--sheet.is-open .sheet { transform: none; }
.sheet__top { display: flex; justify-content: space-between; align-items: center; max-width: var(--container); margin: 0 auto; }
.sheet__top .logo { align-items: flex-start; }
.sheet__close {
  width: 44px; height: 44px; border: 1px solid var(--color-border); border-radius: 50%;
  background: none; display: grid; place-items: center; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease);
}
.sheet__close:hover { border-color: var(--color-text); }
.sheet__close .icon { width: 20px; height: 20px; }
.sheet__grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-48);
  max-width: var(--container); margin: var(--space-32) auto 0;
}
.sheet__grid .cap { margin: var(--space-24) 0 var(--space-8); }
.sheet__grid nav > .cap:first-child { margin-top: 0; }
.sheet__list a {
  display: block; font: 400 38px/1.15 var(--font-display); padding: 6px 0;
  border-bottom: 1px solid var(--color-border); text-decoration: none;
  transition: color var(--dur-fast) var(--ease), padding var(--dur-base) var(--ease);
}
.sheet__list--sm a { font-size: 26px; }
.sheet__list a:hover, .sheet__list a[aria-current="page"] { color: var(--color-brand); padding-left: 10px; }
.sheet__foot { max-width: var(--container); margin: var(--space-32) auto 0; font-size: var(--fs-small); color: var(--color-text-2); display: flex; gap: 10px; align-items: center; }

/* ── inner-page hero (new in the mockup's language) ────────────────────── */
.page-hero {
  background: var(--color-surface);
  border-bottom-right-radius: var(--curve-xl);
  padding: 44px 0 var(--space-72);
}
.page-hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-48); align-items: end; }
.page-hero__title { font: 400 clamp(44px, 5.6vw, 84px)/.98 var(--font-display); letter-spacing: -.02em; margin-top: 18px; max-width: 16ch; }
.page-hero__title i { color: var(--color-brand); }
.page-hero__lead { margin-top: 20px; max-width: 56ch; font-size: var(--fs-lead); color: var(--color-text-2); }
.page-hero__aside { max-width: 380px; }

.crumbs { margin-bottom: var(--space-24); font-size: var(--fs-small); color: var(--color-muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--color-faint); }
.crumbs a { text-decoration: none; position: relative; }
.crumbs a:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }

/* ── section rhythm ────────────────────────────────────────────────────── */
.sec { padding-block: var(--section-pad); }
.sec--tight { padding-block: var(--space-72); }
.sec--surface { background: var(--color-surface); }
.sec--band { background: var(--color-surface); border-top-left-radius: var(--curve-xl); }
.sec--ink { background: var(--color-text); color: var(--color-on-dark); }
.sec--ink .cap { color: color-mix(in srgb, var(--color-on-dark) 75%, transparent); }
.sec--ink .cap::before { background: var(--color-dusk); }
.sec + .sec--band, .sec--band + .sec { margin-top: 0; }

/* zigzag (mockup .z) */
.z { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-72); align-items: start; }
.z--rev { grid-template-columns: 7fr 5fr; }
.z--rev > .z__copy { order: 2; }
.z__copy { position: sticky; top: 96px; }
.z__copy > p { color: var(--color-text-2); margin-top: 18px; max-width: 46ch; }

/* reading column for long text pages */
.prose-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-72); align-items: start; }
.toc { position: sticky; top: 96px; font-size: var(--fs-small); }
.toc .cap { margin-bottom: var(--space-12); }
.toc ol { display: grid; gap: 2px; border-left: 1px solid var(--color-border); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--color-text-2); transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.toc a:hover, .toc a.is-active { color: var(--color-text); border-left-color: var(--color-brand); }

/* ── RG band (mockup .rg) ──────────────────────────────────────────────── */
.rg-band { background: var(--color-text); color: var(--color-on-dark); }
.rg-band__inner { display: flex; gap: 28px; align-items: center; padding-block: 26px; flex-wrap: wrap; }
.rg-band__mark { font: 400 44px/1 var(--font-display); color: var(--color-dusk); }
.rg-band p { flex: 1; min-width: 260px; font-size: var(--fs-ui); }

/* ── footer ────────────────────────────────────────────────────────────── */
.site-footer { background: var(--color-bg); padding: var(--space-72) 0 var(--space-32); }
.site-footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-32); flex-wrap: wrap; padding-bottom: var(--space-48); border-bottom: 1px solid var(--color-text); }
.site-footer__claim { max-width: 40ch; color: var(--color-text-2); }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-32); padding: var(--space-48) 0; }
.site-footer__col .cap { margin-bottom: var(--space-16); }
.site-footer__col ul { display: grid; gap: 10px; }
.site-footer__data {
  display: grid; gap: var(--space-24) var(--space-32);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  padding: var(--space-32) 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-small); color: var(--color-text-2);
}
.site-footer__data .cap { margin-bottom: var(--space-8); }
.site-footer__data address { font-style: normal; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: var(--space-16); flex-wrap: wrap; padding-top: var(--space-24); font-size: var(--fs-small); color: var(--color-muted); }
.site-footer__bottom p { display: flex; align-items: center; gap: 10px; }

/* ── back to top (kept from the template, restyled) ────────────────────── */
.to-top { display: none; }

/* ── tablet ────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hd-nav { display: none; }
  .menu-btn { display: grid; grid-column: 3; }
  .logo { grid-column: 2; }
  .site-header__inner { grid-template-columns: 44px 1fr 44px; }
  .z, .z--rev { grid-template-columns: 1fr; gap: var(--space-48); }
  .z--rev > .z__copy { order: 0; }
  .z__copy { position: static; }
  .prose-layout { grid-template-columns: 1fr; gap: var(--space-32); }
  .toc { position: static; }
  .page-hero__inner { grid-template-columns: 1fr; }
  .page-hero__aside { max-width: none; }
  .sheet__grid { grid-template-columns: 1fr 1fr; gap: var(--space-32); }
}

/* ── mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hd-slot--solid { height: 76px; }
  .site-header__inner { height: 76px; gap: var(--space-8); }
  .logo__word { font-size: 23px; }
  .logo__sub { font-size: 9px; letter-spacing: .26em; }
  .logo--lg .logo__word { font-size: 32px; }
  .sheet__grid { grid-template-columns: 1fr; gap: 0; margin-top: var(--space-16); }
  .sheet__grid nav + nav { margin-top: var(--space-24); }
  .sheet__list a { font-size: 30px; }
  .sheet__list--sm a { font-size: 22px; }
  .overlay--sheet .sheet { max-height: 100vh; overflow-y: auto; padding-bottom: var(--space-32); }
  .page-hero { padding: 28px 0 var(--space-48); }
  .page-hero__title { font-size: 44px; }
  .page-hero__lead { font-size: 16px; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .site-footer__cols > :last-child { grid-column: 1 / -1; }
  .rg-band__inner { gap: 16px; }
}

/* "Mais" is a <button>: strip the UA box so it reads as a nav link */
.hd-nav__more { background: none; border: 0; color: inherit; font: inherit; }
.logo { gap: 6px; }
.logo__word { line-height: 1.05; }
.z > * { min-width: 0; }
.site-footer__data { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1080px) { .site-footer__data { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .site-footer__data { grid-template-columns: 1fr 1fr; }
  .site-footer__data > :last-child { grid-column: 1 / -1; }
}
/* long e-mail addresses must wrap instead of pushing the page sideways */
.site-footer__data, .note, .contact-card, .prose { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .site-footer__data { grid-template-columns: 1fr; }
  .site-footer__data > :last-child { grid-column: auto; }
}
@media (max-width: 389px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

/* Over a photo the header carries its own dark band (the top of the hero scrim):
   the text sits on a real background, and the hero gradient continues below it. */
.hd-slot--overlay { position: absolute; top: 0; left: 0; right: 0; height: 92px; background-color: rgba(20,22,24,.66); z-index: var(--z-header); }
@media (max-width: 640px) { .hd-slot--overlay { height: 76px; background-color: rgba(20,22,24,.7); } }
.menu-btn { grid-row: 1; }

/* ── logo image (logo__v1): ink on light, light on the photo header ── */
.logo__img, .logo__img img { display: block; height: 64px; width: auto; }
.logo__img--light { display: none; }
.site-header--overlay:not(.is-stuck) .logo__img--ink { display: none; }
.site-header--overlay:not(.is-stuck) .logo__img--light { display: block; }
.site-header.is-stuck .logo__img, .site-header.is-stuck .logo__img img { height: 48px; }
.sheet__top .logo__img, .sheet__top .logo__img img { height: 48px; }
.logo--lg .logo__img, .logo--lg .logo__img img { height: 84px; }
@media (max-width: 640px) {
  .logo__img, .logo__img img { height: 44px; }
  .logo--lg .logo__img, .logo--lg .logo__img img { height: 64px; }
}
@media (max-width: 389px) { .logo__img, .logo__img img { height: 38px; } }
