/* political.bar - Translucent Frost Terrarium */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-loam: #0b1210;
    --frost-glass: #d4e5ed;
    --lichen-green: #7fb5a3;
    --aurora-teal: #3dd9c1;
    --aurora-violet: #9b7fd4;
    --spore-gold: #c4a85a;
    --frost-white: #e8f0f4;
    --mycelium-grey: #4a5c56;
    --mono-accent: #8ba4b3;
    --bg-dark: #0f1a17;
}

html, body {
    height: 100%;
    overflow-x: hidden;
    font-family: 'Commissioner', sans-serif;
    background: var(--deep-loam);
    color: var(--frost-white);
    cursor: none;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: url(#noise);
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(61, 217, 193, 0.4);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.05s ease;
}

.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(61, 217, 193, 0.2);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 70%, rgba(61, 217, 193, 0.08), transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(155, 127, 212, 0.06), transparent 50%),
        linear-gradient(170deg, #0b1210 0%, #0f1a17 50%, #0b1210 100%);
    background-size: 200% 200%;
    animation: aurora-drift 120s ease-in-out infinite;
    opacity: 0;
    z-index: 0;
}

@keyframes aurora-drift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Bento Grid */
.bento-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(60px, auto);
    gap: clamp(6px, 1vw, 12px);
    padding: clamp(16px, 3vw, 48px);
    min-height: 100vh;
    max-height: 120vh;
}

/* Tiles Base */
.tile {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: border-color 0.4s ease, transform 0.3s ease;
}

.tile .tile-border-draw {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 1px solid var(--mycelium-grey);
    opacity: 0;
    animation: borderAppear 0.6s ease forwards;
    animation-delay: var(--tile-delay, 0.8s);
}

.tile .tile-frost {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(212, 229, 237, var(--frost-opacity, 0.15)) 0%, rgba(212, 229, 237, calc(var(--frost-opacity, 0.15) * 0.5)) 100%);
    backdrop-filter: blur(0px);
    animation: frostIn 1s ease forwards;
    animation-delay: var(--frost-delay, 1.5s);
}

.tile .tile-content {
    position: relative;
    z-index: 2;
    padding: clamp(16px, 2vw, 32px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    animation: contentFadeIn 0.8s ease forwards;
    animation-delay: var(--content-delay, 2.5s);
}

.tile:hover {
    border-color: var(--lichen-green);
}

.tile:hover .tile-frost {
    --frost-opacity: 0.20;
}

.tile:hover .svg-draw {
    filter: drop-shadow(0 0 4px rgba(61, 217, 193, 0.3));
}

@keyframes borderAppear {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes frostIn {
    from { backdrop-filter: blur(0px); }
    to { backdrop-filter: blur(16px); }
}

@keyframes contentFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tile Positions */
.tile-hero {
    grid-column: 1 / 7;
    grid-row: 1 / 5;
    --tile-delay: 0.8s;
    --frost-delay: 1.5s;
    --content-delay: 2.5s;
}

.tile-concept-1 {
    grid-column: 7 / 10;
    grid-row: 1 / 4;
    --tile-delay: 1.0s;
    --frost-delay: 1.7s;
    --content-delay: 2.7s;
}

.tile-concept-2 {
    grid-column: 10 / 13;
    grid-row: 1 / 3;
    --tile-delay: 1.1s;
    --frost-delay: 1.8s;
    --content-delay: 2.8s;
}

.tile-quote {
    grid-column: 10 / 13;
    grid-row: 3 / 5;
    --tile-delay: 1.2s;
    --frost-delay: 1.9s;
    --content-delay: 2.9s;
}

.tile-breathing-1 {
    grid-column: 7 / 10;
    grid-row: 4 / 5;
    --tile-delay: 1.3s;
    --frost-delay: 2.0s;
    --content-delay: 3.0s;
}

.tile-concept-3 {
    grid-column: 1 / 5;
    grid-row: 5 / 8;
    --tile-delay: 1.4s;
    --frost-delay: 2.1s;
    --content-delay: 3.1s;
}

.tile-breathing-2 {
    grid-column: 5 / 7;
    grid-row: 5 / 7;
    --tile-delay: 1.5s;
    --frost-delay: 2.2s;
    --content-delay: 3.2s;
}

.tile-accent {
    grid-column: 7 / 9;
    grid-row: 5 / 7;
    --tile-delay: 1.6s;
    --frost-delay: 2.3s;
    --content-delay: 3.3s;
}

.tile-index {
    grid-column: 5 / 13;
    grid-row: 7 / 8;
    --tile-delay: 1.7s;
    --frost-delay: 2.4s;
    --content-delay: 3.4s;
}

/* Hero Tile */
.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    color: var(--frost-white);
    margin-bottom: 0.3em;
}

.hero-subtitle {
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    color: var(--lichen-green);
    letter-spacing: 0.06em;
    margin-bottom: 1.5em;
}

.hero-mushroom {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin-top: auto;
}

/* Tile Typography */
.tile-label {
    font-family: 'Commissioner', sans-serif;
    font-weight: 600;
    font-size: clamp(0.65rem, 0.8vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--lichen-green);
    margin-bottom: 0.8em;
}

.tile-headline {
    font-family: 'Commissioner', sans-serif;
    font-weight: 200;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4e5ed;
    margin-bottom: 0.6em;
}

.tile-body {
    font-family: 'Commissioner', sans-serif;
    font-weight: 350;
    font-size: clamp(0.85rem, 1.1vw, 1.05rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    color: #b8ccd6;
}

.tile-illustration {
    width: 80px;
    height: auto;
    margin-top: auto;
    align-self: flex-end;
}

/* Quote Tile */
.quote-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 100;
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    line-height: 1.45;
    color: #a8dbc5;
}

/* Breathing Tiles */
.breathing-svg {
    width: 100%;
    height: auto;
}

.accent-svg {
    width: 60px;
    height: auto;
    margin: auto;
}

/* SVG Draw Animation */
.svg-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: filter 0.4s ease;
}

