/* Mendonça Visuals — broadsheet editorial on warm parchment */

:root {
  /* Colors */
  --color-parchment: #e2dedb;
  --color-bone-cream: #cdc6be;
  --color-ink-black: #1d1d1b;
  --color-charcoal: #69645f;
  --color-pure-black: #000000;
  --color-ember-orange: #c03f13;

  /* Font roles (Google Fonts substitutes for the reference faces) */
  --font-body: 'Source Serif 4', 'Tiempos Text', Georgia, serif;        /* Editorial New role */
  --font-display: 'Bodoni Moda', 'Didot', 'Bodoni 72', serif;           /* Canopee role */
  --font-display-mid: 'Playfair Display', Georgia, serif;               /* Domaine Display role */
  --font-gothic: 'UnifrakturMaguntia', 'Old English Text MT', serif;    /* Germgoth role */

  /* Type scale */
  --text-caption: 14px;
  --text-body-sm: 16px;
  --text-body: 19px;
  --text-subheading: 22px;
  --text-heading-sm: 32px;
  --text-heading: clamp(44px, 5.2vw, 72px);
  --text-display-md: clamp(52px, 7vw, 109px);
  --text-banner: clamp(64px, 19vw, 280px);
  --text-gothic: clamp(72px, 11vw, 158px);

  /* Spacing */
  --spacing-4: 4px;
  --spacing-7: 7px;
  --spacing-10: 10px;
  --spacing-14: 14px;
  --spacing-22: 22px;
  --spacing-28: 28px;
  --spacing-36: 36px;
  --spacing-43: 43px;
  --spacing-65: 65px;
  --spacing-115: 115px;

  /* Layout */
  --page-max-width: 1440px;
  --gutter: clamp(16px, 3vw, 36px);
  --section-gap: 43px;
  --card-padding: 24px;
  --element-gap: 14px;

  /* Shape & depth */
  --radius-tags: 2.88px;
  --radius-cards: 11.52px;
  --shadow-card: rgba(29, 29, 27, 0.2) -4px 4px 6px 0px;
  --shadow-portrait: rgba(29, 29, 27, 0.2) -5px 3px 6px 0px;

  --duration-fast: 150ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-parchment);
  color: var(--color-ink-black);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.27;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--color-ink-black); outline-offset: 3px; }

/* ---------- Masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: var(--spacing-14) var(--gutter);
  background: var(--color-parchment);
  border-bottom: 1px solid var(--color-ink-black);
  font-size: var(--text-body);
}
.masthead__brand { color: inherit; text-decoration: none; text-align: center; }
.masthead__menu {
  justify-self: end;
  display: grid;
  gap: 5px;
  width: 44px;
  height: 44px;
  place-content: center;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.masthead__menu span { display: block; width: 26px; height: 1.5px; background: var(--color-ink-black); transition: transform var(--duration-fast) var(--ease-out); }
.masthead__menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.masthead__menu[aria-expanded="true"] span:nth-child(2) { transform: scaleX(0); }
.masthead__menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing-10);
  padding: var(--spacing-115) var(--gutter) var(--spacing-43);
  background: var(--color-ink-black);
}
.menu[hidden] { display: none; }
.menu a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 12vw, 160px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--color-parchment);
  text-decoration: none;
}
.menu a:hover { color: var(--color-bone-cream); }
body.menu-open .masthead { background: var(--color-ink-black); color: var(--color-parchment); border-color: var(--color-charcoal); }
body.menu-open .masthead__menu span { background: var(--color-parchment); }

/* ---------- Page & shared type ---------- */
.page {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter) 0;
  display: grid;
  gap: var(--spacing-65);
}

.heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-heading);
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-wrap: balance;
}
.subheading {
  font-family: var(--font-display-mid);
  font-weight: 500;
  font-size: var(--text-heading-sm);
  line-height: 1;
  letter-spacing: -0.03em;
  padding-bottom: var(--spacing-10);
  border-bottom: 1px solid var(--color-ink-black);
  margin-bottom: var(--spacing-28);
}
.display-md {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-display-md);
  line-height: 0.8;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}
.blackletter {
  font-family: var(--font-gothic);
  font-weight: 400;
  font-size: var(--text-gothic);
  line-height: 1;
  letter-spacing: -0.004em;
  text-align: center;
  margin-bottom: var(--spacing-22);
}

.text-link {
  color: var(--color-ink-black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--duration-fast);
}
.text-link:hover { color: var(--color-pure-black); text-decoration-thickness: 2px; }

