/* TWINX – shared styles (index, inner pages, footer) */

:root {
    --scale: clamp(0.9rem, 1.2vw, 1.35rem);
    --pad: calc(var(--scale) * 2.4);
    --pad-hero: calc(var(--scale) * 3);
    --gap: calc(var(--scale) * 3.2);
    --text-headline: calc(var(--scale) * 2.45);
    --text-subhead: calc(var(--scale) * 1.6);
    --text-body: var(--scale);
    --text-tag: calc(var(--scale) * 0.9);
    --text-meta: calc(var(--scale) * 0.85);
    --line: calc(var(--scale) * 0.55);
    --line-height: calc(var(--scale) * 3);
    --bridge-line-width: calc(1.8 * var(--line));
    --logo-size: clamp(9rem, 13vw, 18rem);
    --nav-width: clamp(11rem, 14vw, 18rem);
    --nav-gap: clamp(calc(var(--scale) * 0.6), var(--scale) * 0.95, calc(var(--scale) * 1.4));

}

body {
    background-color: #151517;
    color: white;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* Prevent any element from exceeding viewport width */
* {
    max-width: 100%;
}

section, main, div {
    box-sizing: border-box;
}

body.index-page {
    cursor: crosshair;
}

/* Shader / WebGL */
#shader-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#shader-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

#shader-error {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: white;
    background: linear-gradient(135deg, #0a0a0c 0%, #151517 50%, #0a0a0c 100%);
}

/* Typography & scale */
.text-body-size { font-size: var(--text-body); }
.text-headline-size { font-size: var(--text-headline); }
.text-subhead-size { font-size: var(--text-subhead); }
.text-tag-size { font-size: var(--text-tag); }
.text-meta-size { font-size: var(--text-meta); }
.text-list-item-size { font-size: calc(1.1 * var(--text-meta)); }
.text-nav {
    font-size: calc(1.3 * var(--text-meta));
    letter-spacing: 0.25em;
    text-transform: capitalize;
}
.text-nav:hover { font-weight: 900; }

/* Desktop sidebar nav – width scales with viewport */
nav.fixed.left-0.top-0.h-full {
    width: var(--nav-width) !important;
    min-width: var(--nav-width) !important;
    max-width: var(--nav-width) !important;
}
.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}
.nav-label {
    display: inline-block;
    transform: rotate(-90deg);
    transition: transform 0.35s ease, text-shadow 0.35s ease;
    transform-origin: center;
}
.nav-item:hover {
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.35), inset 0 0 12px rgba(0, 240, 255, 0.25);
    border-color: rgba(0, 240, 255, 0.4);
}
.nav-item:hover .nav-label {
    transform: rotate(0deg);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
}

.vertical-text { transform: none; }
/* Nav item gap scales with viewport (sidebar only) */
nav .vertical-text {
    gap: var(--nav-gap);
}
.vertical-text a { transform: rotate(180deg); display: inline-block; }

.nav-link.active { text-shadow: 0 0 10px rgba(0, 240, 255, 0.8); }
.nav-link.active[data-section="home"],
.nav-link.active[data-section="bridge"],
.nav-link.active[data-section="identity"],
.nav-link.active[data-section="yield"] {
    color: #FFB800;
    text-shadow: 0 0 20px rgba(255, 184, 0, 0.5);
}
.nav-link.active[data-section="system"] {
    color: #00D4FF;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.legal-note {
    font-size: calc(var(--scale) * 0.6);
    line-height: 0.9rem;
}
.legal-note-header {
    font-size: calc(var(--scale) * 0.75);
    line-height: 1.1rem;
    width: 100%;
    /* text-align: center; */
}
.line-height-size { height: var(--line-height); }
.line-width-size { width: var(--line); }
.gap-size { gap: var(--gap); }
.pad-size { padding: var(--pad); }
.mb-gap { margin-bottom: var(--gap); }
.mt-gap { margin-top: var(--gap); }
.space-x-size > * + * { margin-left: var(--gap); }
.space-y-size > * + * { margin-top: var(--gap); }
.h-line-size { height: calc(1.8 * var(--line-height)); }
.w-line-size { width: var(--bridge-line-width); }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #FFB800; }

