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

:root {
    --bg:     #0a0a0a;
    --ink:    #ffffff;
    --muted:  rgba(255, 255, 255, 0.55);
    --line:   rgba(255, 255, 255, 0.12);
    --lime:   #c9ff2d;
    --lime-deep: #a8dd15;
    --accent: #c9ff2d;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.back-link {
    position: fixed;
    bottom: 4.5rem;
    left: 0.75rem;
    z-index: 1000;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 0.45rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); background: rgba(255, 255, 255, 0.14); }

/* =========================================================
   LOADER — rotating vinyl with counter
   ========================================================= */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loader__stage {
    position: relative;
    width: min(320px, 55vw);
    height: min(320px, 55vw);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader__vinyl {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 60px rgba(201, 255, 45, 0.15));
}

.loader__counter {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bg);
    letter-spacing: 0.2em;
    font-variant-numeric: tabular-nums;
    z-index: 2;
}

.loader__label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--muted);
    text-transform: uppercase;
}

/* =========================================================
   PORTFOLIO SECTION
   ========================================================= */
.portfolio {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 780px;
    overflow: hidden;
    background: var(--bg);
}

/* ---------- Top nav ---------- */
.topnav {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(8px);
}

.topnav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    will-change: transform;
}
.topnav__logo-mark { width: 36px; height: 36px; flex-shrink: 0; }
.topnav__logo-mark svg { width: 100%; height: 100%; display: block; }

.topnav__links {
    margin: 0 auto;
    display: flex;
    gap: 2.5rem;
}
.topnav__links a {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    padding: 0.3rem 0;
    will-change: transform;
}
.topnav__links a.is-active { color: var(--lime); }
.topnav__links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 1px;
    background: var(--lime);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.topnav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topnav__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--lime);
    color: var(--bg);
    text-decoration: none;
    padding: 0.75rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    will-change: transform;
    transition: background 0.3s;
}
.topnav__cta svg { width: 16px; height: 16px; transition: transform 0.3s ease; }
.topnav__cta:hover { background: var(--lime-deep); }
.topnav__cta:hover svg { transform: translateX(3px); }

.topnav__menu {
    width: 44px; height: 44px;
    background: var(--ink);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    will-change: transform;
}
.topnav__menu span {
    width: 18px;
    height: 2px;
    background: var(--bg);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.topnav__menu:hover span:nth-child(1) { transform: translateY(1px); }
.topnav__menu:hover span:nth-child(3) { transform: translateY(-1px); }

/* ---------- Left rail ---------- */
.rail {
    position: absolute;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}
.rail > * { pointer-events: auto; }
.rail--left {
    top: 7rem; left: 0.5rem; bottom: 5rem;
    gap: 2rem;
}
.rail--right {
    top: 7rem; right: 0.75rem; bottom: 5rem;
    gap: 1.5rem;
    align-items: center;
}

.rail__dots {
    display: grid;
    grid-template-columns: repeat(3, 6px);
    gap: 4px;
}
.rail__dots span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ink);
    cursor: pointer;
    will-change: transform;
    transition: background 0.3s ease;
}
.rail__dots span:hover { background: var(--lime); }

.rail__phone {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.3s ease;
}
.rail__phone:hover { color: var(--lime); }

.rail__scroll {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    color: var(--muted);
}
.rail__scroll-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}
.rail__scroll-line {
    width: 1px;
    height: 80px;
    background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent);
    display: block;
    transform-origin: top;
}
.rail__scroll-arrow { font-size: 0.8rem; opacity: 0.6; }

.rail__follow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    color: var(--muted);
}
.rail__follow-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}
.rail__follow-line {
    width: 1px;
    height: 70px;
    background: linear-gradient(180deg, rgba(255,255,255,0.4), transparent);
    display: block;
}
.rail__follow-arrow { font-size: 0.8rem; opacity: 0.6; }

.rail__social {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: auto;
    align-items: center;
}
.rail__social-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    will-change: transform;
    transition: background 0.3s ease, color 0.3s ease;
}
.rail__social-icon svg { width: 15px; height: 15px; }
.rail__social-icon:hover { background: var(--lime); color: var(--bg); }