/* ---------- Photo slot (real image or art-directed placeholder) ---------- */
.photo {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 5);
  overflow: hidden;
  background: var(--color-bone-cream);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-empty {
  display: grid;
  place-items: center;
  padding: var(--spacing-22);
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(29, 29, 27, 0.06) 11px 12px),
    var(--color-bone-cream);
}
.photo.is-empty::after {
  content: attr(data-label);
  max-width: 22ch;
  font-size: var(--text-caption);
  line-height: 1.18;
  color: var(--color-charcoal);
  text-align: center;
}

/* ---------- Featured strip: image · type · image ---------- */
.featured {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: var(--spacing-28);
  align-items: center;
}
.featured__title { display: grid; gap: var(--spacing-22); justify-items: center; text-align: center; }
.featured__title .heading { font-size: clamp(52px, 7.4vw, 118px); line-height: 0.78; }
.featured__sub { max-width: 30ch; font-size: var(--text-subheading); line-height: 1.18; }

/* ---------- Display banner ---------- */
.banner {
  margin: 0 calc(-1 * var(--gutter));
  padding: clamp(18px, 2.4vw, 36px) var(--gutter) clamp(6px, 1vw, 14px);
  background: var(--color-ink-black);
  color: var(--color-parchment);
  overflow: hidden;
  text-align: center;
}
.banner__word {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  /* each word sets --fit so it spans the full width without overflowing */
  font-size: min(var(--fit, 18vw), var(--fit-max, 260px));
  line-height: 0.74;
  padding-bottom: 0.16em; /* room for the Ç cedilla */
  letter-spacing: -0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Bio with drop cap ---------- */
.bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-43);
  align-items: start;
}
.bio__text { display: grid; gap: var(--element-gap); max-width: 58ch; }
.dropcap {
  float: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 108px;
  line-height: 0.74;
  letter-spacing: -0.04em;
  margin: 6px var(--spacing-10) 0 0;
}
.bio__headline { font-size: clamp(40px, 4.8vw, 72px); }

/* ---------- Works ---------- */
.works { display: grid; gap: var(--spacing-43); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--spacing-28); }

.card {
  display: grid;
  gap: var(--spacing-10);
  align-content: start;
  padding: var(--card-padding);
  background: var(--color-bone-cream);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-fast) var(--ease-out);
}
.card:hover { transform: translateY(-3px); }
.card .photo { margin-bottom: var(--spacing-7); background: var(--color-parchment); }
.card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-10);
  font-weight: 300;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.card__desc { font-size: var(--text-body-sm); line-height: 1.27; }
.card__meta { font-size: var(--text-caption); color: var(--color-charcoal); }

.badge {
  display: inline-block;
  padding: 2px 6px 3px;
  border-radius: var(--radius-tags);
  background: var(--color-ember-orange);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Portrait block ---------- */
.portrait {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-43);
  align-items: end;
}
.portrait .photo { box-shadow: var(--shadow-portrait); }
.portrait__placard { display: grid; gap: var(--spacing-22); padding-bottom: var(--spacing-22); }
.portrait__note { max-width: 32ch; font-size: var(--text-subheading); line-height: 1.18; }

/* ---------- Contact + stamp ---------- */
.contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--spacing-43);
  align-items: center;
  padding-bottom: var(--spacing-65);
}
.contact > div:first-child { display: grid; gap: var(--spacing-22); max-width: 52ch; }
.contact__links { font-size: var(--text-subheading); line-height: 1.6; }