/* Glows */
.glow-text-gold {
    text-shadow: 0 0 10px rgba(255, 184, 0, 0.6), 0 0 20px rgba(255, 184, 0, 0.4), 0 0 30px rgba(255, 184, 0, 0.3);
}
.glow-text-cyan {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6), 0 0 20px rgba(0, 212, 255, 0.4), 0 0 30px rgba(0, 212, 255, 0.3);
}
.glow-box-cyan {
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15), 0 0 50px rgba(0, 212, 255, 0.1), inset 0 0 20px rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
}
.glow-box-gold {
    box-shadow: 0 0 30px rgba(255, 184, 0, 0.15), 0 0 50px rgba(255, 184, 0, 0.1), inset 0 0 20px rgba(255, 184, 0, 0.05);
    border: 1px solid rgba(255, 184, 0, 0.3);
}

/* Holo card */
.holo-card {
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(12px);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.02);
}
.holo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: 0.5s;
}
.holo-card:hover::before { left: 100%; }

button, .button { border-radius: 6px; }
.border.border-neonBlue\/50,
.border.border-gold\/50,
.border-l-4 { border-radius: 6px; }
.border.border-red-500\/30,
.border.border-gray-700,
.border.border-gray-800 { border-radius: 6px; }
.rounded-xl, .rounded-lg { border-radius: 12px; }

/* HUD corners */
.hud-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.group:hover .hud-corner-tl { border-top-color: #00D4FF; border-left-color: #00D4FF; top: -5px; left: -5px; }
.group:hover .hud-corner-br { border-bottom-color: #FFB800; border-right-color: #FFB800; bottom: -5px; right: -5px; }

/* Scanline */
.scanline {
    width: 100%;
    height: 100px;
    z-index: 10;
    background: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(0, 240, 255, 0.02) 50%, rgba(0,0,0,0) 100%);
    opacity: 0.1;
    position: absolute;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}
.scanline-rainbow {
    background: linear-gradient(
        0deg,
        rgba(255, 184, 0, 0) 0%,
        rgba(255, 184, 0, 0.15) 35%,
        rgba(0, 240, 255, 0.15) 65%,
        rgba(0, 240, 255, 0) 100%
    );
    opacity: 0.25;
}
@keyframes scanline {
    0% { bottom: 100%; }
    100% { bottom: -100%; }
}

.bg-video {
    filter: brightness(0.3) contrast(1.1) saturate(0.6) blur(2px);
    z-index: 20;
}
.bg-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 3, 3, 0.4);
    backdrop-filter: blur(8px);
    z-index: 5;
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes shimmer-bg {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.identity-bg-animated {
    background: linear-gradient(90deg, rgba(255, 184, 0, 0.06) 0%, rgba(10, 10, 12, 0.8) 50%, rgba(255, 184, 0, 0.06) 100%);
    background-size: 200% 100%;
    background-position: 0 center;
    animation: shimmer-bg 8s ease-in-out infinite;
    position: relative;
}
.identity-bg-animated::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.02), rgba(255, 184, 0, 0.015)), url('../noise.svg');
    background-size: 100% 100%, 200px 200px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.identity-bg-animated > * {
    position: relative;
    z-index: 1;
}

.section-fade { position: relative; }
.section-fade::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(2px);
    z-index: 0;
    pointer-events: none;
}
.section-fade > :not(.scanline):not(.section-bg-layer):not(.section-scroll-indicator) {
    position: relative;
    z-index: 1;
}
.section-fade > .scanline {
    position: absolute;
    z-index: 2;
}

#cta.section-fade::before {
    background: transparent;
    backdrop-filter: none;
}

.hero-main-card {
    max-width: 90%;
}

.section-scroll-indicator {
    z-index: 30;
}

.mobile-scroll-assist {
    display: none;
}

