/* ── Variables ─────────────────────────────────────────────── */
:root {
    --dark: #0d1b42;
    --dark-mid: #1c3879;
    --light: #d9e6f2;
    --logo-dark: #12224d;
    /* logo/text on light bg */

    --txt-light: #fefefe;
    --txt-muted: #a0b2d8;
    --txt-dark: #12224d;
    --txt-dark-m: #4a5d8a;

    --serif: 'Playfair Display', serif;
    --sans: 'Lato', sans-serif;
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--sans);
    background: var(--dark);
    color: var(--txt-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

em {
    font-style: italic;
    font-family: var(--serif);
    font-weight: 400;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 400;
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2.25rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    pointer-events: none;
    /* children re-enabled below */
}

.nav-logo-link,
.nav-menu-btn {
    pointer-events: auto;
}

/* Logo – CSS mask so background-color transition is silky */
.nav-logo {
    width: 55px;
    height: 55px;
    background-color: var(--txt-light);
    mask-image: url('logo.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('logo.svg');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    transition: background-color 0.5s ease;
}

.nav.on-light .nav-logo {
    background-color: var(--logo-dark);
}

/* Menu button */
.nav-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--txt-light);
    transition: color 0.5s ease;
}

.nav.on-light .nav-menu-btn {
    color: var(--logo-dark);
}

.nav-menu-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-menu-icon span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: currentColor;
    transition: background 0.5s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* ── Full-screen overlay menu ──────────────────────────────── */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 27, 66, 0.97);
    z-index: 190;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.menu-link {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--txt-light);
    transform: translateY(24px);
    opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), color 0.2s;
}

.menu-overlay.open .menu-link {
    transform: translateY(0);
    opacity: 1;
}

.menu-overlay.open .menu-link:nth-child(1) {
    transition-delay: 0.05s;
}

.menu-overlay.open .menu-link:nth-child(2) {
    transition-delay: 0.12s;
}

.menu-overlay.open .menu-link:nth-child(3) {
    transition-delay: 0.19s;
}

.menu-link:hover {
    color: #89aef0;
}

/* ── Dark / Light panel base ───────────────────────────────── */
.dark-panel {
    background: linear-gradient(140deg, var(--dark-mid) 0%, var(--dark) 100%);
    color: var(--txt-light);
}

.light-panel {
    background: var(--light);
    color: var(--txt-dark);
}

/* ── Sticky frames (hero, services) ───────────────────────── */
.sticky-frame {
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 10;
    /* each new section sits on top */
}

/* Services frame needs higher z so it covers hero when scrolling */
#services {
    z-index: 20;
}

.panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 8vw;
    overflow: hidden;
    position: relative;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero-bg-blur {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(62, 107, 214, 0.45) 0%, transparent 60%);
    filter: blur(80px);
    pointer-events: none;
}

.hero-panel {
    align-items: flex-end;
    text-align: right;
    padding-right: 14vw;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 1.05;
    color: #aecdff;
    animation: heroFadeIn 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.15s both;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title em {
    background: linear-gradient(
        90deg,
        var(--txt-light) 0%,
        #aecdff 35%,
        var(--txt-light) 55%,
        var(--txt-light) 100%
    );
    background-size: 250% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroFadeIn 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.15s both,
               shimmer 5s linear 1.4s infinite;
}

@keyframes shimmer {
    from { background-position: 200% center; }
    to   { background-position: -200% center; }
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--txt-muted);
}

.scroll-arrow {
    animation: bounce 1.6s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* ── Statement scroll space ────────────────────────────────── */
.statement-scroll-space {
    /* 300vh = 3 scroll lengths; panel is sticky inside */
    height: 300vh;
    position: relative;
    z-index: 15;
    /* covers hero */
}

.statement-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    padding: 8rem 8vw 6rem;
    overflow: hidden;
}

.statement-bg-logo {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translate(-50%, -50%);
    width: 55vh;
    opacity: 0.08;
    pointer-events: none;
}

.statement-bg-logo img {
    width: 100%;
}

/* Text area */
.statement-body {
    position: relative;
    z-index: 2;
    max-width: 580px;
    width: 100%;
}

.statement-texts {
    position: relative;
    height: 220px;
    /* fixed height – all steps stack here */
}

.st {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.45;
    color: var(--txt-dark);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
    pointer-events: none;
}

.st.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Pager */
.statement-pager {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--txt-dark-m);
    font-size: 0.85rem;
}

.pager-track {
    width: 140px;
    height: 1px;
    background: rgba(18, 34, 77, 0.18);
    overflow: hidden;
}

.pager-fill {
    height: 100%;
    background: var(--txt-dark);
    width: 33.33%;
    transition: width 0.45s ease;
}

/* ── Services scroll space ─────────────────────────────────── */
.section-eyebrow {
    position: absolute;
    top: 2.25rem;
    /* start after the nav logo icon (~47px wide) + nav left padding (4rem) + gap */
    left: calc(4rem + 55px + 1rem);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--txt-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 55px;
}

.section-eyebrow::before {
    content: '';
    width: 50px;
    height: 1px;
    background: currentColor;
    opacity: 0.35;
}

.services-scroll-space {
    height: 300vh;
    position: relative;
    z-index: 20;
}

