/* ===== Base ===== */
@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0D0D0D;
  --surface: #1C1C1C;
  --beige: #F1E0C2;
  --graphite: #333;
  --warm: #F2EDE4;
  --muted-dark: #B9B09F;
  --muted-light: #4A4A4A;
  --gold: #B8975A;
  --gold-light: #7A5C22;
  --serif: "Cinzel", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--warm); font: 400 1rem/1.6 var(--sans); }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, dl, dd, figure, address { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }
a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }

/* ===== Seções (alternância de cor) ===== */
.section { padding-block: clamp(4rem, 10vw, 8rem); }
.dark { background: var(--bg); color: var(--warm); }
.surface { background: var(--surface); color: var(--warm); }
.light { background: var(--beige); color: var(--bg); }
.dark .note, .surface .note { color: var(--muted-dark); }
.light .note { color: var(--muted-light); }
.note { font-size: 0.9375rem; margin-top: 1rem; }

.eyebrow { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.5rem; }
.eyebrow span { display: block; margin-bottom: 0.25rem; font: 700 clamp(3.5rem, 12vw, 6rem)/1 var(--serif); letter-spacing: 0; color: var(--gold); }
.light .eyebrow span { color: var(--gold-light); }
h2 { font: 700 clamp(1.75rem, 5vw, 2.75rem)/1.15 var(--serif); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
h2::after { content: ""; display: block; width: 56px; height: 2px; margin-top: 1rem; background: var(--gold); }
.light h2::after { background: var(--gold-light); }
h3 { font: 600 1.125rem/1.3 var(--sans); }

/* ===== Botões ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.75rem 1.75rem; border: 2px solid transparent; border-radius: 2px; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background-color 0.2s, color 0.2s, transform 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--beige); color: var(--bg); }
.btn-primary:hover { background: var(--warm); }
.btn-ghost { border-color: var(--beige); color: var(--beige); background: transparent; }
.btn-ghost:hover { background: var(--beige); color: var(--bg); }
.btn-dark { background: var(--bg); color: var(--beige); }
.btn-dark:hover { background: var(--graphite); }
.btn-ghost-dark { border-color: var(--bg); color: var(--bg); background: transparent; }
.btn-ghost-dark:hover { background: var(--bg); color: var(--beige); }

/* ===== Linhas editoriais (serviços e horários) ===== */
.row { display: flex; align-items: baseline; gap: 0.75rem; }
.leader { flex: 1; border-bottom: 2px dotted currentColor; opacity: 0.45; min-width: 1rem; }
.price, .hours dd { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.services li { padding-block: 1.25rem; border-bottom: 1px solid rgba(13, 13, 13, 0.18); }
.services li:first-child { border-top: 1px solid rgba(13, 13, 13, 0.18); }
@media (hover: hover) {
  .services li { transition: padding-left 0.3s, background-color 0.3s; }
  .services li:hover { padding-left: 1rem; background: rgba(122, 92, 34, 0.1); }
  .services li:hover .price { color: var(--gold-light); }
  .services li:hover .leader { opacity: 1; border-color: var(--gold-light); }
}
.services .row h3 { font-size: clamp(1.125rem, 3vw, 1.375rem); }
.services .price { font-size: clamp(1.125rem, 3vw, 1.375rem); }
.services p { margin-top: 0.25rem; color: var(--muted-light); }
.services + .note { margin-bottom: 2rem; }
.hours { max-width: 560px; }
.hours .row { padding-block: 1rem; font-size: 1.125rem; }
.hours dt { font-weight: 400; }

/* ===== 1. Hero ===== */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding-block: 1.5rem clamp(2.5rem, 8vw, 5rem); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: var(--surface); }
.hero-bg::before, .hero-bg::after { content: ""; position: absolute; top: 50%; right: -10%; aspect-ratio: 1; border: 1px solid rgba(184, 151, 90, 0.4); transform: translateY(-50%) rotate(45deg); }
.hero-bg::before { width: min(95vw, 720px); }
.hero-bg::after { width: min(65vw, 480px); right: calc(-10% + min(15vw, 120px)); }
@keyframes spin { to { transform: translateY(-50%) rotate(405deg); } }
.hero-bg::before { animation: spin 90s linear infinite; }
.hero-bg::after { animation: spin 70s linear infinite reverse; }
/* Vídeo: fundo com camada escura no celular; painel vertical ao lado do texto no desktop */
.hero-media { position: absolute; inset: 0; overflow: hidden; background: var(--surface); }
.hero-media::after { content: ""; position: absolute; inset: 0; background: rgba(13, 13, 13, 0.6); }
.hero-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-top, .hero-content { position: relative; }
.hero-top img { width: 88px; height: 88px; }
.hero h1 { font: 700 clamp(2.5rem, 11vw, 4.5rem)/1.05 var(--serif); text-transform: uppercase; letter-spacing: 0.04em; }
.hero h1 span { display: block; }
.tagline { margin-top: 1.25rem; font-size: clamp(1.125rem, 3vw, 1.5rem); color: var(--beige); max-width: 28ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-hours { margin-top: 2rem; color: var(--warm); max-width: 40ch; }
.hero-content { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55); }
@media (min-width: 1024px) {
  .hero-media { inset: auto; top: 50%; right: clamp(1.5rem, 8vw, 8rem); height: min(84%, 760px); aspect-ratio: 9 / 16; transform: translateY(-50%); border: 1px solid var(--gold); }
  .hero-media::after { display: none; }
  .hero-content { text-shadow: none; }
  .hero-hours { color: var(--muted-dark); }
}

/* ===== 2. Vídeo (vertical 9:16) ===== */
.tour { display: grid; gap: 2.5rem; align-items: center; justify-items: center; }
.tour-text { justify-self: start; max-width: 36ch; }
.tour-video { width: min(100%, 360px); height: auto; max-height: 80vh; aspect-ratio: 9 / 16; background: var(--bg); border: 1px solid var(--gold); object-fit: contain; }
@media (min-width: 768px) {
  .tour { grid-template-columns: 1fr auto; gap: 4rem; }
  .tour-text { justify-self: start; }
  .tour-video { width: auto; height: min(80vh, 640px); }
}

/* ===== Faixa em movimento ===== */
.marquee { overflow: hidden; background: var(--gold); color: var(--bg); padding-block: 0.9rem; }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee span { padding-inline: 1.25rem; font: 700 clamp(1rem, 3vw, 1.5rem)/1 var(--serif); text-transform: uppercase; letter-spacing: 0.14em; white-space: nowrap; }
.marquee span::after { content: "◆"; margin-left: 2.5rem; font-size: 0.6em; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== 3. Galeria (colunas, proporções variadas) ===== */
.gallery { columns: 2; column-gap: 0.75rem; }
.gallery > * { break-inside: avoid; margin-bottom: 0.75rem; }
.gallery img { width: 100%; height: auto; background: var(--surface); }
@media (min-width: 1024px) { .gallery { columns: 3; column-gap: 1rem; } .gallery > * { margin-bottom: 1rem; } }
.values { display: flex; flex-direction: column; justify-content: center; gap: 0.5rem; min-height: 10rem; padding: 1.25rem 1rem; background: var(--surface); border: 1px solid var(--gold); font: 700 clamp(1rem, 3.4vw, 2rem)/1.2 var(--serif); text-transform: uppercase; letter-spacing: 0.08em; color: var(--beige); overflow-wrap: anywhere; }

/* ===== 4. Localização ===== */
address { font-size: 1.125rem; max-width: 40ch; }
address .note { display: inline; margin: 0; }
.map { position: relative; display: grid; place-content: center; justify-items: center; gap: 0.75rem; margin-block: 2rem; min-height: 320px; aspect-ratio: 4 / 3; max-height: 480px; width: 100%; background: var(--surface); color: var(--warm); text-align: center; padding: 1rem; }
.map .btn-dark { background: var(--beige); color: var(--bg); }
.map .note { color: var(--muted-dark); margin: 0; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ===== Galeria: hover e ampliação ===== */
.gallery figure { position: relative; cursor: zoom-in; }
.gallery img { transition: scale 0.8s ease, opacity 0.6s ease; }
.js .gallery figure { background: var(--surface); }
.js .gallery img { opacity: 0; }
.js .gallery figure.ld img { opacity: 1; }
.gallery figure::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, transparent 30%, rgba(184, 151, 90, 0.16) 50%, transparent 70%); transform: translateX(-100%); animation: shimmer 1.4s ease-in-out infinite; pointer-events: none; }
.gallery figure.ld::before { display: none; }
@keyframes shimmer { to { transform: translateX(100%); } }
.gallery figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(184, 151, 90, 0.35), transparent 60%); opacity: 0; transition: opacity 0.4s; pointer-events: none; }
@media (hover: hover) { .gallery figure:hover img { scale: 1.07; } .gallery figure:hover::after { opacity: 1; } }
.lightbox { padding: 0; border: 1px solid var(--gold); background: var(--bg); max-width: 92vw; max-height: 92vh; cursor: zoom-out; }
.lightbox::backdrop { background: rgba(13, 13, 13, 0.92); }
.lightbox img { display: block; max-width: 92vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; }

