/**
 * ek.media Design System
 * Unified CSS architecture with global design tokens
 * Optimized for production deployment
 */

/* ============================================================================
   DESIGN TOKENS (CSS Custom Properties)
   ============================================================================ */
:root {
    /* -------------------------------------------------------------------------
       COLOR PALETTE
       ------------------------------------------------------------------------- */
    /* Background Colors */
    --c-bg-primary: #0a0a0a;
    --c-bg-secondary: #111111;
    --c-bg-tertiary: #1a1a1a;
    --c-bg-elevated: #222222;

    /* Surface & Border Colors */
    --c-border: rgba(255, 255, 255, 0.1);
    --c-border-hover: rgba(255, 255, 255, 0.2);
    --c-border-focus: var(--c-accent);

    /* Text Colors */
    --c-text: #ffffff;
    --c-text-secondary: #a0a0a0;
    --c-text-muted: #666666;

    /* Accent Colors */
    --c-accent: #3b82f6;
    --c-accent-hover: #2563eb;
    --c-accent-glow: rgba(59, 130, 246, 0.25);

    /* Semantic Colors */
    --c-success: #10b981;
    --c-success-bg: rgba(16, 185, 129, 0.15);
    --c-error: #ef4444;
    --c-error-bg: rgba(239, 68, 68, 0.15);
    --c-warning: #f59e0b;

    /* -------------------------------------------------------------------------
       TYPOGRAPHY
       ------------------------------------------------------------------------- */
    /* Font Families */
    --f-serif: 'Cormorant Garamond', Georgia, serif;
    --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes (Fluid Scale) */
    --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
    --fs-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
    --fs-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --fs-lg: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --fs-xl: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --fs-2xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --fs-3xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --fs-4xl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
    --fs-5xl: clamp(2.5rem, 2rem + 3vw, 4rem);
    --fs-hero: clamp(3rem, 2rem + 5vw, 6rem);

    /* Font Weights */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Line Heights */
    --lh-tight: 1.2;
    --lh-base: 1.5;
    --lh-relaxed: 1.7;

    /* Letter Spacing */
    --ls-tight: -0.02em;
    --ls-normal: 0;
    --ls-wide: 0.05em;
    --ls-wider: 0.1em;

    /* -------------------------------------------------------------------------
       SPACING SCALE (based on 0.25rem increments)
       ------------------------------------------------------------------------- */
    --s-1: 0.25rem;
    /* 4px */
    --s-2: 0.5rem;
    /* 8px */
    --s-3: 0.75rem;
    /* 12px */
    --s-4: 1rem;
    /* 16px */
    --s-5: 1.25rem;
    /* 20px */
    --s-6: 1.5rem;
    /* 24px */
    --s-8: 2rem;
    /* 32px */
    --s-10: 2.5rem;
    /* 40px */
    --s-12: 3rem;
    /* 48px */
    --s-16: 4rem;
    /* 64px */
    --s-20: 5rem;
    /* 80px */
    --s-24: 6rem;
    /* 96px */

    /* -------------------------------------------------------------------------
       BORDERS & RADIUS
       ------------------------------------------------------------------------- */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* -------------------------------------------------------------------------
       SHADOWS
       ------------------------------------------------------------------------- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px var(--c-accent-glow);

    /* -------------------------------------------------------------------------
       TRANSITIONS
       ------------------------------------------------------------------------- */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    --t-fast: 150ms var(--ease-out);
    --t-base: 250ms var(--ease-out);
    --t-slow: 400ms var(--ease-out);

    /* -------------------------------------------------------------------------
       LAYOUT
       ------------------------------------------------------------------------- */
    --container-max: 1400px;
    --container-padding: clamp(var(--s-4), 5vw, var(--s-8));
    --header-height: 80px;
}

/* ============================================================================
   CSS RESET & BASE STYLES
   ============================================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--f-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-base);
    color: var(--c-text);
    background: var(--c-bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: var(--c-accent);
    color: var(--c-text);
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Images */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lists */
ul,
ol {
    list-style: none;
}

/* Buttons */
button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================================================================
   LAYOUT UTILITIES
   ============================================================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

.section {
    padding-block: var(--s-16);
}

/* ============================================================================
   TYPOGRAPHY UTILITIES
   ============================================================================ */
.text-serif {
    font-family: var(--f-serif);
}

.text-sans {
    font-family: var(--f-sans);
}

.text-xs {
    font-size: var(--fs-xs);
}

.text-sm {
    font-size: var(--fs-sm);
}

.text-base {
    font-size: var(--fs-base);
}

