/* Fonts: same as giraffe.partners. Archivo for headings, Instrument Serif italic for accents, DM Sans for text. */
@font-face {
    font-family: "Archivo";
    src: url(assets/fonts/archivo.woff2) format("woff2");
    font-weight: 400 700;
    font-stretch: 62% 125%;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Serif";
    src: url(assets/fonts/instrumentserif-italic-400.woff2) format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

:root {
    --display: "Archivo", "Arial Narrow", Arial, sans-serif;
    --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
}

* {
    -webkit-font-smoothing: antialiased;
}

/* The fixed nav is about 97px tall (89px on phones): keep anchor jumps and focused fields below it */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
}

@media (max-width: 1023px) {
    html {
        scroll-padding-top: 100px;
    }
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #FAF9FC;
    color: #0F0A1A;
    overflow-x: hidden;
}

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

button {
    font-family: inherit;
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid #4B2F79;
    outline-offset: 3px;
}

.bg-p-900 :focus-visible,
.bg-p-950 :focus-visible,
#hero :focus-visible,
#top :focus-visible {
    outline-color: #C9BCE0;
}

/* ─── SKIP LINK ─── */
.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 12px 18px;
    background: #0F0A1A;
    color: #FAF9FC;
    font-size: 14px;
    border-radius: 999px;
}

.skip-link:focus {
    top: 12px;
}

/* ─── SCROLL PROGRESS ─── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #4B2F79;
    z-index: 100;
    transform: scaleX(0);
    transform-origin: left center;
}

/* ─── HALFTONE: dotted gradient from the visiting cards, painted by script.js ─── */
.halftone {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.halftone svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ─── BRACKET FRAME: the info-field pattern from the visiting cards ─── */
.bracket {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 22px;
    border: 1px solid rgba(147, 130, 174, 0.4);
    border-top: none;
    border-radius: 0 0 7px 7px;
    margin-top: 10px;
}

.bracket::before,
.bracket::after {
    content: '';
    position: absolute;
    top: -10px;
    width: 22px;
    height: 10px;
    border: 1px solid rgba(147, 130, 174, 0.4);
    border-bottom: none;
}

.bracket::before {
    left: -1px;
    border-right: none;
    border-top-left-radius: 7px;
}

.bracket::after {
    right: -1px;
    border-left: none;
    border-top-right-radius: 7px;
}

/* Light variant for dark backgrounds */
.bracket--light {
    border-color: rgba(255, 255, 255, 0.22);
}

.bracket--light::before,
.bracket--light::after {
    border-color: rgba(255, 255, 255, 0.22);
}

.bracket-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6F5893;
    flex-shrink: 0;
}

.bracket--light .bracket-label {
    color: rgba(219, 213, 228, 0.75);
}

.bracket-value {
    font-size: 13px;
    color: #0F0A1A;
    letter-spacing: 0.01em;
}

.bracket--light .bracket-value {
    color: #FAF9FC;
}

/* ─── REVEAL ON SCROLL ───
   Only hidden when script.js has marked the page with .js, so the page stays readable if scripts fail. */
.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s cubic-bezier(.23, 1, .32, 1),
        transform 0.7s cubic-bezier(.23, 1, .32, 1);
}

@keyframes gim-show {
    to {
        opacity: 1;
        transform: none;
    }
}

.js .reveal,
.js .word-reveal .word>span,
.js .gap-bar-fill {
    animation: gim-show 0s 3s forwards;
}

.js-ready .reveal,
.js-ready .word-reveal .word>span,
.js-ready .gap-bar-fill {
    animation: none;
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

.js .reveal.delay-1 {
    transition-delay: 0.06s;
}

.js .reveal.delay-2 {
    transition-delay: 0.12s;
}

.js .reveal.delay-3 {
    transition-delay: 0.18s;
}

.js .reveal.delay-4 {
    transition-delay: 0.24s;
}

/* ─── WORD REVEAL: hero headline ─── */
.word-reveal .word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    color: #FFFFFF;
    line-height: 1.04;
    padding-right: 0.04em;
}

.js .word-reveal .word>span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 0.9s cubic-bezier(.23, 1, .32, 1);
}

.js .word-reveal.is-in .word>span {
    transform: none;
}

.word-reveal .word:nth-child(2)>span { transition-delay: 0.05s; }
.word-reveal .word:nth-child(3)>span { transition-delay: 0.1s; }
.word-reveal .word:nth-child(4)>span { transition-delay: 0.15s; }
.word-reveal .word:nth-child(5)>span { transition-delay: 0.2s; }
.word-reveal .word:nth-child(6)>span { transition-delay: 0.25s; }
.word-reveal .word:nth-child(7)>span { transition-delay: 0.3s; }
.word-reveal .word:nth-child(8)>span { transition-delay: 0.35s; }
.word-reveal .word:nth-child(9)>span { transition-delay: 0.4s; }

/* ─── LOGO LOCKUP (Giraffe Industrial Marketing, used exactly as supplied) ─── */
.site-logo {
    display: block;
    height: 56px;
    width: auto;
    max-width: none;
}