/* ===== Menu do topo e barra de progresso ===== */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: 0.5rem clamp(1.25rem, 5vw, 3rem); background: rgba(13, 13, 13, 0.92); border-bottom: 1px solid var(--gold); transform: translateY(-100%); visibility: hidden; transition: transform 0.3s ease, visibility 0s 0.3s; }
.topnav.show { transform: none; visibility: visible; transition-delay: 0s; }
.topnav .brand { font: 700 1rem/1 var(--serif); text-transform: uppercase; letter-spacing: 0.14em; text-decoration: none; color: var(--beige); min-height: 44px; display: inline-flex; align-items: center; }
.topnav .links { display: none; gap: 1.75rem; }
.topnav .links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--warm); transition: color 0.2s; }
.topnav .links a:hover { color: var(--gold); }
@media (min-width: 768px) { .topnav .links { display: flex; } }
section[id] { scroll-margin-top: 4rem; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: var(--gold); transform: scaleX(0); transform-origin: left; }
@supports (animation-timeline: scroll()) { .progress { animation: grow linear both; animation-timeline: scroll(root); } }
@keyframes grow { to { transform: scaleX(1); } }

/* ===== Texto gigante ao fundo da galeria ===== */
#galeria { position: relative; overflow: hidden; }
#galeria::before { content: "PIASSINI"; position: absolute; top: 4rem; left: 5vw; font: 700 18vw/1 var(--serif); letter-spacing: 0.04em; color: transparent; -webkit-text-stroke: 1px rgba(184, 151, 90, 0.28); white-space: nowrap; pointer-events: none; }
#galeria .wrap { position: relative; }
@supports (animation-timeline: view()) { #galeria::before { animation: slide linear both; animation-timeline: view(); } }
@keyframes slide { from { transform: translateX(3vw); } to { transform: translateX(-3vw); } }

/* ===== 6. Rodapé ===== */
.foot { position: relative; padding-block: 3rem; border-top: 1px solid var(--gold); }
.foot::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: repeating-linear-gradient(-45deg, #B3262D 0 12px, var(--warm) 12px 24px, #1F3F8A 24px 36px); background-size: 51px 8px; animation: stripes 1.5s linear infinite; }
@keyframes stripes { to { background-position-x: 51px; } }
.foot-name { font: 700 1.125rem/1.3 var(--serif); text-transform: uppercase; letter-spacing: 0.12em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 0.75rem; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--beige); }

/* ===== Grão estático (arquivo próprio, por causa do CSP) ===== */
body::after { content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; background: url("../media/grain.svg"); opacity: 0.07; }

/* ===== CTA fixo no celular: aparece depois do hero (main.js) ===== */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: center; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--gold); transform: translateY(100%); visibility: hidden; transition: transform 0.3s ease, visibility 0s 0.3s; }
.sticky-cta.show { transform: none; visibility: visible; transition-delay: 0s; }
.sticky-cta .btn { width: 100%; max-width: 420px; }
@media (max-width: 767px) { .foot { padding-bottom: 6rem; } }
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* ===== Revelação ao rolar (só com JS) ===== */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* títulos: linha dourada se desenha; galeria: cortina */
.js .reveal h2::after { width: 0; transition: width 0.8s ease 0.3s; }
.js .reveal.in h2::after { width: 56px; }
.gallery figure { overflow: hidden; }
.js .gallery figure.reveal { opacity: 1; transform: none; }
.js .gallery figure.reveal img { clip-path: inset(0 0 100% 0); transition: clip-path 0.9s cubic-bezier(0.7, 0, 0.2, 1); }
.js .gallery figure.reveal.in img { clip-path: inset(0); }

