/* Atelier Eduardo Carlesso */
:root {
  --bg: #f3efe8;
  --bg-alt: #ebe5da;
  --paper: #faf8f4;
  --ink: #1b1915;
  --ink-soft: #57524a;
  --muted: #8a8378;
  --line: #d8d0c2;
  --dark: #161512;
  --dark-2: #22201c;
  --on-dark: #f3efe8;
  --on-dark-soft: #b9b2a6;
  --gold: #a8895a;
  --gold-soft: #c9b38c;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --script: "Mrs Saint Delafield", "Brush Script MT", cursive;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.005em; }
h1 { font-size: clamp(40px, 6.2vw, 84px); }
h2 { font-size: clamp(32px, 4.2vw, 56px); }
h3 { font-size: clamp(22px, 2vw, 27px); }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-block;
  font: 400 11.5px/1.4 var(--sans);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow.light { color: var(--gold-soft); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 40em; }
.signature { font-family: var(--script); font-weight: 400; line-height: 1; white-space: nowrap; }
.num { font-family: var(--serif); font-size: 22px; color: var(--gold); display: block; margin-bottom: 14px; }

/* buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 28px;
  font: 400 12.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
  background: var(--ink); color: var(--bg);
  border: 1px solid var(--ink);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-light { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn-light:hover { background: transparent; color: var(--bg); }
.btn-ghost-light { background: transparent; color: var(--bg); border-color: rgba(243, 239, 232, .5); }
.btn-ghost-light:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.link-arrow {
  font: 400 12.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; padding-bottom: 6px; border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.link-arrow::after { content: " →"; }
.link-back { display: table; margin-bottom: 28px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.link-back::before { content: "← "; }

/* header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  color: var(--ink);
  transition: background .4s var(--ease), color .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
}
.has-hero .site-header:not(.is-solid) { color: var(--on-dark); }
.site-header.is-solid { background: rgba(243, 239, 232, .94); backdrop-filter: blur(10px); padding-block: 12px; box-shadow: 0 1px 0 var(--line); }
body:not(.has-hero) .site-header { background: var(--bg); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mono {
  font-family: var(--serif); font-size: 18px; letter-spacing: .06em;
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid currentColor;
}
.brand-name { font: 400 11.5px/1.3 var(--sans); letter-spacing: .3em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.site-nav a { font: 400 12.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; padding: 8px 0; position: relative; }
.site-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { border: 1px solid currentColor; padding: 12px 20px !important; }
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span:not(.sr-only) { position: absolute; left: 11px; right: 11px; height: 1px; background: currentColor; transition: transform .3s var(--ease); }
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 860px) {
  .brand-name { display: none; }
  .nav-toggle { display: block; z-index: 2; }
  .site-nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--dark); color: var(--on-dark);
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .site-nav a { font-size: 15px; }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  body.nav-open .site-header { color: var(--on-dark); background: transparent; box-shadow: none; }
  body.nav-open { overflow: hidden; }
}

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--on-dark); background: var(--dark); overflow: hidden; }
.hero-short { min-height: 88svh; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72; animation: heroIn 1.8s var(--ease) both; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 21, 18, .5) 0%, rgba(22, 21, 18, 0) 30%, rgba(22, 21, 18, .15) 55%, rgba(22, 21, 18, .85) 100%); }
.hero-inner { position: relative; z-index: 1; padding-block: 140px clamp(56px, 9vw, 110px); }
.hero h1 { max-width: 12em; margin: 18px 0 8px; }
.hero-lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--on-dark-soft); max-width: 34em; margin-top: 20px; }
.hero-sig { display: block; font-size: clamp(54px, 7vw, 100px); color: var(--on-dark); opacity: .9; margin: -4px 0 30px clamp(0px, 8vw, 140px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-short .hero-actions { margin-top: 36px; }
@keyframes heroIn { from { transform: scale(1.06); opacity: 0; } to { transform: scale(1); opacity: .72; } }

/* sections */
.section { padding-block: var(--section); }
.section-tight { padding-top: 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark .lead, .section-dark p { color: var(--on-dark-soft); }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 780px; }
.section-head h2 { margin-top: 16px; }
.section-head .lead { margin-top: 20px; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.head-row .section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.head-row .link-arrow { margin-bottom: clamp(40px, 6vw, 72px); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.split-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.split-text h2 { margin: 16px 0 24px; }
.split-text p { color: var(--ink-soft); }
.section-dark .split-text p { color: var(--on-dark-soft); }
.sig-dark { display: block; font-size: clamp(52px, 6vw, 80px); color: var(--ink); margin-bottom: 28px; }
.intro .lead { color: var(--ink); font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.35; margin-bottom: 28px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .arch-band .split-img { order: -1; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.stats dt { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); line-height: 1; }
.stats dd { margin: 8px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* lists */
.lines, .steps, .benefits, .formats { list-style: none; margin: 0; padding: 0; }
.lines { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.lines li { padding: 36px 32px 8px 0; }
.lines li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.lines h3 { margin-bottom: 14px; }
.lines p, .steps p, .benefits p, .formats p { color: var(--ink-soft); font-size: 16px; }
@media (max-width: 1000px) {
  .lines { grid-template-columns: 1fr 1fr; }
  .lines li:nth-child(3) { padding-left: 0; border-left: 0; }
  .lines li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .lines { grid-template-columns: 1fr; }
  .lines li, .lines li + li { padding: 28px 0 4px; border-left: 0; }
  .lines li + li { border-top: 1px solid var(--line); }
}

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 40px); counter-reset: s; }
.steps-5 { grid-template-columns: repeat(5, 1fr); }
.steps li { padding-top: 24px; border-top: 1px solid var(--ink); }
.steps h3 { margin-bottom: 12px; }
@media (max-width: 1000px) { .steps, .steps-5 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps, .steps-5 { grid-template-columns: 1fr; } }

.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 40px); }
.benefits li { padding: 32px 28px; background: var(--paper); border: 1px solid var(--line); }
.benefits h3 { margin-bottom: 12px; }
@media (max-width: 1000px) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .benefits { grid-template-columns: 1fr; } }

.formats { margin: 8px 0 36px; border-top: 1px solid var(--line); }
.formats li { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: baseline; }
.formats h3 { font-size: 22px; }
.formats p { margin: 0; }
@media (max-width: 560px) { .formats li { grid-template-columns: 1fr; gap: 6px; } }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px) clamp(20px, 2.4vw, 32px); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } }
.card { text-decoration: none; display: block; }
.card[hidden] { display: none; }
.card-img { overflow: hidden; background: var(--bg-alt); }
.card-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.1s var(--ease); }
.card:hover .card-img img { transform: scale(1.04); }
.card-meta { padding-top: 20px; }
.card-meta h3 { margin-top: 8px; }

