/**
 * A Formulation of Truth - Main Stylesheet
 *
 * No external dependencies. All fonts loaded locally.
 */

/* ============================================
   LOCAL FONT FACES
   ============================================ */

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/orbitron-v35-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/orbitron-v35-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/orbitron-v35-latin-600.woff2') format('woff2');
}

@font-face {
    font-family: 'Orbitron';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/orbitron-v35-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/space-mono-v17-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/space-mono-v17-latin-700.woff2') format('woff2');
}

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    --void: #000000;
    --obsidian: #0a0a0a;
    --slate: #1a1a1a;
    --ghost: #2a2a2a;
    --mist: #888888;
    --pearl: #cccccc;
    --bone: #e8e8e8;
    --light: #ffffff;

    /* Neon palette */
    --neon-pink: #ff69b4;
    --neon-orange: #ff8c42;
    --neon-emerald: #00ff88;
    --pink-glow: rgba(255, 105, 180, 0.4);
    --orange-glow: rgba(255, 140, 66, 0.4);
    --emerald-glow: rgba(0, 255, 136, 0.4);
    --pink-dim: rgba(255, 105, 180, 0.15);
    --emerald-dim: rgba(0, 255, 136, 0.15);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

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

body {
    background: var(--void);
    color: var(--pearl);
    font-family: 'Space Mono', ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, var(--void) 0%, transparent 100%);
}

.logo {
    font-family: 'Orbitron', ui-sans-serif, system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--light);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--neon-pink);
    box-shadow: 0 0 8px var(--pink-glow);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--light);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.tagline {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--mist);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.2s forwards;
}

.title {
    font-family: 'Orbitron', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--light);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.4s forwards;
}

.title span {
    display: block;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-pink) 0%, var(--neon-orange) 50%, var(--neon-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 20px var(--pink-glow)) drop-shadow(0 0 40px var(--orange-glow));
}

.subtitle {
    font-size: 1.1rem;
    color: var(--pearl);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.9;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.6s forwards;
}

.icelandic-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--mist);
    margin: -0.75rem 0 1.75rem;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.5s forwards;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeSlideUp 1s ease 0.8s forwards;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards, float 2s ease-in-out infinite 1.2s;
}

.scroll-indicator span {
    display: block;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, var(--neon-emerald), var(--neon-pink), transparent);
    box-shadow: 0 0 10px var(--emerald-glow);
}

/* ============================================
   BUTTONS / CTA
   ============================================ */

.cta {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 1px solid var(--ghost);
    background: transparent;
    color: var(--pearl);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--pink-dim);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta:hover {
    border-color: var(--neon-pink);
    color: var(--light);
    box-shadow: 0 0 20px var(--pink-glow);
}

.cta:hover::before {
    left: 0;
}

.cta-primary {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-orange));
    color: var(--void);
    border: none;
    font-weight: 700;
}

.cta-primary:hover {
    background: linear-gradient(135deg, var(--neon-orange), var(--neon-emerald));
    box-shadow: 0 0 30px var(--orange-glow), 0 0 60px var(--emerald-glow);
    color: var(--void);
}

.cta-primary::before {
    display: none;
}

.cta-secondary {
    background: transparent;
    border: 1px solid var(--ghost);
    color: var(--mist);
}

.cta-secondary:hover {
    border-color: var(--mist);
    color: var(--pearl);
    box-shadow: none;
}

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

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 8rem 2rem;
    position: relative;
    z-index: 1;
}

.section-inner {
    max-width: 800px;
    margin: 0 auto;
}

.section-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--neon-emerald);
    text-shadow: 0 0 10px var(--emerald-glow);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--neon-emerald);
    box-shadow: 0 0 8px var(--emerald-glow);
}

.section-title {
    font-family: 'Orbitron', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    color: var(--light);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.section-text {
    font-size: 1rem;
    color: var(--pearl);
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.section-text em {
    color: var(--bone);
    font-style: italic;
}

/* ============================================
   QUOTE BLOCK
   ============================================ */

.quote-block {
    border-left: 2px solid var(--neon-orange);
    padding: 2rem;
    margin: 3rem 0;
    background: linear-gradient(135deg, var(--pink-dim) 0%, rgba(255, 140, 66, 0.08) 100%);
    box-shadow: 0 0 30px rgba(255, 140, 66, 0.1);
}

.quote-block p {
    font-family: 'Orbitron', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--bone);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.quote-block cite {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--mist);
    letter-spacing: 0.1em;
}

/* ============================================
   GATE SECTION (Question Display)
   ============================================ */

.gate-section {
    background: var(--obsidian);
    border-top: 1px solid var(--ghost);
    border-bottom: 1px solid var(--ghost);
}

.gate-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.gate-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--pink-glow), 0 0 40px var(--orange-glow);
    animation: neon-pulse 2s ease-in-out infinite;
}

.gate-title {
    font-family: 'Orbitron', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--neon-orange);
    text-shadow: 0 0 15px var(--orange-glow);
    margin-bottom: 1.5rem;
}

.gate-description {
    font-size: 0.95rem;
    color: var(--pearl);
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* Progress indicator for gate */
.gate-progress {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mist);
    margin-bottom: 2rem;
}

/* ============================================
   FORMS
   ============================================ */

.gate-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mist);
    margin-bottom: 0.5rem;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.95rem;
    background: var(--void);
    border: 1px solid var(--ghost);
    color: var(--light);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

/* Watermark effect for textareas */
.form-group .textarea-wrapper {
    position: relative;
}

.form-group .watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    font-family: 'Orbitron', ui-sans-serif, system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    user-select: none;
}

.form-group .textarea-wrapper textarea {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.8);
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px var(--pink-glow), 0 0 40px var(--orange-glow);
}

.form-group textarea::placeholder,
.form-group input::placeholder {
    color: var(--mist);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions .cta {
    flex: 1;
}

.accessibility-note {
    font-size: 0.7rem;
    color: var(--mist);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accessibility-note a {
    color: var(--neon-emerald);
    text-decoration: none;
    text-shadow: 0 0 8px var(--emerald-glow);
}

.accessibility-note a:hover {
    text-decoration: underline;
    color: var(--neon-pink);
    text-shadow: 0 0 8px var(--pink-glow);
}

/* ============================================
   MESSAGES (Success/Error)
   ============================================ */

.message {
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.message-success {
    background: var(--emerald-dim);
    border: 1px solid var(--neon-emerald);
    color: var(--neon-emerald);
}

.message-error {
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.3);
    color: #ff6b6b;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    padding: 4rem 2rem;
    border-top: 1px solid var(--ghost);
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mist);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--light);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--mist);
    letter-spacing: 0.05em;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 0.5;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 0 0 20px var(--pink-glow), 0 0 40px var(--orange-glow);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 30px var(--pink-glow), 0 0 60px var(--orange-glow), 0 0 80px var(--emerald-glow);
        opacity: 0.8;
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.65rem;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .section {
        padding: 5rem 1.5rem;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .cta {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