.stamp {
  justify-self: center;
  width: min(300px, 100%);
  padding: var(--spacing-22);
  background: var(--color-parchment);
  border-radius: var(--radius-cards);
  /* perforated edge */
  outline: 2px dashed var(--color-ink-black);
  outline-offset: -10px;
  border: 1px solid var(--color-ink-black);
  transform: rotate(-3deg);
  display: grid;
  gap: var(--spacing-10);
  justify-items: center;
}
.stamp__sun { width: 96px; height: 96px; color: var(--color-ember-orange); margin-top: var(--spacing-10); }
.stamp__sign {
  font-family: var(--font-display-mid);
  font-style: italic;
  font-size: 30px;
  border-bottom: 1px solid var(--color-ink-black);
  padding: 0 var(--spacing-14) var(--spacing-4);
}
.stamp__rows { width: 100%; padding: 0 var(--spacing-10) var(--spacing-10); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.stamp__rows div { display: flex; justify-content: space-between; gap: var(--spacing-10); padding: var(--spacing-4) 0; border-top: 1px solid rgba(29, 29, 27, 0.35); }
.stamp__rows dt { color: var(--color-charcoal); }

/* ---------- WhatsApp (primary action: ink fill, print-sharp corners) ---------- */
.button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-10);
  padding: var(--spacing-14) var(--spacing-22);
  background: var(--color-ink-black);
  color: var(--color-parchment);
  border-radius: var(--radius-buttons, 2.88px);
  font-size: var(--text-body);
  text-decoration: none;
  transition: background var(--duration-fast), transform var(--duration-fast) var(--ease-out);
}
.button:hover { background: var(--color-pure-black); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.icon-whatsapp { width: 22px; height: 22px; flex: none; }

.whatsapp-float {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 8;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--color-ink-black);
  color: var(--color-parchment);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-card);
  transition: background var(--duration-fast), transform var(--duration-fast) var(--ease-out);
}
.whatsapp-float:hover { background: var(--color-pure-black); transform: translateY(-2px); }
.whatsapp-float .icon-whatsapp { width: 28px; height: 28px; }
body.menu-open .whatsapp-float { display: none; }

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-14);
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--spacing-22) var(--gutter);
  border-top: 1px solid var(--color-ink-black);
  font-size: var(--text-body-sm);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr 1fr; }
  .featured__title { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 640px) {
  :root { --text-body: 17px; }
  .masthead { grid-template-columns: 1fr auto; }
  .masthead__place { display: none; }
  .masthead__brand { text-align: left; }
  .page { gap: var(--spacing-43); padding-top: var(--spacing-28); }
  .grid, .bio, .portrait, .contact { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .featured { gap: var(--spacing-14); }
  .dropcap { font-size: 84px; }
  .footer { flex-direction: column; }
}

/* =====================================================================
   MOTION & 3D — signature easing + 3 durations. All hidden start-states
   live under html.motion (added by motion.js), so no-JS and
   reduced-motion visitors always see the finished page.
   ===================================================================== */
:root {
  --ease-signature: cubic-bezier(0.16, 1, 0.3, 1);   /* entrances */
  --ease-wipe: cubic-bezier(0.77, 0, 0.175, 1);      /* on-screen wipes */
  --ease-paper: cubic-bezier(0.22, 1.12, 0.36, 1);   /* paper settle, ~4% overshoot */
  --dur-quick: 200ms;
  --dur-standard: 450ms;
  --dur-slow: 900ms;
}

/* Hero prints: loose prints laid on the page (always on) */
.featured .photo {
  rotate: var(--base-rot, 0deg);
  box-shadow: var(--shadow-portrait);
}

/* Masked lines / letters (markup injected by motion.js) */
.line { display: block; overflow: hidden; padding: 0.1em 0 0.08em; margin: -0.1em 0 -0.08em; }
.line__inner { display: block; }
.char { display: inline-block; }

html.motion [data-reveal="lines"] .line__inner {
  translate: 0 110%;
  transition: translate var(--dur-slow) var(--ease-signature);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.motion [data-reveal="lines"].is-in .line__inner { translate: 0 0; }

html.motion .banner .char {
  translate: 0 115%;
  transition: translate var(--dur-slow) var(--ease-signature);
  transition-delay: calc(var(--i, 0) * 40ms);
}
html.motion .banner.is-in .char { translate: 0 0; }

/* Photo wipe: a print emerging from the bath */
/* The clip lives on the <img>, never on the observed <figure>:
   IntersectionObserver treats a fully clipped target as not visible. */
html.motion .reveal-photo img {
  clip-path: inset(100% 0 0 0);
  transition:
    clip-path var(--dur-slow) var(--ease-wipe),
    scale 1400ms var(--ease-signature);
  transition-delay: calc(var(--i, 0) * 80ms + 150ms);
}
html.motion .reveal-photo:not(.no-zoom) img { scale: 1.18; }
html.motion .reveal-photo.is-in img { clip-path: inset(0 0 0 0); }
html.motion .reveal-photo.is-in:not(.no-zoom) img { scale: 1; }

/* Cards: rise in, then tilt in 3D with layered depth */
html.motion .card {
  opacity: 0;
  translate: 0 28px;
  transition:
    opacity var(--dur-standard) var(--ease-signature),
    translate var(--dur-slow) var(--ease-signature),
    box-shadow var(--dur-quick);
  transition-delay: calc(var(--i, 0) * 80ms);
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: calc(-4px + var(--sx, 0px)) calc(4px + var(--sy, 0px)) 10px 0 rgba(29, 29, 27, 0.2);
}
html.motion .card.is-in { opacity: 1; translate: 0 0; }
html.motion .card:hover { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
html.motion .card .photo { transform: translateZ(12px); }
html.motion .card__title { transform: translateZ(34px); }
html.motion .card__desc,
html.motion .card__meta { transform: translateZ(20px); }

/* Hero prints: drop onto the page, then tilt with the cursor */
html.motion .featured .photo {
  opacity: 0;
  translate: 0 -36px;
  rotate: calc(var(--base-rot, 0deg) * 3);
  transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: calc(-5px + var(--sx, 0px)) calc(3px + var(--sy, 0px)) 8px 0 rgba(29, 29, 27, 0.22);
  transition:
    opacity var(--dur-standard) var(--ease-signature),
    translate var(--dur-slow) var(--ease-paper),
    rotate var(--dur-slow) var(--ease-paper);
}
html.motion .featured .photo:last-child { transition-delay: 140ms; }
html.motion .featured.is-in .photo { opacity: 1; translate: 0 0; rotate: var(--base-rot, 0deg); }

/* Ambient: portrait parallax + stamp sway */
html.motion .photo[data-parallax] img { scale: 1.14; translate: 0 var(--py, 0px); }
html.motion .stamp { animation: stamp-sway 6s ease-in-out infinite; }
@keyframes stamp-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(-1.2deg); }
}

/* ---------- Arquivo: 3D ring of prints, scroll-driven ---------- */
.archive {
  margin: 0 calc(-1 * var(--gutter));
  background: var(--color-ink-black);
  color: var(--color-parchment);
}
.archive__sticky {
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: var(--spacing-22);
  min-height: 80vh;
  /* clear the sticky masthead (~62px) before the title */
  padding: calc(var(--spacing-65) + 48px) var(--gutter) var(--spacing-36);
  overflow: hidden;
}
.archive__title { color: var(--color-parchment); font-size: clamp(56px, 9vw, 140px); text-align: center; }
.archive__hint { font-size: var(--text-caption); color: var(--color-bone-cream); letter-spacing: 0.04em; text-transform: uppercase; }

.ring {
  --item-w: clamp(130px, 15vw, 230px);
  --ring-r: calc(var(--item-w) * 2.25);
  display: grid;
  place-items: center;
  width: 100%;
  perspective: 1600px;
}
.ring__track {
  position: relative;
  width: var(--item-w);
  aspect-ratio: 4 / 5;
  transform-style: preserve-3d;
  transform: rotateX(-7deg) rotateY(var(--ring-rot, -15deg));
}
.ring__item {
  position: absolute;
  inset: 0;
  margin: 0;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--n, 0) * 30deg)) translateZ(var(--ring-r));
  filter: brightness(var(--lit, 1));
}
.ring__face,
.ring__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.ring__face img { width: 100%; height: 100%; object-fit: cover; }
.ring__back {
  transform: rotateY(180deg);
  display: grid;
  place-items: center;
  background: var(--color-bone-cream);
  color: var(--color-charcoal);
  font-family: var(--font-display-mid);
  font-style: italic;
  font-size: clamp(14px, 1.4vw, 20px);
  border: 1px solid var(--color-charcoal);
}

