/* ==========================================================================
   OBSERVATÓRIO LITERÁRIO 3D — JÚLIA ALMEIDA SANT'ANNA (CONSTELLATION EDITION)
   ========================================================================== */
:root {
    --bg-deep: #020308;
    --bg-card: rgba(11, 15, 32, 0.62);
    --bg-card-strong: rgba(15, 21, 45, 0.85);
    --accent-purple: #8b5cf6;
    --accent-pink: #f43f5e;
    --accent-cyan: #22d3ee;
    --accent-gold: #fbbf24;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    --font-sans: 'Outfit', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-deep);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
    line-height: 1.65;
}

/* ==========================================================================
   CARTA CELESTE VIVA: LINHAS DE CONSTEULAÇÃO E NÓS ESTELARES
   ========================================================================== */
.constellation-web {
    position: absolute;
    top: 0;
    left: 8%;
    width: 2px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image: linear-gradient(to bottom, rgba(34, 211, 238, 0.15) 50%, transparent 50%);
    background-size: 2px 24px;
}

.constellation-beam {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-pink), var(--accent-gold));
    box-shadow: 0 0 15px var(--accent-cyan), 0 0 30px var(--accent-pink);
    transition: height 0.1s linear;
}

.star-node {
    position: relative;
    width: 16px;
    height: 16px;
    margin-bottom: -16px;
    left: -8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 20px #fff, 0 0 40px var(--accent-cyan);
    z-index: 2;
}

.star-node::before {
    content: attr(data-coord);
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--accent-cyan);
    white-space: nowrap;
    opacity: 0.85;
}

.star-node::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px dashed rgba(34, 211, 238, 0.5);
    border-radius: 50%;
    animation: spinSlow 10s linear infinite;
}

@media (max-width: 992px) {
    .constellation-web { left: 4%; }
}

/* ==========================================================================
   PRELOADER CINEMATOGRÁFICO
   ========================================================================== */
.cosmos-preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #0a0f24 0%, #020308 100%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}

.cosmos-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-rings {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.p-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
}

.p-ring.r1 {
    width: 100%;
    height: 100%;
    border-top-color: var(--accent-cyan);
    border-bottom-color: var(--accent-pink);
    animation: spinSlow 4s linear infinite;
}

.p-ring.r2 {
    width: 75%;
    height: 75%;
    border-left-color: var(--accent-purple);
    border-right-color: var(--accent-gold);
    animation: spinSlowReverse 3s linear infinite;
}

.p-ring.r3 {
    width: 50%;
    height: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    animation: spinSlow 8s linear infinite;
}

.preloader-core {
    font-size: 1.8rem;
    color: var(--accent-gold);
    filter: drop-shadow(0 0 12px var(--accent-gold));
}

.telemetry-coords {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    color: var(--accent-cyan);
    display: block;
    margin-bottom: 0.8rem;
}

.preloader-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 0.3rem;
}

.preloader-title em {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--accent-pink);
}

.preloader-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.btn-enter-universe {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: 0 0 35px rgba(244, 63, 94, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-enter-universe:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(34, 211, 238, 0.7);
}

.audio-hint {
    display: block;
    margin-top: 1.2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.75;
}

/* ==========================================================================
   MOTOR 3D WEBGL, GRAIN, CURSOR & HUD
   ========================================================================== */
#webgl-galaxy {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

.film-grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.035;
    background-image: radial-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 0);
    background-size: 24px 24px;
}

.ambient-nebula {
    position: fixed;
    border-radius: 50%;
    filter: blur(130px);
    opacity: 0.18;
    z-index: -1;
    pointer-events: none;
}

.nebula-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    top: -120px;
    left: -150px;
}

.nebula-2 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, var(--accent-pink), transparent 70%);
    bottom: 5%;
    right: -160px;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan));
    z-index: 9999;
    box-shadow: 0 0 15px var(--accent-cyan);
}

@media (pointer: fine) {
    .custom-cursor-dot {
        position: fixed;
        width: 6px;
        height: 6px;
        background: var(--accent-cyan);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
    }
    .custom-cursor-ring {
        position: fixed;
        width: 34px;
        height: 34px;
        border: 1px solid rgba(34, 211, 238, 0.45);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: width 0.25s, height 0.25s, border-color 0.25s;
    }
}

.astro-hud {
    position: fixed;
    bottom: 1.4rem;
    left: 1.8rem;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: rgba(148, 163, 184, 0.7);
    background: rgba(6, 9, 20, 0.65);
    backdrop-filter: blur(10px);
    padding: 0.45rem 0.9rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.hud-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.hud-sep { color: var(--accent-pink); }

/* ==========================================================================
   NAVEGAÇÃO E CONTROLE DE SOM
   ========================================================================== */
.navbar-island {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1260px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.5rem;
    background: rgba(7, 10, 22, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.logo {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-orbit {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(244, 63, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-pink);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.logo-text span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
}

.logo-text small {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    align-items: center;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--accent-cyan);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sound-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 0.5rem 0.95rem;
    border-radius: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    transition: 0.3s;
}

.sound-toggle.playing {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
}

.sound-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.sound-bars span {
    width: 2px;
    height: 4px;
    background: currentColor;
    border-radius: 2px;
    transition: 0.2s;
}

.sound-toggle.playing .sound-bars span:nth-child(1) { animation: eqBar 0.8s infinite ease-in-out; }
.sound-toggle.playing .sound-bars span:nth-child(2) { animation: eqBar 0.6s infinite ease-in-out 0.2s; }
.sound-toggle.playing .sound-bars span:nth-child(3) { animation: eqBar 0.9s infinite ease-in-out 0.4s; }
.sound-toggle.playing .sound-bars span:nth-child(4) { animation: eqBar 0.7s infinite ease-in-out 0.1s; }

@keyframes eqBar {
    0%, 100% { height: 3px; }
    50% { height: 12px; }
}

.btn-nav {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff !important;
    text-decoration: none;
    padding: 0.55rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.35);
}

.menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
}

.menu-toggle.active .hamburger-line:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle.active .hamburger-line:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 3, 8, 0.96);
    backdrop-filter: blur(24px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    text-align: center;
    width: 85%;
}

.mobile-nav-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-cyan);
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
}