@keyframes mobile-scroll-assist-glow {
    0%, 100% {
        box-shadow: 0 0 16px rgba(0, 212, 255, 0.35), 0 0 22px rgba(255, 184, 0, 0.3);
        opacity: 0.95;
    }
    50% {
        box-shadow: 0 0 22px rgba(0, 212, 255, 0.5), 0 0 30px rgba(255, 184, 0, 0.42);
        opacity: 1;
    }
}

footer#footer {
    background: rgba(0, 0, 0, 0.6);
}

@media (min-width: 769px) {
    .section-scroll-indicator {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 54px;
        height: 54px;
        min-width: 54px;
        min-height: 54px;
        padding: 10px;
        border-radius: 9999px;
        border: 1px solid rgba(0, 212, 255, 0.7);
        background: radial-gradient(circle at 35% 35%, rgba(255, 184, 0, 0.2), rgba(10, 10, 12, 0.82) 65%);
        box-shadow: 0 0 16px rgba(0, 212, 255, 0.3), 0 0 20px rgba(255, 184, 0, 0.24);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
    }
    .section-scroll-indicator svg,
    .section-scroll-indicator i {
        transition: transform 0.2s ease;
    }
    .section-scroll-indicator.is-up {
        opacity: 0.82;
        filter: saturate(0.86) brightness(0.94);
    }
    .section-scroll-indicator.is-up svg,
    .section-scroll-indicator.is-up i {
        transform: rotate(180deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 15px rgba(21, 21, 23, 0.6), 0 0 30px rgba(21, 21, 23, 0.4), 0 0 45px rgba(21, 21, 23, 0.2);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 25px rgba(21, 21, 23, 0.8), 0 0 50px rgba(21, 21, 23, 0.5), 0 0 75px rgba(21, 21, 23, 0.3);
        transform: scale(1.01);
    }
}

.animated-gradient-text {
    background: linear-gradient(90deg, #151517 0%, #2a2a2d 25%, #151517 50%, #1a1a1c 75%, #151517 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite, pulse-glow 2.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.logo-top {
    display: block;
    margin: 0 auto;
    width: min(var(--logo-size), calc(var(--nav-width) - 2.5rem));
    height: auto;
    max-width: 100%;
    padding: 0;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}
a:hover .logo-top {
    animation: spin 10s linear infinite;
}

/* Tablet-specific breakpoint (landscape tablets, small laptops) */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --nav-width: clamp(8rem, 10vw, 10rem);
        --logo-size: clamp(6rem, 10vw, 8rem);
        --scale: clamp(0.9rem, 1.1vw, 1.2rem);
        --pad: calc(var(--scale) * 2.2);
        --gap: calc(var(--scale) * 2.8);
    }
    .logo-top {
        width: min(var(--logo-size), calc(var(--nav-width) - 2.25rem));
        height: auto;
        padding: 0;
    }
}

/* Full HD / ultrawide (optimize for limited vertical space) */
@media (min-width: 1440px) and (max-height: 1150px) {
    :root {
        --scale: clamp(0.8rem, 0.9vw, 1.05rem);
        --pad: calc(var(--scale) * 2.0);
        --pad-hero: calc(var(--scale) * 4.5);
        --logo-size: clamp(4.5rem, 8vw, 9rem);
        --nav-width: clamp(12rem, 12vw, 15rem);
        --nav-gap: calc(var(--scale) * 0.95);
    }
    .logo-top {
        width: min(var(--logo-size), calc(var(--nav-width) - 2.5rem));
        height: auto;
        padding: 0;
    }
    .vertical-text {
        gap: var(--nav-gap);
    }
    nav.fixed.left-0.top-0 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    main#home {
        padding-top: calc(var(--pad) * 0.75);
        padding-bottom: calc(var(--pad) * 0.75);
    }

    /* Constrain hero + section content width on HD / ultrawide */
    body.index-page .hero-main-card {
        max-width: clamp(44rem, 62vw, 72rem) !important;
    }
    body.index-page .max-w-screen-2xl {
        max-width: 72rem !important;
    }
    #system > div,
    #identity > div,
    #bridge > div,
    #yield > div,
    #cta > div {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}