/* ---------- Stage (vinyl + portrait) ---------- */
.stage {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

.stage__vinyl {
    position: absolute;
    top: 45%;
    left: 58%;
    transform: translate(-50%, -50%);
    width: min(820px, 85vw);
    height: min(820px, 85vw);
    opacity: 0.95;
    will-change: transform;
}

.stage__portrait {
    position: absolute;
    top: 46%;
    left: 66%;
    transform: translate(-50%, -50%);
    width: min(480px, 45vw);
    height: min(620px, 80vh);
    will-change: transform;
    mask-image: radial-gradient(ellipse at center, #000 55%, transparent 95%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, transparent 95%);
}
.stage__portrait img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    user-select: none;
    filter: contrast(1.05) saturate(0.9);
}

/* ---------- Main hero content ---------- */
.hero {
    position: absolute;
    left: 5rem;
    top: 7rem;
    right: 4rem;
    bottom: 5rem;
    z-index: 8;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
    pointer-events: none;
}
.hero > * { pointer-events: auto; }

.hero__eyebrow {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    gap: 0.4rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    padding-bottom: 0.4rem;
    max-width: max-content;
    will-change: transform;
}
.hero__eyebrow-text {
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 0.2rem;
}
.hero__eyebrow-arrow {
    display: inline-block;
    font-size: 0.85em;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.hero__eyebrow:hover .hero__eyebrow-arrow {
    transform: translate(4px, -4px) rotate(3deg);
}

.hero__title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 9vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin: auto 0;
    max-width: 780px;
}
.hero__line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.05em;
}
.hero__char {
    display: inline-block;
    will-change: transform, color;
    transition: color 0.3s ease;
}
.hero__char.is-space { width: 0.25em; }

.hero__play {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--ink);
    margin-top: auto;
    max-width: max-content;
    will-change: transform;
}
.hero__play-scribble { width: 70px; height: 52px; }
.hero__play-scribble path {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
}
.hero__play-btn {
    position: relative;
    width: 62px;
    height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hero__play-btn > svg:first-child {
    width: 100%; height: 100%;
    transition: transform 0.3s ease;
}
.hero__play-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}
.hero__play:hover .hero__play-btn > svg:first-child {
    transform: scale(1.08);
}
.hero__play-label {
    display: flex;
    flex-direction: column;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.1;
}

/* ---------- Marquee ---------- */
.marquee {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 10;
    background: var(--lime);
    color: var(--bg);
    padding: 1.1rem 0;
    overflow: hidden;
    white-space: nowrap;
}
.marquee__track {
    display: flex;
    gap: 0;
    width: max-content;
    will-change: transform;
}
.marquee__group {
    display: flex;
    gap: 3rem;
    padding: 0 1.5rem;
    align-items: center;
}
.marquee__item {
    font-size: clamp(1rem, 1.7vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: default;
}

/* ---------- Initial hidden states ---------- */
[data-magnetic], [data-rail], [data-social], [data-eyebrow],
[data-title-line] .hero__char, [data-play], [data-portrait] {
    opacity: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .topnav__links { display: none; }
    .hero { left: 4rem; right: 3rem; top: 6rem; }
    .rail--left { left: 0.25rem; }
    .rail--right { right: 0.25rem; }
    .stage__portrait { left: 72%; width: 55vw; }
    .stage__vinyl { left: 62%; width: 90vw; height: 90vw; }
}
@media (max-width: 768px) {
    .rail--right .rail__follow { display: none; }
    .rail--left .rail__phone { display: none; }
    .rail__social { gap: 0.4rem; }
    .rail__social-icon { width: 28px; height: 28px; }
    .hero { left: 3rem; right: 3rem; top: 5rem; bottom: 4rem; }
    .hero__title { font-size: clamp(2.3rem, 11vw, 6rem); }
    .stage__portrait { left: 55%; width: 75vw; top: 50%; opacity: 0.35; }
    .stage__vinyl { left: 50%; width: 110vw; height: 110vw; opacity: 0.7; }
    .topnav__menu { width: 38px; height: 38px; }
}
@media (max-width: 480px) {
    .rail { gap: 1rem; }
    .rail--left { top: 5rem; }
    .rail--right { top: 5rem; }
    .rail__scroll, .rail__follow { display: none; }
    .rail__dots { display: none; }
    .topnav { padding: 0.75rem 1rem; gap: 0.75rem; }
    .topnav__logo-text { display: none; }
    .topnav__cta { padding: 0.5rem 0.9rem; font-size: 0.8rem; }
    .hero__eyebrow { font-size: 0.85rem; }
}