html.motion .archive { height: 260vh; }
html.motion .archive__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }

@media (max-width: 640px) {
  .ring { --item-w: 120px; --ring-r: calc(var(--item-w) * 2.3); perspective: 1000px; }
  html.motion .archive { height: 220vh; }
}

/* =====================================================================
   ESTANTE (home) — endless 3D shelf of cloth-bound photo albums,
   plus the album page that grows out of the cover.
   Geometry (--Hpx, --ws, --d) is measured and written by estante.js.
   ===================================================================== */
.lbl {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.box {
  display: inline-flex;
  align-items: center;
  height: 27px;
  padding: 0 11px;
  border: 1px solid var(--color-ink-black);
  border-radius: var(--radius-tags);
  background: none;
  color: var(--color-ink-black);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-quick), color var(--dur-quick);
}
.box:hover { background: var(--color-ink-black); color: var(--color-parchment); }
html.is-locked { overflow: hidden; }

/* Mouse-reactive title letters (split by titles.js) */
.mg-word { display: inline-block; white-space: nowrap; }
.mg { display: inline-block; will-change: transform; }

/* ---------- Home screen ---------- */
.estante {
  --H: min(42svh, 26vw);
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  height: calc(100svh - 62px);
  min-height: 660px;
  margin: calc(-1 * var(--section-gap)) calc(-1 * var(--gutter)) 0;
  padding: clamp(18px, 3.2vh, 40px) var(--gutter) clamp(18px, 3vh, 36px);
  overflow: hidden;
  border-bottom: 1px solid var(--color-ink-black);
  background: var(--color-parchment);
  outline: none;
}
.estante__probe { position: absolute; width: 1px; height: var(--H); visibility: hidden; pointer-events: none; }
.estante__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(46px, 8.4vw, 136px);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}
.estante__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--spacing-14);
  width: 100%;
  margin-top: clamp(14px, 2.4vh, 26px);
}
.estante__hint { justify-self: end; color: var(--color-charcoal); }