/* parallax ligado ao scroll (CSS puro; navegadores sem suporte ignoram) */
@keyframes drift { from { transform: scale(1.14) translateY(-5%); } to { transform: scale(1.14) translateY(5%); } }
@keyframes leave { to { translate: 0 -70px; opacity: 0.15; } }
@supports (animation-timeline: view()) {
  .gallery img { animation: drift linear both; animation-timeline: view(); }
  .hero-content { animation: leave linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
}

/* ===== Abertura ===== */
.intro-overlay { display: none; }
.intro .intro-overlay { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: var(--bg); animation: curtain 0.6s cubic-bezier(0.7, 0, 0.2, 1) 2.2s forwards; }
.intro-logo { width: min(60vw, 260px); height: auto; overflow: visible; animation: fade-out 0.3s ease 2s forwards; }
/* o contorno se desenha (pathLength=1 normaliza o traço) e depois o preenchimento aparece */
.intro-logo g { fill: transparent; stroke: var(--beige); stroke-width: 10; stroke-linejoin: round; animation: fill-in 0.7s ease 1.2s forwards; }
.intro-logo path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s ease-in-out forwards; }
.intro .hero-bg, .intro .hero-video { animation: zoom 2.9s ease-out both; }
.intro .hero-content > * { animation: rise 0.5s ease both; }
.intro .hero-content > :nth-child(1) { animation-delay: 2.2s; }
.intro .hero-content > :nth-child(2) { animation-delay: 2.27s; }
.intro .hero-content > :nth-child(3) { animation-delay: 2.34s; }
.intro .hero-content > :nth-child(4) { animation-delay: 2.41s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill: var(--beige); stroke-opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes curtain { from { clip-path: inset(0); } to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
@keyframes zoom { from { transform: scale(1.05); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0.4; transform: translateY(16px); } to { opacity: 1; transform: none; } }


/* ===== Movimento reduzido ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro-overlay { display: none !important; }
  .intro .hero-bg, .intro .hero-video, .intro .hero-content > * { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .sticky-cta { transition: none; }
  .progress, #galeria::before, .topnav, .gallery img { transition: none; }
  .gallery figure::before { animation: none; }
  .progress, #galeria::before { animation: none; }
  .hero-bg::before, .hero-bg::after, .marquee-track, .foot::before, .gallery img, .hero-content { animation: none; }
  .js .gallery figure.reveal img { clip-path: none; transition: none; }
  .js .reveal h2::after { width: 56px; transition: none; }
  .btn:hover { transform: none; }
}
