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

:root {
    --bg: #f7f2e7;
    --card-bg: rgba(255, 253, 247, 0.82);
    --card-border: rgba(166, 116, 42, 0.24);
    --accent: #a6642c;
    --accent-dim: rgba(166, 116, 42, 0.18);
    --accent-glow: rgba(166, 116, 42, 0.25);
    --text: #241f15;
    --text-soft: rgba(36, 31, 21, 0.68);
    --text-xsoft: rgba(36, 31, 21, 0.42);
    --input-bg: rgba(255, 255, 255, 0.6);
    --input-border: rgba(166, 116, 42, 0.24);
    --input-focus: rgba(166, 116, 42, 0.50);
    --error-bg: rgba(224, 110, 80, 0.15);
    --error-border: rgba(224, 110, 80, 0.35);
    --error-text: #c93b16;
    --f-display: 'Fraunces', Georgia, serif;
    --f-ui: 'Inter', system-ui, sans-serif;
}

html,
body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--f-ui);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Starfield Canvas ─────────────────────────────────────────── */
#starfield {
    display: none !important;
}

/* ── Background Orbit Rings ───────────────────────────────────── */
.bg-orbit {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.bg-orbit__svg {
    width: min(1300px, 140vw);
    height: min(1300px, 140vw);
    opacity: 0.15;
    color: var(--accent);
}

.bg-orbit__svg ellipse,
.bg-orbit__svg circle {
    stroke: currentColor;
}

.orbit-ring-1 {
    animation: orbit-spin 75s linear infinite;
    transform-origin: 550px 550px;
}

.orbit-ring-2 {
    animation: orbit-spin 55s linear infinite reverse;
    transform-origin: 550px 550px;
}

.orbit-ring-3 {
    animation: orbit-spin 35s linear infinite;
    transform-origin: 550px 550px;
}

@keyframes orbit-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.page {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

/* ── Hero Section (Full Viewport) ─────────────────────────────── */
.hero-section {
    min-height: 100dvh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px 60px;
    gap: 28px;
    position: relative;
    box-sizing: border-box;
}

/* ── Details Section (Below the fold, revealed cleanly on scroll) ─────── */
.details-section {
    min-height: 90dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 60px;
    padding-bottom: 100px;
    scroll-margin-top: 20px;
}

.details-section .landing-container {
    opacity: 0;
    transform: translateY(45px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.details-section.visible .landing-container {
    opacity: 1;
    transform: translateY(0);
}

.planet-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 0;
}

.planet-saturn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 10px 28px rgba(200, 147, 63, 0.45));
    animation: saturn-float 6s ease-in-out infinite;
}

/* CRITICAL: system monospace for stable character dimensions */
.hero__saturn-canvas, .ascii-saturn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14.5px;
    line-height: 14.5px;
    white-space: pre;
    text-align: center;
    display: block;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    text-shadow: 0 0 16px rgba(200, 147, 63, 0.20);
}

.hero-tagline-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.hero-tagline {
    font-family: var(--f-display);
    font-size: clamp(34px, 5.2vw, 54px);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text);
}

.hero-tagline em {
    font-style: italic;
    color: var(--accent);
    font-weight: 400;
}

/* ── Scroll Down Button: Ver mais ─────────────────────────────── */
.scroll-down-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 11px 26px;
    background: rgba(200, 147, 63, 0.08);
    border: 1px solid rgba(200, 147, 63, 0.28);
    border-radius: 40px;
    color: var(--text);
    font-family: var(--f-ui);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 18px rgba(166, 100, 44, 0.12);
}

.scroll-down-btn:hover {
    background: rgba(200, 147, 63, 0.18);
    border-color: var(--accent);
    transform: translateY(3px);
    box-shadow: 0 6px 24px rgba(166, 100, 44, 0.25);
    color: var(--accent);
}

.scroll-arrow {
    stroke: currentColor;
    transition: transform 0.25s ease;
    animation: bounce-arrow 2s infinite ease-in-out;
}

.scroll-down-btn:hover .scroll-arrow {
    transform: translateY(3px);
}

@keyframes bounce-arrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(4px);
    }
    60% {
        transform: translateY(2px);
    }
}

/* ── Details Section ─────────────────────────────────────────── */
.details-section {
    padding-top: 40px;
    padding-bottom: 60px;
    scroll-margin-top: 20px;
}

