/* ========================================
   IVORY GAMES — Technical Indie Aesthetic
   ======================================== */

/* CSS Variables */
:root {
    /* Ivory Palette - More muted, less "happy" */
    --ivory-pure: #FAF0E6;
    --ivory-warm: #E8DFD0;
    --ivory-muted: #D4C8B8;
    --ivory-dark: #B8A898;

    /* Technical accents */
    --black: #0A0A0A;
    --black-soft: #141414;
    --black-medium: #1E1E1E;
    --black-light: #2A2A2A;
    --gray-dark: #3A3A3A;
    --gray-medium: #666666;

    /* Typography */
    --font-mono: 'Space Mono', 'Courier New', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: clamp(80px, 12vh, 140px);
    --container-width: min(88%, 720px);

    /* Transitions */
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.7;
    color: var(--ivory-pure);
    background: var(--black);
    overflow-x: hidden;
}

/* ========================================
   LANGUAGE SELECTOR
   ======================================== */

.lang-selector {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 9998;
    display: flex;
    gap: 5px;
}

.lang-btn {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--gray-dark);
    color: var(--ivory-muted);
    cursor: pointer;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(5px);
}

.lang-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    color: var(--ivory-pure);
    border-color: var(--ivory-muted);
}

.lang-btn.active {
    background: var(--ivory-pure);
    color: var(--black);
    border-color: var(--ivory-pure);
}

/* ========================================
   NOISE & TEXTURE OVERLAYS
   ======================================== */

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* Grid pattern for sections */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    width: var(--container-width);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ========================================
   HERO SECTION - Full background image
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/andorra_bg_ivory_games.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.hero-logo {
    max-width: min(85%, 420px);
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
    animation: fadeInUp 1s ease-out;
}

.hero-logo-games {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--ivory-muted);
    margin-top: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1s ease-out 0.1s both;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 400;
    color: var(--ivory-pure);
    margin-bottom: 25px;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-location {
    font-size: 0.9rem;
    color: var(--ivory-warm);
    line-height: 1.8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.location-highlight {
    display: block;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1em;
    color: var(--ivory-pure);
    margin-top: 5px;
}

.location-note {
    display: block;
    font-size: 0.85em;
    color: var(--ivory-muted);
    font-style: italic;
    margin-top: 5px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
    z-index: 2;
    text-decoration: none;
    cursor: pointer;
}

.scroll-indicator span {
    font-size: 1.8rem;
    color: var(--ivory-muted);
    opacity: 0.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    transition: opacity var(--transition-smooth);
}

.scroll-indicator:hover span {
    opacity: 1;
}

/* ========================================
   SECTIONS - Dark theme with grid
   ======================================== */

.section {
    padding: var(--section-padding) 20px;
    position: relative;
    background: var(--black);
}

.section-title {
    font-family: var(--font-mono);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 40px;
    text-align: left;
    letter-spacing: 0.05em;
    color: var(--ivory-pure);
}

/* About Section */
.about {
    background: var(--black-soft);
    border-top: 1px solid var(--gray-dark);
}

.about-content {
    max-width: 100%;
}

.about-content p {
    margin-bottom: 1.4em;
    color: var(--ivory-warm);
}

.about-content .lead {
    font-size: 1.1em;
    color: var(--ivory-pure);
}

.strikethrough {
    text-decoration: line-through;
    opacity: 0.5;
}

.quote-block {
    padding: 20px 25px;
    margin: 25px 0;
    background: var(--black-medium);
    border-left: 3px solid var(--ivory-muted);
    font-style: italic;
    color: var(--ivory-muted);
}

.quote-mark {
    font-family: Georgia, serif;
    font-size: 1.5em;
    opacity: 0.3;
}

.small-note {
    font-size: 0.85rem;
    color: var(--gray-medium);
    font-family: var(--font-mono);
    padding-top: 20px;
    border-top: 1px dashed var(--gray-dark);
    margin-top: 30px;
}

.small-note a {
    color: var(--ivory-muted);
}

.email-obfuscated {
    font-family: var(--font-mono);
    color: var(--ivory-warm);
}

/* Game Section */
.game {
    background: var(--black);
    border-top: 1px solid var(--gray-dark);
}

.game-card {
    background: var(--black-medium);
    border: 1px solid var(--gray-dark);
    border-radius: 4px;
    padding: 40px;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

/* Scan line effect on game card */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px);
    pointer-events: none;
    z-index: 1;
}

.game-card>* {
    position: relative;
    z-index: 2;
}

.game-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--ivory-muted);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff41;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 5px #00ff41;
    }

    50% {
        opacity: 0.5;
        box-shadow: none;
    }
}

.game-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(1.1);
}

.game-genre {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ivory-dark);
    margin-bottom: 25px;
}

.game-description {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--ivory-warm);
}

.game-tagline {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--ivory-muted);
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 2px solid var(--ivory-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    border: 2px solid transparent;
    letter-spacing: 0.02em;
}

.btn-icon {
    font-size: 1.1em;
}