/* manifesto */
.manifesto { position: relative; background: var(--dark); color: var(--on-dark); padding-block: clamp(110px, 16vw, 220px); overflow: hidden; }
.manifesto-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; filter: grayscale(1); }
.manifesto-inner { position: relative; max-width: 980px; }
.manifesto blockquote { margin: 24px 0 28px; font-family: var(--serif); font-size: clamp(36px, 5.4vw, 74px); line-height: 1.08; }
.manifesto p { color: var(--on-dark-soft); max-width: 34em; font-size: 18px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.contact-grid h2 { margin: 16px 0 24px; }
.contact-list { border-top: 1px solid var(--ink); }
.contact-item { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .35s var(--ease); }
.contact-item strong { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 30px); }
.contact-item:hover { padding-left: 10px; }
.contact-item:hover strong::after { content: " →"; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* form */
.arch-form { display: grid; gap: 18px; }
.arch-form label { display: grid; gap: 8px; font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--on-dark-soft); }
.arch-form input, .arch-form textarea {
  font: 300 17px/1.5 var(--sans); color: var(--on-dark);
  background: transparent; border: 0; border-bottom: 1px solid rgba(243, 239, 232, .3);
  padding: 10px 0; border-radius: 0; resize: vertical;
}
.arch-form input:focus, .arch-form textarea:focus { outline: none; border-bottom-color: var(--gold-soft); }
.arch-form textarea::placeholder { color: rgba(243, 239, 232, .35); }
.arch-form .btn { justify-self: start; margin-top: 12px; }
.muted-light { font-size: 15px; }
.muted-light a { color: var(--on-dark); }