.text-lg {
    font-size: var(--fs-lg);
}

.text-xl {
    font-size: var(--fs-xl);
}

.text-2xl {
    font-size: var(--fs-2xl);
}

.text-muted {
    color: var(--c-text-muted);
}

.text-secondary {
    color: var(--c-text-secondary);
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

/* Elegant Headline (Serif Italic) */
.headline-elegant {
    font-family: var(--f-serif);
    font-weight: var(--fw-regular);
    font-style: italic;
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
}

/* Section Label */
.label {
    display: block;
    font-family: var(--f-sans);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin-bottom: var(--s-2);
}

/* ============================================================================
   BUTTON COMPONENTS
   ============================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    padding: var(--s-4) var(--s-8);
    font-family: var(--f-sans);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-full);
    transition: var(--t-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn:hover::before {
    transform: translateX(100%);
}

/* Outline Button */
.btn-outline {
    color: var(--c-text);
    background: transparent;
    border: 1px solid var(--c-border);
}

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

/* Solid Button */
.btn-solid {
    color: var(--c-bg-primary);
    background: var(--c-text);
    border: 1px solid var(--c-text);
}

.btn-solid:hover {
    background: transparent;
    color: var(--c-text);
}

/* Primary Button (Accent) */
.btn-primary {
    color: white;
    background: var(--c-accent);
    border: 1px solid var(--c-accent);
}

.btn-primary:hover {
    background: var(--c-accent-hover);
    border-color: var(--c-accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Large Button */
.btn-lg {
    padding: var(--s-5) var(--s-12);
    font-size: var(--fs-base);
}

/* Button Disabled */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled::before {
    display: none;
}

/* ============================================================================
   FORM COMPONENTS
   ============================================================================ */
.form {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.form-label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--c-text-secondary);
}

.form-input {
    width: 100%;
    padding: var(--s-4);
    font-family: var(--f-sans);
    font-size: var(--fs-base);
    color: var(--c-text);
    background: var(--c-bg-tertiary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--t-base);
}

.form-input::placeholder {
    color: var(--c-text-muted);
}

.form-input:hover {
    border-color: var(--c-border-hover);
}

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

.form-input.error {
    border-color: var(--c-error);
    box-shadow: 0 0 0 3px var(--c-error-bg);
}

.form-input.success {
    border-color: var(--c-success);
}

/* Textarea */
.form-textarea {
    resize: vertical;
    min-height: 140px;
}

/* Select */
.form-select-wrap {
    position: relative;
}

.form-select {
    appearance: none;
    padding-right: var(--s-12);
    cursor: pointer;
}

.form-select-arrow {
    position: absolute;
    right: var(--s-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-text-muted);
    pointer-events: none;
    transition: var(--t-fast);
}

.form-select:focus+.form-select-arrow {
    color: var(--c-accent);
}

/* Error Text */
.form-error {
    font-size: var(--fs-sm);
    color: var(--c-error);
    min-height: 1.25rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: var(--t-fast);
}

.form-error.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Submit Button */
.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    width: 100%;
    padding: var(--s-5) var(--s-8);
    font-family: var(--f-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--c-bg-primary);
    background: var(--c-text);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--t-base);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.submit-btn:hover::before {
    transform: translateX(100%);
}

.submit-btn:hover {
    background: var(--c-accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.submit-btn:disabled::before {
    display: none;
}

/* Loading State */
.btn-loader {
    display: none;
}

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

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

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* ============================================================================
   CARD COMPONENTS
   ============================================================================ */
.card {
    background: var(--c-bg-secondary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--t-base);
}

.card:hover {
    border-color: var(--c-border-hover);
}

.card-body {
    padding: var(--s-8);
}

/* Info Card */
.info-card {
    display: flex;
    align-items: flex-start;
    gap: var(--s-4);
    padding: var(--s-6);
    background: var(--c-bg-secondary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    transition: var(--t-base);
}

.info-card:hover {
    border-color: var(--c-border-hover);
    transform: translateX(4px);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--c-accent-glow);
    border-radius: var(--radius-md);
    color: var(--c-accent);
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: var(--fs-xs);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--c-text-muted);
}

.info-value {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--c-text);
}

/* ============================================================================
   TOAST NOTIFICATION
   ============================================================================ */
.toast {
    position: fixed;
    bottom: var(--s-8);
    right: var(--s-8);
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-6);
    background: var(--c-bg-secondary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateX(calc(100% + var(--s-8)));
    opacity: 0;
    transition: var(--t-slow);
    z-index: 1000;
}

.toast.visible {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--c-success);
    background: var(--c-success-bg);
}