/* Mobile nav active states */
.nav-link-mobile.active {
    color: #FFB800;
    border-left-color: #FFB800;
    text-shadow: 0 0 10px rgba(255, 184, 0, 0.8);
}
.nav-link-mobile.active[data-section="system"] {
    color: #00D4FF;
    border-left-color: #00D4FF;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}

/* Mobile responsive */
@media (max-width: 768px) {
    :root {
        --scale: clamp(0.95rem, 3.5vw, 1.2rem);
        --pad: calc(var(--scale) * 1.7);
        --pad-hero: calc(var(--scale) * 1.4);
        --gap: calc(var(--scale) * 1.35);
        --text-headline: clamp(1.8rem, 7vw, 3rem);
        --text-subhead: clamp(1.3rem, 5vw, 2rem);
        --text-body: clamp(0.95rem, 3.8vw, 1.1rem);
        --text-tag: clamp(0.85rem, 3.2vw, 1rem);
    }
    
    /* Force all sections to not overflow */
    body {
        overflow-x: hidden !important;
        max-width: 100vw;
    }
    
    section, main {
        padding-left: 0 !important;
        overflow-x: hidden !important;
        max-width: 100vw;
    }
    section[id], main[id] {
        scroll-margin-top: 68px;
    }
    section:not(#home) {
        padding-top: 0px;
    }
    section#bridge {
        padding-top: 72px;
    }
    main#home {
        padding-left: clamp(0.75rem, 3vw, 1.5rem) !important;
        padding-right: clamp(0.75rem, 3vw, 1.5rem) !important;
        padding-top: clamp(62px, 9vh, 76px);
        padding-bottom: clamp(16px, 4vh, 28px);
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
        overflow-x: hidden !important;
        max-width: 100vw;
        width: 100%;
    }
    main#home .holo-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: clamp(0.95rem, 3.6vw, 1.35rem);
        width: 100% !important;
        max-width: 100% !important;
    }
    main#home .hero-main-card {
        max-height: calc(100dvh - 84px);
    }
    main#home .hero-main-card h1 {
        line-height: 1.1;
    }
    main#home .hero-main-card p {
        line-height: 1.35;
    }
    main#home .hero-main-card .legal-note {
        line-height: 1.3;
    }
    main#home .absolute.inset-0 {
        overflow: hidden;
    }
    .pad-size {
        padding: clamp(1rem, 4vw, 1.5rem);
    }
    
    /* Target specific grids instead of blanket rule */
    #system .grid,
    #identity .grid,
    #bridge .grid,
    #yield .grid {
        grid-template-columns: 1fr !important;
    }
    
    .text-headline-size {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    .text-subhead-size {
        font-size: clamp(1.2rem, 5vw, 2rem);
    }
    .holo-card {
        margin-bottom: 1.5rem;
    }
    body {
        overflow-x: hidden;
    }
    .animate-marquee span {
        font-size: clamp(12vw, 15vw, 18vw) !important;
    }
    footer {
        margin-left: 0 !important;
        padding-left: var(--pad) !important;
    }
    
    /* Legal note text sizing */
    .legal-note {
        font-size: clamp(0.75rem, 2.8vw, 0.9rem);
        line-height: 1.4;
    }
    
    .legal-note-header {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
        line-height: 1.3;
    }
    
    /* Mobile nav drawer - reduced gaps */
    #mobile-nav-drawer .vertical-text {
        gap: 0.6rem !important;
        margin-top: auto;
        margin-bottom: auto;
        padding-right: 1rem;
        /* margin-right: 0.35rem; */
        justify-content: center !important;
        align-items: center;
    }

    #mobile-nav-drawer .text-nav {
        font-size: clamp(1.05rem, 4.8vw, 1.3rem) !important;
        line-height: 1.2;
        letter-spacing: 0.15em;
    }
    
    #mobile-nav-drawer .vertical-text a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
    }
    
    /* Fix mobile header layout and logo positioning */
    .md\:hidden.fixed.top-0 {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 90 !important;
        background: rgba(21, 21, 23, 0.72) !important;
        padding: 0.75rem 1rem !important;
        height: 60px;
        min-height: 60px;
        align-items: center;
    }
    
    .md\:hidden.fixed.top-0 img {
        height: 42px !important;
        width: 42px !important;
        margin-top: 0;
    }
    
    .md\:hidden.fixed.top-0 button {
        padding: 0.5rem !important;
    }
    
    .md\:hidden.fixed.top-0 .font-header {
        font-size: 1rem !important;
        margin-top: 0;
    }

    #mobile-nav-drawer {
        top: 0 !important;
        bottom: 0 !important;
        width: clamp(290px, 78vw, 320px);
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        position: fixed !important;
        background: rgba(3, 3, 3, 0.6) !important;
        overflow-y: auto;
        border-right: 0.5px solid rgba(255, 184, 0, 0.24) !important;
        box-shadow: 1px 0 6px rgba(255, 184, 0, 0.08);
        width: 90% !important;
    }

    #mobile-nav-overlay {
        top: 0 !important;
        bottom: 0 !important;
        height: 100dvh !important;
    }
    
    /* Scroll indicators should be touchable */
    a.section-scroll-indicator {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
    a.section-scroll-indicator {
        display: none !important;
    }
    .mobile-scroll-assist {
        position: fixed;
        left: 50%;
        bottom: max(0.8rem, env(safe-area-inset-bottom));
        transform: translateX(-50%);
        z-index: 80;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 54px;
        height: 54px;
        border-radius: 9999px;
        border: 1px solid rgba(0, 212, 255, 0.7);
        color: #00D4FF;
        background: radial-gradient(circle at 35% 35%, rgba(255, 184, 0, 0.25), rgba(10, 10, 12, 0.92) 65%);
        box-shadow: 0 0 16px rgba(0, 212, 255, 0.35), 0 0 22px rgba(255, 184, 0, 0.3);
        backdrop-filter: blur(5px);
        animation: mobile-scroll-assist-glow 2.2s ease-in-out infinite;
    }
    .mobile-scroll-assist i,
    .mobile-scroll-assist svg {
        width: 22px;
        height: 22px;
        transition: transform 0.2s ease;
    }
    .mobile-scroll-assist.is-up {
        opacity: 0.78;
        filter: saturate(0.85) brightness(0.92);
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.2), 0 0 14px rgba(255, 184, 0, 0.18);
    }
    .mobile-scroll-assist.is-up i,
    .mobile-scroll-assist.is-up svg {
        transform: rotate(180deg);
    }
    
    /* brdige section fixes */
    .h-line-size {
        height: calc(2.2 * var(--line-height));
        margin-top: -1.5rem;
    }
    .bridge-symbol {
        margin-top: -1.4rem;
    }
    .visual-terminal {
        margin-top: 1.4rem;
    }

    /* CTA section fixes */
    section#cta {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100vw;
        overflow-x: hidden !important;
    }
    
    section#cta > div {
        padding-left: clamp(1rem, 4vw, 2rem);
        padding-right: clamp(1rem, 4vw, 2rem);
    }
    
    section#cta .space-y-size {
        gap: clamp(1.2rem, 4vw, 2rem);
    }
    
    section#cta .flex.flex-col.md\:flex-row {
        gap: clamp(0.8rem, 3vw, 1.2rem);
    }
    
    /* CTA buttons on mobile - better sizing */
    section#cta a {
        min-height: 48px;
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        white-space: normal;
        line-height: 1.3;
        width: 90%;
    }
}