/* page head */
.page-head { padding-top: clamp(150px, 18vw, 220px); padding-bottom: clamp(48px, 6vw, 80px); }
.page-head h1 { margin: 18px 0 24px; max-width: 14em; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.filters button { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; padding: 12px 20px; border: 1px solid var(--line); transition: all .3s var(--ease); }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* acervo */
.acervo { columns: 4 240px; column-gap: 24px; }
.acervo-item { break-inside: avoid; margin: 0 0 28px; }
.acervo-item button, .gal-item button, .case-cover button { display: block; width: 100%; cursor: zoom-in; overflow: hidden; }
.acervo-item img { width: 100%; transition: transform 1s var(--ease); }
.acervo-item button:hover img { transform: scale(1.03); }
.acervo-item figcaption { padding-top: 12px; display: flex; flex-direction: column; }
.acervo-item strong { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.acervo-item span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* case */
.case-head { padding-top: clamp(140px, 16vw, 200px); padding-bottom: clamp(40px, 5vw, 64px); }
.case-head h1 { margin: 16px 0 24px; }
.case-cover { margin: 0 auto; }
.case-cover img { width: 100%; max-height: 88vh; object-fit: cover; }
.case-body { display: grid; grid-template-columns: 320px 1fr; gap: clamp(40px, 7vw, 120px); padding-block: clamp(56px, 8vw, 110px); }
.case-text p { font-size: clamp(18px, 1.5vw, 20px); color: var(--ink-soft); max-width: 36em; }
.case-text p:first-child { font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); line-height: 1.35; color: var(--ink); }
.ficha { margin: 0; border-top: 1px solid var(--ink); align-self: start; }
.ficha div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.ficha dt { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.ficha dd { margin: 0; font-size: 16px; }
@media (max-width: 860px) { .case-body { grid-template-columns: 1fr; } .ficha { order: 2; } }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); }
.gal-item { margin: 0; }
.gal-item img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1s var(--ease); }
.gal-item button:hover img { transform: scale(1.03); }
.gal-item:nth-child(3n+1):last-child, .gal-item:nth-child(3n) { grid-column: 1 / -1; }
.gal-item:nth-child(3n) img, .gal-item:nth-child(3n+1):last-child img { aspect-ratio: 16 / 10; }
.gal-item figcaption { padding-top: 12px; font-size: 13px; letter-spacing: .06em; color: var(--muted); }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } .gal-item img { aspect-ratio: auto !important; } }
.testimonial { margin: 40px 0 0; padding-left: 28px; border-left: 1px solid var(--gold); }
.testimonial p { font-family: var(--serif); font-style: italic; font-size: 24px !important; color: var(--ink) !important; }
.testimonial cite { font-style: normal; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.case-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-block: clamp(56px, 8vw, 100px) 0; }
.case-cta p { margin: 0; font-family: var(--serif); font-size: clamp(26px, 2.8vw, 38px); }
.next-case { display: block; text-decoration: none; margin-block: clamp(56px, 8vw, 100px); padding-top: 32px; border-top: 1px solid var(--ink); }
.next-case strong { display: block; margin-top: 12px; font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 68px); line-height: 1.05; transition: transform .5s var(--ease); }
.next-case strong::after { content: " →"; }
.next-case:hover strong { transform: translateX(12px); }

