/* ============================================================
   Humanitatis Europae — CSS
   Paleta e linguagem visual do documento oficial
   ============================================================ */

:root {
    --he-dark:    #170b3a;
    --he-darker:  #0f0726;
    --he-mid:     #1e1050;
    --he-yellow:  #f5d22d;
    --he-green:   #5dd74f;
    --he-red:     #e63535;
    --he-cyan:    #4dd4e0;
    --he-blue:    #4a90d9;
    --he-mag:     #cf4fc0;
    --he-orange:  #f07c2a;
    --he-white:   #ffffff;
    --he-cream:   #f8f6f0;
    --he-ghost:   rgba(255,255,255,0.55);
    --he-ghost2:  rgba(255,255,255,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #1a1a2e;
    background: var(--he-white);
    overflow-x: hidden;
}

/* ── Utils ────────────────────────────────────────────────── */
.he-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Decorative rule — linha curta do documento */
.he-rule {
    width: 40px;
    height: 2px;
    background: var(--he-yellow);
    margin-bottom: 1.5rem;
}
.he-rule-light {
    background: rgba(255,255,255,0.35);
}

/* Color classes para letras individuais */
.c-y  { color: var(--he-yellow);  }
.c-g  { color: var(--he-green);   }
.c-r  { color: var(--he-red);     }
.c-c  { color: var(--he-cyan);    }
.c-b  { color: var(--he-blue);    }
.c-m  { color: var(--he-mag);     }
.c-o  { color: var(--he-orange);  }

/* ── Navbar ───────────────────────────────────────────────── */
.he-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--he-darker);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.he-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.he-nav-logo {
    display: flex;
    align-items: center;
}
.he-nav-logo img {
    height: 36px;
    display: block;
}
.he-nav-back {
    font-size: .78rem;
    color: var(--he-ghost);
    text-decoration: none;
    letter-spacing: .04em;
    transition: color .2s;
}
.he-nav-back:hover { color: var(--he-yellow); }

/* ── Hero ─────────────────────────────────────────────────── */
.he-hero {
    background: var(--he-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 2rem 80px;
    position: relative;
    overflow: hidden;
}
/* Subtle radial glow centrado */
.he-hero::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw; height: 80vh;
    background: radial-gradient(ellipse, rgba(42,40,120,0.55) 0%, transparent 70%);
    pointer-events: none;
}
.he-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.he-hero-title-img {
    max-height: 52vh;
    width: auto;
    max-width: 88vw;
    display: block;
    filter: drop-shadow(0 6px 48px rgba(0,0,0,.5));
}
.he-hero-tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--he-ghost);
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1.8;
}
.he-btn {
    display: inline-block;
    padding: .8rem 2rem;
    border: 1px solid var(--he-yellow);
    color: var(--he-yellow);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background .2s, color .2s;
    border-radius: 2px;
}
.he-btn:hover {
    background: var(--he-yellow);
    color: var(--he-dark);
}

/* ── Section Break (NÁUTICA PARA TODOS) ──────────────────── */
.he-break {
    background: var(--he-mid);
    padding: 5rem 2rem;
    overflow: hidden;
}
.he-break-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 5rem;
}
.he-kayak-art {
    flex-shrink: 0;
}
.he-canoa-img {
    height: 380px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.4));
}
.he-break-text {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}
.he-break-bold {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -.01em;
}
.he-break-light {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 2.8vw, 2rem);
    line-height: 1.4;
    color: var(--he-ghost);
    letter-spacing: .08em;
}

/* ── Sections ─────────────────────────────────────────────── */
.he-section { padding: 6rem 0; }
.he-white    { background: var(--he-cream); }
.he-dark     { background: var(--he-dark); }

.he-section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    letter-spacing: -.01em;
    color: var(--he-dark);
    margin-bottom: 2rem;
}
.he-title-light { color: var(--he-white); }

/* Texto em colunas (páginas brancas) */
.he-text-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    font-size: .97rem;
    line-height: 1.85;
    color: #333;
}
.he-text-cols strong { color: var(--he-dark); }

/* Quote block (páginas escuras) */
.he-quote-block {
    max-width: 820px;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--he-ghost);
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Pilares */
.he-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.he-pillar {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    transition: background .2s;
}
.he-pillar:hover { background: rgba(255,255,255,0.1); }
.he-pillar-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.he-pillar h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--he-yellow);
    margin-bottom: .6rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.he-pillar p {
    font-size: .88rem;
    line-height: 1.7;
    color: var(--he-ghost);
}

/* Parceiros */
.he-partners {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}
.he-partner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
}
.he-partner-logo {
    height: 60px;
    object-fit: contain;
    display: block;
    filter: brightness(0);
    opacity: .7;
}
.he-partner-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--he-dark);
    letter-spacing: .02em;
}
.he-partner p {
    font-size: .82rem;
    color: #777;
}
.he-partner-divider {
    width: 1px;
    height: 60px;
    background: rgba(23,11,58,.15);
    flex-shrink: 0;
}

/* ── Revista / Flipbook ──────────────────────────────────── */
#revista.he-section { padding: 3rem 0 2rem; }