.mobile-bottom-dock {
    display: none;
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 420px;
    background: rgba(8, 12, 26, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 40px;
    padding: 0.5rem 0.6rem;
    z-index: 990;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
    gap: 0.2rem;
    padding: 0.35rem 0.65rem;
    border-radius: 20px;
}

.dock-item.active { color: var(--accent-cyan); }
.dock-item.dock-cta {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    padding: 0.45rem 0.85rem;
    font-weight: 600;
}

/* ==========================================================================
   HERO & ASTROLÁBIO SVG
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11rem 7% 4rem;
    gap: 3.5rem;
    max-width: 1360px;
    margin: 0 auto;
}

.hero-content { flex: 1.15; }

.badge-astro {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.35);
    padding: 0.45rem 1.15rem;
    border-radius: 50px;
    font-size: 0.76rem;
    color: var(--accent-cyan);
    margin-bottom: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.8vw, 4.15rem);
    line-height: 1.07;
    margin-bottom: 1.4rem;
    font-weight: 700;
}

.serif-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: 1.14em;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 10%, var(--accent-pink) 50%, var(--accent-cyan) 95%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.12rem;
    color: var(--text-muted);
    margin-bottom: 2.2rem;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    padding: 0.9rem 1.85rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    border: none;
    box-shadow: 0 10px 25px rgba(244, 63, 94, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(244, 63, 94, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--border-glass);
}

.stat-item { display: flex; align-items: center; gap: 0.75rem; }
.stat-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--accent-gold); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); line-height: 1.3; }
.stat-divider { width: 1px; height: 32px; background: var(--border-glass); }

.hero-image-container {
    flex: 0.95;
    display: flex;
    justify-content: center;
}

.astrolabe-system {
    position: relative;
    width: 440px;
    height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.astrolabe-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ring-svg-1 { animation: spinSlow 28s linear infinite; }
.ring-svg-2 { animation: spinSlowReverse 38s linear infinite; }

.author-photo-wrapper {
    width: 290px;
    height: 290px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple), var(--accent-cyan));
    box-shadow: 0 0 60px rgba(244, 63, 94, 0.35);
    position: relative;
    z-index: 2;
}

.author-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 4px solid var(--bg-deep);
}

.floating-chip {
    position: absolute;
    z-index: 4;
    background: rgba(10, 15, 32, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.chip-top { top: 8%; right: 0; }
.chip-top i { color: var(--accent-gold); }
.chip-bottom { bottom: 8%; left: -2%; }
.chip-bottom i { color: var(--accent-pink); }

/* ==========================================================================
   MANIFESTO E SEÇÕES GERAIS
   ========================================================================== */
.cosmos-quote {
    max-width: 1050px;
    margin: 1rem auto 3rem;
    padding: 0 6%;
}

.quote-container {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(244, 63, 94, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.28);
    border-radius: 28px;
    padding: 2.8rem 3rem;
    text-align: center;
    backdrop-filter: blur(14px);
}

.quote-tag {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.quote-container p {
    font-family: var(--font-serif);
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-style: italic;
    line-height: 1.45;
    margin-bottom: 1rem;
}

.quote-author {
    font-size: 0.88rem;
    color: var(--accent-cyan);
}

section {
    padding: 6rem 7%;
    max-width: 1360px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.6vw, 2.9rem);
    margin-bottom: 0.6rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.02rem;
    max-width: 620px;
    margin: 0 auto;
}

/* ==========================================================================
   PLANETÁRIO 3D WEBGL DE EPIFANIA
   ========================================================================== */
.explorer-container {
    max-width: 1080px;
    margin: 0 auto;
}

.orbit-tabs {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.orbit-tabs::-webkit-scrollbar { display: none; }

.orbit-tab {
    background: rgba(13, 19, 38, 0.75);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.85rem 1.35rem;
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.3s;
}

.orbit-step {
    font-family: var(--font-display);
    color: var(--accent-gold);
    font-size: 0.8rem;
}

.orbit-tab.active, .orbit-tab:hover {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(139, 92, 246, 0.28));
    border-color: var(--accent-pink);
    color: #fff;
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.25);
}

.orbit-display-card {
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.16), rgba(8, 12, 26, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 28px;
    padding: 2.5rem 3rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: center;
    backdrop-filter: blur(18px);
}

.orbit-webgl-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#planet-canvas {
    width: 260px;
    height: 260px;
    cursor: grab;
}

.stage-caption {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    margin-top: 0.3rem;
}

.orbit-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.orbit-badge {
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    color: var(--accent-gold);
    font-weight: 700;
}

.orbit-freq {
    font-family: var(--font-display);
    font-size: 0.74rem;
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
}

.orbit-info h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 0.9rem;
}

.orbit-info p {
    color: var(--text-muted);
    font-size: 1.02rem;
    margin-bottom: 1.3rem;
}

.orbit-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--accent-cyan);
    padding-left: 1rem;
    border-left: 2px solid var(--accent-pink);
}

/* ==========================================================================
   CARDS SOBRE & FÍSICA 3D TILT + GLARE
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 2rem;
}

.tilt-card {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

.card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 3;
}

.tilt-card:hover .card-glare {
    opacity: 1;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 2.6rem 2rem;
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.card-number {
    position: absolute;
    top: 1.4rem;
    right: 1.8rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.08);
}

.card-icon {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(139, 92, 246, 0.16));
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--accent-pink);
    margin-bottom: 1.4rem;
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
}

.about-card p { color: var(--text-muted); font-size: 0.96rem; }

/* ==========================================================================
   OBRAS PUBLICADAS
   ========================================================================== */
.books-showcase {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.book-card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 28px;
    padding: 2.8rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    backdrop-filter: blur(16px);
}

.book-card-premium.featured-book {
    border-color: rgba(139, 92, 246, 0.38);
    background: linear-gradient(135deg, rgba(14, 20, 42, 0.85), rgba(28, 14, 42, 0.7));
}

.book-badge-ribbon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    color: #fff;
    padding: 0.4rem 1.1rem;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
}

.antologia-ribbon {
    background: rgba(34, 211, 238, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.4);
    color: var(--accent-cyan);
}