/* footer */
.site-footer { background: var(--dark); color: var(--on-dark); padding-block: clamp(64px, 8vw, 100px) 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .signature { font-size: clamp(48px, 5vw, 68px); }
.footer-tag { margin-top: 18px; color: var(--on-dark-soft); font-family: var(--serif); font-size: 20px; font-style: italic; }
.footer-links { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.footer-links a { text-decoration: none; color: var(--on-dark-soft); transition: color .3s; }
.footer-links a:hover { color: var(--on-dark); }
.footer-links p { margin: 0; color: var(--on-dark-soft); }
.footer-base { margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(243, 239, 232, .12); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-soft); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(16, 15, 13, .96); display: grid; place-items: center; padding: 56px 72px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-height: 100%; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 150px); object-fit: contain; }
.lightbox figcaption { color: var(--on-dark-soft); font-size: 14px; letter-spacing: .06em; margin-top: 16px; text-align: center; }
.lightbox button { position: absolute; color: var(--on-dark); font-family: var(--serif); font-size: 44px; line-height: 1; width: 56px; height: 56px; }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lightbox { padding: 64px 12px; } .lb-prev, .lb-next { top: auto !important; bottom: 8px; transform: none !important; } }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------------- catálogo (tela e impressão) ---------------- */
.catalog .site-header, .catalog .site-footer, .catalog .skip { display: none; }
.catalog { background: #d9d4cb; }
.catalog main { padding: 80px 20px 40px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.cat-toolbar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; background: var(--bg); box-shadow: 0 1px 0 var(--line); font-size: 14px; }
.cat-toolbar a { text-decoration: none; }
.cat-toolbar .btn { min-height: 40px; }
.cat-page {
  width: 297mm; height: 210mm; max-width: 100%;
  background: var(--bg); position: relative; overflow: hidden;
  padding: 18mm; box-shadow: 0 10px 40px rgba(0, 0, 0, .12);
}
.cat-cover { background: var(--dark); color: var(--on-dark); display: flex; align-items: flex-end; }
.cat-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.cat-cover-inner { position: relative; }
.cat-cover h1 { font-size: 52px; margin-top: 14px; max-width: 12em; }
.cat-cover .hero-sig { font-size: 90px; margin: 0 0 0 60px; }
.cat-about { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18mm; align-items: center; }
.cat-about h2 { font-size: 40px; margin: 12px 0 20px; }
.cat-about p { font-size: 15px; color: var(--ink-soft); }
.cat-about .steps { grid-template-columns: 1fr 1fr; gap: 10mm; }
.cat-about .steps p { font-size: 13.5px; }
.cat-case { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14mm; padding: 14mm; }
.cat-photos { display: grid; gap: 4mm; height: 100%; min-height: 0; }
.cat-photos img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.cat-photos.n2, .cat-photos.n3 { grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; }
.cat-photos.n2 img:first-child, .cat-photos.n3 img:first-child { grid-row: 1 / -1; }
.cat-photos.n2 img:nth-child(2) { grid-row: 1 / -1; }
.cat-info { display: flex; flex-direction: column; justify-content: center; }
.cat-info h2 { font-size: 40px; margin: 10px 0 16px; }
.cat-info p { font-size: 14.5px; color: var(--ink-soft); }
.cat-info .ficha div { padding: 9px 0; }
.cat-info .ficha dd { font-size: 14px; }
.cat-acervo { display: grid; grid-template-rows: auto 1fr; gap: 8mm; }
.cat-acervo h2 { font-size: 34px; margin-top: 8px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; gap: 5mm; min-height: 0; }
.cat-grid figure { margin: 0; display: flex; flex-direction: column; min-height: 0; }
.cat-grid img { flex: 1; min-height: 0; width: 100%; object-fit: cover; }
.cat-grid figcaption { font-family: var(--serif); font-size: 15px; padding-top: 6px; display: flex; justify-content: space-between; gap: 8px; }
.cat-grid figcaption span { font-family: var(--sans); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); align-self: center; }
.cat-end { background: var(--dark); color: var(--on-dark); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cat-end .signature { font-size: 110px; }
.cat-end p { font-family: var(--serif); font-size: 28px; margin-top: 24px; }
.cat-end .cat-contacts { font-family: var(--sans); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-soft); }
.catalog .reveal { opacity: 1 !important; transform: none !important; }
@media (max-width: 1100px) {
  .cat-page { height: auto; aspect-ratio: 297 / 210; padding: 5%; }
  .cat-case, .cat-about { gap: 4%; }
}
@media (max-width: 700px) {
  .cat-page { aspect-ratio: auto; }
  .cat-case, .cat-about { grid-template-columns: 1fr; }
  .cat-photos { height: 60vw; }
  .cat-grid { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .cat-grid img { aspect-ratio: 4 / 5; }
  .cat-cover { min-height: 70vw; }
  .cat-cover h1 { font-size: 36px; }
  .cat-cover .hero-sig, .cat-end .signature { font-size: 60px; margin-left: 0; }
}

@page { size: A4 landscape; margin: 0; }
@media print {
  .catalog { background: none; }
  .catalog main { padding: 0; gap: 0; display: block; }
  .cat-toolbar, .lightbox, .page-wipe { display: none !important; }
  .cat-page { box-shadow: none; page-break-after: always; break-after: page; width: 297mm; height: 210mm; aspect-ratio: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------- pincel, assinatura e transições (paint.js) ---------------- */
.btn-ghost { background: rgba(243, 239, 232, .55); color: var(--ink); border-color: var(--ink); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* hero: tela de linho que o pincel pinta revelando a foto */
.hero-paint {
  color: var(--ink);
  background-color: #eee8dd;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .31 0 0 0 0 .26 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(120, 105, 85, .05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 105, 85, .045) 0 1px, transparent 1px 3px);
}
.hero-paint::after { display: none; }
.hero-paint .hero-img { opacity: 1; animation: none; }
.hero-paint.paint-on .hero-img { visibility: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.hero-paint .hero-inner { z-index: auto; } /* sem contexto próprio, o blend enxerga a pintura */
.hero-paint h1, .hero-paint .hero-sig { color: #f3efe8; mix-blend-mode: difference; }
.hero-paint .eyebrow { color: var(--gold); }
.hero-light .site-header:not(.is-solid) { color: #f3efe8; mix-blend-mode: difference; }
body.nav-open.hero-light .site-header { mix-blend-mode: normal; }

/* assinatura: máscara com o percurso da caneta */
.sig-write { display: inline-block; line-height: 0; white-space: normal; }
.hero-sig.sig-write, .sig-dark.sig-write { display: block; }
.sig-svg { display: block; overflow: visible; max-width: 100%; }
.sig-svg text { font-family: var(--script); fill: currentColor; }
.sig-pen { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.js .sig-pen { stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05; }
.js .is-written .sig-pen { stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur) cubic-bezier(.4, 0, .6, 1) var(--delay); }
.hero-sig.sig-write { margin: -.3em 0 .1em clamp(0px, 8vw, 140px); }
.sig-dark.sig-write { margin: -.25em 0 12px -.08em; }
.site-footer .sig-write { margin: -.3em 0 -.2em; }

/* fotos reveladas por pincelada */
.js .paint-wait { opacity: 0; transition: opacity .6s ease, transform 1.1s var(--ease); }
.js .paint-wait.painted { opacity: 1; }
.paint-host { position: relative; }
.paint-canvas { position: absolute; pointer-events: none; }

/* transição entre páginas */
.page-wipe { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 95; pointer-events: none; }
.wipe-in body::after { content: ""; position: fixed; inset: 0; background: #161512; z-index: 96; }

@media (prefers-reduced-motion: reduce) {
  .js .sig-pen { stroke-dashoffset: 0; }
  .js .paint-wait { opacity: 1; }
}

/* assinatura real: o traço da caneta desenhado em sequência */
.sig-line { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.js .sig-write .sig-line { stroke-dasharray: 1 1.1; stroke-dashoffset: 1.05; }
.js .sig-write.is-written .sig-line { stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur) cubic-bezier(.33, 0, .67, 1) var(--delay); }
.sig-real { display: inline-block; line-height: 0; }
.hero-sig.sig-real { display: block; margin: .05em 0 .15em clamp(0px, 8vw, 140px); }
.site-footer .sig-real { margin: 0 0 -.1em; }
.cat-page .sig-real { line-height: 0; }
@media (prefers-reduced-motion: reduce) { .js .sig-write .sig-line { stroke-dashoffset: 0; } }
