/* =========================================
   OPAQE LUXURY CSS ARCHITECTURE (DEV-TEST)
   ========================================= */

/* 1. ROOT & THEMES (Day/Night) */
:root {
    /* DEFAULT (LIGHT MODE / GALLERY) */
    --bg-color: #fbf9f4;
    --surface-color: #ffffff;
    --text-primary: #1a1817;
    --text-muted: #8a8580;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.16);
    --accent: #b8543a;
    
    /* EASING CURVES (Awwwards Standard) */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-quint: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-momentum: cubic-bezier(0.33, 1, 0.68, 1);

    /* TYPOGRAPHY */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* SYSTEM DARK MODE (If user prefers dark, and no manual override is set) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #131214;
        --surface-color: #1c1a1e;
        --text-primary: #ece8e2;
        --text-muted: #a8a39c;
        --border-subtle: rgba(255, 255, 255, 0.07);
        --border-strong: rgba(255, 255, 255, 0.16);
        --accent: #d97a5e;
    }
}

/* MANUAL OVERRIDE (LIGHT) */
[data-theme="light"] {
    --bg-color: #fbf9f4;
    --surface-color: #ffffff;
    --text-primary: #1a1817;
    --text-muted: #8a8580;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.16);
    --accent: #b8543a;
}

/* MANUAL OVERRIDE (DARK) */
[data-theme="dark"] {
    --bg-color: #131214;
    --surface-color: #1c1a1e;
    --text-primary: #ece8e2;
    --text-muted: #a8a39c;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.16);
    --accent: #d97a5e;
}

/* 2. RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* INTRO REVEAL */
.intro-reveal {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 1s var(--ease-out-expo), visibility 1s var(--ease-out-expo);
}

.intro-reveal.hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-logo {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0;
    animation: introFade 1.4s var(--ease-out-expo) forwards;
}

@keyframes introFade {
    0% { 
        opacity: 0; 
        letter-spacing: 0.1em;
        transform: translateY(5px);
    }
    100% { 
        opacity: 1; 
        letter-spacing: 0.25em;
        transform: translateY(0);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.8s var(--ease-out-expo), color 0.8s var(--ease-out-expo);
    overflow-x: hidden;
}

/* Authentic Film Grain Overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.03;
    mix-blend-mode: overlay;
}

/* 3. TYPOGRAPHY */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.05;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 650px;
}

/* 4. LAYOUT & NAVIGATION */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 5vw;
    padding-right: 5vw;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background 0.5s var(--ease-out-expo), border-color 0.5s var(--ease-out-expo);
}

nav.scrolled {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-subtle);
}

.brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-contact-link {
    text-decoration: none; 
    color: var(--text-primary); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 0.1em;
    transition: opacity 0.3s;
}

.nav-contact-link:hover {
    opacity: 0.6;
}

/* Geneva Clock */
.geneva-clock {
    font-family: 'JetBrains Mono', var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-right: 1px solid var(--border-subtle);
    padding-right: 2rem;
}

/* Lang Selector */
.lang-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-right: 2rem;
    border-right: 1px solid var(--border-subtle);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.7rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    color: var(--accent);
    font-weight: 500;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.4s var(--ease-out-expo), border-color 0.4s var(--ease-out-expo);
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--text-primary);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.6s var(--ease-in-out-quint);
}

/* 5. SECTIONS */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 15vh;
}

.hero-content {
    max-width: 1000px;
}

.section {
    padding-top: 12rem;
    padding-bottom: 12rem;
    border-bottom: 1px solid var(--border-subtle);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

/* 🧱 SWISS GRID ARCHITECTURE (CLINICAL & SOLID) */
.swiss-grid {
    border-top: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    gap: 0 !important;
}

.swiss-grid .evidence-card {
    padding: 4.5rem 3rem;
    border: none;
    border-right: 1px solid var(--border-subtle);
    background: transparent;
    transition: background-color 0.4s var(--ease-out-expo);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.swiss-grid .evidence-card:last-child {
    border-right: none;
}

.swiss-grid .evidence-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .swiss-grid .evidence-card:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Technical monospaced card header */
.evidence-header-tech {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    opacity: 0.7;
}

.evidence-tech-code {
    font-weight: 500;
}

.evidence-status-tag {
    color: var(--accent);
    font-weight: 500;
    border: 1px solid var(--border-subtle);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
}

.evidence-meta {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: block;
    font-weight: 600;
}

.evidence-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Form */
.application-form {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 3rem;
    position: relative;
}

.input-line {
    width: 100%;
    max-width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-strong);
    padding: 1rem 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.4s var(--ease-out-expo);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.input-line::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.input-line:focus {
    border-color: var(--text-primary);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    padding: 1.2rem 3rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: background 0.4s var(--ease-out-expo), color 0.4s var(--ease-out-expo), border-color 0.4s var(--ease-out-expo);
}

.btn-submit:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* 6. ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Footer */
footer {
    padding: 6rem 0 3rem;
    text-align: center;
}

footer p {
    max-width: none;
    margin: 0 auto;
}

.footer-text {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.copy-email-btn {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.3s ease;
    opacity: 0.6;
}

.copy-email-btn:hover {
    opacity: 1;
}

/* 7. MOBILE RESPONSIVENESS */
@media (max-width: 900px) {
    .swiss-grid {
        grid-template-columns: 1fr !important;
        border-left: none;
        border-right: none;
    }
    
    .swiss-grid .evidence-card {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 4rem 10vw;
    }
    
    .swiss-grid .evidence-card:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 10vw; /* Massive breathing room on mobile */
        padding-right: 10vw;
    }

    .section {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }

    nav {
        padding: 1.5rem 10vw;
    }
    
    .brand {
        font-size: 1.3rem;
    }
    
    .lang-selector {
        padding-right: 1rem;
        gap: 0.4rem;
    }
    
    .lang-btn {
        font-size: 0.6rem;
    }
    
    .nav-contact-link {
        display: none;
    }
    
    h1 {
        font-size: clamp(2.5rem, 10vw, 3rem);
    }
    
    h2 {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
    }
    
    .geneva-clock {
        display: none;
    }
}