.etabs { position: relative; display: flex; }
.etab {
  position: relative;
  z-index: 1;
  height: 27px;
  margin-left: -1px;
  padding: 0 12px;
  border: 1px solid var(--color-ink-black);
  background: none;
  color: var(--color-ink-black);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.45s var(--ease-signature);
}
.etab.is-active { color: var(--color-parchment); }
.etabs__ind {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--color-ink-black);
  transition: width 0.6s var(--ease-signature), transform 0.6s var(--ease-signature);
}

.shelf {
  position: relative;
  align-self: center;
  width: calc(100% + 2 * var(--gutter));
  height: calc(var(--H) + 80px);
  margin: 0 calc(-1 * var(--gutter));
  perspective: 2200px;
  perspective-origin: 50% 50%;
  touch-action: pan-y;
}
.stage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.tape { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; cursor: pointer; }
.tape__face {
  position: absolute;
  top: calc(var(--Hpx) / -2);
  height: var(--Hpx);
  overflow: hidden;
  border-radius: 2px;
  backface-visibility: hidden;
  /* book cloth: fine linen weave over the album's colour */
  background-color: var(--cloth, var(--color-ink-black));
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 3px);
  color: var(--foil, var(--color-parchment));
}
.tape__face::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--shade, 0);
  pointer-events: none;
}

/* Spine: rounded cloth spine with foil bands, a tipped-in print, title and volume */
.sp {
  left: calc(var(--ws) / -2);
  width: var(--ws);
  transform: translateZ(calc(var(--d) / 2));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--ws) * 0.11);
  padding: calc(var(--ws) * 0.16) 0;
  box-shadow: inset 4px 0 6px -2px rgba(0, 0, 0, 0.35), inset -4px 0 6px -2px rgba(0, 0, 0, 0.35);
}
.sp__band {
  flex: none;
  width: 72%;
  height: calc(var(--ws) * 0.09);
  border-block: 1px solid var(--foil);
}
.sp__plate {
  flex: none;
  width: 60%;
  aspect-ratio: 3 / 4;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--color-parchment);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.sp__title {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--ws) * 0.36);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 -1px 0 rgba(255, 255, 255, 0.08);
}
.sp__vol {
  flex: none;
  font-size: calc(var(--ws) * 0.15);
  letter-spacing: 0.08em;
}

/* Cover: cloth board, double foil frame, matted print, stamped title */
.cv {
  left: calc(var(--d) / -2);
  width: var(--d);
  transform: rotateY(90deg) translateZ(calc(var(--ws) / 2));
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  gap: calc(var(--d) * 0.035);
  padding: 11% 11% 9%;
  box-shadow: 0 30px 60px -28px rgba(20, 16, 10, 0.55), inset 6px 0 10px -6px rgba(0, 0, 0, 0.45);
}
.cv__frame {
  position: absolute;
  inset: 4.5%;
  border: 1px solid var(--foil);
  outline: 1px solid var(--foil);
  outline-offset: -5px;
  pointer-events: none;
}
.cv__plate {
  width: 100%;
  min-height: 0;
  background-size: cover;
  background-position: center;
  border: calc(var(--d) * 0.02) solid var(--color-parchment);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.cv__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--d) * 0.088);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 -1px 0 rgba(255, 255, 255, 0.08);
}
.cv__label {
  font-size: calc(var(--d) * 0.03);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Play button on the cover's lower-left corner */
.estante__play {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-ink-black);
  border-radius: var(--radius-tags);
  background: rgba(226, 222, 219, 0.88);
  color: var(--color-ink-black);
  cursor: pointer;
  transform: translate(-50%, -50%) scale(0);
}
.estante__play svg { width: 12px; height: 12px; margin-left: 2px; }

/* Caption row with arrows */
.estante__foot { position: relative; display: grid; justify-items: center; width: 100%; }
.estante__caption { display: grid; justify-items: center; gap: 9px; pointer-events: none; }
.cap { position: relative; overflow: hidden; width: min(76vw, 760px); text-align: center; }
.cap span { display: block; }
.cap span:not(:first-child) { position: absolute; inset: 0; }
.cap--title {
  font-family: var(--font-display-mid);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.cap--sub { color: var(--color-charcoal); }
.estante__arrow {
  position: absolute;
  top: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink-black);
  cursor: pointer;
}
.estante__arrow svg { width: 18px; height: 10px; }
.estante__arrow--prev { left: 0; }
.estante__arrow--next { right: 0; }