#footer .site-logo {
    height: 80px;
}

@media (max-width: 640px) {
    .site-logo {
        height: 48px;
    }

    #footer .site-logo {
        height: 64px;
    }
}

/* ─── NAV + MOBILE MENU ─── */
.nav {
    transition: background-color 0.3s, border-color 0.3s;
}

.nav.is-scrolled {
    background: rgba(250, 249, 252, 0.94);
    border-bottom-color: #DDD8E8;
}

.menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 11px;
    margin-right: -11px;
    background: none;
    border: 0;
}

.menu-btn span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: #0F0A1A;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #EDEAF1;
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu a:not(.btn-primary) {
    display: block;
    width: 100%;
    padding: 12px 0;
    text-align: center;
    font-size: 15px;
    color: rgba(15, 10, 26, 0.85);
}

/* ─── MARQUEE ─── */
.marquee {
    overflow: hidden;
}

.marquee-track {
    display: flex;
    gap: 64px;
    padding-right: 64px;
    width: max-content;
    white-space: nowrap;
    align-items: center;
    animation: marquee 60s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

/* ─── DISPLAY HEADLINES: Archivo, with Instrument Serif italic accents ─── */
.display-h1,
.display-h2,
.display-h3 {
    font-family: var(--display);
    font-stretch: 84%;
    font-weight: 700;
    text-wrap: balance;
}

.display-h1 {
    font-size: clamp(56px, min(8vw, 13vh), 132px);
    line-height: 0.92;
    letter-spacing: -0.028em;
}

.display-h2 {
    font-size: clamp(38px, 4.9vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.024em;
}

.display-h3 {
    font-size: clamp(26px, 2.6vw, 38px);
    line-height: 1.02;
    letter-spacing: -0.016em;
}

.display-h1 em,
.display-h2 em,
.display-h3 em {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: 1.06em;
    letter-spacing: -0.01em;
}

.ed {
    font-family: 'JetBrains Mono', monospace;
}

/* ─── BUTTONS ─── */
.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 30px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: #FFFFFF;
    color: #000000;
}

.btn-primary:hover {
    background: #4B2F79;
    color: #FFFFFF;
}

.btn-primary.bg-black:hover {
    background: #4B2F79;
}

.btn-ghost {
    color: #FFFFFF;
    border-color: #FFFFFF;
    background: transparent;
}

.btn-ghost:hover {
    background: #FAF9FC;
    border-color: #FAF9FC;
    color: #0F0A1A;
}

.btn-light {
    background: #FAF9FC;
    color: #0F0A1A;
}

.btn-light:hover {
    background: #C9BCE0;
    color: #0F0A1A;
}

.btn-primary .arrow,
.btn-ghost .arrow {
    transition: transform 0.2s ease;
}

.btn-primary:hover .arrow,
.btn-ghost:hover .arrow {
    transform: translateX(4px);
}

.case-study-btn {
    border-color: rgba(255, 255, 255, 0.35);
    color: #FAF9FC;
}

.case-study-btn:hover {
    background: #FAF9FC;
    border-color: #FAF9FC;
    color: #4B2F79;
}

/* ─── HERO VIDEO PAUSE BUTTON ─── */
.video-toggle {
    position: absolute;
    right: 24px;
    bottom: 24px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(15, 10, 26, 0.35);
    color: #FFFFFF;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.video-toggle:hover {
    background: rgba(15, 10, 26, 0.6);
}

/* ─── METHOD: four steps on a rail ─── */
.method-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px 0;
    margin-top: 88px;
}

.method-rail,
.method-rail-fill {
    display: none;
}

.method-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 0 24px;
    text-align: center;
}

.method-step+.method-step {
    border-top: 1px dashed #EDEAF1;
    padding-top: 64px;
}

@media (min-width: 640px) {
    .method-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .method-step+.method-step {
        border-top: none;
        padding-top: 0;
    }

    .method-step:nth-child(even) {
        border-left: 1px dashed #EDEAF1;
    }
}

@media (min-width: 1024px) {
    .method-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }

    .method-step+.method-step {
        border-left: 1px dashed #EDEAF1;
    }

    .method-rail,
    .method-rail-fill {
        display: block;
    }
}

.method-rail {
    position: absolute;
    top: 50px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: repeating-linear-gradient(to right, #DBD5E4 0, #DBD5E4 5px, transparent 5px, transparent 12px);
    z-index: 0;
}

.method-rail-fill {
    position: absolute;
    top: 50px;
    left: 12.5%;
    width: 75%;
    height: 2px;
    background: #4B2F79;
    z-index: 1;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.4s cubic-bezier(.23, 1, .32, 1);
}

.method-rail-fill.is-in {
    transform: scaleX(1);
}

.method-step-output {
    max-width: 240px;
    margin: auto auto 0 auto;
    background: #FAF9FC;
}

.method-instrument {
    width: 96px;
    height: 96px;
    margin: 0 auto 36px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #FAF9FC;
    border: 1px solid #DDD8E8;
}

.method-instrument svg {
    width: 42px;
    height: 42px;
    color: #4B2F79;
}

.method-watermark {
    font-family: var(--display);
    font-stretch: 84%;
    font-weight: 700;
    font-size: 110px;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #EDEAF1;
}

.method-step-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6F5893;
}

