/* =============================================
   DURIN â€” durin.cz
   Modern responsive website with light/dark mode
   ============================================= */

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === CSS CUSTOM PROPERTIES â€” LIGHT MODE (default) === */
:root {
    /* Colors â€” Emerald + Cyan + Amber */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f1f2f4;
    --text-primary: #1a1d2e;
    --text-secondary: #4a5068;
    --text-muted: #888da8;
    --accent: #047857;
    --accent-hover: #065f46;
    --accent-light: rgba(4, 120, 87, 0.08);
    --accent-glow: rgba(4, 120, 87, 0.15);
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.06);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-blur: blur(20px);
    --hero-gradient: linear-gradient(135deg, #f9fafb 0%, #f1f2f4 50%, #f5f5f6 100%);
    --quote-bg: linear-gradient(135deg, #047857, #0e7490);
    --placeholder-bg: rgba(4, 120, 87, 0.04);
    --footer-bg: #111827;
    --footer-text: #9ca3af;

    /* Typography */
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --section-padding: 7rem 0;
    --container-width: 1200px;

    /* Living background â€” light mode */
    --orb-steel: rgba(4, 120, 87, 0.08);
    --orb-cyan: rgba(8, 145, 178, 0.08);
    --orb-amber: rgba(217, 119, 6, 0.10);
    --orb-teal: rgba(20, 184, 166, 0.08);
    --orb-wine: rgba(136, 19, 55, 0.08);
    --code-color: rgba(160, 80, 20, 0.12);
    --stream-steel: rgba(4, 120, 87, 0.14);
    --stream-cyan: rgba(8, 145, 178, 0.14);
    --stream-amber: rgba(217, 119, 6, 0.16);
    --stream-teal: rgba(20, 184, 166, 0.14);
    --stream-wine: rgba(136, 19, 55, 0.14);
    --net-line-color: rgba(160, 80, 20, 0.12);
    --node-fill: rgba(217, 119, 6, 0.30);
    --node-fill-wine: rgba(159, 18, 57, 0.30);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* === DARK MODE === */
[data-theme="dark"] {
    --orb-steel: rgba(16, 185, 129, 0.10);
    --orb-cyan: rgba(34, 211, 238, 0.08);
    --orb-amber: rgba(251, 191, 36, 0.12);
    --orb-teal: rgba(45, 212, 191, 0.08);
    --orb-wine: rgba(225, 29, 72, 0.10);
    --code-color: rgba(200, 120, 30, 0.16);
    --stream-steel: rgba(16, 185, 129, 0.16);
    --stream-cyan: rgba(34, 211, 238, 0.16);
    --stream-amber: rgba(251, 191, 36, 0.18);
    --stream-teal: rgba(45, 212, 191, 0.16);
    --stream-wine: rgba(225, 29, 72, 0.16);
    --net-line-color: rgba(200, 120, 30, 0.14);
    --node-fill: rgba(251, 191, 36, 0.45);
    --node-fill-wine: rgba(225, 29, 72, 0.40);

    --bg-primary: #0f1219;
    --bg-secondary: #13161d;
    --bg-tertiary: #1a1e26;
    --text-primary: #e8ecf0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #059669;
    --accent-hover: #10b981;
    --accent-light: rgba(5, 150, 105, 0.1);
    --accent-glow: rgba(5, 150, 105, 0.2);
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --card-bg: #1e293b;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.15);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.2);
    --nav-bg: rgba(15, 18, 25, 0.85);
    --hero-gradient: linear-gradient(135deg, #0f1219 0%, #0f1219 50%, #0f1219 100%);
    --placeholder-bg: rgba(5, 150, 105, 0.06);
    --footer-bg: #0a0d14;
    --footer-text: #64748b;
}

[data-theme="dark"] .logo-icon,
[data-theme="dark"] .ref-logo-invertable {
    filter: invert(1);
}

/* System preference detection */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] {
        --orb-steel: rgba(16, 185, 129, 0.10);
        --orb-cyan: rgba(34, 211, 238, 0.08);
        --orb-amber: rgba(251, 191, 36, 0.12);
        --orb-teal: rgba(45, 212, 191, 0.08);
        --orb-wine: rgba(225, 29, 72, 0.10);
        --code-color: rgba(200, 120, 30, 0.16);
        --stream-steel: rgba(16, 185, 129, 0.16);
        --stream-cyan: rgba(34, 211, 238, 0.16);
        --stream-amber: rgba(251, 191, 36, 0.18);
        --stream-teal: rgba(45, 212, 191, 0.16);
        --stream-wine: rgba(225, 29, 72, 0.16);
        --net-line-color: rgba(200, 120, 30, 0.14);
        --node-fill: rgba(251, 191, 36, 0.45);
        --node-fill-wine: rgba(225, 29, 72, 0.40);

        --bg-primary: #0f1219;
        --bg-secondary: #13161d;
        --bg-tertiary: #1a1e26;
        --text-primary: #e8ecf0;
        --text-secondary: #94a3b8;
        --text-muted: #64748b;
        --accent: #059669;
        --accent-hover: #10b981;
        --accent-light: rgba(5, 150, 105, 0.1);
        --accent-glow: rgba(5, 150, 105, 0.2);
        --border: rgba(255, 255, 255, 0.06);
        --border-strong: rgba(255, 255, 255, 0.12);
        --card-bg: #1e293b;
        --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.15);
        --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.2);
        --nav-bg: rgba(15, 18, 25, 0.85);
        --hero-gradient: linear-gradient(135deg, #0f1219 0%, #0f1219 50%, #0f1219 100%);
        --placeholder-bg: rgba(5, 150, 105, 0.06);
        --footer-bg: #0a0d14;
        --footer-text: #64748b;
    }
    [data-theme="system"] .logo-icon,
    [data-theme="system"] .ref-logo-invertable {
        filter: invert(1);
    }
}

