/* ============================================================
   Horsehead — Home pública · v2 (clean / 2026)
   craft beer + espaço profundo + fotografia documental
   ============================================================ */
:root {
    --ink: #07070d;
    --panel: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.09);
    --text: #ecebf4;
    --muted: #9b96ae;
    --magenta: #d24bd6;
    --violet: #8a5cf6;
    --wrap: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--ink);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { text-wrap: balance; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

/* Container central — nada estica em telas largas */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
section[id] { scroll-margin-top: 90px; }

/* Céu: gradientes profundos; nebulosa entra com FADE (sem emenda visível) */
.sky {
    position: fixed; inset: -10% 0; z-index: -2;
    background:
        radial-gradient(55% 42% at 80% 8%, rgba(150, 40, 160, 0.28), transparent 65%),
        radial-gradient(42% 38% at 12% 66%, rgba(70, 40, 160, 0.18), transparent 65%),
        linear-gradient(180deg, #0b0716 0%, #07070d 52%, #060609 100%);
    will-change: transform;
}
.sky::before {
    content: '';
    position: absolute; top: -6%; right: -8%;
    width: min(62vw, 980px); aspect-ratio: 1;
    background: url('/assets/brand/nebula.jpg') center / cover no-repeat;
    opacity: 0.34;
    mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 78%);
    mask-image: radial-gradient(closest-side, #000 30%, transparent 78%);
}
.stars {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.7), transparent 100%),
        radial-gradient(1px 1px at 34% 8%, rgba(255,255,255,0.5), transparent 100%),
        radial-gradient(1.4px 1.4px at 58% 30%, rgba(255,255,255,0.6), transparent 100%),
        radial-gradient(1px 1px at 79% 18%, rgba(255,255,255,0.45), transparent 100%),
        radial-gradient(1px 1px at 90% 46%, rgba(255,255,255,0.5), transparent 100%),
        radial-gradient(1.3px 1.3px at 22% 58%, rgba(255,255,255,0.4), transparent 100%),
        radial-gradient(1px 1px at 44% 76%, rgba(255,255,255,0.45), transparent 100%),
        radial-gradient(1px 1px at 68% 64%, rgba(255,255,255,0.35), transparent 100%),
        radial-gradient(1.3px 1.3px at 85% 84%, rgba(255,255,255,0.45), transparent 100%);
    animation: twinkle 10s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.5; } to { opacity: 0.9; } }
