:root {
    --bg-color: #030304;
    --text-color: #f2f2f2;
    --muted-color: #99999f;
    --line-color: rgba(255, 255, 255, 0.14);
    --hanyu-color: #4dd8cb;
    --vifluent-color: #d24d70;
    --page-gutter: clamp(1.5rem, 5vw, 5rem);
    --content-width: 78rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    min-width: 20rem;
    background: var(--bg-color);
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.home-page {
    height: 100%;
    overflow: hidden;
}

.products-page {
    overflow-x: hidden;
}

.abyss-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    pointer-events: none;
    animation: nav-enter 700ms 100ms both cubic-bezier(0.16, 1, 0.3, 1);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.5rem var(--page-gutter);
    background: linear-gradient(to bottom, rgba(3, 3, 4, 0.88), transparent);
    pointer-events: auto;
}

.site-brand,
.nav-link {
    text-decoration: none;
}

.site-brand {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: clamp(1rem, 3vw, 2.25rem);
}

.nav-link {
    position: relative;
    color: #aaaab0;
    font-size: 0.84rem;
    font-weight: 500;
    transition: color 200ms ease;
}

.nav-link::after {
    position: absolute;
    right: 0;
    bottom: -0.45rem;
    left: 0;
    height: 1px;
    background: #fff;
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"] {
    color: #fff;
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}

.home-layout {
    position: relative;
    z-index: 10;
    display: grid;
    width: 100%;
    height: 100svh;
    place-items: center;
    pointer-events: none;
}

.home-panel {
    width: min(100% - 3rem, 56rem);
    padding: clamp(2rem, 5vw, 4rem) clamp(0rem, 3vw, 2rem);
    pointer-events: auto;
    animation: hero-enter 900ms 120ms both cubic-bezier(0.16, 1, 0.3, 1);
}

.eyebrow,
.product-kicker,
.product-number {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.eyebrow {
    color: #b3b3b8;
}

.display-title {
    position: relative;
    margin: 1rem 0 1.5rem;
    color: #fff;
    font-size: clamp(2.75rem, 7vw, 4.8rem);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 0.95;
}

.glitch-title::before,
.glitch-title::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    content: attr(data-text);
    opacity: 0.8;
    clip-path: inset(50% 50% 50% 50%);
}

.glitch-title::before {
    z-index: -1;
    color: #0ff;
    animation: glitch-one 5s infinite linear alternate-reverse;
}

.glitch-title::after {
    z-index: -2;
    color: #f0f;
    animation: glitch-two 5s infinite linear alternate-reverse;
}

.home-intro,
.portfolio-lede,
.product-summary,
.company-close > p:not(.eyebrow) {
    color: var(--muted-color);
    font-weight: 400;
    letter-spacing: -0.012em;
}

.home-intro {
    max-width: 30rem;
    margin: 0 0 2rem;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.6;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.text-link,
.product-link,
.scroll-cue {
    display: inline-flex;
    align-items: center;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.34);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 550;
    text-decoration: none;
    transition: border-color 220ms ease, color 220ms ease, gap 300ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms ease;
}

.text-link::after {
    margin-left: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82em;
    content: "→";
}

.text-link:hover,
.text-link:focus-visible,
.product-link:hover,
.product-link:focus-visible,
.scroll-cue:hover,
.scroll-cue:focus-visible {
    border-bottom-color: #fff;
    transform: translateY(-2px);
}

.text-link-muted {
    border-bottom-color: transparent;
    color: #8e8e94;
}

.home-location {
    position: fixed;
    right: var(--page-gutter);
    bottom: 1.5rem;
    z-index: 20;
    margin: 0;
    color: #6d6d72;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: nav-enter 700ms 350ms both cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-hero {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 100svh;
    align-items: center;
    padding: 8rem var(--page-gutter) 5rem;
}

.portfolio-hero::before {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 31% 54%, rgba(3, 3, 4, 0.92) 0, rgba(3, 3, 4, 0.72) 32%, transparent 62%);
    content: "";
    pointer-events: none;
}

.portfolio-hero-inner {
    position: relative;
    z-index: 1;
    width: min(100%, var(--content-width));
    margin: 0 auto;
    animation: hero-enter 900ms 120ms both cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-title {
    max-width: 62rem;
    margin: 1.1rem 0 1.5rem;
    color: #fff;
    font-size: clamp(3rem, 8.5vw, 7.2rem);
    font-weight: 450;
    letter-spacing: -0.065em;
    line-height: 0.91;
}

.portfolio-lede {
    max-width: 34rem;
    margin: 0 0 3rem;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.6;
}

.scroll-cue {
    gap: 1.6rem;
    color: #b8b8bd;
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
    gap: 2rem;
    color: #fff;
}

.portfolio-content {
    position: relative;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(3, 3, 4, 0.96), var(--bg-color) 12rem);
}

.product-story {
    display: grid;
    width: min(100%, calc(var(--content-width) + (var(--page-gutter) * 2)));
    min-height: 90svh;
    align-items: center;
    gap: clamp(3rem, 7vw, 7rem);
    margin: 0 auto;
    padding: clamp(6rem, 11vw, 10rem) var(--page-gutter);
    border-top: 1px solid var(--line-color);
    grid-template-columns: minmax(16rem, 0.72fr) minmax(0, 1.28fr);
}

.product-vifluent {
    grid-template-columns: minmax(0, 1.28fr) minmax(16rem, 0.72fr);
}

.product-vifluent .product-copy {
    grid-column: 2;
}

.product-vifluent .product-media {
    grid-row: 1;
    grid-column: 1;
}