/* === GLOBAL === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background var(--transition-medium), color var(--transition-medium);
    overflow-x: hidden;
}

/* === LIVING BACKGROUND (pure CSS/SVG) === */
#livingBg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

/* Pulsing glow orbs */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform, opacity;
}
.bg-orb-1 {
    width: 300px; height: 300px; top: 10%; left: 15%;
    background: radial-gradient(circle, var(--orb-steel) 0%, transparent 70%);
    animation: orbPulse 18s ease-in-out infinite;
}
.bg-orb-2 {
    width: 250px; height: 250px; top: 60%; right: 10%;
    background: radial-gradient(circle, var(--orb-cyan) 0%, transparent 70%);
    animation: orbPulse 22s ease-in-out 4s infinite;
}
.bg-orb-3 {
    width: 200px; height: 200px; bottom: 20%; left: 40%;
    background: radial-gradient(circle, var(--orb-amber) 0%, transparent 70%);
    animation: orbPulse 16s ease-in-out 8s infinite;
}
.bg-orb-4 {
    width: 280px; height: 280px; top: 35%; right: 35%;
    background: radial-gradient(circle, var(--orb-teal) 0%, transparent 70%);
    animation: orbPulse 20s ease-in-out 2s infinite;
}
.bg-orb-5 {
    width: 240px; height: 240px; top: 70%; right: 40%;
    background: radial-gradient(circle, var(--orb-wine) 0%, transparent 70%);
    animation: orbPulse 19s ease-in-out 6s infinite;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* Floating code text */
.bg-code {
    position: absolute;
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-weight: 600;
    color: var(--code-color);
    will-change: transform;
    animation: codeFloat linear infinite;
    white-space: nowrap;
}

@keyframes codeFloat {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    3% { opacity: 1; }
    93% { opacity: 1; }
    100% { transform: translateY(-10vh) translateX(20px); opacity: 0; }
}

/* 20 code items â€” slow drift upward */
.bg-code-1  { left: 5%;  font-size: 14px; animation-duration: 55s; animation-delay: 0s; }
.bg-code-2  { left: 12%; font-size: 16px; animation-duration: 60s; animation-delay: -6s; }
.bg-code-3  { left: 20%; font-size: 13px; animation-duration: 50s; animation-delay: -16s; }
.bg-code-4  { left: 28%; font-size: 15px; animation-duration: 65s; animation-delay: -25s; }
.bg-code-5  { left: 35%; font-size: 12px; animation-duration: 58s; animation-delay: -10s; }
.bg-code-6  { left: 42%; font-size: 17px; animation-duration: 52s; animation-delay: -38s; }
.bg-code-7  { left: 50%; font-size: 14px; animation-duration: 68s; animation-delay: -4s; }
.bg-code-8  { left: 58%; font-size: 13px; animation-duration: 56s; animation-delay: -32s; }
.bg-code-9  { left: 65%; font-size: 16px; animation-duration: 48s; animation-delay: -14s; }
.bg-code-10 { left: 72%; font-size: 12px; animation-duration: 62s; animation-delay: -42s; }
.bg-code-11 { left: 78%; font-size: 15px; animation-duration: 54s; animation-delay: -20s; }
.bg-code-12 { left: 85%; font-size: 13px; animation-duration: 66s; animation-delay: -2s; }
.bg-code-13 { left: 92%; font-size: 14px; animation-duration: 52s; animation-delay: -28s; }
.bg-code-14 { left: 8%;  font-size: 11px; animation-duration: 60s; animation-delay: -45s; }
.bg-code-15 { left: 18%; font-size: 15px; animation-duration: 50s; animation-delay: -12s; }
.bg-code-16 { left: 32%; font-size: 13px; animation-duration: 64s; animation-delay: -34s; }
.bg-code-17 { left: 48%; font-size: 12px; animation-duration: 46s; animation-delay: -18s; }
.bg-code-18 { left: 62%; font-size: 14px; animation-duration: 58s; animation-delay: -8s; }
.bg-code-19 { left: 75%; font-size: 11px; animation-duration: 70s; animation-delay: -40s; }
.bg-code-20 { left: 88%; font-size: 16px; animation-duration: 54s; animation-delay: -22s; }

/* Data stream lines */
.bg-stream {
    position: absolute;
    height: 2px;
    border-radius: 1px;
    will-change: transform;
}
.bg-stream-1 {
    width: 120px; top: 25%;
    background: linear-gradient(90deg, transparent, var(--stream-steel), transparent);
    animation: streamH 14s linear infinite;
}
.bg-stream-2 {
    width: 80px; top: 55%;
    background: linear-gradient(90deg, transparent, var(--stream-cyan), transparent);
    animation: streamH 18s linear 5s infinite;
}
.bg-stream-3 {
    width: 100px; top: 75%;
    background: linear-gradient(90deg, transparent, var(--stream-amber), transparent);
    animation: streamH 16s linear 10s infinite;
}
.bg-stream-4 {
    width: 2px; height: 100px; left: 30%; top: 0;
    background: linear-gradient(180deg, transparent, var(--stream-teal), transparent);
    animation: streamV 20s linear 3s infinite;
}
.bg-stream-5 {
    width: 2px; height: 80px; left: 70%; top: 0;
    background: linear-gradient(180deg, transparent, var(--stream-steel), transparent);
    animation: streamV 16s linear 8s infinite;
}
.bg-stream-6 {
    width: 90px; top: 40%;
    background: linear-gradient(90deg, transparent, var(--stream-wine), transparent);
    animation: streamH 17s linear 7s infinite;
}

@keyframes streamH {
    0% { transform: translateX(-150px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(100vw); opacity: 0; }
}
@keyframes streamV {
    0% { transform: translateY(-120px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* SVG Network overlay */
.bg-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.net-line {
    stroke: var(--net-line-color);
    stroke-width: 1;
    fill: none;
    opacity: 0;
    animation: lineFade 10s ease-in-out infinite;
}
.nl-1  { animation-delay: 0s; }
.nl-2  { animation-delay: 1s; }
.nl-3  { animation-delay: 2s; }
.nl-4  { animation-delay: 3s; }
.nl-5  { animation-delay: 4s; }
.nl-6  { animation-delay: 5s; }
.nl-7  { animation-delay: 6s; }
.nl-8  { animation-delay: 7s; }
.nl-9  { animation-delay: 0.5s; }
.nl-10 { animation-delay: 1.5s; }
.nl-11 { animation-delay: 2.5s; }
.nl-12 { animation-delay: 3.5s; }

@keyframes lineFade {
    0%, 100% { opacity: 0; }
    30%, 70% { opacity: 1; }
}

.net-node {
    fill: var(--node-fill);
    opacity: 0;
    animation: nodePulse 8s ease-in-out infinite;
}
.net-node-wine {
    fill: var(--node-fill-wine);
    opacity: 0;
    animation: nodePulse 8s ease-in-out infinite;
}
.nn-1  { animation-delay: 0s; }
.nn-2  { animation-delay: 0.8s; }
.nn-3  { animation-delay: 1.6s; }
.nn-4  { animation-delay: 2.4s; }
.nn-5  { animation-delay: 3.2s; }
.nn-6  { animation-delay: 4s; }
.nn-7  { animation-delay: 4.8s; }
.nn-8  { animation-delay: 5.6s; }
.nn-9  { animation-delay: 6.4s; }
.nn-10 { animation-delay: 7.2s; }
.nn-11 { animation-delay: 2s; }

@keyframes nodePulse {
    0%, 100% { opacity: 0.3; r: 3; }
    50% { opacity: 0.8; r: 5; }
}

.net-pulse {
    fill: none;
    stroke: var(--node-fill);
    stroke-width: 1.5;
    opacity: 0;
    animation: ringExpand 12s ease-out infinite;
}
.np-1 { animation-delay: 0s; }
.np-2 { animation-delay: 3.5s; }
.np-3 { animation-delay: 7s; }
.np-4 { animation-delay: 9s; }

@keyframes ringExpand {
    0% { r: 5; opacity: 0.5; stroke-width: 1.5; }
    100% { r: 50; opacity: 0; stroke-width: 0.3; }
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-xl);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 12px rgba(4, 120, 87, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(4, 120, 87, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-full {
    width: 100%;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === NAVIGATION === */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-medium), box-shadow var(--transition-medium);
}

#header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.08em;
}

.logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.footer-brand .logo-icon {
    height: 38px;
    width: auto;
    filter: invert(1);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--accent-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.lang-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.lang-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.lang-arrow {
    transition: transform var(--transition-fast);
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-medium);
    z-index: 100;
    overflow: hidden;
}

.lang-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.lang-option:hover {
    background: var(--accent-light);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--accent);
    font-weight: 600;
    background: var(--accent-light);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-icon {
    transition: opacity var(--transition-fast), transform var(--transition-medium);
}

/* Light mode â€” show moon, hide sun */
.theme-icon.sun { display: none; }
.theme-icon.moon { display: block; }

/* Dark mode â€” show sun, hide moon */
[data-theme="dark"] .theme-icon.sun { display: block; }
[data-theme="dark"] .theme-icon.moon { display: none; }

/* System preference */
@media (prefers-color-scheme: dark) {
    [data-theme="system"] .theme-icon.sun { display: block; }
    [data-theme="system"] .theme-icon.moon { display: none; }
}
@media (prefers-color-scheme: light) {
    [data-theme="system"] .theme-icon.sun { display: none; }
    [data-theme="system"] .theme-icon.moon { display: block; }
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-medium);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === HERO === */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 2rem 2rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--hero-gradient);
    z-index: -2;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: auto 0;
    padding-bottom: 5rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    border: 1px solid var(--accent-glow);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--accent), #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    display: inline;
}

.stat-plus {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-strong);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: bounce 2s infinite;
    pointer-events: none;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes bounce-mobile {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* === SECTIONS === */
.section {
    padding: var(--section-padding);
}

.section-alt {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* === ABOUT === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text .lead {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Timeline */
.about-timeline {
    position: relative;
    padding-left: 2rem;
}

.about-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-glow), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
    padding-left: 1.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-year {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.4rem;
}

.timeline-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === TECH STACK BADGES === */
.tech-stack {
    margin-top: 2rem;
}

.tech-stack h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid var(--accent-glow);
    border-radius: 9999px;
    white-space: nowrap;
}

/* === REF TECH TAGS === */
.ref-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.ref-tech {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: 4px;
    white-space: nowrap;
}

/* === SERVICES === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
    border-color: var(--accent-glow);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === WHY US === */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.reason-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
}

.reason-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.reason-card:hover {
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-glow);
}

.reason-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.6;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.reason-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.reason-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Quote block */
.quote-block {
    background: var(--quote-bg);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
}

.quote-block blockquote p {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* === REFERENCES === */

/* === PLATFORM === */
.platform-showcase {
    max-width: 800px;
    margin: 0 auto;
}

.platform-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #0e7490, var(--accent));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.platform-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.platform-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.platform-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.platform-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.platform-card-titles h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.platform-card-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.platform-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.platform-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.platform-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.platform-feature svg {
    color: var(--accent);
    flex-shrink: 0;
}

.platform-templates {
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.platform-templates h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.platform-template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.platform-template-tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.platform-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Reference featured card */
.ref-card-featured {
    border-color: var(--accent-glow);
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--accent-light) 100%);
    position: relative;
}