.services-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(140deg, var(--dark-mid) 0%, var(--dark) 100%);
    color: var(--txt-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 8vw 6rem;
    overflow: hidden;
}

.services-layout {
    display: flex;
    align-items: center;
    gap: 8vw;
    width: 100%;
}

.services-title {
    font-size: clamp(3rem, 5.5vw, 5rem);
    line-height: 1.1;
    color: #92b8f5;
    flex: 0 0 auto;
    white-space: nowrap;
}

.svc-items {
    flex: 1;
    position: relative;
    height: 260px;
}

.svc-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition:
        opacity 0.7s var(--ease),
        transform 0.7s var(--ease),
        filter 0.7s ease;
    filter: blur(3px);
    pointer-events: none;
}

.svc-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
}

/* Animated accent line under the name */
.svc-item .svc-line {
    display: block;
    width: 0;
    height: 1px;
    background: rgba(146, 184, 245, 0.5);
    margin: 1rem 0 1.4rem;
    transition: width 0s;
}

.svc-item.active .svc-line {
    width: 60px;
    transition: width 0.6s var(--ease) 0.2s;
}

.svc-num {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--txt-muted);
    margin-bottom: 0.75rem;
}

.svc-name {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    font-weight: 400;
    color: var(--txt-light);
    margin-bottom: 1.25rem;
    line-height: 1.1;
}

.svc-desc {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--txt-muted);
    max-width: 480px;
}

/* Large ghost number behind each svc item for visual depth */
.svc-item::before {
    content: attr(data-n);
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    font-family: var(--serif);
    font-size: 9rem;
    line-height: 1;
    color: rgba(146, 184, 245, 0.06);
    pointer-events: none;
    transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
    opacity: 0;
}

.svc-item.active::before {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
    position: relative;
    z-index: 30;
    padding: 5rem 8vw 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid rgba(18, 34, 77, 0.15);
    gap: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 25px;
}

.footer-brand-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-brand-name {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--txt-dark);
}

.footer-logo {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    background-color: var(--logo-dark);
    mask-image: url('logo.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('logo.svg');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.footer-tagline {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.26rem;
    line-height: 1.5;
    color: var(--txt-dark-m);
    max-width: none;
}

.footer-tagline em {
    color: var(--txt-dark);
    /* italic already from parent */
}

.footer-nav {
    display: flex;
    gap: 5rem;
}

.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-nav-label {
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--txt-dark-m);
    margin-bottom: 0.4rem;
    opacity: 0.6;
}

.footer-nav-col a {
    font-size: 0.88rem;
    color: var(--txt-dark);
    transition: color 0.25s, opacity 0.25s;
    opacity: 0.75;
}

.footer-nav-col a:hover {
    opacity: 1;
    color: var(--dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-copy {
    font-size: 1rem;
    color: var(--txt-dark);
    opacity: 0.75;
}

/* ── Legal pages ───────────────────────────────────────────── */
.legal-hero {
    background: linear-gradient(140deg, var(--dark-mid) 0%, var(--dark) 100%);
    padding: 10rem 8vw 5rem;
}

.legal-hero-label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--txt-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.legal-hero-label::before {
    content: '';
    width: 50px;
    height: 1px;
    background: currentColor;
    opacity: 0.35;
}

.legal-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    color: #aecdff;
    line-height: 1.1;
}

.legal-content {
    background: var(--light);
    color: var(--txt-dark);
    padding: 5rem 8vw 6rem;
}

.legal-body {
    max-width: 760px;
}

.legal-body h2 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--txt-dark);
    margin: 2.5rem 0 0.75rem;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--txt-dark-m);
    margin-bottom: 1rem;
}

.legal-body ul {
    margin: 0 0 1rem 1.5rem;
    color: var(--txt-dark-m);
}

.legal-body ul li {
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 0.35rem;
}

.legal-updated {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--txt-dark-m);
    opacity: 0.6;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .legal-hero {
        padding: 8rem 5vw 4rem;
    }

    .legal-content {
        padding: 4rem 5vw 5rem;
    }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .nav {
        padding: 1.75rem 5vw;
    }

    .panel {
        padding: 6rem 5vw;
    }

    .hero-panel {
        align-items: flex-start;
        text-align: left;
        padding-right: 5vw;
    }

    .services-sticky {
        padding: 7rem 5vw 3rem;
    }

    .section-eyebrow {
        top: 1.75rem;
        left: calc(5vw + 48px + 1rem);
    }

    .services-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .services-title {
        white-space: normal;
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .svc-items {
        height: auto;
        min-height: 260px;
        width: 100%;
    }

    /* hide large ghost number on mobile – avoids horizontal overflow */
    .svc-item::before {
        display: none;
    }

    .statement-sticky {
        padding: 7rem 5vw 5rem;
        align-items: flex-start;
    }

    .statement-texts {
        height: 280px;
    }

    .footer-top {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-nav {
        gap: 3rem;
    }
}

@media (max-width: 600px) {
    .nav-logo {
        width: 43px;
        height: 43px;
    }

    .services-sticky {
        justify-content: flex-start;
    }

    .section-eyebrow {
        position: static;
        height: auto;
        left: auto;
        top: auto;
        margin-bottom: 1.5rem;
    }

    .statement-texts {
        height: 320px;
    }

    .svc-items {
        height: 340px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 2rem;
    }
}