.book-3d-tilt {
    width: 100%;
    height: 370px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #070a14;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.publisher-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.book-details-col h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.year-tag { font-weight: 400; font-size: 1.2rem; color: var(--text-muted); }
.book-synopsis { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem; }

.book-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 2rem;
}

.book-tags-row span {
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.book-tags-row i { color: var(--accent-cyan); }
.book-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--text-main);
}

.btn-outline:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }

.btn-icon-only {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
}

/* ==========================================================================
   FANFICS & GALERIA DE EVENTOS
   ========================================================================== */
.fanfics-banner {
    background: linear-gradient(135deg, rgba(13, 20, 40, 0.9), rgba(28, 14, 48, 0.85));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 28px;
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2.5rem;
    align-items: center;
}

.fanfics-text h2 { font-family: var(--font-display); font-size: 2rem; margin: 0.5rem 0 1rem; }
.fanfics-text p { color: var(--text-muted); }
.fanfics-cards { display: flex; flex-direction: column; gap: 1rem; }

.fanfic-item {
    background: rgba(5, 8, 18, 0.65);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.fanfic-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.fanfic-meta { flex: 1; }
.fanfic-vol { font-size: 0.72rem; text-transform: uppercase; color: var(--accent-gold); }
.fanfic-meta h4 { font-family: var(--font-display); font-size: 1.1rem; }
.fanfic-meta p { font-size: 0.84rem; color: var(--text-muted); }

.btn-fanfic {
    background: rgba(244, 63, 94, 0.16);
    border: 1px solid rgba(244, 63, 94, 0.45);
    color: #fff;
    text-decoration: none;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.disabled-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-glass);
    color: var(--text-muted);
}

.footer {
    background: #010205;
    padding: 4.5rem 7% 6.5rem;
    text-align: center;
    border-top: 1px solid var(--border-glass);
}

.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-bottom: 1.8rem; }
.footer-brand h2 { font-family: var(--font-display); font-size: 1.5rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.95rem; }
.social-icons { display: flex; justify-content: center; gap: 1.1rem; margin-bottom: 2rem; }
.social-icons a {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
}
.social-icons a:hover { background: var(--accent-pink); border-color: var(--accent-pink); transform: translateY(-4px); }
.footer-divider { max-width: 200px; height: 1px; background: var(--border-glass); margin: 0 auto 1.5rem; }
.copyright { font-size: 0.82rem; color: var(--text-muted); }

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes spinSlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spinSlowReverse { 0% { transform: rotate(360deg); } 100% { transform: rotate(0deg); } }

@media (max-width: 992px) {
    .nav-links, .btn-nav, .astro-hud { display: none; }
    .menu-toggle, .mobile-bottom-dock { display: flex; }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 7.5rem;
        gap: 2.2rem;
    }
    .hero-subtitle { margin: 0 auto 2rem; }
    .hero-buttons, .hero-stats { justify-content: center; }

    .astrolabe-system { width: 320px; height: 320px; }
    .author-photo-wrapper { width: 215px; height: 215px; }

    .orbit-display-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    .orbit-meta-row { justify-content: center; }
    .orbit-quote { border-left: none; padding-left: 0; }

    .book-card-premium, .fanfics-banner {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
    .book-3d-tilt { max-width: 240px; height: 330px; margin: 0 auto; }
}

@media (max-width: 640px) {
    section { padding: 4.5rem 5%; }
    .orbit-tabs { justify-content: flex-start; }
    .btn, .book-actions .btn, .btn-fanfic { width: 100%; justify-content: center; }
    .fanfic-item { flex-direction: column; align-items: flex-start; }


}
/* ==========================================================================
   v2 — EXPERIÊNCIA MOBILE, GALERIA EM SLIDERS, LIGHTBOX & ACESSIBILIDADE
   ========================================================================== */
:root {
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; }
button { font: inherit; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
    border-radius: 10px;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 1rem;
    z-index: 20000;
    background: var(--accent-cyan);
    color: #020308;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus { top: calc(1rem + var(--safe-top)); }

/* Abertura: curta, sai sozinha */
.cosmos-preloader { cursor: pointer; }
.cosmos-preloader .preloader-title { font-weight: 700; }
.preloader-telemetry { animation: fadeUp 0.9s var(--ease-out) both; }

/* Nós estelares não empurram mais o layout */
section { position: relative; }
.star-node {
    position: absolute;
    top: 2.2rem;
    left: calc(8vw - max(0px, (100vw - 1360px) / 2) - 8px);
    margin: 0;
}

.nav-item.active { color: #fff; }
.nav-item { position: relative; }
.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-cyan));
}

/* Hero */
.hero { min-height: 100svh; position: relative; }
.scroll-cue {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}
.scroll-cue span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--accent-cyan);
    animation: scrollCue 1.8s var(--ease-out) infinite;
}
@keyframes scrollCue {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

/* Manifesto: palavras acendem com o scroll */
.word-reveal .w {
    opacity: 0.2;
    transition: opacity 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
.word-reveal .w.on { opacity: 1; }

/* Botões: resposta ao toque */
.btn, .btn-nav, .orbit-tab, .event-tab, .dock-item, .btn-fanfic, .sound-toggle, .orbit-arrow, .slider-arrow {
    transition: transform 0.25s var(--ease-out), box-shadow 0.3s, background 0.3s, border-color 0.3s, color 0.3s;
}
.btn:active, .btn-nav:active, .orbit-tab:active, .event-tab:active, .dock-item:active,
.btn-fanfic:active, .sound-toggle:active, .orbit-arrow:active, .slider-arrow:active { transform: scale(0.96); }

/* Planetário */
#planet-canvas {
    width: 100%;
    max-width: 260px;
    height: auto;
    aspect-ratio: 1 / 1;
    touch-action: pan-y;
}
.stage-caption { display: inline-flex; gap: 0.4rem; align-items: center; }
.orbit-info { transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); touch-action: pan-y; }
.orbit-info.is-switching { opacity: 0; transform: translateY(10px); }
.orbit-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.6rem;
}
.orbit-arrow, .slider-arrow {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.orbit-arrow:hover, .slider-arrow:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.orbit-dots, .slider-dots { display: flex; gap: 6px; align-items: center; }
.orbit-dots span, .slider-dots span {
    width: 7px;
    height: 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    transition: width 0.35s var(--ease-out), background 0.35s;
}
.orbit-dots span.active, .slider-dots span.active {
    width: 22px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-cyan));
}

