:root {
    --bg: #ffffff;
    --text: #111111;
    --muted: #6f6f6f;
    --accent: #b32424;
    --line: rgba(17, 17, 17, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: -0.01em;
    font-feature-settings: "liga", "kern";
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    position: relative;
}

.is-hidden {
    visibility: hidden;
}

.rail {
    position: fixed;
    left: 4.4rem;
    top: 5.2rem;
    width: 10rem;
}

.logo-box {
    width: 5.6rem;
    height: 5.6rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.2rem;
    overflow: hidden;
}

.logo-svg {
    width: 100%;
    height: auto;
    display: block;
    color: #111111;

    transform: scale(1.10) translateX(-1px);
    transform-origin: center;

    transition: color 0.18s ease, transform 0.18s ease;
}

.logo-box:hover .logo-svg {
    color: var(--accent);
    transform: scale(1.18) translateX(-1px);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav a {
    font-size: 1.7rem;
    font-weight: 300;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
}

.nav a:hover {
    color: var(--accent);
}

.chev {
    font-size: 1.35rem;
    transform: translateY(-0.04em);
}

.hero {
    padding-top: 7.5rem;
    padding-left: 18.7rem;
    padding-right: 5rem;
}

.title-block {
    max-width: 62rem;
}

.hero-lines {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.hero-line {
    font-size: clamp(3.2rem, 5.1vw, 5rem);
    line-height: 1;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
    margin: 0;
}

.brand-line {
    margin: 0;
}

.tagline-line {
    margin-top: 0.06em;
}

.systems-word {
    font: inherit;
    letter-spacing: inherit;
}

.rotating-line {
    margin-top: 0.06em;
    min-height: 1em;
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}

.rotating-word {
    display: inline-block;
}

.cursor {
    display: inline-block;
    width: 0.22em;
    height: 0.9em;
    margin-left: 0.04em;
    background: var(--accent);
    vertical-align: -0.08em;
    animation: blink 1.05s step-end infinite;
}

@keyframes blink {
    0%, 48% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

.contact-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8.5rem;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.contact-link {
    pointer-events: auto;
    font-size: clamp(2.2rem, 3vw, 3.2rem);
    font-weight: 300;
    letter-spacing: 0.01em;
}

.contact-link:hover {
    color: var(--accent);
}

#boot-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

#boot-overlay.is-gone {
    opacity: 0;
    visibility: hidden;
}

.boot-inner {
    width: min(42rem, calc(100vw - 4rem));
}

.boot-lines {
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
    white-space: pre-line;
}

.boot-line::before {
    content: "> ";
    color: var(--accent);
}

/* ---------- stage + view system ---------- */

#stage {
    position: relative;
}

.view {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.view.is-entering {
    animation: viewIn 240ms ease forwards;
}

.view.is-exiting {
    animation: viewOut 180ms ease forwards;
}

@keyframes viewIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes viewOut {
    0% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(1px);
    }
}


/* ---------- nav state ---------- */

.nav a {
    position: relative;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.nav a.is-active {
    color: var(--accent);
}

.nav a.is-active .chev {
    transform: translateX(2px);
}

.chev {
    transition: transform 0.18s ease, color 0.18s ease;
}

.nav a:hover .chev {
    transform: translateX(2px);
}


/* ---------- about page styling ---------- */

.content-wrap {
    max-width: 860px;
    margin-left: 18.7rem;
    padding: 8rem 5rem 5rem 0;
}

.page-title {
    margin: 0 0 2rem 0;
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    line-height: 1;
    font-weight: 300;
    letter-spacing: -0.01em;
}

.content-wrap p {
    margin: 0 0 1.25rem 0;
    font-size: 1.02rem;
    line-height: 1.6;
    max-width: 46rem;
}

.about-intro {
    font-size: 1.16rem !important;
    line-height: 1.55 !important;
    max-width: 42rem !important;
}

.principle-intro {
    margin-top: 2.5rem !important;
}

.principles {
    margin-top: 2.25rem;
    display: grid;
    gap: 2rem;
}

.principle {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
    max-width: 46rem;
}

.principle h3 {
    margin: 0 0 0.45rem 0;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.principle p {
    margin: 0;
}


/* ---------- subtle terminal cue ---------- */

.page-title::before {
    content: "> ";
    color: var(--accent);
}


/* ---------- mobile ---------- */

@media (max-width: 900px) {
    .content-wrap {
        margin-left: 0;
        padding: 2rem 1.35rem 3rem 1.35rem;
    }

    .page-title {
        margin-bottom: 1.5rem;
        font-size: clamp(2rem, 10vw, 2.75rem);
    }

    .content-wrap p {
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .principles {
        gap: 1.5rem;
    }
}

@media (max-width: 900px) {
    .rail {
        position: static;
        width: auto;
        padding: 1.5rem 1.35rem 0 1.35rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .logo-box {
        margin-bottom: 0;
        flex: 0 0 auto;
        width: 4.2rem;
        height: 4.2rem;
    }

    .nav {
        gap: 0.7rem;
    }

    .nav a {
        font-size: 1.05rem;
    }

    .hero {
        padding-top: 1.5rem;
        padding-left: 1.35rem;
        padding-right: 1.35rem;
    }

    .hero-lines {
        gap: 0.06em;
    }

    .hero-line {
        white-space: normal;
        font-size: clamp(2.6rem, 12vw, 4rem);
        line-height: 0.98;
    }

    .rotating-line {
        min-height: 1em;
    }

    .contact-wrap {
        position: static;
        justify-content: flex-start;
        padding: 4.5rem 1.35rem 3rem;
    }

    .contact-link {
        font-size: clamp(2rem, 9vw, 3rem);
    }
}