@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Great+Vibes&display=swap");
/* Barra fixa no topo e rodapé — todas as páginas públicas (montados por site-menu.js).
   Seletores com #site-top / #site-foot: as páginas têm CSS próprio para header, nav e links. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

:root {
    --brand-wine: #7a2e3a;
    --brand-wine-deep: #3e1f22;
    --brand-cream: #f5eee3;
    --brand-sage: #9aa98a;
    --brand-gold: #d8b97c;
    --site-top-h: 64px;
    --site-top-ink: #1f1d1b;
    --site-top-muted: #6b645b;
    --site-top-wine: var(--brand-wine);
}
html[data-theme="dark"] {
    --site-top-ink: #f4efe8;
    --site-top-muted: #c4bdb4;
    --site-top-wine: #e6a9b1;
}
@media (max-width: 980px) {
    :root { --site-top-h: 58px; }
}

html { scroll-padding-top: calc(var(--site-top-h) + 12px); }

#site-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: auto;
    height: var(--site-top-h);
    margin: 0;
    padding: 0;
    background: rgba(246, 241, 234, 0.95);
    border: 0;
    border-bottom: 1px solid rgba(31, 29, 27, 0.08);
    border-radius: 0;
    box-shadow: none;
    color: var(--site-top-ink);
    font-family: "Nunito", "Segoe UI", sans-serif;
    line-height: 1.2;
    text-align: left;
    -webkit-backdrop-filter: saturate(1.2) blur(10px);
    backdrop-filter: saturate(1.2) blur(10px);
    transition: box-shadow 0.25s ease;
    view-transition-name: site-top;
}
#site-top.is-scrolled { box-shadow: 0 6px 24px rgba(40, 36, 32, 0.1); }
.site-top-spacer { display: block; height: var(--site-top-h); margin: 0; padding: 0; }

#site-top .site-top-in {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

#site-top .site-top-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    background: none;
    line-height: 1;
    color: var(--brand-wine-deep);
    text-decoration: none;
}
#site-top .site-top-logo-mark { display: block; width: 44px; height: 44px; object-fit: contain; }
#site-top .site-top-logo-mark--dark { display: none; }
#site-top .site-top-logo-text { display: flex; flex-direction: column; gap: 0.3rem; }
#site-top .site-top-logo-name {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.14rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--brand-wine);
}
#site-top .site-top-logo-sur {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--brand-wine-deep);
}
#site-top .site-top-logo:hover .site-top-logo-name { color: var(--brand-wine-deep); }

#site-top .site-top-nav {
    position: static;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}
#site-top .site-top-link {
    position: relative;
    display: inline-block;
    margin: 0;
    padding: 0.4rem 0;
    background: none;
    border: 0;
    border-radius: 0;
    font-family: "Nunito", "Segoe UI", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--site-top-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}
#site-top .site-top-link::before { display: none; }
#site-top .site-top-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
#site-top .site-top-link:hover { color: var(--site-top-wine); }
#site-top .site-top-link:hover::after,
#site-top .site-top-link.is-active::after { transform: scaleX(1); }
#site-top .site-top-link.is-active { color: var(--site-top-wine); }
#site-top .site-top-link--soft {
    text-transform: none;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--site-top-muted);
}
#site-top .site-top-sep { color: var(--site-top-muted); margin: 0 -0.6rem; }

#site-top .site-top-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}
#site-top .site-top-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--site-top-ink);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
#site-top .site-top-icon:hover { background: rgba(31, 29, 27, 0.07); color: var(--site-top-wine); }
#site-top .site-top-icon svg { width: 19px; height: 19px; }

#site-top .site-top-cta {
    display: inline-block;
    margin: 0 0 0 0.4rem;
    padding: 0.5rem 1.15rem;
    background: transparent;
    border: 1.5px solid var(--site-top-ink);
    border-radius: 999px;
    box-shadow: none;
    font-family: "Nunito", "Segoe UI", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.2;
    color: var(--site-top-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
#site-top .site-top-cta:hover,
#site-top .site-top-cta.is-active {
    background: var(--site-top-wine);
    border-color: var(--site-top-wine);
    color: #fffdf9;
}

#site-top .site-top-burger {
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    color: var(--site-top-ink);
    cursor: pointer;
}
#site-top .site-top-burger .material-icons-outlined { font-size: 1.55rem; }

@media (max-width: 1120px) {
    #site-top .site-top-nav { gap: 1.15rem; }
    #site-top .site-top-in { gap: 1rem; }
}
@media (max-width: 1240px) {
    #site-top .site-top-nav { gap: 1rem; }
    #site-top .site-top-link { letter-spacing: 0.1em; }
}
@media (max-width: 1100px) {
    #site-top .site-top-nav { gap: 0.8rem; }
    #site-top .site-top-link { font-size: 0.68rem; letter-spacing: 0.06em; }
    #site-top .site-top-icon--ig { display: none; }
    #site-top .site-top-logo-name { letter-spacing: 0.14em; }
}
@media (max-width: 1040px) {
    #site-top .site-top-nav { gap: 0.6rem; }
    #site-top .site-top-in { gap: 0.75rem; }
    #site-top .site-top-sep { margin: 0 -0.25rem; }
}
@media (max-width: 980px) {
    #site-top .site-top-in { padding: 0 0.6rem 0 1rem; }
    #site-top .site-top-nav,
    #site-top .site-top-icon { display: none; }
    #site-top .site-top-actions { margin-left: auto; }
    #site-top .site-top-burger { display: grid; }
    #site-top .site-top-logo-mark { width: 38px; height: 38px; }
    #site-top .site-top-logo-name { font-size: 1rem; letter-spacing: 0.16em; }
    #site-top .site-top-logo-sur { font-size: 0.6rem; letter-spacing: 0.12em; }
    #site-top .site-top-cta { padding: 0.42rem 0.9rem; font-size: 0.68rem; letter-spacing: 0.1em; }
}

/* Menu lateral e avisos acima da barra */
.home-menu { z-index: 1150; }
.home-menu-link.is-active { color: var(--site-top-wine); }
.home-menu-fab { display: none !important; }
.member-toast { top: calc(var(--site-top-h) + 0.75rem); }