@media (min-width: 1200px) {
    .hero-main-card {
        max-width: clamp(52rem, 66vw, 78rem) !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    main#home {
        padding-top: clamp(50px, 10vh, 70px);
    }
    
    /* Even smaller gaps for tiny screens */
    #mobile-nav-drawer .vertical-text {
        gap: 0.2rem !important;
    }
    
    #mobile-nav-drawer .vertical-text a {
        padding: 4px 7px;
        font-size: 0.95rem;
    }
}

/* Small mobile devices specific adjustments */
@media (max-width: 640px) {
    footer {
        padding: clamp(1rem, 4vw, 1.5rem) !important;
    }
    
    footer .flex.flex-col.sm\:flex-row {
        gap: clamp(0.8rem, 3vw, 1.2rem);
    }
    
    footer nav {
        font-size: clamp(0.75rem, 2.8vw, 0.85rem);
        gap: clamp(0.6rem, 2vw, 0.8rem);
    }
    
    /* Cookie consent bar mobile layout */
    .twinx-cookie-bar {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }
    
    .twinx-cookie-bar-inner {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .twinx-cookie-bar-text {
        min-width: 100%;
        text-align: center;
        font-size: clamp(0.75rem, 2.8vw, 0.85rem);
    }
    
    .twinx-cookie-bar-actions {
        width: 100%;
        justify-content: center;
    }
    
    .twinx-cookie-bar-btn {
        flex: 1;
        text-align: center;
    }
}

/* Landscape mobile phones */
@media (max-width: 896px) and (max-height: 428px) and (orientation: landscape) {
    :root {
        --scale: 0.85rem;
        --pad: calc(var(--scale) * 1.8);
        --text-headline: calc(var(--scale) * 1.8);
        --text-subhead: calc(var(--scale) * 1.3);
    }
    
    main#home {
        min-height: 100vh;
        padding-top: 30px;
        padding-bottom: 30px;
    }
    
    section {
        padding-top: clamp(2rem, 5vh, 3rem) !important;
        padding-bottom: clamp(2rem, 5vh, 3rem) !important;
    }
    
    /* Hide scroll indicators in landscape mobile */
    .animate-bounce[href^="#"] {
        display: none;
    }
}

