/* ========== SHARED COMPONENTS: STACKD ========== */

/* ----- Reset + Base ----- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ----- Animated Grid Background ----- */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.grid-bg svg {
    width: 100%;
    height: 100%;
}

.grid-bg .grid-line {
    stroke: var(--border);
    stroke-width: 0.5;
}

.grid-bg .grid-square {
    fill: var(--accent);
    opacity: 0;
}

.page, .footer, .popup-overlay, .modal-overlay {
    position: relative;
    z-index: 1;
}

/* ----- Page Container ----- */
.page {
    width: 100%;
    margin: 0 auto;
    padding: 80px 0 0;
    min-height: 100vh;
}

.page--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 10px;
}

/* ----- Container ----- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ----- Sections ----- */
.section {
    padding: 80px 0;
}

.section--dark {
    color: var(--text);
}

.section--alt {
}

.section-label {
    font-family: var(--font-display);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-sub {
    font-size: 17px;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.6;
    max-width: 600px;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ----- Navigation ----- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 18px 20px;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav-cta {
    padding: 8px 20px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-cta:hover {
    opacity: 0.9;
}

.nav-slots {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    white-space: nowrap;
}

.nav-slots strong {
    color: var(--accent);
}

/* ----- Footer ----- */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 16px;
    margin-top: auto;
    width: 100%;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.social-links a svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    transition: fill 0.2s ease;
}

.social-links a:hover svg {
    fill: var(--accent);
}

.footer-legal {
    font-size: 14px;
    color: var(--text-muted);
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
}

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

.disclaimer {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.6;
    text-align: center;
    max-width: 600px;
    line-height: 1.4;
}

/* ----- Modal System ----- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 640px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 20px;
    text-transform: uppercase;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

.modal-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* ----- Form Inputs ----- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #ef4444;
}

.form-textarea {
    min-height: 90px;
    resize: vertical;
}

.form-error {
    display: none;
    color: #ef4444;
    font-size: 13px;
    margin-top: 4px;
}

.form-error.show {
    display: block;
}

/* ----- Buttons ----- */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

/* ----- Status Badge ----- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.3);
    font-family: var(--font-display);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #eab308;
}

/* ----- Video Container ----- */
.vsl-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 56.25%;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.vsl-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ----- Popup Overlay ----- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.popup-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 520px;
    width: 92%;
    padding: 36px 32px;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
}

.popup-progress {
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 28px;
    overflow: hidden;
}

.popup-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.popup-question-label {
    font-family: var(--font-display);
    font-size: 22px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.popup-question-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.popup-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.popup-back {
    padding: 10px 20px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
}

.popup-next {
    padding: 10px 28px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.popup-next:hover { opacity: 0.9; }

/* Button Select Group */
.btn-select-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-select {
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

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

.btn-select.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

/* Input Row */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
    .page--centered {
        padding: 100px 12px 10px;
    }

    .section {
        padding: 64px 0;
    }
}

@media (max-width: 600px) {
    .nav {
        padding: 14px 16px;
    }

    .nav-logo-text {
        font-size: 18px;
    }

    .nav-cta {
        padding: 6px 14px;
        font-size: 13px;
    }

    .nav-slots {
        display: none;
    }

    .page--centered {
        padding: 84px 16px 16px;
    }

    .section {
        padding: 48px 0;
    }

    .popup-container {
        padding: 24px 20px;
    }

    .popup-question-label {
        font-size: 18px;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 8px;
    }
}