.ref-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--accent);
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
}

@media (max-width: 768px) {
    .platform-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .platform-card {
        padding: 1.5rem;
    }

    .platform-actions {
        flex-direction: column;
    }

    .platform-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .platform-features {
        grid-template-columns: 1fr;
    }
}

/* === REFERENCES (grid) === */
.references-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.ref-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
}

.ref-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ref-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
    border-color: var(--accent-glow);
}

.ref-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    color: var(--accent);
    overflow: hidden;
}

.ref-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ref-logo img.ref-logo-round {
    border-radius: 100%;
}

.ref-logo img.ref-logo-invertable {
    /* black SVG â€” needs invert in dark mode */
}

.ref-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.ref-type {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.ref-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === CONTACT === */
.contact-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    justify-content: start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.contact-item svg {
    color: var(--accent);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.contact-item a,
.contact-item span:not(.contact-label) {
    color: var(--text-primary);
    font-weight: 500;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top:-1.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-status {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 1.4em;
}

.form-status.success {
    color: #16a34a;
}

.form-status.error {
    color: #dc2626;
}

/* === FOOTER === */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-brand {
    text-align: center;
}

.footer-brand .logo {
    color: #fff;
    margin-bottom: 0.5rem;
    display: inline-flex;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--footer-text);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--footer-text);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
}

/* === ANIMATIONS === */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .services-grid,
    .reasons-grid,
    .references-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid,
    .contact-grid-2col {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background: var(--bg-primary);
        padding: 2rem;
        gap: 0.25rem;
        z-index: 999;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }

    #header.menu-open {
        background: var(--bg-primary);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.75rem 1rem;
    }

    .nav-links li {
        opacity: 0;
        transform: translateX(-12px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .nav-links.open li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.open li:nth-child(1) { transition-delay: 0.05s; }
    .nav-links.open li:nth-child(2) { transition-delay: 0.1s; }
    .nav-links.open li:nth-child(3) { transition-delay: 0.15s; }
    .nav-links.open li:nth-child(4) { transition-delay: 0.2s; }
    .nav-links.open li:nth-child(5) { transition-delay: 0.25s; }
    .nav-links.open li:nth-child(6) { transition-delay: 0.3s; }

    .hamburger {
        display: flex;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .services-grid,
    .reasons-grid,
    .references-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .scroll-indicator {
        position: static;
        transform: none;
        animation: bounce-mobile 2s infinite;
        padding-top: 0;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .quote-block {
        padding: 2rem 1.5rem;
    }

    .quote-block blockquote p {
        font-size: 1.1rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .lang-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    #hero {
        padding: 6rem 1rem 1.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .scroll-indicator {
        font-size: 0.65rem;
    }

    .scroll-indicator svg {
        width: 18px;
        height: 18px;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    #livingBg { display: none; }
}