.he-revista-sub {
    font-size: .95rem;
    color: var(--he-ghost);
    margin-top: -.5rem;
    margin-bottom: 2rem;
}
.he-flipbook-wrap {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}
#heFlipbook {
    display: block;
    margin: 0 auto;
}
.he-flipbook-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: .5rem 0 1rem;
}
.he-flip-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    color: var(--he-white);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
}
.he-flip-btn:hover {
    background: var(--he-yellow);
    border-color: var(--he-yellow);
    color: var(--he-dark);
}
.he-zoom-btn {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.he-btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.8rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,.25);
    color: var(--he-ghost);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: border-color .2s, color .2s, background .2s;
}
.he-btn-pdf:hover {
    border-color: var(--he-yellow);
    color: var(--he-yellow);
}
.he-flip-page {
    font-family: 'Montserrat', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--he-ghost);
    min-width: 60px;
    text-align: center;
}

/* ── Footer ───────────────────────────────────────────────── */
.he-footer {
    background: var(--he-darker);
    padding: 3rem 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.he-footer-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.he-footer-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}
.he-footer-text {
    font-size: .8rem;
    color: var(--he-ghost2);
    line-height: 1.7;
}
.he-footer-text strong { color: var(--he-ghost); }
.he-footer-back {
    margin-left: auto;
    font-size: .78rem;
    color: var(--he-ghost);
    text-decoration: none;
    letter-spacing: .05em;
    text-transform: uppercase;
    transition: color .2s;
}
.he-footer-back:hover { color: var(--he-yellow); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .he-text-cols  { grid-template-columns: 1fr; gap: 1.5rem; }
    .he-pillars    { grid-template-columns: 1fr; gap: 1.5rem; }
    .he-break-inner { gap: 2.5rem; }
    .he-kayak-art  { width: 60px; }
}
@media (max-width: 640px) {
    .he-break-inner { flex-direction: column; gap: 2rem; text-align: center; }
    .he-kayak-art   { display: none; }
    .he-footer-inner { flex-direction: column; align-items: flex-start; }
    .he-footer-back  { margin-left: 0; }
    .he-partners     { gap: 2rem; }
    .he-hero-logo    { border-radius: 1rem; }
}

/* ── Galeria ──────────────────────────────────────────────── */

.he-gallery-albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.he-album-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.he-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.he-album-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: rgba(255,255,255,0.04);
}
.he-album-thumb-placeholder {
    width: 100%;
    height: 180px;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: rgba(255,255,255,0.2);
}
.he-album-body {
    padding: 1rem 1.1rem;
}
.he-album-nome {
    font-weight: 700;
    font-size: 1rem;
    color: var(--he-white);
    margin-bottom: .3rem;
}
.he-album-meta {
    font-size: .8rem;
    color: var(--he-ghost);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.he-album-data {
    color: var(--he-yellow);
    font-weight: 700;
    font-size: .75rem;
}

.he-gallery-empty {
    text-align: center;
    padding: 3rem 0;
    color: var(--he-ghost);
    font-size: .95rem;
}

/* Modal do álbum */
.he-album-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(10, 5, 30, 0.92);
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}
.he-album-modal.open { display: flex; }
.he-album-modal-panel {
    background: #1a0f3a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    width: 100%;
    max-width: 960px;
    overflow: hidden;
}
.he-album-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.he-album-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--he-white);
}
.he-album-modal-subtitle {
    font-size: .82rem;
    color: var(--he-ghost);
    margin-top: .2rem;
}
.he-album-modal-close {
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--he-white);
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.he-album-modal-close:hover { background: rgba(255,255,255,0.18); }
.he-album-modal-body { padding: 1.25rem 1.5rem; }
.he-album-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .75rem;
}
.he-modal-foto {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: rgba(255,255,255,0.05);
}
.he-modal-foto img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.he-modal-foto:hover img { transform: scale(1.06); }
.he-modal-foto-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,5,30,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.he-modal-foto:hover .he-modal-foto-overlay { opacity: 1; }

/* Lightbox */
.he-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(5, 2, 15, 0.97);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.he-lightbox.open { display: flex; }
.he-lightbox-img-wrap {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.he-lightbox-img-wrap img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 80px rgba(0,0,0,.8);
}
.he-lightbox-close {
    position: fixed;
    top: 1.2rem; right: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: none; color: #fff;
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}
.he-lightbox-close:hover { background: rgba(255,255,255,0.25); }
.he-lightbox-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none; color: #fff;
    width: 46px; height: 46px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.he-lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.he-lightbox-nav.prev { left: 1.2rem; }
.he-lightbox-nav.next { right: 1.2rem; }
.he-lightbox-caption {
    color: rgba(255,255,255,0.7);
    font-size: .88rem;
    margin-top: .75rem;
    text-align: center;
}
.he-lightbox-counter {
    position: fixed;
    bottom: 1.2rem;
    left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: .8rem;
}

@media (max-width: 640px) {
    .he-gallery-albums { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
    .he-album-modal-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