/* Footer (social icons etc.) */
.footer-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: color 0.2s;
}
.footer-icon-link:hover { color: #9ca3af; }
.footer-icon-link svg {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    flex-shrink: 0;
    display: block;
}
.footer-icon-link svg.bigger {
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
}
.footer-icon-link .footer-icon-img {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.footer-icon-link .footer-icon-img.footer-icon-telegram {
    width: 1.4rem;
    height: 1.4rem;
    min-width: 1.4rem;
    min-height: 1.4rem;
}
.footer-icon-link .footer-icon-img.footer-icon-linedin {
    width: 1.2rem;
    height: 1.2rem;
    min-width: 1.2rem;
    min-height: 1.2rem;
}
.footer-icon-link:hover .footer-icon-img {
    opacity: 1;
    filter: brightness(1.2);
}
.footer-icon-link i {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* EU cookie consent bar */
.twinx-cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: var(--pad, 1rem);
    background: rgba(10, 10, 12, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.twinx-cookie-bar.twinx-cookie-bar-visible {
    transform: translateY(0);
}
.twinx-cookie-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.twinx-cookie-bar-text {
    margin: 0;
    font-size: var(--text-meta, 0.85rem);
    line-height: 1.5;
    color: #9ca3af;
    flex: 1;
    min-width: 200px;
}
.twinx-cookie-bar-link {
    color: #00D4FF;
    text-decoration: underline;
}
.twinx-cookie-bar-link:hover {
    color: #FFB800;
}
.twinx-cookie-bar-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.twinx-cookie-bar-btn {
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: var(--text-tag, 0.9rem);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}
.twinx-cookie-bar-btn-reject {
    background: transparent;
    color: #9ca3af;
}
.twinx-cookie-bar-btn-reject:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}
.twinx-cookie-bar-btn-accept {
    background: #00D4FF;
    color: #0a0a0c;
    border-color: #00D4FF;
}
.twinx-cookie-bar-btn-accept:hover {
    background: #33ddff;
    border-color: #33ddff;
}