/* Viewfinder cursor (fine pointers, inside the shelf only) */
.estante.has-cursor,
.estante.has-cursor * { cursor: none; }
.scursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  pointer-events: none;
  visibility: hidden;
}
.scursor.is-visible { visibility: visible; }
.scursor__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--color-ink-black);
  border-radius: var(--radius-tags);
  transition: transform 0.5s var(--ease-signature), background-color 0.4s var(--ease-signature);
}
.scursor__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--color-ink-black);
  transition: transform 0.4s var(--ease-signature);
}
.scursor__lbl {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--color-parchment);
  transform: scale(0);
  transition: transform 0.45s var(--ease-signature);
}
.scursor.is-spine .scursor__ring { transform: scale(0.72); }
.scursor.is-btn .scursor__ring { transform: scale(0.55); }
.scursor.is-btn .scursor__dot { transform: scale(0); }
.scursor.is-open .scursor__ring { transform: scale(1.6); background-color: var(--color-ink-black); }
.scursor.is-open .scursor__dot { transform: scale(0); }
.scursor.is-open .scursor__lbl { transform: scale(1); }

/* ---------- Album page: a sheet of paper grown out of the cover ---------- */
.sdetail {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-parchment);
  visibility: hidden;
}
.sdetail.is-open { visibility: visible; }
.sdetail__bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--color-ink-black);
  background: var(--color-parchment);
}
.sdetail__brand { font-size: var(--text-body); }
.sdetail__bar .sdetail__cta { justify-self: end; }
.sdetail__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4vw;
  min-height: calc(100svh - 64px);
  padding: 48px 6vw 56px 7vw;
}
.sdetail__text { display: grid; gap: 18px; max-width: 540px; }
.dmask { overflow: hidden; padding-block: 0.08em; }
.dmask > * { display: block; }
.dmask > .button,
.dmask > .box { display: inline-flex; }
.sdetail__cat {
  justify-self: start;
  width: fit-content;
  padding: 7px 10px;
  background-color: var(--cloth);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 3px);
  color: var(--foil);
}
.sdetail__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(46px, 5.8vw, 92px);
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.sdetail__meta { color: var(--color-charcoal); }
.sdetail__desc { max-width: 42ch; font-size: 18px; line-height: 1.5; }
.sdetail__credit { font-family: var(--font-display-mid); font-style: italic; font-size: 16px; color: var(--color-charcoal); }
.sdetail__poster { display: grid; place-items: center; height: min(78vh, 760px); }
.sdetail__poster svg { display: block; height: 100%; width: auto; aspect-ratio: 2 / 3; }

.sdetail__gallery {
  columns: 3 260px;
  column-gap: 18px;
  padding: 0 6vw 24px;
}
.gphoto {
  margin: 0 0 18px;
  overflow: hidden;
  break-inside: avoid;
  background: var(--color-bone-cream);
}
.gphoto img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .gphoto img {
    clip-path: inset(100% 0 0 0);
    scale: 1.12;
    transition: clip-path 900ms var(--ease-wipe), scale 1400ms var(--ease-signature);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .gphoto.is-in img { clip-path: inset(0 0 0 0); scale: 1; }
}
.sdetail__end {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 56px 6vw 96px;
  border-top: 1px solid var(--color-ink-black);
  text-align: center;
}
.sdetail__end .heading { font-size: clamp(40px, 6vw, 88px); }

@media (max-width: 767px) {
  .estante { --H: min(58vw, 36svh); min-height: 600px; }
  .estante__top { grid-template-columns: 1fr; justify-items: center; }
  .estante__top > .lbl { display: none; }
  .etab { padding: 0 7px; font-size: 10px; }
  .cap--title { font-size: 24px; }
  .sdetail__bar { padding: 14px 16px; }
  .sdetail__bar .sdetail__cta { display: none; }
  .sdetail__head { grid-template-columns: 1fr; align-items: start; gap: 24px; min-height: 0; padding: 24px 22px 40px; }
  .sdetail__poster { order: -1; height: 52svh; }
  .sdetail__title { font-size: 42px; }
  .sdetail__desc { font-size: 16px; }
  .sdetail__gallery { columns: 2 140px; column-gap: 10px; padding: 0 12px 16px; }
  .gphoto { margin-bottom: 10px; }
}

/* Home title: letters rise out of their own word masks on load */
.estante__title .mg-word { overflow: hidden; padding: 0.14em 0.03em 0.06em; margin: -0.14em -0.03em -0.06em; vertical-align: top; }

/* Spine titles shrink to fit their length (≈0.66em per uppercase Bodoni letter) */
.sp__title { font-size: min(calc(var(--ws) * 0.36), calc(var(--Hpx) * 0.8 / var(--len, 12))); }

.sdetail__bar .sdetail__close { justify-self: start; }
@media (max-width: 767px) { .estante { padding-bottom: 84px; } }

/* =====================================================================
   INTRO — "MENDONÇA [pill] VISUALS" opening sheet (intro.js).
   --ifs is the word size, fitted by intro.js so both words and the pill fit.
   ===================================================================== */
