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

:root {
    --ink:       #0d1b3d;
    --navy:      #1a2b5c;
    --navy-deep: #0d3172;
    --blue:      #2a6fdc;
    --blue-soft: #5a8de8;
    --muted:     rgba(13, 27, 61, 0.6);
    --line:      rgba(13, 27, 61, 0.1);
    --bg:        #ffffff;
    --bg-soft:   #f3f6fb;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: 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(--bg);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(13, 27, 61, 0.08);
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}
.back-link:hover { opacity: 1; transform: translateY(-2px); }

/* =========================================================
   LOADER — Growing chart
   ========================================================= */
.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__chart {
    width: min(340px, 75vw);
    padding: 1rem;
}
.loader__svg { width: 100%; height: auto; display: block; }

.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);
}
.loader__counter {
    color: var(--blue);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
}

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

/* ---------- Top info bar ---------- */
.topbar {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    font-size: 0.75rem;
    color: var(--muted);
}
.topbar__note { font-weight: 500; }
.topbar__pill b { color: var(--blue); margin-right: 0.25rem; }

/* ---------- Main nav ---------- */
.mainnav {
    position: relative;
    z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.mainnav__top {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--line);
}
.mainnav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    will-change: transform;
}
.mainnav__logo-mark { width: 34px; height: 34px; }
.mainnav__logo-mark svg { width: 100%; height: 100%; display: block; }
.mainnav__infos {
    margin-left: auto;
    display: flex;
    gap: 2rem;
}
.mainnav__info {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    will-change: transform;
    cursor: pointer;
}
.mainnav__info-icon {
    width: 38px; height: 38px;
    background: var(--bg-soft);
    color: var(--blue);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s;
}
.mainnav__info-icon svg { width: 18px; height: 18px; }
.mainnav__info:hover .mainnav__info-icon { background: var(--blue); color: #fff; }
.mainnav__info-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}
.mainnav__info-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

.mainnav__bottom {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 2rem;
}
.mainnav__links {
    display: flex;
    gap: 2rem;
}
.mainnav__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;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    will-change: transform;
}
.mainnav__links a.is-active { color: var(--blue); }
.mainnav__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.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.mainnav__links a:hover::after,
.mainnav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
.caret { font-size: 0.7em; opacity: 0.7; transition: transform 0.3s; }
.mainnav__links a:hover .caret { transform: translateY(2px); }

.mainnav__arrows {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}
.mainnav__arrow {
    width: 38px; height: 38px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.mainnav__arrow svg { width: 16px; height: 16px; }
.mainnav__arrow:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: var(--bg);
}

/* Dark navy angled shape */
.hero__angle {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 58%;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
    clip-path: polygon(0 0, 85% 0, 65% 100%, 0 100%);
    z-index: 2;
    will-change: transform;
}
.hero__angle-dots {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 120px;
    height: auto;
}
.hero__circle-pattern {
    position: absolute;
    top: 20%;
    left: 15%;
    width: 200px; height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    opacity: 0.6;
}
.hero__circle-pattern::before,
.hero__circle-pattern::after {
    content: '';
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}
.hero__circle-pattern::after { inset: 50px; }

/* Background rotated text */
.hero__backtext {
    position: absolute;
    top: 5%;
    left: 35%;
    z-index: 3;
    width: 65%;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.08);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    overflow: hidden;
    pointer-events: none;
}
.hero__backtext span { display: inline-block; padding-right: 1rem; }

/* Photo on right side */
.hero__photo {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 55%;
    overflow: hidden;
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
    z-index: 4;
    will-change: transform;
}
.hero__photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 30%;
    user-select: none;
    will-change: transform;
}
.hero__photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(270deg, transparent 60%, rgba(26, 43, 92, 0.4) 100%);
    pointer-events: none;
}

/* Content */
.hero__content {
    position: relative;
    z-index: 10;
    padding: 4rem 2rem 4rem 4rem;
    max-width: 640px;
    color: #fff;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #fff;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}
.hero__eyebrow-mark {
    display: inline-flex;
    gap: 3px;
}
.hero__eyebrow-mark i {
    display: block;
    width: 4px; height: 4px;
    background: var(--blue-soft);
    border-radius: 50%;
}

.hero__title {
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 1.25rem;
}
.hero__line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.04em;
}
.hero__char {
    display: inline-block;
    will-change: transform, color;
    transition: color 0.3s ease;
}
.hero__char.is-space { width: 0.25em; }

.hero__desc {
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2rem;
    max-width: 460px;
}

.hero__cta-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    padding: 0.95rem 1.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    overflow: hidden;
    will-change: transform;
    box-shadow: 0 10px 22px rgba(42, 111, 220, 0.4);
}
.cta__label, .cta__arrow { position: relative; z-index: 2; }
.cta__arrow svg { width: 14px; height: 14px; transition: transform 0.4s; }
.cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #0f3a8c;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
}
.cta:hover::before { transform: scaleX(1); transform-origin: left; }
.cta:hover .cta__arrow svg { transform: translateX(4px); }

.hero__stats {
    display: flex;
    gap: 1.5rem;
}
.hero__stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.hero__stat b {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.hero__stat b em {
    font-style: normal;
    color: var(--blue-soft);
    font-size: 0.8em;
    font-weight: 600;
}
.hero__stat span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

/* Pagination */
.hero__pages {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
}
.hero__pages-current { color: #fff; font-weight: 600; }
.hero__pages-bar {
    position: relative;
    width: 80px;
    height: 2px;
    background: rgba(255, 255, 255, 0.25);
    display: inline-block;
}
.hero__pages-bar span {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 33%;
    background: #fff;
    transform-origin: left;
}

/* ---------- Initial states ---------- */
[data-magnetic], [data-link], [data-fade], [data-title-line] .hero__char, [data-eyebrow], [data-stats], [data-photo], [data-angle], [data-info], [data-topbar] {
    opacity: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .mainnav__infos { display: none; }
    .hero__angle { width: 100%; clip-path: none; }
    .hero__photo { width: 100%; clip-path: none; opacity: 0.3; }
    .hero__content { padding: 3rem 2rem; max-width: 100%; }
    .hero { height: 580px; }
}
@media (max-width: 760px) {
    .topbar { padding: 0.4rem 1rem; font-size: 0.65rem; }
    .topbar__note { display: none; }
    .mainnav__top { padding: 0.75rem 1rem; }
    .mainnav__bottom { padding: 0.5rem 1rem; flex-wrap: wrap; gap: 0.75rem; }
    .mainnav__links { gap: 1rem; font-size: 0.75rem; }
    .mainnav__links a { font-size: 0.75rem; }
    .hero__backtext { display: none; }
    .hero__content { padding: 2rem 1.25rem; }
    .hero { height: 520px; }
    .hero__cta-row { gap: 1rem; }
    .hero__stats { flex-direction: row; gap: 1rem; }
    .hero__stat b { font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .mainnav__links a { font-size: 0.7rem; }
    .caret { display: none; }
    .hero__stats { display: none; }
    .hero { height: 500px; }
}
