/* base color definitions */
:root {
    --color-accent: 33, 100%, 50%;
    --color-accent-light-2: 26, 99%, 69%;
    --mica-tint-opacity: .8
}

:root {
    --clr-accent: hsl(var(--color-accent));
    --clr-accent-hover: hsla(var(--color-accent-light-2), 90%);
    --clr-text-primary: hsla(0, 0%, 100%, 100%);
    --clr-text-secondary: hsla(0, 0%, 100%, 78.6%);
    --clr-text-tertiary: hsla(0, 0%, 100%, 54.42%);
    --clr-text-disabled: hsla(0, 0%, 100%, 36.28%);
    --clr-accent-subtle: hsla(var(--color-accent-light-2), 20%);
    --clr-mica-border: rgba(0, 0, 0, 0.05);
    --clr-mica-tint: 0, 0%, 13%;
    --clr-card-background-default: hsla(0, 0%, 100%, 3.26%);
    --clr-bg: #0c0c0c;
    --clr-surface: #141414;
    --clr-surface-2: #1c1c1c;
    --clr-surface-3: #242424;
    --clr-surface-4: #2e2e2e;
    --clr-border: rgba(255, 255, 255, 0.07);
    --clr-border-hover: rgba(255, 255, 255, 0.15);
    --clr-glass-border: rgba(255, 255, 255, 0.05);
    --clr-input-bg: rgba(255, 255, 255, 0.04);
    --clr-input-border: rgba(255, 255, 255, 0.09);
    --clr-sep: rgba(255, 255, 255, 0.06);
    /* status tokens */
    --clr-s-released: #22c55e;
    --clr-s-active: #3b82f6;
    --clr-s-paused: #f59e0b;
    --clr-s-planned: #a78bfa;
    --clr-s-discontinued: #ef4444;
    /* typography */
    --font: 'Bahnschrift', 'DIN Alternate', 'Franklin Gothic Medium', 'Gill Sans', sans-serif;
    /* layout */
    --header-h: 62px;
    --pad-section: 96px;
    --pad-x: 24px;
    --max-w: 1200px;
    /* shape */
    --r-xs: 3px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    /* animation durations */
    --t-xs: 80ms;
    --t-sm: 150ms;
    --t-md: 260ms;
    --t-lg: 420ms;
    --t-underline: 290ms;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    /* blur */
    --blur-sm: blur(8px);
    --blur-md: blur(22px);
}

/* light mode */
[data-theme="light"] {
    --clr-text-primary: hsla(0, 0%, 0%, 89.56%);
    --clr-text-secondary: hsla(0, 0%, 0%, 60.63%);
    --clr-text-tertiary: hsla(0, 0%, 0%, 44.58%);
    --clr-text-disabled: hsla(0, 0%, 0%, 36.14%);
    --clr-mica-tint: 0, 0%, 95%;
    --clr-card-background-default: hsla(0, 0%, 100%, 70%);
    --clr-bg: #f0f0f0;
    --clr-surface: #fafafa;
    --clr-surface-2: #f4f4f4;
    --clr-surface-3: #ebebeb;
    --clr-surface-4: #e2e2e2;
    --clr-border: rgba(0, 0, 0, 0.07);
    --clr-border-hover: rgba(0, 0, 0, 0.14);
    --clr-input-bg: rgba(0, 0, 0, 0.03);
    --clr-input-border: rgba(0, 0, 0, 0.1);
    --clr-sep: rgba(0, 0, 0, 0.07);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    :root {
        --t-xs: 0ms;
        --t-sm: 0ms;
        --t-md: 0ms;
        --t-lg: 0ms;
        --t-underline: 0ms;
    }
}

.mica {
    background-color: hsl(var(--clr-mica-tint), var(--mica-tint-opacity));
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
}

/* reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--clr-bg);
    color: var(--clr-text-primary);
    font-family: var(--font);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
    transition: background var(--t-md), color var(--t-md);
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

button {
    font-family: var(--font);
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea {
    font-family: var(--font);
}

/* typography */
.t-primary {
    color: var(--clr-text-primary);
}

.t-secondary {
    color: var(--clr-text-secondary);
}

