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

:root {
    --bg:    #e6e6fa;
    --bg-2:  #dedef8;
    --ink:   #1a1a2e;
    --muted: rgba(26, 26, 46, 0.6);
    --line:  rgba(26, 26, 46, 0.12);
    --blue:  #3452e8;
    --blue-deep: #2439c4;
    --blue-soft: #6478ee;
    --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: var(--white);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.1);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — Compass dial
   ========================================================= */
.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__dial {
    width: min(220px, 55vw);
    filter: drop-shadow(0 20px 30px rgba(52, 82, 232, 0.2));
}
.loader__svg { width: 100%; height: auto; display: block; }

#loader-outer {
    stroke-dasharray: 535;
    stroke-dashoffset: 535;
}
#axis-v, #axis-h {
    stroke-dasharray: 140;
    stroke-dashoffset: 140;
}
#loader-needle {
    transform-origin: 100px 100px;
    will-change: transform;
}

.loader__meta {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--muted);
    text-transform: uppercase;
}
.loader__counter {
    color: var(--blue);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
}

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

/* Large blue arc behind photo */
.bg-arc {
    position: absolute;
    top: 0; bottom: 0;
    right: 0;
    width: 55%;
    background: linear-gradient(135deg, #8497ff 0%, #3452e8 100%);
    border-radius: 0 0 0 50% / 0 0 0 40%;
    z-index: 1;
    will-change: transform;
}

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

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

.topnav__links {
    margin: 0 auto;
    display: flex;
    gap: 2rem;
}
.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.is-active { color: var(--blue); }
.topnav__links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
    border-radius: 2px;
}
.topnav__links a.is-active::after,
.topnav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.topnav__social {
    display: flex;
    gap: 0.5rem;
}
.social-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    will-change: transform;
    transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
}
.social-btn svg { width: 15px; height: 15px; }
.social-btn--fb { background: #3452e8; }
.social-btn--tw { background: #1a1a2e; }
.social-btn--ig { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af 100%); }
.social-btn--yt { background: #e63946; }
.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(26, 26, 46, 0.2);
    filter: brightness(1.1);
}

/* ---------- Nav arrows ---------- */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    width: 54px; height: 54px;
    background: var(--white);
    border: none;
    color: var(--ink);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(26, 26, 46, 0.12);
    will-change: transform;
    transition: background 0.3s, color 0.3s;
}
.nav-arrow svg { width: 20px; height: 20px; transition: transform 0.3s; }
.nav-arrow--left  { left: 1.25rem; }
.nav-arrow--right { right: 1.25rem; }
.nav-arrow:hover {
    background: var(--blue);
    color: #fff;
}
.nav-arrow--left:hover svg  { transform: translateX(-3px); }
.nav-arrow--right:hover svg { transform: translateX(3px); }

/* ---------- Right photo ---------- */
.photo {
    position: absolute;
    top: 0; bottom: 0;
    right: 0;
    width: 55%;
    z-index: 3;
    overflow: hidden;
    border-radius: 0 0 0 50% / 0 0 0 40%;
    will-change: transform;
}
.photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    user-select: none;
    filter: saturate(1.05);
    transition: transform 0.8s ease;
}

/* ---------- White content card ---------- */
.card {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    z-index: 10;
    width: min(560px, 55%);
    background: var(--white);
    padding: 3rem 3rem 2.5rem;
    border-radius: 14px;
    box-shadow: 0 25px 50px rgba(26, 26, 46, 0.08);
    will-change: transform;
}

.card__title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.3rem;
}
.card__word {
    display: inline-block;
    overflow: hidden;
    padding-bottom: 0.05em;
    will-change: transform;
}
.card__word-inner {
    display: inline-block;
    will-change: transform, color;
    transition: color 0.3s ease;
}
.card__word--accent .card__word-inner { color: var(--blue); }

.card__desc {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 460px;
}

.card__cta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-dark {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ink);
    color: #fff;
    text-decoration: none;
    padding: 0.95rem 2rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    overflow: hidden;
    will-change: transform;
}
.btn-dark__label { position: relative; z-index: 2; }
.btn-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
}
.btn-dark:hover::before { transform: scaleX(1); transform-origin: left; }

.btn-play {
    position: relative;
    width: 58px; height: 58px;
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(52, 82, 232, 0.4);
    will-change: transform;
}
.btn-play svg { width: 18px; height: 18px; margin-left: 2px; }
.btn-play-ring {
    position: absolute;
    inset: -6px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    opacity: 0.4;
}

/* ---------- Dots ---------- */
.dots {
    position: absolute;
    bottom: 2rem;
    left: 13%;
    z-index: 15;
    display: flex;
    gap: 0.65rem;
    align-items: center;
}
.dots span {
    width: 10px; height: 10px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.dots span.is-active { background: var(--blue); transform: scale(1.2); }
.dots span:hover:not(.is-active) { background: rgba(52, 82, 232, 0.4); }

/* ---------- Initial states ---------- */
[data-magnetic], [data-link], [data-fade], [data-title-word] .card__word-inner,
[data-card], [data-photo], [data-arc], [data-social], [data-cta], [data-play], [data-dots] {
    opacity: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .card { left: 5%; width: 60%; padding: 2rem 2rem 1.5rem; }
    .photo, .bg-arc { width: 45%; }
    .topnav__links { display: none; }
    .topnav { padding: 1rem 1.5rem; gap: 1rem; }
}
@media (max-width: 760px) {
    .photo, .bg-arc { width: 100%; opacity: 0.5; border-radius: 0; }
    .card {
        position: static;
        transform: none;
        margin: 2rem auto 0;
        width: calc(100% - 2rem);
        max-width: 500px;
    }
    .axis { height: auto; min-height: 100vh; padding-bottom: 5rem; }
    .nav-arrow { top: auto; bottom: 4.5rem; transform: none; }
    .dots { bottom: 2rem; left: 50%; transform: translateX(-50%); }
    .card__title { font-size: clamp(1.6rem, 7vw, 2.5rem); }
    .card__cta { flex-wrap: wrap; }
    .btn-dark { padding: 0.75rem 1.5rem; }
}
@media (max-width: 480px) {
    .topnav { flex-wrap: wrap; padding: 0.75rem 1rem; }
    .topnav__social { order: 2; margin-left: auto; }
    .nav-arrow { width: 40px; height: 40px; }
    .card { padding: 1.5rem 1.25rem; }
}