.product-copy {
    position: relative;
}

.product-number {
    margin-bottom: clamp(3.5rem, 7vw, 6rem);
    color: #53535a;
}

.product-kicker {
    margin-bottom: 0.75rem;
}

.product-hanyu .product-kicker {
    color: var(--hanyu-color);
}

.product-vifluent .product-kicker {
    color: var(--vifluent-color);
}

.product-copy h2,
.company-close h2 {
    margin: 0;
    color: #fff;
    font-weight: 480;
    letter-spacing: -0.055em;
}

.product-copy h2 {
    font-size: clamp(3rem, 5.8vw, 5.6rem);
    line-height: 0.95;
}

.product-summary {
    max-width: 31rem;
    margin: 1.75rem 0 2rem;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.65;
}

.product-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.35rem;
    margin: 0 0 2.5rem;
    padding: 0;
    color: #77777e;
    font-size: 0.78rem;
    list-style: none;
}

.product-details li:not(:last-child)::after {
    margin-left: 1.35rem;
    color: #414146;
    content: "/";
}

.product-link {
    gap: 0.75rem;
    line-height: 1.45;
}

.product-link:hover,
.product-link:focus-visible {
    gap: 1.05rem;
}

.product-media {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #111;
    box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.45);
    isolation: isolate;
}

.product-media::after {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    content: "";
    pointer-events: none;
}

.product-hanyu .product-media {
    box-shadow: 0 2rem 8rem rgba(42, 185, 172, 0.1), 0 2rem 7rem rgba(0, 0, 0, 0.45);
}

.product-vifluent .product-media {
    box-shadow: 0 2rem 8rem rgba(178, 33, 75, 0.11), 0 2rem 7rem rgba(0, 0, 0, 0.45);
}

.product-media img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: top center;
    transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1), filter 500ms ease;
}

.product-media:hover img,
.product-media:focus-visible img {
    filter: saturate(1.08) contrast(1.02);
    transform: scale(1.022);
}

.company-close {
    width: min(100% - (var(--page-gutter) * 2), var(--content-width));
    min-height: 70svh;
    margin: 0 auto;
    padding: clamp(7rem, 13vw, 12rem) 0;
    border-top: 1px solid var(--line-color);
}

.company-close h2 {
    max-width: 54rem;
    margin-top: 1rem;
    font-size: clamp(2.7rem, 7vw, 6.5rem);
    line-height: 0.96;
}

.company-close > p:not(.eyebrow) {
    margin: 1.75rem 0 2.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.site-footer {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem var(--page-gutter) 2rem;
    border-top: 1px solid var(--line-color);
    background: var(--bg-color);
    color: #717177;
    font-size: 0.72rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #fff;
}

.reveal {
    opacity: 0;
    transform: translateY(2.25rem);
    transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-late {
    transition-delay: 100ms;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes nav-enter {
    from { opacity: 0; transform: translateY(-0.75rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-enter {
    from { opacity: 0; transform: translateY(1.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glitch-one {
    0%, 92% { clip-path: inset(50% 50% 50% 50%); transform: translate(0); }
    93% { clip-path: inset(10% 0 60% 0); transform: translate(-4px, 2px); }
    94% { clip-path: inset(80% 0 5% 0); transform: translate(4px, -2px); }
    95% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 0); }
    96% { clip-path: inset(60% 0 10% 0); transform: translate(2px, 2px); }
    97% { clip-path: inset(40% 0 30% 0); transform: translate(-2px, -2px); }
    98%, 100% { clip-path: inset(50% 50% 50% 50%); transform: translate(0); }
}

@keyframes glitch-two {
    0%, 92% { clip-path: inset(50% 50% 50% 50%); transform: translate(0); }
    93% { clip-path: inset(30% 0 40% 0); transform: translate(4px, -2px); }
    94% { clip-path: inset(10% 0 80% 0); transform: translate(-4px, 2px); }
    95% { clip-path: inset(50% 0 10% 0); transform: translate(2px, 0); }
    96% { clip-path: inset(0% 0 70% 0); transform: translate(-2px, -2px); }
    97% { clip-path: inset(70% 0 0% 0); transform: translate(2px, 2px); }
    98%, 100% { clip-path: inset(50% 50% 50% 50%); transform: translate(0); }
}

@media (max-width: 56rem) {
    .product-story,
    .product-vifluent {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .product-copy,
    .product-vifluent .product-copy,
    .product-vifluent .product-media {
        grid-row: auto;
        grid-column: 1;
    }

    .product-vifluent .product-copy {
        order: 1;
    }

    .product-vifluent .product-media {
        order: 2;
    }

    .product-number {
        margin-bottom: 3rem;
    }
}

@media (max-width: 38rem) {
    .site-nav {
        padding-top: 1.15rem;
    }

    .site-brand {
        max-width: 7rem;
        line-height: 1.35;
    }

    .home-panel {
        padding: 1.5rem 0;
    }

    .home-location {
        right: auto;
        left: var(--page-gutter);
    }

    .portfolio-hero {
        align-items: flex-end;
        padding-bottom: 5rem;
    }

    .portfolio-title {
        font-size: clamp(3.2rem, 15vw, 5.2rem);
    }

    .product-story {
        gap: 3.5rem;
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .product-details {
        display: block;
    }

    .product-details li {
        margin-top: 0.5rem;
    }

    .product-details li:not(:last-child)::after {
        content: none;
    }

    .site-footer {
        display: block;
    }

    .site-footer a {
        display: inline-block;
        margin-top: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