/* O respiro do topo era para o botão flutuante antigo; a barra já ocupa esse espaço */
.has-site-top.site-menu-on .page-header,
.has-site-top.site-menu-on .sub-page-hero,
.has-site-top.site-menu-on .biblioteca-hero { padding-top: 2.75rem !important; }

/* Barras "sticky" das páginas ficam logo abaixo da barra fixa */
.has-site-top .be-switch,
.has-site-top .lg-filter,
.has-site-top .af-phases { top: var(--site-top-h); }

/* Cabeçalhos próprios das páginas viram só trilha (breadcrumb) */
.has-site-top .rb-brand,
.has-site-top .lg-brand,
.has-site-top .porta-brand {
    font-family: "Nunito", "Segoe UI", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 380px) {
    #site-top .site-top-logo { gap: 0.4rem; }
    #site-top .site-top-logo-mark { width: 34px; height: 34px; }
    #site-top .site-top-logo-name { font-size: 0.9rem; letter-spacing: 0.12em; }
    #site-top .site-top-logo-sur { font-size: 0.54rem; letter-spacing: 0.08em; }
}

html[data-theme="dark"] #site-top {
    background: rgba(28, 26, 24, 0.94);
    border-bottom-color: rgba(244, 239, 232, 0.08);
}
html[data-theme="dark"] #site-top .site-top-logo-name { color: #f4efe8; }
html[data-theme="dark"] #site-top .site-top-logo-sur { color: #e6a9b1; }
html[data-theme="dark"] #site-top .site-top-logo-mark { display: none; }
html[data-theme="dark"] #site-top .site-top-logo-mark--dark { display: block; }
html[data-theme="dark"] #site-top .site-top-icon:hover { background: rgba(244, 239, 232, 0.08); }
html[data-theme="dark"] #site-top .site-top-cta:hover,
html[data-theme="dark"] #site-top .site-top-cta.is-active { background: var(--brand-wine); border-color: var(--brand-wine); color: #fffdf9; }

.home-menu-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: "Cormorant Garamond", Georgia, serif !important;
    font-size: 1.05rem !important;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-wine) !important;
}
.home-menu-brand span { display: flex; flex-direction: column; gap: 0.25rem; }
.home-menu-brand small { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; color: var(--brand-wine-deep); }
.home-menu-brand img { width: 38px; height: 38px; object-fit: contain; }
.home-menu-brand-mark--dark { display: none; }
html[data-theme="dark"] .home-menu-brand { color: #f4efe8 !important; }
html[data-theme="dark"] .home-menu-brand small { color: #e6a9b1; }
html[data-theme="dark"] .home-menu-brand-mark { display: none; }
html[data-theme="dark"] .home-menu-brand-mark--dark { display: block; }

/* Rodapé único (montado por site-menu.js); os rodapés antigos de cada página ficam ocultos */
.has-site-foot footer:not(#site-foot) { display: none !important; }

#site-foot {
    position: relative;
    margin: 0;
    padding: 3.5rem 1.5rem 1.6rem;
    background: var(--brand-wine-deep);
    color: #efe4d6;
    font-family: "Nunito", "Segoe UI", sans-serif;
    font-size: 0.92rem;
    line-height: 1.55;
    text-align: left;
}
#site-foot::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-wine), var(--brand-gold), var(--brand-sage));
}
#site-foot a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
#site-foot a:hover { color: var(--brand-gold); }
#site-foot .sf-in {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1180px;
    margin: 0 auto;
}
#site-foot .sf-brand-row { display: flex; align-items: center; gap: 0.8rem; }
#site-foot .sf-brand-row img { width: 72px; height: 72px; object-fit: contain; }
#site-foot .sf-name {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #f5eee3;
}
#site-foot .sf-sur {
    display: block;
    margin-top: 0.4rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-gold);
}
#site-foot .sf-about { margin: 1rem 0 0; max-width: 34ch; color: #d9cabb; }
#site-foot h2 {
    margin: 0 0 0.9rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f5eee3;
}
#site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
#site-foot .sf-soft { color: #bda999; font-size: 0.85rem; }
#site-foot .sf-help {
    max-width: 1180px;
    margin: 2.4rem auto 0;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(216, 185, 124, 0.35);
    border-radius: 14px;
    color: #efe4d6;
    font-size: 0.88rem;
}
#site-foot .sf-help strong { color: var(--brand-gold); }
#site-foot .sf-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.6rem 1.5rem;
    max-width: 1180px;
    margin: 1.4rem auto 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(245, 238, 227, 0.14);
    color: #bda999;
    font-size: 0.8rem;
}
html[data-theme="dark"] #site-foot { background: #1f1416; }

@media (max-width: 900px) {
    #site-foot .sf-in { grid-template-columns: 1fr 1fr; gap: 2rem; }
    #site-foot .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    #site-foot { padding: 2.6rem 1.2rem 1.4rem; }
    #site-foot .sf-brand-row img { width: 58px; height: 58px; }
    #site-foot .sf-name { font-size: 1.15rem; letter-spacing: 0.14em; }
    #site-foot .sf-sur { font-size: 0.68rem; letter-spacing: 0.1em; }
    #site-foot .sf-in { grid-template-columns: 1fr; gap: 1.6rem; }
}