/* grain bem leve */
body::after {
    content: '';
    position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* Header sticky com blur */
.hh-header {
    position: sticky; top: 0; z-index: 30;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(7, 7, 13, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hh-header .wrap {
    display: flex; justify-content: space-between; align-items: center;
    padding-block: 0.8rem;
}
.hh-logo { display: flex; align-items: center; gap: 0.7rem; }
.hh-logo img { height: 42px; width: auto; }
.hh-logo span {
    font-weight: 800; letter-spacing: 0.22em; font-size: 0.95rem;
}
.hh-nav { display: flex; gap: clamp(0.8rem, 2.2vw, 1.8rem); flex-wrap: wrap; }
.hh-nav a {
    font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--muted); transition: color 0.2s; padding-block: 0.3rem;
}
.hh-nav a:hover { color: #fff; }

/* Hero */
.hero { padding-block: clamp(3rem, 9vh, 6.5rem) clamp(3rem, 7vh, 5rem); }
.hero .wrap {
    display: grid; grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    line-height: 1.05; letter-spacing: 0.01em;
    margin: 0 0 1.2rem; font-weight: 800;
}
.grad {
    background: linear-gradient(92deg, var(--magenta), var(--violet) 60%, #5aa7ff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: var(--muted); font-size: 1.03rem; line-height: 1.7; margin: 0 0 2rem; max-width: 46ch; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hbtn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 1.5rem; border-radius: 12px;
    font-size: 0.87rem; font-weight: 600; letter-spacing: 0.03em;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hbtn.solid { background: linear-gradient(92deg, var(--magenta), var(--violet)); color: #fff; box-shadow: 0 4px 20px rgba(178, 72, 214, 0.3); }
.hbtn.ghost { border: 1px solid var(--border); color: var(--text); }
.hbtn:hover { transform: translateY(-2px); }
.hbtn.solid:hover { box-shadow: 0 8px 28px rgba(178, 72, 214, 0.42); }
.hbtn.ghost:hover { border-color: var(--magenta); }

.hero-photo { position: relative; }
.hero-photo img {
    width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.hero-photo::after {  /* vinheta + luz cósmica sutil sobre a foto */
    content: ''; position: absolute; inset: 0; border-radius: 22px; pointer-events: none;
    background:
        linear-gradient(180deg, rgba(11, 7, 22, 0.12), transparent 30%, transparent 72%, rgba(7, 7, 13, 0.45)),
        radial-gradient(80% 60% at 85% 8%, rgba(178, 72, 214, 0.14), transparent 60%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

/* Seções */
.sec { padding-block: clamp(3rem, 9vh, 6rem); }
.sec h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 0.5rem; }
.sec-head { margin-bottom: 2rem; max-width: 58ch; }

/* Cervejas */
.beer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.beer-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0.85rem 0.85rem 1.1rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.beer-card:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 22px color-mix(in srgb, var(--accent) 18%, transparent);
}
.beer-photo { aspect-ratio: 1; border-radius: 12px; overflow: hidden; margin-bottom: 0.8rem; background: rgba(0,0,0,0.35); }
.beer-photo img { width: 100%; height: 100%; object-fit: cover; }
.beer-abstract {
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(70% 60% at 50% 34%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 74%),
        rgba(0, 0, 0, 0.4);
}
.beer-glyph { font-size: 1.8rem; color: var(--accent); text-shadow: 0 0 16px var(--accent); }
.beer-line { height: 2px; width: 38px; background: var(--accent); border-radius: 2px; margin-bottom: 0.55rem; }
.beer-card h3 { margin: 0 0 0.3rem; font-size: 0.98rem; letter-spacing: 0.05em; text-transform: uppercase; }
.beer-meta { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.55; }

/* História / splits */
.split .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split p { line-height: 1.75; max-width: 52ch; }
.split-photo img { border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); }
.split-photo.wide { max-width: 860px; margin: 2.4rem auto 0; }
.caption { text-align: center; margin-top: 0.7rem; }
.timeline { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.timeline li { padding: 0.45rem 0 0.45rem 1rem; border-left: 2px solid rgba(178, 72, 214, 0.35); margin-left: 0.2rem; color: var(--muted); }
.timeline li span { color: var(--magenta); font-weight: 700; margin-right: 0.6rem; }

/* Homebrewing */
.brew-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem 0.9rem; }
.brew-step {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
    padding: 1rem 1.4rem; font-size: 0.85rem; color: var(--muted); min-width: 108px;
}
.brew-ico { font-size: 1.4rem; }
.brew-arrow { color: var(--magenta); opacity: 0.6; }

/* Nebulosa */
.nebula-card {
    display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
    background: rgba(12, 7, 22, 0.5);
    border: 1px solid rgba(178, 72, 214, 0.22);
    border-radius: 22px;
    padding: clamp(1.5rem, 4vw, 2.8rem);
}
.nebula-card img { border-radius: 16px; }
.nebula-card p { line-height: 1.75; }
.nebula-figure { margin: 0; }
.nebula-figure figcaption { font-size: 0.72rem; margin-top: 0.5rem; text-align: right; opacity: 0.7; }

/* Galeria */
.mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.7rem; }
.mosaic-item { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 14px; overflow: hidden; aspect-ratio: 1; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease, filter 0.3s ease; filter: saturate(0.95); }
.mosaic-item:hover img { transform: scale(1.04); filter: saturate(1.08); }

/* Instagram */
.insta { text-align: center; }
.insta .hbtn { margin-top: 1.2rem; }

/* Footer */
.hh-footer { border-top: 1px solid var(--border); background: rgba(0, 0, 0, 0.35); }
.hh-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 2rem; padding-block: 2.6rem 1.4rem; }
.foot-brand img { height: 40px; margin-bottom: 0.7rem; }
.foot-cols { display: flex; gap: clamp(1.5rem, 5vw, 4rem); justify-content: flex-end; flex-wrap: wrap; }
.foot-cols strong { display: block; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.6rem; color: var(--muted); }
.foot-cols a { display: block; font-size: 0.88rem; color: var(--muted); padding: 0.2rem 0; }
.foot-cols a:hover { color: #fff; }
.foot-bottom {
    grid-column: 1 / -1;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem;
    border-top: 1px solid var(--border); padding-top: 1.1rem; margin-top: 0.4rem;
}
.private-link { font-size: 0.76rem; color: rgba(155, 150, 174, 0.5); transition: color 0.2s; }
.private-link:hover { color: var(--muted); }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(0, 0, 0, 0.93);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; cursor: zoom-out;
}
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; }
.lb-close { position: absolute; top: 1rem; right: 1.2rem; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
[hidden] { display: none !important; }

/* Revelação suave */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .stars { animation: none; }
    html { scroll-behavior: auto; }
}

/* Mobile */
@media (max-width: 860px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-photo { order: -1; max-width: 380px; margin-inline: auto; }
    .hero-photo img { aspect-ratio: 1; }
    .split .wrap, .nebula-card { grid-template-columns: 1fr; }
    .hh-nav { display: none; } /* nav simples no mobile: âncoras via rolagem */
    .hh-footer .wrap { grid-template-columns: 1fr; }
    .foot-cols { justify-content: flex-start; }
    .mosaic { grid-template-columns: repeat(2, 1fr); }
    .beer-grid { grid-template-columns: repeat(2, 1fr); }
}
