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

:root {
    --bg:     #0b0b0d;
    --bg-2:   #151517;
    --ink:    #ffffff;
    --muted:  rgba(255, 255, 255, 0.55);
    --line:   rgba(255, 255, 255, 0.1);
    --yellow: #fcc83d;
    --yellow-deep: #e6b01f;
    --white:  #ffffff;
}

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: 0.75rem;
    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.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — Rotating text badge
   ========================================================= */
.loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.loader__stage {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loader__ring {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    will-change: transform;
}
#loader-ring-g {
    transform-origin: 110px 110px;
}
.loader__core {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 400;
    box-shadow: 0 0 30px rgba(252, 200, 61, 0.4),
                inset 0 2px 6px rgba(255, 255, 255, 0.3);
    will-change: transform;
    z-index: 2;
}
.loader__core span { display: block; will-change: transform; }

.loader__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.loader__particles span {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--yellow);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(252, 200, 61, 0.6);
    will-change: transform, opacity;
}

.loader__meta {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    color: var(--muted);
    text-transform: uppercase;
}
.loader__counter {
    color: var(--yellow);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    min-width: 7ch;
    text-align: right;
}

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

/* Corner decorative lines */
.deco {
    position: absolute;
    z-index: 4;
    pointer-events: none;
}
.deco--tl {
    top: 10%;
    right: 42%;
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(25deg);
}
.deco--tr {
    top: 35%;
    right: 8%;
    width: 1px;
    height: 80px;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(25deg);
}
.deco--bl {
    bottom: 35%;
    left: 7%;
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(25deg);
}

/* ---------- Top nav ---------- */
.topnav {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 3rem;
}

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

.topnav__links {
    display: flex;
    gap: 2rem;
    margin-left: 1.5rem;
}
.topnav__links a {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    will-change: transform;
}
.topnav__links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1.5px;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.topnav__signin {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.3rem 0;
    will-change: transform;
}
.topnav__signin::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1.5px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.topnav__signin:hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__badge {
    position: relative;
    width: 54px; height: 54px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}
.topnav__badge-text {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    will-change: transform;
}
.topnav__badge-core {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    padding: 0 3rem;
    height: calc(100vh - 100px);
    align-items: flex-start;
    padding-top: 2rem;
}

.hero__left {
    position: relative;
}

.hero__title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 3.5rem;
    display: block;
}
.hero__title .hl-yellow {
    display: inline-block;
    position: relative;
    color: var(--ink);
    padding: 0 0.1em;
    will-change: transform;
}
.hero__title .hl-yellow::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: 0.05em;
    height: 0.35em;
    background: var(--yellow);
    z-index: -1;
    border-radius: 2px;
    transform-origin: left;
}
.hero__title .hl-box {
    display: inline-block;
    background: var(--white);
    color: var(--bg);
    padding: 0 0.2em 0.05em;
    margin: 0 0.05em;
    border-radius: 3px;
    will-change: transform;
}

.hero__lower {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}
.hero__pic {
    position: relative;
    width: 120px;
    aspect-ratio: 4 / 5;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    overflow: hidden;
    will-change: transform;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.hero__pic img {
    width: 100%; height: 100%;
    object-fit: cover;
    user-select: none;
}
.deco-line {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
}

.hero__desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: var(--bg);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    will-change: transform;
    transition: background 0.3s;
}
.cta svg { width: 14px; height: 14px; transition: transform 0.3s; }
.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 0;
}
.cta span, .cta svg { position: relative; z-index: 2; }
.cta:hover::before { transform: scaleX(1); transform-origin: left; }
.cta:hover svg { transform: translateX(4px); }

/* ---------- Right scattered photos ---------- */
.hero__right {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
}
.photo {
    position: absolute;
    overflow: hidden;
    will-change: transform;
    cursor: pointer;
}
.photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    user-select: none;
    transition: transform 0.6s ease;
}
.photo:hover img { transform: scale(1.08); }

.photo--gradient {
    top: 0;
    right: 42%;
    width: 180px;
    aspect-ratio: 9 / 14;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.photo--gradient .photo__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff6b9d 0%, #c44569 50%, #6c5ce7 100%);
    z-index: 0;
}
.photo--gradient img {
    position: relative;
    mix-blend-mode: screen;
    opacity: 0.85;
    z-index: 1;
}
.photo--gradient .photo__glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    pointer-events: none;
    z-index: 2;
}

.photo--phone {
    top: 6%;
    right: 5%;
    width: 210px;
    aspect-ratio: 9 / 13;
    background: #fff;
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.photo__bracket {
    position: absolute;
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
    z-index: 3;
}
.photo__bracket--tl { top: -20px; left: -20px; transform: rotate(45deg); }
.photo__bracket--br { bottom: -20px; right: -20px; transform: rotate(45deg); }

.photo--person {
    bottom: 5%;
    right: 3%;
    width: 300px;
    aspect-ratio: 4 / 3.5;
    border-radius: 6px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

/* ---------- Slider controls ---------- */
.slider-controls {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.slide-arrow {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    transition: background 0.3s, color 0.3s;
}
.slide-arrow svg { width: 18px; height: 18px; transition: transform 0.3s; }
.slide-arrow:hover { background: var(--yellow); color: var(--bg); border-color: var(--yellow); }

.slide-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--ink);
    letter-spacing: 0.1em;
    font-variant-numeric: tabular-nums;
}
.slide-progress__current { color: var(--yellow); font-weight: 700; }
.slide-progress__total { color: var(--muted); }
.slide-progress__bar {
    display: inline-block;
    position: relative;
    width: 120px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.15);
}
.slide-progress__bar span {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 25%;
    background: var(--yellow);
    transform-origin: left;
}

/* ---------- Initial states ---------- */
[data-magnetic], [data-link], [data-photo], [data-pic], [data-controls], [data-desc] {
    opacity: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .hero { grid-template-columns: 1.3fr 1fr; padding: 0 2rem; }
    .hero__title { font-size: clamp(1.8rem, 5vw, 3rem); }
    .topnav__links { display: none; }
    .photo--gradient { width: 140px; right: 52%; }
    .photo--phone { width: 160px; }
    .photo--person { width: 240px; }
}
@media (max-width: 760px) {
    .topnav { padding: 1rem 1.5rem; gap: 1rem; }
    .hero { grid-template-columns: 1fr; padding: 0 1.5rem; height: auto; gap: 2rem; }
    .hero__title { font-size: clamp(1.5rem, 7vw, 2.5rem); margin-bottom: 1.5rem; }
    .hero__right { min-height: 280px; }
    .photo--gradient { width: 110px; top: 0; right: 60%; }
    .photo--phone { width: 120px; top: 0; }
    .photo--person { width: 180px; bottom: 0; }
    .nest { height: auto; min-height: 100vh; padding-bottom: 5rem; }
    .slider-controls { bottom: 1rem; }
    .hero__lower { grid-template-columns: 1fr; gap: 1rem; }
    .hero__pic { width: 100px; }
    .topnav__signin { font-size: 0.85rem; }
}
@media (max-width: 480px) {
    .topnav__badge { display: none; }
    .photo--gradient { display: none; }
    .deco { display: none; }
    .cta { padding: 0.75rem 1.5rem; }
}