.t-eyebrow {
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--clr-accent);
}

    .t-eyebrow::before {
        content: '';
        display: inline-block;
        width: 26px;
        height: 1px;
        background: var(--clr-accent);
        margin-right: 10px;
        vertical-align: middle;
    }

.t-h1 {
    font-weight: 700;
    font-size: clamp(2.5rem, 5.5vw, 5rem);
    line-height: 1.0;
    letter-spacing: -0.025em;
}

.t-h2 {
    font-weight: 600;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-transform: lowercase;
}

.t-h3 {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.25;
}

.t-body {
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--clr-text-secondary);
    line-height: 1.65;
}

.t-small {
    font-weight: 300;
    font-size: 0.78rem;
    color: var(--clr-text-tertiary);
}

.t-accent {
    color: var(--clr-accent);
}

/* button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 9px 20px;
    border-radius: var(--r-sm);
    font-family: var(--font);
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    white-space: nowrap;
    transition: background var(--t-sm), border-color var(--t-sm), box-shadow var(--t-sm), color var(--t-sm), transform var(--t-xs);
}

    .btn:active {
        transform: translateY(0px);
    }

.btn-primary {
    background: var(--clr-accent);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--clr-accent-hover);
    }

.btn-secondary {
    background: var(--clr-surface-3);
    color: var(--clr-text-primary);
    border: 1px solid var(--clr-border);
}

    .btn-secondary:hover {
        background: var(--clr-surface-4);
        border-color: var(--clr-border-hover);
    }

.btn-ghost {
    background: transparent;
    color: var(--clr-text-secondary);
    border: 1px solid var(--clr-border);
}

    .btn-ghost:hover {
        color: var(--clr-text-primary);
        border-color: var(--clr-border-hover);
        background: var(--clr-surface-2);
    }

.btn-lg {
    padding: 12px 28px;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
}

/* layout */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

.section {
    padding: var(--pad-section) 0;
}

.sep {
    width: 100%;
    height: 1px;
    background: var(--clr-sep);
}

.section-header {
    margin-bottom: 44px;
}

    .section-header .t-eyebrow {
        display: block;
        margin-bottom: 8px;
    }

/* scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--t-lg) var(--ease-out), transform var(--t-lg) var(--ease-out);
}

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }

.reveal-d1 {
    transition-delay: 80ms;
}

.reveal-d2 {
    transition-delay: 160ms;
}

.reveal-d3 {
    transition-delay: 240ms;
}

.reveal-d4 {
    transition-delay: 320ms;
}

/* header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    z-index: 1000;
    border-bottom: 1px solid var(--clr-mica-border);
    transition: background var(--t-md), border-color var(--t-md);
}

    #header.scrolled {
        border-bottom-color: var(--clr-border);
    }

.header-inner {
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--pad-x);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    gap: 4px;
}

.logo-mark {
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: 0.05em;
}

/* desktop navigation */
.nav-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.nav-link {
    position: relative;
    padding: 6px 14px;
    font-weight: 400;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    color: var(--clr-text-secondary);
    border-radius: var(--r-xs);
    transition: color var(--t-sm);
}

    /* underline: left-to-right on hover */
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 1px;
        left: 14px;
        right: 14px;
        height: 1.5px;
        background: var(--clr-accent);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform var(--t-underline) var(--ease-out);
    }

    .nav-link:hover {
        color: var(--clr-text-primary);
    }

        .nav-link:hover::after,
        .nav-link.active::after {
            transform: scaleX(1);
        }

    .nav-link.active {
        color: var(--clr-text-primary);
    }

/* header controls */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-text-secondary);
    border: 1px solid var(--clr-border);
    background: transparent;
    transition: color var(--t-sm), border-color var(--t-sm), background var(--t-sm);
}

    .icon-btn:hover {
        color: var(--clr-text-primary);
        border-color: var(--clr-border-hover);
        background: var(--clr-surface-2);
    }

    .icon-btn svg {
        pointer-events: none;
    }

svg.icon {
    width: 20px;
    height: 20px;
}

/* theme toggle icon swap */
.icon-moon {
    display: block;
}

.icon-sun {
    display: none;
}