/* Obras */
.book-mini-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn-icon-only { cursor: pointer; font-family: inherit; }
.btn-icon-only:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* ==========================================================================
   GALERIA: ABAS POR EVENTO + SLIDER
   ========================================================================== */
.event-tabs {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0.25rem;
}
.event-tabs::-webkit-scrollbar { display: none; }
.event-tab {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.7rem 1.25rem;
    border-radius: 40px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
}
.event-tab:hover { color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.event-tab.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}
.count-pill {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.08rem 0.5rem;
    border-radius: 20px;
    font-weight: 700;
}

.event-panel[hidden] { display: none; }
.event-panel.active { animation: fadeUp 0.6s var(--ease-out) both; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.event-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 1.4rem;
}
.event-info h3 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; }
.event-where { color: var(--accent-cyan); font-size: 0.85rem; font-weight: 500; margin-top: 0.2rem; }
.event-where i { margin-right: 0.25rem; }
.event-desc { color: var(--text-muted); max-width: 470px; font-size: 0.95rem; text-align: right; }

.slider { position: relative; }
.slider-track {
    display: flex;
    gap: 1.2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 0.5rem 0.25rem 0.75rem;
    outline-offset: 6px;
}
.slider-track::-webkit-scrollbar { display: none; }

.gallery-item {
    position: relative;
    flex: 0 0 calc((100% - 2 * 1.2rem) / 3);
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    overflow: hidden;
    padding: 0;
    background: #0b1020;
    border: 1px solid var(--border-glass);
    scroll-snap-align: start;
    cursor: zoom-in;
    color: inherit;
    text-align: left;
    transition: transform 0.5s var(--ease-out), border-color 0.4s, opacity 0.5s;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s var(--ease-out);
}
@media (hover: hover) {
    .gallery-item:hover { border-color: rgba(244, 63, 94, 0.7); transform: translateY(-4px); }
    .gallery-item:hover img { transform: scale(1.05); }
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(2, 3, 8, 0.92) 4%, rgba(2, 3, 8, 0.25) 42%, transparent 70%);
}
.event-tag {
    font-size: 0.7rem;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.g-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: #fff; line-height: 1.25; }
.zoom-icon {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
}
.play-badge {
    top: 50%;
    left: 50%;
    right: auto;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    background: rgba(244, 63, 94, 0.9);
    box-shadow: 0 0 0 10px rgba(244, 63, 94, 0.18), 0 0 30px var(--accent-pink);
    animation: pulsePlay 2.2s ease-in-out infinite;
}
@keyframes pulsePlay {
    0%, 100% { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0.18), 0 0 30px var(--accent-pink); }
    50% { box-shadow: 0 0 0 16px rgba(244, 63, 94, 0.06), 0 0 40px var(--accent-pink); }
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(6, 9, 20, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.slider-arrow:active { transform: translateY(-50%) scale(0.94); }
.slider-arrow.prev { left: -22px; }
.slider-arrow.next { right: -22px; }
.slider-arrow[disabled] { opacity: 0; pointer-events: none; }

.slider-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.slider-counter {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    min-width: 3.5em;
}

/* ==========================================================================
   LIGHTBOX (tela cheia com swipe)
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 3, 8, 0.97);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease-out), visibility 0.3s;
    touch-action: none;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(0.9rem + var(--safe-top)) 1rem 0.5rem;
}
.lightbox-counter { font-family: var(--font-display); color: var(--text-muted); font-size: 0.85rem; letter-spacing: 0.1em; padding-left: 0.4rem; }
.lightbox-close {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
}
.lightbox-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    position: relative;
}
.lightbox-img, .lightbox-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
    transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
    user-select: none;
    -webkit-user-drag: none;
}
.lightbox-video { background: #000; }
.lightbox-stage.loading .lightbox-img { opacity: 0.35; }
.lightbox-spinner {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-cyan);
    animation: spinSlow 0.8s linear infinite;
    opacity: 0;
    pointer-events: none;
}
.lightbox-stage.loading .lightbox-spinner { opacity: 1; }
.lightbox-arrow {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
}
.lightbox-arrow.prev { left: 1.2rem; }
.lightbox-arrow.next { right: 1.2rem; }
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.16); }
.lightbox-bottom {
    text-align: center;
    padding: 0.9rem 1.2rem calc(1.2rem + var(--safe-bottom));
}
.lightbox-tag { font-size: 0.72rem; color: var(--accent-cyan); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.lightbox-caption { font-family: var(--font-display); font-size: 1.15rem; color: #fff; margin-top: 0.2rem; }
.lightbox-hint { display: none; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; }

/* Toast + brilho no toque */
.toast {
    position: fixed;
    left: 50%;
    bottom: calc(6.5rem + var(--safe-bottom));
    transform: translate(-50%, 20px);
    background: rgba(15, 21, 45, 0.95);
    border: 1px solid rgba(34, 211, 238, 0.4);
    color: #fff;
    padding: 0.7rem 1.2rem;
    border-radius: 40px;
    font-size: 0.88rem;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.tap-spark {
    position: fixed;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1500;
    background: #fff;
    box-shadow: 0 0 10px #fff, 0 0 18px var(--accent-cyan);
    animation: spark 0.75s var(--ease-out) forwards;
}
@keyframes spark {
    from { transform: translate(0, 0) scale(1); opacity: 1; }
    to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

.footer-brand h2 { font-family: var(--font-display); font-size: 1.5rem; }
.footer-share { margin-bottom: 1.8rem; border: 1px solid rgba(255, 255, 255, 0.16); }

/* ==========================================================================
   TABLET / CELULAR
   ========================================================================== */
@media (max-width: 992px) {
    .navbar-island {
        top: calc(0.7rem + var(--safe-top));
        padding: 0.55rem 0.6rem 0.55rem 0.9rem;
    }
    .star-node { display: none; }
    .constellation-web { display: none; }

    /* Sem blur pesado sobre o 3D: muito mais fluido em celulares simples */
    .about-card, .book-card-premium, .quote-container, .orbit-display-card, .fanfics-banner { backdrop-filter: none; }
    .about-card, .book-card-premium { background: rgba(10, 14, 30, 0.88); }
    .ambient-nebula { filter: none; opacity: 0.22; }

    .mobile-bottom-dock {
        bottom: calc(0.7rem + var(--safe-bottom));
        transition: transform 0.45s var(--ease-out), opacity 0.3s;
    }
    body.dock-hidden .mobile-bottom-dock { transform: translate(-50%, 150%); opacity: 0; }
    .dock-item { position: relative; min-width: 56px; padding: 0.45rem 0.5rem; }
    .dock-item i { font-size: 1.05rem; }
    .dock-item.active:not(.dock-cta)::before {
        content: '';
        position: absolute;
        top: -2px;
        left: 50%;
        width: 18px;
        height: 3px;
        margin-left: -9px;
        border-radius: 3px;
        background: var(--accent-cyan);
        box-shadow: 0 0 10px var(--accent-cyan);
    }

    .mobile-link {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
    }
    .mobile-menu-overlay.active .mobile-link { opacity: 1; transform: none; }
    .mobile-menu-overlay.active .mobile-link:nth-child(2) { transition-delay: 0.05s; }
    .mobile-menu-overlay.active .mobile-link:nth-child(3) { transition-delay: 0.1s; }
    .mobile-menu-overlay.active .mobile-link:nth-child(4) { transition-delay: 0.15s; }
    .mobile-menu-overlay.active .mobile-link:nth-child(5) { transition-delay: 0.2s; }
    .mobile-menu-overlay.active .mobile-link:nth-child(6) { transition-delay: 0.25s; }
    .mobile-menu-overlay.active .mobile-link:nth-child(7) { transition-delay: 0.3s; }
    .mobile-menu-cta { margin-top: 0.8rem; width: 100%; }
    .mobile-menu-cta .btn { width: 100%; }

    .hero { padding-top: calc(6.8rem + var(--safe-top)); padding-bottom: 4.5rem; }
    .scroll-cue { display: none; }

    .gallery-item { flex-basis: calc((100% - 1.2rem) / 2); }
    .event-info { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .event-desc { text-align: left; }

    .lightbox-arrow { display: none; }
    .lightbox-hint { display: block; }
}

@media (max-width: 640px) {
    section { padding: 4rem 1.1rem; }
    .section-header { margin-bottom: 2.2rem; }
    .section-header h2 { font-size: clamp(1.8rem, 8vw, 2.2rem); }
    .section-header p { font-size: 0.95rem; }

    .sound-label { display: none; }
    .sound-toggle { width: 40px; height: 40px; padding: 0; justify-content: center; }
    .logo-orbit { width: 34px; height: 34px; }

    .hero { gap: 1.6rem; padding-left: 1.1rem; padding-right: 1.1rem; }
    .badge-astro { font-size: 0.66rem; padding: 0.4rem 0.9rem; margin-bottom: 1rem; }
    .hero-title { font-size: clamp(2rem, 9.4vw, 2.6rem); margin-bottom: 1rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-buttons { flex-direction: column; gap: 0.7rem; margin-bottom: 2rem; }
    .astrolabe-system { width: 270px; height: 270px; }
    .author-photo-wrapper { width: 180px; height: 180px; }
    .floating-chip { font-size: 0.7rem; padding: 0.4rem 0.75rem; }
    .chip-top { top: 4%; right: -4%; }
    .chip-bottom { bottom: 4%; left: -4%; }
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        padding-top: 1.4rem;
    }
    .stat-divider { display: none; }
    .stat-item { flex-direction: column; gap: 0.2rem; text-align: center; }
    .stat-num { font-size: 1.6rem; line-height: 1; }
    .stat-label { font-size: 0.7rem; }

    .cosmos-quote { padding: 0 1.1rem; margin-bottom: 1rem; }
    .quote-container { padding: 2rem 1.3rem; border-radius: 22px; }

    .orbit-tabs {
        margin: 0 -1.1rem 1.4rem;
        padding: 0.25rem 1.1rem 0.5rem;
        scroll-snap-type: x proximity;
        scroll-padding: 0 1.1rem;
        gap: 0.5rem;
    }
    .orbit-tab { padding: 0.65rem 1rem; font-size: 0.86rem; border-radius: 40px; scroll-snap-align: start; }
    .orbit-display-card { padding: 1.4rem 1.1rem 1.6rem; gap: 0.8rem; border-radius: 22px; }
    #planet-canvas { max-width: 210px; }
    .orbit-info h3 { font-size: 1.4rem; }
    .orbit-info p { font-size: 0.96rem; }
    .orbit-quote { font-size: 1.15rem; }
    .orbit-nav { justify-content: space-between; }

    .about-grid { gap: 1rem; }
    .about-card { padding: 1.8rem 1.4rem; }

    .books-showcase { gap: 1.6rem; }
    .book-card-premium { padding: 1.6rem 1.2rem; gap: 1.6rem; border-radius: 22px; }
    .book-badge-ribbon { position: static; justify-self: center; font-size: 0.72rem; }
    .book-card-premium .book-badge-ribbon { margin-bottom: -0.6rem; }
    .book-3d-tilt { max-width: 210px; height: auto; aspect-ratio: 5 / 8; }
    .book-details-col { text-align: center; }
    .book-details-col h3 { font-size: 1.7rem; }
    .book-synopsis { font-size: 0.96rem; text-align: left; }
    .book-tags-row { justify-content: center; gap: 0.5rem; }
    .book-actions { gap: 0.7rem; }
    .book-mini-actions { width: 100%; gap: 0.7rem; }
    .book-mini-actions .btn { flex: 1; width: auto; }

    .fanfics-banner { padding: 1.6rem 1.2rem; border-radius: 22px; gap: 1.4rem; }
    .fanfics-text h2 { font-size: 1.6rem; }
    .fanfic-item { padding: 1.1rem; }

    .event-tabs {
        justify-content: flex-start;
        margin: 0 -1.1rem 1.4rem;
        padding: 0.25rem 1.1rem;
    }
    .event-tab { padding: 0.6rem 1rem; font-size: 0.85rem; }
    .event-info h3 { font-size: 1.35rem; }
    .slider-track {
        margin: 0 -1.1rem;
        padding: 0.5rem 1.1rem 0.75rem;
        scroll-padding: 0 1.1rem;
        gap: 0.8rem;
    }
    .gallery-item { flex-basis: 80%; border-radius: 20px; scroll-snap-align: center; }
    .slider-arrow { display: none; }

    .footer { padding: 3.5rem 1.1rem calc(7.5rem + var(--safe-bottom)); }
}

/* Quem pede menos movimento no celular/computador */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .word-reveal .w { opacity: 1; }
}

/* Progresso e feixe via transform (sem recalcular layout) */
.scroll-progress { width: 100%; transform: scaleX(0); transform-origin: left center; }
.constellation-beam { height: 100%; transform: scaleY(0); transform-origin: top center; transition: none; }
#webgl-galaxy { height: 100vh; height: 100lvh; }
.slider-arrow[hidden] { display: none; }

/* Se o aparelho não tiver 3D, mostra um planeta em CSS */
.orbit-webgl-stage.no-webgl #planet-canvas { display: none; }
.orbit-webgl-stage.no-webgl .stage-caption { display: none; }
.orbit-webgl-stage.no-webgl::before {
    content: '';
    width: 170px;
    height: 170px;
    margin: 1rem auto;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0%, var(--accent-cyan) 18%, var(--accent-purple) 60%, #120a2a 100%);
    box-shadow: 0 0 0 14px rgba(244, 63, 94, 0.18), 0 0 60px rgba(34, 211, 238, 0.45);
}
.sound-icon { font-size: 0.8rem; }
.sound-toggle .sound-bars { display: none; }
.sound-toggle.playing .sound-bars { display: flex; }
.sound-toggle.playing .sound-icon { display: none; }

/* ==========================================================================
   v3 — CONSTELAÇÕES, ESTRELAS CADENTES, NEBULOSA E CÉU PROFUNDO
   ========================================================================== */

/* Constelação que escreve o nome da seção */
.constellation-title {
    width: min(100%, 420px);
    margin: 0 auto 1rem;
    line-height: 0;
}
.constellation-title.left { margin-left: 0; width: min(100%, 360px); }
.constellation-title svg { width: 100%; height: auto; overflow: visible; }
.constellation-title line {
    stroke: rgba(125, 211, 252, 0.55);
    stroke-width: 0.12;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 0.55s var(--ease-out) var(--d, 0s);
}
.constellation-title circle {
    fill: #fff;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
    transition: opacity 0.4s var(--ease-out) var(--d, 0s), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s);
    filter: drop-shadow(0 0 0.35px #fff) drop-shadow(0 0 0.8px rgba(34, 211, 238, 0.9));
}
.constellation-title circle.bright { fill: #fde68a; filter: drop-shadow(0 0 0.5px #fde68a) drop-shadow(0 0 1px rgba(244, 63, 94, 0.8)); }
.constellation-title.drawn line { stroke-dashoffset: 0; }
.constellation-title.drawn circle {
    opacity: 1;
    transform: scale(1);
    animation: twinkle var(--tw, 3s) ease-in-out calc(var(--d, 0s) + 1.2s) infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Estrelas cadentes */
.shooting-star {
    position: fixed;
    z-index: 0;
    width: 130px;
    height: 2px;
    margin-left: -130px;
    pointer-events: none;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.35) 55%, #fff);
    transform-origin: 100% 50%;
    transform: rotate(var(--rot)) translateX(0);
    opacity: 0;
    animation: shoot var(--dur, 1.2s) cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.shooting-star::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.9), 0 0 16px 4px rgba(34, 211, 238, 0.55);
}
.shooting-star.big { z-index: 2500; width: 220px; height: 3px; margin-left: -220px; }
.shooting-star.big::after { box-shadow: 0 0 10px 3px #fff, 0 0 24px 8px rgba(244, 63, 94, 0.6); }
@keyframes shoot {
    0% { opacity: 0; transform: rotate(var(--rot)) translateX(0) scaleX(0.3); }
    12% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; transform: rotate(var(--rot)) translateX(var(--dist)) scaleX(1); }
}

/* Nebulosa e poeira estelar na capa de Epifania */
.book-visual-col.has-nebula { position: relative; isolation: isolate; }
.nebula-glow {
    position: absolute;
    inset: -12% -18%;
    z-index: -1;
    border-radius: 50%;
    background:
        radial-gradient(closest-side at 40% 45%, rgba(139, 92, 246, 0.55), transparent 70%),
        radial-gradient(closest-side at 62% 60%, rgba(244, 63, 94, 0.4), transparent 70%),
        radial-gradient(closest-side at 50% 30%, rgba(34, 211, 238, 0.28), transparent 70%);
    filter: blur(18px);
    animation: nebulaPulse 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes nebulaPulse {
    0%, 100% { opacity: 0.65; transform: scale(0.96) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.06) rotate(6deg); }
}
.stardust { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: visible; }
.stardust span {
    position: absolute;
    bottom: 8%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px #fff, 0 0 10px rgba(34, 211, 238, 0.8);
    opacity: 0;
    animation: dustRise 6s linear infinite;
}
.stardust span:nth-child(1) { left: 6%; animation-delay: 0s; }
.stardust span:nth-child(2) { left: 18%; animation-delay: 1.8s; width: 2px; height: 2px; }
.stardust span:nth-child(3) { left: 30%; animation-delay: 3.6s; }
.stardust span:nth-child(4) { left: 44%; animation-delay: 0.9s; width: 2px; height: 2px; background: #fde68a; }
.stardust span:nth-child(5) { left: 58%; animation-delay: 4.4s; }
.stardust span:nth-child(6) { left: 70%; animation-delay: 2.6s; width: 2px; height: 2px; }
.stardust span:nth-child(7) { left: 82%; animation-delay: 5.2s; background: #f9a8d4; }
.stardust span:nth-child(8) { left: 94%; animation-delay: 1.3s; width: 2px; height: 2px; }
.stardust span:nth-child(9) { left: 24%; animation-delay: 3.1s; animation-duration: 8s; }
.stardust span:nth-child(10) { left: 76%; animation-delay: 4.9s; animation-duration: 7s; }
@keyframes dustRise {
    0% { opacity: 0; transform: translate(0, 0); }
    15% { opacity: 1; }
    80% { opacity: 0.8; }
    100% { opacity: 0; transform: translate(14px, -360px); }
}

/* Céu que fica mais profundo conforme a pessoa desce */
.sky-dusk {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(120% 70% at 50% 0%, #1b1446 0%, rgba(27, 20, 70, 0) 70%),
        linear-gradient(180deg, #0d0b2a 0%, #050616 60%, #020308 100%);
}
.galaxy-end {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.2rem;
}
.galaxy-end span { color: var(--accent-gold); font-style: normal; font-size: 0.9rem; }

@media (max-width: 640px) {
    .constellation-title { width: min(88%, 320px); margin-bottom: 0.6rem; }
    .constellation-title.left { width: min(88%, 300px); }
    .constellation-title line { stroke-width: 0.15; }
    .nebula-glow { inset: -8% -10%; filter: blur(14px); }
}

@media (prefers-reduced-motion: reduce) {
    .constellation-title line { stroke-dashoffset: 0; }
    .constellation-title circle { opacity: 1; transform: none; }
    .nebula-glow, .stardust { animation: none; }
    .stardust { display: none; }
}
.mobile-insta { color: var(--accent-cyan); text-decoration: none; font-weight: 600; display: inline-flex; gap: 0.5rem; align-items: center; }

/* Palavra "constelações" do título desenhada como constelação */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.hero-title .constellation-title.hero-word {
    display: block;
    width: min(100%, 560px);
    margin: 0.18em 0 0.22em;
}
.hero-word line { stroke-width: 0.2; }
.hero-word circle.bright { fill: #fde68a; }
@media (max-width: 992px) {
    .hero-title .constellation-title.hero-word { margin-left: auto; margin-right: auto; width: min(100%, 440px); }
}
@media (max-width: 640px) {
    .hero-title .constellation-title.hero-word { width: 100%; margin: 0.25em auto 0.3em; }
    .hero-word line { stroke-width: 0.24; }
}

/* v5 — estrelas com magnitudes (substitui o estilo anterior dos pontos) */
.constellation-title .star circle,
.constellation-title.drawn .star circle { opacity: 1; transform: none; transition: none; filter: none; animation: none; }
.constellation-title .star {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
    transition: opacity 0.45s var(--ease-out) var(--d, 0s), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s);
}
.constellation-title.drawn .star {
    opacity: 1;
    transform: scale(1);
    animation: starTwinkle var(--tw, 3s) ease-in-out calc(var(--d, 0s) + 1.2s + var(--tdelay, 0s)) infinite;
}
@keyframes starTwinkle {
    0%, 100% { opacity: 1; }
    45% { opacity: var(--tmin, 0.5); }
    55% { opacity: var(--tmin, 0.5); }
}
.constellation-title .spike,
.constellation-title.drawn .spike { stroke-width: 0.03; stroke-linecap: round; opacity: 0.45; stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
.constellation-title line:not(.spike) { stroke: rgba(148, 197, 255, 0.38); stroke-width: 0.09; }
.hero-word line:not(.spike) { stroke-width: 0.16; }
@media (max-width: 640px) {
    .constellation-title line:not(.spike) { stroke-width: 0.12; }
    .hero-word line:not(.spike) { stroke-width: 0.2; }
}
/* Seções com constelação como título: um pouco maiores e com respiro */
.section-header .constellation-title { width: min(100%, 520px); margin-bottom: 1.2rem; }
@media (max-width: 640px) { .section-header .constellation-title { width: min(92%, 360px); } }
/* enfeite antigo que encostava nas constelações */
.star-node { display: none; }
@media (prefers-reduced-motion: reduce) {
    .constellation-title .star { opacity: 1; transform: none; animation: none; }
}

/* Palavra do título desenhada como constelação (Planetário, Sobre, Obras) */
.section-header h2 .constellation-title.inline-word {
    display: inline-block;
    width: auto;
    margin: 0 0.06em;
    line-height: 0;
}
.constellation-title.inline-word svg { display: block; width: auto; max-width: none; }
.inline-word line:not(.spike) { stroke-width: 0.24; }
@media (max-width: 640px) { .inline-word line:not(.spike) { stroke-width: 0.3; } }

/* mais sutil: halo de dentro mais suave */

/* traçado um pouco mais lento e visível */
.constellation-title line:not(.spike) { transition: stroke-dashoffset 0.8s cubic-bezier(0.45, 0, 0.2, 1) var(--d, 0s); }

/* Ícones astronômicos dos cards "Sobre" */
.about-card .card-icon {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    margin: 0.4rem 0 1.6rem 0.4rem;
    background: radial-gradient(circle at 35% 30%, rgba(139, 92, 246, 0.28), rgba(8, 10, 24, 0.92) 70%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e8e6ff;
    box-shadow: inset 0 0 18px rgba(139, 92, 246, 0.18), 0 0 24px rgba(34, 211, 238, 0.06);
}
.about-card .card-icon svg { width: 33px; height: 33px; }
.about-card .card-icon .accent { fill: #fde68a; filter: drop-shadow(0 0 2px rgba(253, 230, 138, 0.9)); }
.about-card .card-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px dashed rgba(148, 197, 255, 0.22);
}
.about-card .card-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 0, #fde68a 0 2.2px, rgba(253, 230, 138, 0.35) 3px, transparent 4.5px);
    animation: spinSlow 16s linear infinite;
}
.about-card:nth-child(2) .card-icon::after { animation-duration: 11s; animation-direction: reverse; }
.about-card:nth-child(3) .card-icon::after { animation-duration: 21s; }
.about-card:hover .card-icon { color: #fff; border-color: rgba(34, 211, 238, 0.35); }

/* animação dos nomes 30% mais rápida */
.constellation-title line:not(.spike) { transition: stroke-dashoffset 0.56s cubic-bezier(0.45, 0, 0.2, 1) var(--d, 0s); }
.constellation-title .star { transition: opacity 0.32s var(--ease-out) var(--d, 0s), transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s); }
.constellation-title.drawn .star { animation-delay: calc(var(--d, 0s) + 0.85s + var(--tdelay, 0s)); }

/* ==========================================================================
   ABERTURA v2 — a constelação JÚLIA se desenha e a gente atravessa o céu
   ========================================================================== */
.cosmos-preloader {
    background: radial-gradient(ellipse at 50% 45%, #10123a 0%, #060718 55%, #020308 100%);
    transition: opacity 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.15s, visibility 0s linear 1.05s;
}
.cosmos-preloader.hidden { opacity: 0; visibility: hidden; }
.pre-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent),
        radial-gradient(1px 1px at 27% 72%, #dbeafe, transparent),
        radial-gradient(1.4px 1.4px at 38% 32%, #fff, transparent),
        radial-gradient(1px 1px at 52% 86%, #fff8ec, transparent),
        radial-gradient(1.6px 1.6px at 66% 22%, #fff, transparent),
        radial-gradient(1px 1px at 74% 64%, #dbeafe, transparent),
        radial-gradient(1.2px 1.2px at 86% 40%, #fff, transparent),
        radial-gradient(1px 1px at 92% 82%, #fff, transparent),
        radial-gradient(1px 1px at 6% 58%, #fff8ec, transparent),
        radial-gradient(1.3px 1.3px at 47% 8%, #fff, transparent),
        radial-gradient(1px 1px at 18% 92%, #fff, transparent),
        radial-gradient(1px 1px at 82% 10%, #fff, transparent);
    animation: preSky 2.4s ease-out both, preTwinkle 3.2s ease-in-out 2.4s infinite;
}
@keyframes preSky { from { opacity: 0; transform: scale(1.04); } to { opacity: 0.9; transform: none; } }
@keyframes preTwinkle { 50% { opacity: 0.55; } }

.pre-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(78vw, 380px);
    transition: transform 1.05s cubic-bezier(0.7, 0, 0.84, 0), opacity 0.8s ease 0.2s, filter 0.9s ease;
}
.cosmos-preloader.hidden .pre-stage { transform: scale(2.6); opacity: 0; filter: blur(6px); }
.cosmos-preloader.hidden .pre-sky { transform: scale(1.6); opacity: 0; transition: transform 1.05s cubic-bezier(0.7, 0, 0.84, 0), opacity 0.9s ease; animation: none; }

.pre-stage .constellation-title.pre-word { width: 100%; margin: 0 0 1.4rem; }
.pre-word line:not(.spike) { stroke-width: 0.17; }
.pre-word .star { transition-duration: 0.3s, 0.36s; }

.pre-line {
    display: block;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: preLine 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
}
@keyframes preLine { to { width: 140px; } }
.pre-name {
    margin-top: 1rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(248, 250, 252, 0.85);
    padding-left: 0.42em;
    opacity: 0;
    animation: preFade 0.7s ease 0.95s forwards;
}
.pre-tag {
    margin-top: 0.45rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    color: #f9a8d4;
    opacity: 0;
    animation: preFade 0.7s ease 1.15s forwards;
}
@keyframes preFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .pre-line { width: 140px; animation: none; }
    .pre-name, .pre-tag { opacity: 1; animation: none; }
}

/* ==========================================================================
   RESPONSIVIDADE — ajustes finos para celulares pequenos e tablets
   ========================================================================== */
html, body { overflow-x: clip; }

/* Textos mínimos legíveis */
.badge-astro { font-size: 0.72rem; }
.event-tag { font-size: 0.74rem; }
.stat-label { font-size: 0.76rem; }
.dock-item { font-size: 0.7rem; }

/* Cards "Sobre": 3 lado a lado no computador */
.about-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Tablet (retrato e iPad deitado) */
@media (max-width: 1180px) {
    .hero { gap: 2.5rem; padding-left: 5%; padding-right: 5%; }
    .hero-stats { gap: 1.1rem; }
    .stat-label { font-size: 0.74rem; }
}
@media (min-width: 993px) and (max-width: 1180px) {
    .astrolabe-system { width: 380px; height: 380px; }
    .author-photo-wrapper { width: 250px; height: 250px; }
    .about-card { padding: 2.2rem 1.5rem; }
    .fanfics-banner { gap: 1.8rem; padding: 2.4rem; }
}
@media (pointer: coarse) {
    .nav-item { padding: 0.6rem 0.2rem; }
    .nav-item.active::after { bottom: 2px; }
}
@media (min-width: 641px) and (max-width: 992px) {
    section { padding-left: 6%; padding-right: 6%; }
    .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
    .about-card:last-child {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 1.6rem;
        align-items: center;
    }
    .about-card:last-child .card-icon { grid-row: span 2; margin-bottom: 0; }
    .about-card:last-child h3 { align-self: end; }
    .about-card:last-child p { align-self: start; }
    .hero-content { max-width: 640px; margin: 0 auto; }
    .book-card-premium { padding: 2.2rem; }
    .fanfics-banner { padding: 2.2rem; }
}

/* Celulares: uma coluna */
@media (max-width: 640px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* Celulares pequenos (iPhone SE, Androids compactos) */
@media (max-width: 374px) {
    .navbar-island { width: calc(100% - 1rem); padding: 0.45rem 0.45rem 0.45rem 0.6rem; }
    .logo { gap: 0.5rem; }
    .logo-text span { font-size: 0.92rem; }
    .logo-text small { font-size: 0.78rem; }
    .nav-actions { gap: 0.4rem; }
    .sound-toggle, .menu-toggle { width: 38px; height: 38px; }
    .mobile-bottom-dock { width: calc(100% - 1rem); padding: 0.4rem 0.35rem; }
    .dock-item { min-width: 0; flex: 1; padding: 0.4rem 0.15rem; font-size: 0.66rem; }
    .dock-item.dock-cta { flex: 1.2; padding: 0.4rem 0.3rem; }
    section { padding-left: 0.9rem; padding-right: 0.9rem; }
    .hero { padding-left: 0.9rem; padding-right: 0.9rem; }
    .astrolabe-system { width: 240px; height: 240px; }
    .author-photo-wrapper { width: 160px; height: 160px; }
    .floating-chip { font-size: 0.66rem; }
    .quote-container p { font-size: 1.2rem; }
    .gallery-item { flex-basis: 86%; }
}