.intro {
  --ifs: min(19.6vh, 6vw);
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: hidden;
  background: #ffffff;
  color: #1d1d1d;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.intro[hidden] { display: none; }
html.has-intro .scursor,
html.has-intro .whatsapp-float { visibility: hidden; }

.intro__paper { position: absolute; inset: 0; background: #f2f2f1; opacity: 0; }
.intro__paper svg { width: 100%; height: 100%; display: block; }
.intro__lines path { fill: none; stroke: #fff; stroke-linecap: round; vector-effect: non-scaling-stroke; }

.intro__nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: space-between;
  padding: max(16px, calc(var(--ifs) * .14)) max(20px, calc(var(--ifs) * .27)) 0;
  font-size: max(12px, calc(var(--ifs) * .072));
  font-weight: 450;
  transform: translateY(-140%);
}
.intro__nav ul { display: flex; gap: 1.6em; list-style: none; margin: 0; padding: 0; }
.intro__nav a { color: #1d1d1d; text-decoration: none; }
.intro__nav a:hover { color: #3a3a3a; text-decoration: underline; text-underline-offset: 3px; }

.intro__hero {
  position: absolute; left: 0; right: 0; top: 43%; z-index: 2;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  gap: .026em;
  margin: 0;
  font-size: var(--ifs);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .8;
  text-transform: uppercase;
  white-space: nowrap;
}
.intro__part { display: block; }
.intro__pill {
  position: relative; flex: none;
  height: 1.81em; width: .012em;
  border-radius: 999px; overflow: hidden;
  background: #d8d3cf;
  clip-path: inset(50% 0);
  letter-spacing: 0;
}
.intro__video {
  position: absolute; left: 50%; top: 0;
  width: max(100%, 4.2em); height: 1.81em;
  transform: translateX(-50%);
  object-fit: cover; object-position: center top;
}
.intro__hairline { position: absolute; inset: 0; background: #b9b9b9; }
.intro__icon {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: .13em; height: .13em; opacity: 0;
  color: #fff; background: none; border: 0; padding: 0; cursor: pointer;
}
.intro__icon svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.intro__icon--breeze { left: .2em; pointer-events: none; }
.intro__icon--sound { right: .2em; }
.intro__icon--sound .waves { transition: opacity .25s; }
.intro__icon--sound[aria-pressed="false"] .waves { opacity: 0; }

.intro__foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: flex-end; gap: calc(var(--ifs) * .2);
  padding: 0 max(20px, calc(var(--ifs) * .27)) max(18px, calc(var(--ifs) * .14));
  transform: translateY(160%);
}
.intro__foot p {
  flex: none; width: max(260px, calc(var(--ifs) * 1.42));
  margin: 0;
  font-size: max(13px, calc(var(--ifs) * .066)); line-height: 1.45;
  color: #3a3a3a;
}
.intro__foot p::first-letter {
  float: left; font-size: 2.35em; font-weight: 650; line-height: .82;
  margin: .04em .08em 0 0; color: #1d1d1d;
}
.intro__rule { flex: 1; height: 1px; background: #a9a9a6; transform: scaleX(0); margin-bottom: calc(var(--ifs) * .1); }
.intro__cta {
  flex: none; border: 0; border-radius: 999px; cursor: pointer;
  background: #1b1b1b; color: #fff;
  font: 500 max(13px, calc(var(--ifs) * .07)) / 1 'Inter', sans-serif;
  padding: 1.05em 1.9em;
  transition: transform .2s;
}
.intro__cta:hover { transform: translateY(-2px); }
.intro__cta:focus-visible { outline: 2px solid #1d1d1d; outline-offset: 3px; }

@media (max-width: 720px) {
  .intro__nav { padding: 18px 20px 0; font-size: 12.5px; }
  .intro__nav ul { gap: 1.2em; }
  .intro__nav .intro__social { display: none; }
  .intro__hero { top: 47%; flex-direction: column; gap: .03em; }
  .intro__pill { width: calc(100vw - 40px); height: 1.5px; clip-path: inset(0 50%); }
  .intro__video { width: 100%; height: var(--ipill-h, 50vw); top: 50%; transform: translate(-50%, -50%); }
  .intro__icon { width: 22px; height: 22px; }
  .intro__icon--breeze { left: 22px; }
  .intro__icon--sound { right: 22px; }
  .intro__foot { flex-wrap: wrap; align-items: center; gap: 14px 16px; padding: 0 20px 20px; }
  .intro__foot p { width: 100%; font-size: 13px; line-height: 1.5; }
  .intro__rule { margin-bottom: 0; }
  .intro__cta { height: 38px; padding: 0 18px; font-size: 13px; }
}

/* =====================================================================
   BIO — personal, first person, before the album shelf
   ===================================================================== */
.bio--personal {
  grid-template-columns: minmax(220px, 0.8fr) 1.2fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100svh - 62px - var(--section-gap));
}
.bio__photo {
  margin: 0;
  rotate: -2.5deg;
  border: 10px solid #fff;
  box-shadow: var(--shadow-portrait);
  background: #fff;
}
.bio__photo img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.bio__photo figcaption { padding: 10px 2px 2px; font-family: var(--font-display-mid); font-style: italic; font-size: 15px; color: var(--color-charcoal); }
.bio__content { display: grid; gap: var(--spacing-22); max-width: 640px; }
.bio__kicker { color: var(--color-charcoal); }
.bio__content .heading { font-size: clamp(48px, 6.4vw, 104px); }
.bio__content .bio__text { max-width: 58ch; }
.bio__sign { font-family: var(--font-display-mid); font-style: italic; font-size: 22px; }

/* the shelf is no longer the first section */
.bio + .estante { margin-top: 0; border-top: 1px solid var(--color-ink-black); }

@media (max-width: 640px) {
  .bio--personal { grid-template-columns: 1fr; min-height: 0; }
  .bio__photo { max-width: 260px; justify-self: center; }
}
.bio__photo { width: 100%; max-width: 360px; justify-self: center; }
@media (min-width: 641px) { .bio--personal { grid-template-columns: minmax(220px, 0.75fr) 1.25fr; } }

/* Intro v2: the pill is a window onto the live site. The white sheet around it is the pill's
   own box-shadow, so the intro itself is transparent and nothing else covers the site. */
.intro { background: transparent; }
.intro__hero { z-index: 2; }
.intro__part { position: relative; z-index: 1; }
.intro__pill {
  position: relative;
  z-index: 0;
  height: 0;
  background: transparent;
  clip-path: none;
  overflow: visible;
  box-shadow: 0 0 0 300vmax #ffffff;
}
.intro__hairline { border-radius: inherit; }
@media (max-width: 720px) {
  .intro__pill { width: 0; height: 1.5px; clip-path: none; }
}

/* Shelf title: one word now, pairing with the VISUALS banner near the end */
.estante__title { font-size: clamp(56px, 10.5vw, 170px); }

/* Bio photo v2: the whole picture, uncropped, as a taped-down print */
.bio__photo {
  position: relative;
  width: min(100%, calc(70svh * 2 / 3));
  max-width: none;
  justify-self: center;
  padding: 14px 14px 0;
  border: 0;
  background: #fff;
  rotate: -2deg;
  box-shadow: rgba(29, 29, 27, 0.22) -6px 8px 18px 0;
}
.bio__photo::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  width: 34%;
  height: 28px;
  translate: -50% 0;
  rotate: 3deg;
  background: rgba(205, 198, 190, 0.78);
  box-shadow: 0 1px 2px rgba(29, 29, 27, 0.12);
}
.bio__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 1350;
  object-fit: contain;
  background: #f4f2ef;
}
.bio__photo figcaption {
  padding: 14px 4px 16px;
  text-align: center;
  font-size: 17px;
}
@media (max-width: 640px) {
  .bio__photo { width: min(78vw, 300px); }
}

/* anchor jumps land below the sticky masthead */
main > section { scroll-margin-top: 62px; }

/* Phone polish */
.sdetail__close { white-space: nowrap; }
@media (max-width: 720px) {
  .sdetail__bar { grid-template-columns: auto 1fr; gap: 12px; }
  .sdetail__brand { text-align: right; font-size: 16px; }
  .estante { height: auto; min-height: 0; gap: 14px; }
  .estante .shelf { margin-block: 8px; }
  .footer { padding-bottom: 96px; }
}

/* "Abrir" cursor v2: a small vintage stamp instead of a big black square */
.scursor.is-open .scursor__ring {
  transform: scale(1.18) rotate(-6deg);
  background-color: var(--color-parchment);
  border: 1.5px solid var(--color-ink-black);
  outline: 1px dashed var(--color-ink-black);
  outline-offset: -6px;
  box-shadow: rgba(29, 29, 27, 0.22) -3px 4px 8px 0;
}
.scursor.is-open .scursor__lbl {
  transform: scale(1) rotate(-6deg);
  color: var(--color-ink-black);
  font-family: var(--font-display-mid);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------- compatibility (iPhone Safari, Android auto-dark) ---------- */
:root { color-scheme: light only; }
.tape, .stage, .tape__face, .card { -webkit-transform-style: preserve-3d; }
.tape__face { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.tape__face.cv, .tape__face.sp { -webkit-transform-style: flat; transform-style: flat; }
.footer { flex-wrap: wrap; }

/* WhatsApp float on the left: the bottom-right corner belongs to the host's badge */
.whatsapp-float { right: auto; left: var(--gutter); }