.method-step-name {
    font-family: var(--display);
    font-stretch: 84%;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: -0.015em;
    color: #0F0A1A;
    margin: 8px 0 18px 0;
}

.method-step-body {
    font-size: 14px;
    line-height: 1.65;
    color: #6B6478;
    max-width: 240px;
    margin: 0 auto 38px;
}

/* ─── OPR FORM ─── */
.opr-field {
    position: relative;
}

.opr-field input,
.opr-field select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    color: #FAF9FC;
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    padding: 18px 0 14px 0;
    outline: none;
    transition: border-color 0.2s;
}

.opr-field input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.opr-field input:focus {
    border-color: #DBD5E4;
}

.opr-field input:focus-visible {
    outline: 2px solid #C9BCE0;
    outline-offset: 4px;
}

.opr-field-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: rgba(219, 213, 228, 0.8);
    text-transform: uppercase;
    display: block;
}

.form-status:empty {
    display: none;
}

.form-status a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── PROBLEM GAP VISUAL ─── */
.gap-bar {
    position: relative;
    height: 28px;
    background: #EDEAF1;
    overflow: hidden;
}

.gap-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transform-origin: left center;
    transition: transform 1.4s cubic-bezier(.23, 1, .32, 1);
}

.js .gap-bar-fill {
    transform: scaleX(0);
}

.js .gap-bar-fill.is-in {
    transform: scaleX(1);
}

.gap-bar-fill.fill-95 {
    width: 95%;
    background: linear-gradient(to right, #4B2F79, #2A1D4B);
}

.gap-bar-fill.fill-32 {
    width: 32%;
    background: linear-gradient(to right, #9382AE, #6F5893);
}

/* ─── NUMBERS ─── */
.case-metric-num,
.stat-num {
    font-family: var(--display);
    font-stretch: 84%;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.case-metric-num {
    font-size: clamp(64px, 7vw, 110px);
    color: #FAF9FC;
}

.stat-num {
    font-size: clamp(56px, 6vw, 88px);
    color: #0F0A1A;
}

/* ─── FAQ ─── */
.gp-halftone-dark {
    background-image: radial-gradient(circle, #9B7FBF 1.2px, transparent 1.2px);
    background-size: 14px 14px;
}

summary::-webkit-details-marker {
    display: none;
}

summary::marker {
    content: '';
}

summary {
    list-style: none;
    cursor: pointer;
}

/* Plus that turns into an X: the parent rotates, the two lines stay centred */
.gp-plus {
    position: relative;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.2s,
        border-color 0.2s;
}

.gp-plus::before,
.gp-plus::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: #4B2F79;
    transition: background-color 0.2s;
}

.gp-plus::before {
    width: 10px;
    height: 1.5px;
    transform: translate(-50%, -50%);
}

.gp-plus::after {
    width: 1.5px;
    height: 10px;
    transform: translate(-50%, -50%);
}

details[open] .gp-plus {
    transform: rotate(45deg);
    background-color: #4B2F79;
    border-color: #4B2F79 !important;
}

details[open] .gp-plus::before,
details[open] .gp-plus::after {
    background-color: #FFFFFF;
}

details[open] {
    border-bottom-color: #4B2F79 !important;
    background: linear-gradient(to right, rgba(75, 47, 121, 0.025), transparent 40%);
}

details[open] .gp-num {
    color: #4B2F79;
}

details[open] .gp-answer-body {
    animation: gpReveal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gpReveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.gp-num {
    font-feature-settings: "tnum";
}

.font-display {
    font-stretch: 84%;
}

/* ─── EXTENDED TEAM lists ─── */
.extend-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.extend-list li {
    font-family: var(--display);
    font-stretch: 84%;
    font-weight: 600;
    font-size: clamp(20px, 1.9vw, 26px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: #0F0A1A;
    padding: 16px 0;
    border-top: 1px solid #DDD8E8;
}

.extend-list li:last-child {
    padding-bottom: 0;
}

.extend-list--dark li {
    color: #FAF9FC;
    border-top-color: rgba(250, 249, 252, 0.16);
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .marquee-track {
        animation: none;
    }

    .js .reveal,
    .js .word-reveal .word>span,
    .js .gap-bar-fill,
    .method-rail-fill,
    .btn-primary .arrow,
    .btn-ghost .arrow,
    .gp-plus {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    details[open] .gp-plus {
        transform: rotate(45deg) !important;
    }

    details[open] .gp-answer-body {
        animation: none;
    }
}

/* ─── PRINT ─── */
@media print {

    .reveal,
    .word-reveal .word>span,
    .gap-bar-fill {
        opacity: 1 !important;
        transform: none !important;
    }

    .nav,
    .scroll-progress,
    .video-toggle,
    .marquee {
        display: none !important;
    }
}