[data-theme="light"] .icon-moon {
    display: none;
}

[data-theme="light"] .icon-sun {
    display: block;
}

/* hamburger */
.hamburger {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    border: 1px solid var(--clr-border);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: transparent;
    transition: border-color var(--t-sm);
}

    .hamburger:hover {
        border-color: var(--clr-border-hover);
    }

.h-bar {
    width: 18px;
    height: 1px;
    background: var(--clr-text-secondary);
    border-radius: 2px;
    transition: transform var(--t-md) var(--ease-out), opacity var(--t-md), background var(--t-sm);
}

.hamburger.open .h-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.open .h-bar:nth-child(2) {
    opacity: 0;
}

.hamburger.open .h-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* mobile nav drawer */
.nav-mobile {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--clr-border);
    padding: 10px var(--pad-x) 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 998;
    /* Hidden by default */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity var(--t-md) var(--ease-out), transform var(--t-md) var(--ease-out), visibility 0ms var(--t-md);
}

    .nav-mobile.open {
        visibility: visible;
        opacity: 1;
        pointer-events: all;
        transform: translateY(0);
        transition: opacity var(--t-md) var(--ease-out), transform var(--t-md) var(--ease-out), visibility 0ms;
    }

.nav-mobile-link {
    padding: 10px 12px;
    font-weight: 400;
    font-size: 0.92rem;
    color: var(--clr-text-secondary);
    border-radius: var(--r-sm);
    transition: color var(--t-sm), background var(--t-sm);
}

    .nav-mobile-link:hover {
        color: var(--clr-text-primary);
        background: var(--clr-surface-2);
    }

/* badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--r-xs);
    font-weight: 400;
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    flex-shrink: 0;
}

.badge-released {
    background: rgba(34, 197, 94, 0.1);
    color: var(--clr-s-released);
}

.badge-active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--clr-s-active);
}

.badge-paused {
    background: rgba(245, 158, 11, 0.1);
    color: var(--clr-s-paused);
}

.badge-planned {
    background: rgba(167, 139, 250, 0.1);
    color: var(--clr-s-planned);
}

.badge-discontinued {
    background: rgba(239, 68, 68, 0.1);
    color: var(--clr-s-discontinued);
}

/* light box */
.lightbox-img {
    cursor: pointer;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

    .lightbox.show {
        display: flex;
    }

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
}

.lightbox-content {
    position: relative;
    max-width: 94vw;
    max-height: 94vh;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

.lightbox-image-wrapper {
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    cursor: grab;
}

    .lightbox-image-wrapper:active {
        cursor: grabbing;
    }

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.1s ease-out;
    user-select: none;
    transform-origin: center center;
}

/* close button */
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--r-sm);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--t-sm);
}

    .lightbox-close:hover {
        background: var(--clr-accent);
        border-color: var(--clr-accent);
    }

/* toolbar */
.lightbox-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.zoom-level {
    font-size: 0.82rem;
    color: var(--clr-text-secondary);
    min-width: 52px;
    text-align: center;
}

/* footer */
#footer {
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    padding: 44px 0 28px;
}

.footer-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 32px;
    align-items: start;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--clr-border);
    margin-bottom: 22px;
}

.footer-brand {
    font-size: 1.4rem;
}

    .footer-brand .logo-slogan {
        font-size: 0.58rem;
        margin-top: 3px;
        display: block;
    }

.footer-links-col {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.footer-ext-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: var(--r-sm);
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--clr-text-tertiary);
    border: 1px solid transparent;
    transition: color var(--t-sm), border-color var(--t-sm), background var(--t-sm);
}

    .footer-ext-link:hover {
        color: var(--clr-text-secondary);
        border-color: var(--clr-border);
        background: var(--clr-surface-2);
    }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-copy {
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--clr-text-tertiary);
}

.footer-legal {
    display: flex;
    gap: 18px;
}

.footer-legal-link {
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--clr-text-tertiary);
    transition: color var(--t-sm);
}

    .footer-legal-link:hover {
        color: var(--clr-text-secondary);
    }

/* responsive */
@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-links-col {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --pad-section: 64px;
    }

    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 500px) {
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