.landing-container {
    width: 100%;
    max-width: 1160px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

@media (max-width: 968px) {
    .landing-container {
        grid-template-columns: 1fr;
        gap: 60px;
        padding-top: 20px;
    }

    .intro-column {
        text-align: center;
    }

    .feature-item {
        text-align: left;
    }
}

/* ── Left Column: Intro & Features ────────────────────────────── */
.intro-column {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

@keyframes saturn-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(-1.5deg);
    }
}

/* Scale the ASCII grid down on narrower screens so the rings never clip */
@media (max-width: 1120px) {
    .ascii-saturn {
        font-size: 10.5px;
        line-height: 10.5px;
    }
}

@media (max-width: 600px) {
    .ascii-saturn {
        font-size: 7.5px;
        line-height: 7.5px;
    }
}

@media (max-width: 420px) {
    .ascii-saturn {
        font-size: 6px;
        line-height: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .planet-saturn-container {
        animation: none;
    }

    .orbit-ring-1,
    .orbit-ring-2,
    .orbit-ring-3 {
        animation: none;
    }
}

.intro-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.intro-title {
    font-family: var(--f-display);
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
}

.intro-title em {
    font-style: normal;
    color: var(--accent);
    font-weight: 400;
}

.intro-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-soft);
    font-weight: 300;
    max-width: 580px;
}

.intro-description strong {
    color: var(--text);
    font-weight: 500;
}

.intro-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 12px;
}

.feature-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.feature-icon {
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(200, 147, 63, 0.08);
    border: 1px solid rgba(200, 147, 63, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.feature-details h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}

.feature-details p {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-soft);
    font-weight: 300;
}

/* ── Right Column: Login Card ─────────────────────────────────── */
.login-column {
    display: flex;
    justify-content: center;
}

.card {
    width: 100%;
    max-width: 410px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 48px 40px;
    backdrop-filter: blur(32px) saturate(1.3);
    -webkit-backdrop-filter: blur(32px) saturate(1.3);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: card-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.card-header h2 {
    font-family: var(--f-display);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 6px;
}

.card-header h2 em {
    color: var(--accent);
    font-style: normal;
}

.card-header p {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 300;
}

/* ── Form Controls ────────────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.field input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 14px;
    font-family: var(--f-ui);
    color: var(--text);
    outline: none;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
}

.field input::placeholder {
    color: var(--text-xsoft);
}

.field input:focus {
    border-color: var(--input-focus);
    background: var(--input-bg);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Error Banner ─────────────────────────────────────────────── */
.error-banner {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--error-text);
    text-align: center;
    display: none;
}

.error-banner.visible {
    display: block;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    80% {
        transform: translateX(4px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-4px);
    }

    40%,
    60% {
        transform: translateX(4px);
    }
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn-submit {
    margin-top: 8px;
    width: 100%;
    padding: 14px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--f-ui);
    color: #120b00;
    cursor: pointer;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(200, 147, 63, 0.25);
    transition: opacity 0.15s, transform 0.15s, box-shadow 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.btn-submit:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(200, 147, 63, 0.35);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(200, 147, 63, 0.20);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit .text {
    transition: opacity 0.15s;
}

.btn-submit .spin {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(18, 11, 0, 0.25);
    border-top-color: #120b00;
    border-radius: 50%;
    animation: spin-btn 0.6s linear infinite;
}

.btn-submit.loading .text {
    display: none;
}

.btn-submit.loading .spin {
    display: block;
}

@keyframes spin-btn {
    to {
        transform: rotate(360deg);
    }
}

/* ── Card footer ──────────────────────────────────────────────── */
.divider {
    margin-top: 24px;
    border-top: 1px solid rgba(200, 147, 63, 0.10);
    padding-top: 18px;
    text-align: center;
    font-size: 11.5px;
    color: var(--text-xsoft);
    font-weight: 300;
}

/* ── Footer ───────────────────────────────────────────────────── */
.page-footer {
    width: 100%;
    max-width: 1160px;
    margin: 40px auto 0;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-xsoft);
    font-weight: 300;
    letter-spacing: 0.02em;
}

.page-footer a {
    color: var(--text-xsoft);
    text-decoration: none;
    transition: color 0.2s;
}

.page-footer a:hover {
    color: var(--accent);
}