.svg-draw.animate {
    animation: drawPath 3s ease-out forwards;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* Hero mushroom loop */
.hero-mushroom-path.animate-loop {
    animation: drawPathLoop 10s ease-in-out infinite;
}

.hero-mushroom-detail.animate-loop {
    animation: drawPathLoop 10s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes drawPathLoop {
    0% { stroke-dashoffset: 1000; opacity: 0.6; }
    40% { stroke-dashoffset: 0; opacity: 0.6; }
    70% { stroke-dashoffset: 0; opacity: 0.6; }
    90% { stroke-dashoffset: 0; opacity: 0; }
    100% { stroke-dashoffset: 1000; opacity: 0.6; }
}

/* Spore drift */
.spore-drift {
    animation: sporeDrift 6s ease-in-out infinite;
}

@keyframes sporeDrift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(3px, -5px); }
    50% { transform: translate(-2px, -8px); }
    75% { transform: translate(4px, -3px); }
}

/* Index Nav */
.index-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(8px, 1.5vw, 20px);
}

.index-link {
    font-family: 'Commissioner', sans-serif;
    font-weight: 600;
    font-size: clamp(0.65rem, 0.9vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--lichen-green);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}

.index-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--aurora-teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.index-link:hover::after {
    transform: scaleX(1);
}

.index-link:hover {
    color: var(--aurora-teal);
}

.index-dot {
    display: flex;
    align-items: center;
}

/* Monospace accent for data */
.mono-accent {
    font-family: 'Inconsolata', monospace;
    font-weight: 300;
    font-size: 0.85em;
    letter-spacing: 0.04em;
    color: #8ba4b3;
}

/* Responsive */
@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        max-height: none;
    }

    .tile-hero,
    .tile-concept-1,
    .tile-concept-2,
    .tile-quote,
    .tile-breathing-1,
    .tile-concept-3,
    .tile-breathing-2,
    .tile-accent,
    .tile-index {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .tile-hero {
        min-height: 50vh;
    }

    .tile .tile-content {
        padding: 24px;
    }

    .custom-cursor,
    .cursor-trail {
        display: none;
    }

    html, body {
        cursor: auto;
    }
}
