:root {
    --bg: #0a0a0a;
    --ink: #ffffff;
    --quiet: rgba(255, 255, 255, 0.5);
    --line: rgba(255, 255, 255, 0.1);
    --accent: #c084fc;
    --font: "DM Sans", system-ui, -apple-system, sans-serif;

    --display-xl: clamp(52px, 8vw, 130px);
    --display-lg: clamp(40px, 6vw, 100px);
    --display-md: clamp(28px, 4vw, 64px);
    --body-lg: clamp(22px, 2.6vw, 36px);
    --body: clamp(16px, 1.2vw, 19px);
}

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

html,
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html,
body {
    overflow-x: hidden;
}
img {
    display: block;
    max-width: 100%;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
::selection {
    background: var(--accent);
    color: var(--bg);
}

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(28px, 5vw, 80px);
}

/* ---------- Wordmark ---------- */
.wordmark {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--ink);
    text-transform: uppercase;
    font-family: "Josefin Sans", sans-serif;
}
.wordmark .heavy {
    font-weight: 500;
    letter-spacing: 0.08em;
}
.wordmark .light {
    font-weight: 300;
    margin-left: 0.18em;
    letter-spacing: 0.12em;
    color: #999999;
}

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 22px 0;
    transition:
        background 240ms ease,
        backdrop-filter 240ms ease;
}
.nav.scrolled {
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
}
.nav .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.nav .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.nav .brand .wordmark {
    font-size: 26px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-link {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #bbbbbb;
    background: transparent;
    border-radius: 4px;
    padding: 4px 8px;
    transition:
        color 220ms ease,
        background 220ms ease;
}
.nav-link:hover {
    color: #d8a4ff;
    background: rgba(192, 132, 252, 0.35);
}

/* ---------- Hamburger ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--ink);
    border-radius: 1px;
    transition: background 200ms ease;
}
.hamburger:hover span {
    background: var(--accent);
}

/* ---------- Mobile menu overlay ---------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms ease;
}
.menu-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.menu-close {
    position: absolute;
    top: 26px;
    right: 28px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-close span {
    position: absolute;
    width: 24px;
    height: 1.5px;
    background: var(--quiet);
    border-radius: 1px;
    transition: background 200ms ease;
}
.menu-close span:first-child {
    transform: rotate(45deg);
}
.menu-close span:last-child {
    transform: rotate(-45deg);
}
.menu-close:hover span {
    background: var(--ink);
}
.menu-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05em;
}
.menu-link {
    font-size: clamp(52px, 14vw, 96px);
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--quiet);
    transition: color 200ms ease;
}
.menu-link:hover {
    color: var(--accent);
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: flex;
    }
}

/* ---------- Sections ---------- */
section {
    padding: clamp(137px, 21vh, 235px) 0;
    position: relative;
}
section.hero {
    padding-top: clamp(176px, 28vh, 314px);
    padding-bottom: clamp(137px, 21vh, 235px);
}

/* ---------- Display type ---------- */
.display {
    font-weight: 300;
    font-size: var(--display-xl);
    line-height: 0.92;
    letter-spacing: -0.045em;
    color: var(--ink);
    margin: 0;
    text-wrap: balance;
}
.display .pop {
    color: var(--accent);
}
.display .heavy {
    font-weight: 700;
    letter-spacing: -0.05em;
}
.display.md {
    font-size: var(--display-md);
    line-height: 1;
    letter-spacing: -0.035em;
}

/* Sub copy */
.sub-stack {
    margin-top: clamp(39px, 6vh, 78px);
    display: flex;
    flex-direction: column;
    gap: 0.18em;
    font-weight: 300;
    font-size: clamp(28px, 3.8vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.018em;
}

/* ---------- CTAs ---------- */
.cta-row {
    margin-top: clamp(48px, 7vh, 94px);
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.apply-btn {
    display: inline-flex;
    align-items: baseline;
    gap: 14px;
    font-size: clamp(20px, 1.6vw, 26px);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--ink);
    padding: 4px 0 8px;
    border-bottom: 1px solid var(--ink);
    transition:
        color 220ms ease,
        border-color 220ms ease,
        gap 220ms ease;
}
.apply-btn .arrow {
    font-weight: 200;
    transition: transform 220ms ease;
    display: inline-block;
}
.apply-btn:hover {
    gap: 22px;
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.apply-btn:hover .arrow {
    transform: translateX(4px);
}

.ghost-link {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    font-size: clamp(20px, 1.6vw, 26px);
    font-weight: 300;
    letter-spacing: -0.015em;
    color: var(--ink);
    padding: 4px 0 8px;
    border-bottom: 1px solid transparent;
    transition:
        color 220ms ease,
        border-color 220ms ease;
}
.ghost-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.ghost-link .arrow {
    transition: transform 220ms ease;
    display: inline-block;
}
.ghost-link:hover .arrow {
    transform: translateX(3px);
}

/* ---------- Hero ---------- */
.hero .display {
    font-weight: 300;
    line-height: 0.96;
}

/* ---------- Brothers ---------- */
.brothers .display {
}
.brothers .thesis {
    margin-top: clamp(56px, 8vh, 118px);
    display: flex;
    flex-direction: column;
    gap: 0.18em;
    font-size: clamp(28px, 3.8vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.032em;
    font-weight: 300;
}
.brothers .thesis .line .accent {
    color: var(--accent);
    font-weight: 400;
}

/* ---------- SLED ---------- */
.sled .display {
    max-width: 14ch;
}
.sled .sled-grid {
    margin-top: clamp(63px, 8vh, 118px);
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: clamp(20px, 3vw, 48px);
    align-items: center;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 900px) {
    .sled .sled-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .phone-deck {
        justify-content: center;
        height: clamp(300px, 72vw, 460px);
    }
    .phone-fan {
        width: clamp(110px, 28vw, 200px);
    }
    .sled .sled-meta {
        align-items: center;
        text-align: center;
    }
}
.sled .sled-figure {
    position: relative;
    display: block;
    min-width: 0;
    transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sled .sled-figure:hover {
    transform: translateY(-6px);
}

.sled .sled-meta {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}
.sled .sled-name {
    display: flex;
    align-items: baseline;
    gap: 18px;
    font-size: clamp(28px, 3.4vw, 48px);
    font-weight: 300;
    letter-spacing: -0.028em;
    line-height: 1.05;
    color: var(--ink);
}
.sled .sled-name .dash {
    color: var(--quiet);
    font-weight: 200;
}
.sled .sled-desc {
    font-size: clamp(20px, 1.6vw, 26px);
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: -0.018em;
    max-width: 28ch;
}

/* ---------- Apply form ---------- */
.apply-form {
    margin-top: clamp(48px, 6vh, 72px);
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 540px;
}
.apply-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.apply-field label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #aaaaaa;
}
.apply-field input {
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    font-family: var(--font);
    font-size: clamp(17px, 1.4vw, 22px);
    font-weight: 300;
    padding: 12px 0;
    width: 100%;
    outline: none;
    transition: border-color 200ms ease;
}
.apply-field input:focus {
    border-bottom-color: var(--ink);
}
.form-submit {
    align-self: flex-start;
    margin-top: 8px;
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    font-size: clamp(20px, 1.6vw, 26px);
    font-weight: 300;
    letter-spacing: -0.015em;
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
    padding: 4px 0 8px;
    transition: gap 220ms ease;
}
.form-submit .arrow {
    display: inline-block;
    transition: transform 220ms ease;
}
.form-submit:hover {
    gap: 20px;
}
.form-submit:hover .arrow {
    transform: translateX(4px);
}
.form-thanks {
    margin-top: clamp(48px, 6vh, 72px);
    font-size: clamp(20px, 2vw, 32px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--accent);
}

/* ---------- Footer ---------- */
.footer-cta {
    padding-top: clamp(137px, 21vh, 255px);
    padding-bottom: clamp(137px, 21vh, 255px);
}
.footer-cta .display {
}

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 12px;
    color: var(--quiet);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-wrap: wrap;
}
.footer-bottom .wordmark {
    font-size: 13px;
}
.footer-bottom .links {
    display: flex;
    gap: 24px;
}
.footer-bottom a:hover {
    color: var(--ink);
}

/* ---------- SLED Phone Row ---------- */
.phone-deck {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    width: 100%;
    height: clamp(346px, 34.65vw, 520px);
    overflow: visible;
    position: relative;
}

.phone-deck::before {
    content: "";
    position: absolute;
    left: 30%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    height: 480px;
    background: radial-gradient(
        ellipse at center,
        rgba(192, 132, 252, 0.13) 0%,
        transparent 65%
    );
    pointer-events: none;
    z-index: 0;
}
.phone-fan {
    position: relative;
    width: clamp(160px, 16vw, 240px);
    flex-shrink: 0;
    border-radius: 36px;
    overflow: hidden;
    z-index: 1;
    /* start fully below the deck frame; JS drives translateY from scroll */
    transform: translateY(100%);
}
.phone-fan::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 36px;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}
.phone-fan.phone-left   { z-index: 1; }
.phone-fan.phone-center { z-index: 2; margin-left: -30px; }
.phone-fan.phone-right  { z-index: 3; margin-left: -30px; }

/* SLED meta text: start hidden and offset right, no delay (fast clean exit) */
.sled .sled-name,
.sled .sled-desc,
.sled .sled-meta .cta-row {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Each phone's opacity and translateY are set via inline style by JS */

.sled.sled-visible .sled-name,
.sled.sled-visible .sled-desc,
.sled.sled-visible .sled-meta .cta-row { opacity: 1; transform: translateX(0); }
.sled.sled-visible .sled-name          { transition-delay: 100ms; }
.sled.sled-visible .sled-desc          { transition-delay: 200ms; }
.sled.sled-visible .sled-meta .cta-row { transition-delay: 300ms; }
.screen-img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 900ms ease,
        transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in {
    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;
}

/* ---------- Word reveal on scroll ---------- */
.color-reveal {
    color: #222222;
}
.word-reveal {
    transition: color 0.15s ease;
}
