/* DIP Drinks: sistema visual compartilhado por index.html, blog.html e os posts.
   O que é só de uma página fica no <style> dela (ou em post-style.css). */
:root {
    --bg: #131209;
    --surface: #1F1F1F;
    --text: #FFFFFF;
    --muted: #9B9B9B;
    --gold: #D1B561; /* dourado da marca com saturação reduzida */
    --line: rgba(255, 255, 255, 0.12);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    font-family: "Manrope", system-ui, sans-serif;
    font-size: 16px; line-height: 24px;
    background: var(--bg); color: var(--muted);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
/* Grão sutil para a superfície não ficar chapada */
body::after {
    content: ""; position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { color: var(--text); font-weight: 600; text-wrap: balance; }
h2 { font-size: 48px; line-height: 1; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 28px; letter-spacing: -0.01em; }
p { max-width: 65ch; text-wrap: pretty; }
p + p { margin-top: 16px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

.skip-link {
    position: absolute; top: -64px; left: 16px; z-index: 60;
    background: var(--gold); color: var(--bg); padding: 8px 12px; border-radius: 4px;
    font-weight: 600; text-decoration: none; transition: top 0.3s var(--ease);
}
.skip-link:focus { top: 16px; }

/* --- Preloader --- */
#preloader {
    position: fixed; inset: 0; z-index: 50;
    background: var(--bg); display: flex; justify-content: center; align-items: center;
    transition: opacity 0.75s var(--ease), visibility 0.75s var(--ease);
}
#preloader.loaded { opacity: 0; visibility: hidden; }
.spinner {
    width: 48px; height: 48px; border: 2px solid var(--line);
    border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Barra de progresso --- */
#scroll-progress-bar {
    position: fixed; top: 0; left: 0; z-index: 40;
    width: 100%; height: 2px; background: var(--gold);
    transform: scaleX(0); transform-origin: left;
}

/* --- Menu hambúrguer (mantido) --- */
#menu-toggle-btn {
    position: fixed; top: 20px; left: 20px;
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid #eee; border-radius: 8px;
    z-index: 30; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.hamburger-line {
    width: 20px; height: 2px; background: #333;
    display: block; margin: 4px auto;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
#menu-toggle-btn.active .line-1 { transform: translateY(6px) rotate(45deg); }
#menu-toggle-btn.active .line-2 { opacity: 0; }
#menu-toggle-btn.active .line-3 { transform: translateY(-6px) rotate(-45deg); }

#menu-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 20;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transform: scale(1.1);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}
#menu-overlay.active { opacity: 1; visibility: visible; transform: scale(1); }
#menu-overlay ul { list-style: none; text-align: center; }
#menu-overlay ul li {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#menu-overlay.active ul li:nth-child(1) { transition-delay: 0.2s; }
#menu-overlay.active ul li:nth-child(2) { transition-delay: 0.3s; }
#menu-overlay.active ul li:nth-child(3) { transition-delay: 0.4s; }
#menu-overlay.active ul li:nth-child(4) { transition-delay: 0.5s; }
#menu-overlay.active ul li:nth-child(5) { transition-delay: 0.6s; }
#menu-overlay.active ul li:nth-child(6) { transition-delay: 0.7s; }
#menu-overlay.active ul li:nth-child(7) { transition-delay: 0.8s; }
#menu-overlay.active ul li { opacity: 1; transform: translateY(0); }
#menu-overlay ul li a {
    text-decoration: none; color: #fff; font-size: 2rem;
    font-weight: 500; line-height: 3;
    transition: color 0.3s ease;
}
#menu-overlay ul li a:hover { color: var(--gold); }
.menu-logo-img { width: 100px; height: auto; margin: 0 auto 1rem; }

/* --- Botão --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--gold); color: var(--bg);
    padding: 8px 12px; border: 0; border-radius: 4px;
    font: 600 16px/24px "Manrope", system-ui, sans-serif;
    text-decoration: none; cursor: pointer;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--text); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* --- Estrutura das seções --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0 96px; }
.section-head {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
    margin-bottom: 64px;
}
.section-head h2 { max-width: 680px; }
.eyebrow {
    display: block; margin-bottom: 16px;
    font-size: 12px; line-height: 16px; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
}
.lead { font-size: 18px; line-height: 28px; color: var(--text); }
.link-arrow {
    display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
    color: var(--text); text-decoration: none;
    font-size: 14px; line-height: 20px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    transition: color 0.3s var(--ease);
}
.link-arrow .icon { width: 16px; height: 16px; transition: transform 0.5s var(--ease); }
.link-arrow:hover { color: var(--gold); }
.link-arrow:hover .icon { transform: translateX(4px); }
.index {
    display: block; margin-bottom: 16px;
    font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.08em;
    color: var(--gold); font-variant-numeric: tabular-nums;
}
.media { overflow: hidden; border-radius: 4px; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.post-date {
    display: block; margin-bottom: 8px;
    font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}

/* --- Rodapé --- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-brand img { width: 48px; height: auto; margin-bottom: 16px; }
.footer-title { margin-bottom: 12px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; transition: color 0.3s var(--ease); }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line);
    font-size: 14px; line-height: 20px;
}
.footer-bottom p { margin: 0; } /* anula o p + p: aqui os dois ficam lado a lado */

/* --- Voltar ao topo --- */
#back-to-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 10;
    width: 40px; height: 40px; display: grid; place-items: center;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--line); border-radius: 4px;
    opacity: 0; visibility: hidden; transform: translateY(16px);
    transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease), transform 0.5s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