.btn-primary {
    background: var(--ivory-pure);
    color: var(--black);
    border-color: var(--ivory-pure);
}

.btn-primary:hover {
    background: transparent;
    color: var(--ivory-pure);
    transform: translateX(5px);
}

/* Creator Section */
.creator {
    background: var(--black-soft);
    border-top: 1px solid var(--gray-dark);
}

.creator-card {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 600px) {
    .creator-card {
        flex-direction: row;
        align-items: flex-start;
    }
}

.creator-avatar {
    width: 90px;
    height: 90px;
    background: var(--ivory-pure);
    color: var(--black);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.6rem;
    font-weight: 700;
    flex-shrink: 0;
}

.creator-name {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--ivory-pure);
}

.creator-name .alias {
    font-weight: 400;
    font-size: 0.7em;
    color: var(--gray-medium);
}

.creator-role {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--ivory-muted);
    margin-bottom: 25px;
    letter-spacing: 0.02em;
}

.creator-bio p {
    margin-bottom: 1.2em;
    font-size: 0.95rem;
    color: var(--ivory-warm);
}

.stat-block {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px dashed var(--gray-dark);
    border-bottom: 1px dashed var(--gray-dark);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ivory-pure);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meme-note {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--ivory-muted);
    padding: 15px;
    background: var(--black-medium);
    border-left: 2px solid var(--ivory-dark);
}

.meme-arrow {
    color: var(--ivory-pure);
}

.meme-small {
    display: block;
    font-size: 0.75em;
    color: var(--gray-medium);
    margin-top: 5px;
    font-style: italic;
}

.languages-note {
    font-size: 0.85rem;
    color: var(--gray-medium);
    font-style: italic;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--gray-dark);
}

/* Contact Section */
.contact {
    background: var(--black);
    border-top: 1px solid var(--gray-dark);
}

.contact-intro {
    max-width: 100%;
    margin-bottom: 40px;
}

.contact-intro p {
    color: var(--ivory-warm);
    margin-bottom: 20px;
}

.contact-email-line {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--ivory-muted);
    padding: 15px;
    background: var(--black-medium);
    border: 1px solid var(--gray-dark);
    border-radius: 2px;
    overflow-x: auto;
}

.terminal-prompt {
    color: #00ff41;
    margin-right: 5px;
}

.email-link {
    color: var(--ivory-pure);
    text-decoration: none;
    border-bottom: 1px solid var(--ivory-muted);
}

.email-link:hover {
    color: #00ff41;
    border-color: #00ff41;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin-top: 25px;
}

.email-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-medium);
    margin-top: 5px;
    font-style: italic;
}

/* Contact Form */
.contact-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--ivory-muted);
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 1px solid var(--gray-dark);
    border-radius: 2px;
    background: var(--black-medium);
    color: var(--ivory-pure);
    transition: border-color var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ivory-muted);
}

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

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

.form-group input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--black-light);
    border-style: dashed;
}

.btn-submit {
    width: 100%;
    background: var(--ivory-pure);
    color: var(--black);
    border-color: var(--ivory-pure);
    padding: 16px;
    justify-content: center;
}

.btn-submit:hover {
    background: transparent;
    color: var(--ivory-pure);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--gray-medium);
    border-color: var(--gray-medium);
    color: var(--black);
}

/* Form Success State */
.form-success {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 0.5s ease-out;
}

.form-success .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: #00ff41;
    color: var(--black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    animation: pulse-success 2s ease-in-out infinite;
}

@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 65, 0.6);
    }
}

.form-success .success-title {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--ivory-pure);
    margin-bottom: 15px;
}

.form-success .success-message {
    font-size: 1rem;
    color: var(--ivory-muted);
    max-width: 400px;
    margin: 0 auto;
}

.contact-form.form-submitted {
    background: var(--black-medium);
    border: 1px solid var(--gray-dark);
    border-radius: 4px;
}

/* Form Error */
.form-error {
    background: rgba(255, 60, 60, 0.1);
    border: 1px solid #ff3c3c;
    border-radius: 2px;
    padding: 15px;
    margin-bottom: 20px;
    color: #ff6b6b;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Footer */
.footer {
    background: var(--black-soft);
    border-top: 1px solid var(--gray-dark);
    padding: 50px 20px;
    text-align: center;
}

.footer-copyright {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--ivory-muted);
    margin-bottom: 10px;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-bottom: 15px;
}

.coffee-count {
    text-decoration: line-through;
    opacity: 0.5;
}

.footer-disclaimer {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gray-dark);
    font-style: italic;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-12px);
    }

    60% {
        transform: translateX(-50%) translateY(-6px);
    }
}

/* Section fade in on scroll */
.section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .hero-logo {
        max-width: 90%;
    }

    .game-card {
        padding: 25px;
    }

    .game-logo {
        max-width: 200px;
    }

    .creator-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.3rem;
    }

    .stat-block {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat {
        flex: 1 1 80px;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .noise-overlay {
        display: none;
    }
}