.toast.error {
    border-color: var(--c-error);
    background: var(--c-error-bg);
}

.toast-icon {
    display: flex;
}

.toast-icon-success,
.toast-icon-error {
    display: none;
}

.toast.success .toast-icon-success {
    display: block;
    color: var(--c-success);
}

.toast.error .toast-icon-error {
    display: block;
    color: var(--c-error);
}

.toast-message {
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

@media (max-width: 600px) {
    .toast {
        left: var(--s-4);
        right: var(--s-4);
        bottom: var(--s-4);
    }
}

/* ============================================================================
   BADGE COMPONENT
   ============================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-5);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    background: var(--c-bg-secondary);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
}

.badge-icon {
    font-size: var(--fs-xl);
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.animate-fade-in {
    animation: fadeIn 0.6s var(--ease-out) both;
}

.animate-fade-up {
    animation: fadeInUp 0.6s var(--ease-out) both;
}

/* Scroll-triggered animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
[data-delay="1"] {
    transition-delay: 0.1s;
}

[data-delay="2"] {
    transition-delay: 0.2s;
}

[data-delay="3"] {
    transition-delay: 0.3s;
}

[data-delay="4"] {
    transition-delay: 0.4s;
}

[data-delay="5"] {
    transition-delay: 0.5s;
}

/* ============================================================================
   RESPONSIVE UTILITIES
   ============================================================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ============================================================================
   LANGUAGE SWITCHER
   ============================================================================ */
.language-switcher {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    margin-right: var(--s-6);
}

.lang-btn {
    padding: var(--s-1) var(--s-2);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wide);
    color: var(--c-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--t-fast);
    text-transform: uppercase;
}

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

.lang-btn.active {
    color: var(--c-text);
}

.lang-divider {
    color: var(--c-text-muted);
    font-size: var(--fs-xs);
    opacity: 0.5;
}

/* Mobile Language Switcher */
.mobile-lang-switcher {
    display: flex;
    justify-content: center;
    gap: var(--s-2);
    padding-top: var(--s-4);
    margin-top: var(--s-4);
    border-top: 1px solid var(--c-border);
}

.mobile-lang-switcher .lang-btn {
    padding: var(--s-2) var(--s-4);
    font-size: var(--fs-sm);
}

/* ============================================================================
   GLOBAL FOOTER
   ============================================================================ */
.site-footer {
    background: var(--c-bg-secondary);
    border-top: 1px solid var(--c-border);
    padding: var(--s-16) 0 var(--s-8);
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--s-8);
    margin-bottom: var(--s-16);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--s-10);
    }

    .footer-brand-col {
        grid-column: 1 / -1;
        margin-bottom: var(--s-4);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--s-8);
    }
}

/* Footer Brand */
.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
}

.footer-brand-col .brand-footer {
    font-size: var(--fs-2xl);
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--c-text);
    text-decoration: none;
}

.footer-desc {
    font-size: var(--fs-base);
    color: var(--c-text-secondary);
    line-height: 1.6;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: var(--s-4);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-full);
    color: var(--c-text-muted);
    transition: all var(--t-base);
}

.social-link:hover {
    border-color: var(--c-text);
    color: var(--c-text);
    background: var(--c-bg-tertiary);
}

/* Footer Links */
.footer-column h5 {
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    color: var(--c-text);
    margin-bottom: var(--s-6);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.footer-links a {
    color: var(--c-text-secondary);
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: color var(--t-fast);
}

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

.footer-address {
    font-style: normal;
    color: var(--c-text-secondary);
    font-size: var(--fs-sm);
    line-height: 1.6;
    margin-bottom: var(--s-4);
}

.footer-contact-info a {
    color: var(--c-text);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--t-fast);
}

.footer-contact-info a:hover {
    color: var(--c-accent);
}

/* Footer Bottom */
.footer-bottom {
    padding-top: var(--s-8);
    border-top: 1px solid var(--c-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-4);
}

.copyright p {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}

/* Footer Language Switcher */
.footer-language {
    display: flex;
    align-items: center;
    gap: var(--s-2);
}

.footer-lang-btn {
    background: none;
    border: none;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-text-muted);
    cursor: pointer;
    padding: var(--s-1);
    transition: color var(--t-fast);
}

.footer-lang-btn:hover,
.footer-lang-btn.active {
    color: var(--c-text);
}

.footer-language .sep {
    color: var(--c-border);
    font-size: var(--fs-xs);
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */
@media print {
    body {
        background: white;
        color: black;
    }

    .site-header,
    .site-footer,
    .toast {
        display: none;
    }
}