#back-to-top.show { opacity: 1; visibility: visible; transform: none; }
#back-to-top:hover { color: var(--gold); border-color: var(--gold); }

/* --- Entrada editorial: texto sobe por trás de uma máscara, foto abre como cortina, linha se desenha --- */
.hairline { position: relative; }
.hairline::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: var(--line); transform-origin: left;
    transition: transform 1.2s var(--ease) var(--d, 0ms);
}
[data-reveal] :is(h2, h3, blockquote) {
    clip-path: inset(-0.3em);
    transition: transform 1.1s var(--ease) var(--d, 0ms), clip-path 1.1s var(--ease) var(--d, 0ms), color 0.3s var(--ease);
}
[data-reveal] .media { clip-path: inset(0 round 4px); transition: clip-path 1.2s var(--ease) var(--d, 0ms); }
[data-reveal] :is(p, .eyebrow, .index, figcaption, .brands, .post-date, .filters, .contact-links, .form-group) {
    transition: opacity 0.8s var(--ease) calc(var(--d, 0ms) + 200ms);
}
[data-reveal] .link-arrow { transition: color 0.3s var(--ease), opacity 0.8s var(--ease) calc(var(--d, 0ms) + 200ms); }
[data-reveal] .btn-submit { transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.8s var(--ease) calc(var(--d, 0ms) + 200ms); }

@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal]:not(.is-in) :is(h2, h3, blockquote) {
        transform: translateY(calc(100% + 0.3em));
        clip-path: inset(calc(-100% - 0.6em) -0.3em 100% -0.3em);
    }
    .js [data-reveal]:not(.is-in) .media { clip-path: inset(100% 0 0 0 round 4px); }
    .js [data-reveal]:not(.is-in) .media img { transform: scale(1.15); }
    .js [data-reveal]:not(.is-in) :is(p, .eyebrow, .index, figcaption, .brands, .post-date, .filters, .contact-links, .form-group, .link-arrow, .btn-submit) { opacity: 0; }
    .js [data-reveal]:not(.is-in).hairline::before, .js [data-reveal]:not(.is-in) .hairline::before { transform: scaleX(0); }
}

/* --- Título de página (blog e posts): degradê do hero + entrada por máscara ao carregar --- */
.page-title {
    font-size: 48px; line-height: 1; letter-spacing: -0.02em;
    padding-bottom: 0.15em; /* senão o degradê corta a perna do g e do ç */
    background: linear-gradient(90deg, #FFFFFF, #9B9B9B);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes rise {
    from { transform: translateY(calc(100% + 0.3em)); clip-path: inset(calc(-100% - 0.6em) -0.3em 100% -0.3em); }
    to { transform: none; clip-path: inset(-0.3em); }
}
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
    .page-title { animation: rise 1.1s var(--ease) both; }
    .page-intro { animation: fade 0.8s var(--ease) 0.3s both; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .media img { transition: none; }
}

/* --- Responsivo --- */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .section { padding: 64px 0 80px; }
    h2 { font-size: 36px; line-height: 40px; }
    .page-title { font-size: 36px; line-height: 40px; }
    .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 48px; }
    #menu-toggle-btn { top: 15px; left: 15px; right: auto; }
    #menu-overlay ul li a { font-size: 1.8rem; }
}
