/* ─── Hero Kinetic Animation ─────────────────────────────── */

/* ─── Text Selection ─────────────────────────────────────── */
::selection {
    background: #ffd709;
    color: #111111;
}
::-moz-selection {
    background: #ffd709;
    color: #111111;
}

/* Invert selection on elements with solid yellow backgrounds or text to maintain contrast */
[style*="background:#ffd709"],
.chip-ai,
.btn-primary {
    & ::selection {
        background: #2d2f2f;
        color: #ffd709;
    }
    & ::-moz-selection {
        background: #2d2f2f;
        color: #ffd709;
    }
}

[style*="background:#ffd709"]::selection,
.chip-ai::selection,
.btn-primary::selection {
    background: #111111;
    color: #ffd709;
}
[style*="background:#ffd709"]::-moz-selection,
.chip-ai::-moz-selection,
.btn-primary::-moz-selection {
    background: #111111;
    color: #ffd709;
}

/* Explicit override for the dark CTA button in the audit section */
#audit .btn-primary::selection,
#audit .btn-primary *::selection {
    background: #ffd709;
    color: #2d2f2f;
}
#audit .btn-primary::-moz-selection,
#audit .btn-primary *::-moz-selection {
    background: #ffd709;
    color: #2d2f2f;
}

/* Ensure yellow text/icons select with a yellow background and turn black */
[style*="color:#ffd709"]::selection,
[style*="color:#ffd709"] *::selection {
    background: #ffd709;
    color: #2d2f2f;
}
[style*="color:#ffd709"]::-moz-selection,
[style*="color:#ffd709"] *::-moz-selection {
    background: #ffd709;
    color: #2d2f2f;
}


.hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 215, 9, 0.25);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ring-spin 12s linear infinite;
}

.hero-ring-lg {
    width: 440px;
    height: 440px;
    animation-duration: 18s;
    border-color: rgba(255, 215, 9, 0.18);
}

.hero-ring-md {
    width: 280px;
    height: 280px;
    animation-duration: 11s;
    animation-direction: reverse;
    border-color: rgba(255, 215, 9, 0.3);
}

@keyframes ring-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Morphing core */
.hero-core {
    width: 96px;
    height: 96px;
    background: #ffd709;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: hero-morph 5s ease-in-out infinite;
    box-shadow: 0 0 48px rgba(255, 215, 9, 0.55), 0 0 90px rgba(255, 215, 9, 0.15);
    position: relative;
    z-index: 2;
}

@keyframes hero-morph {
    0%   { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    25%  { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    50%  { border-radius: 30% 60% 30% 70% / 50% 60% 30% 40%; }
    75%  { border-radius: 60% 40% 60% 40% / 60% 40% 60% 40%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}

/* Orbiting nodes — driven by CSS custom properties */
.hero-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--size, 12px);
    height: var(--size, 12px);
    background: #ffd709;
    border-radius: 50%;
    transform-origin: 0 0;
    animation: hero-orbit 6s linear var(--delay, 0s) infinite;
    box-shadow: 0 0 12px rgba(255, 215, 9, 0.6);
    margin-left: calc(var(--size, 12px) / -2);
    margin-top: calc(var(--size, 12px) / -2);
}

@keyframes hero-orbit {
    0%   { transform: rotate(0deg)   translateX(var(--radius, 100px)) rotate(0deg);    }
    100% { transform: rotate(360deg) translateX(var(--radius, 100px)) rotate(-360deg); }
}

/* Mobile scaling for Hero Animation */
@media (max-width: 768px) {
    .hero-ring-lg { width: 320px; height: 320px; }
    .hero-ring-md { width: 200px; height: 200px; }
    .hero-core { width: 72px; height: 72px; font-size: 1.25rem !important; }
    .hero-node { width: 44px !important; height: 44px !important; }
    .hero-node img { width: 24px !important; height: 24px !important; }
    
    /* We'll override the --radius variables in the HTML or add class overrides */
    .hero-node.node-outer { --radius: 155px !important; }
    .hero-node.node-inner { --radius: 100px !important; }
}



:root {
    --white:   #ffffff;
    --yellow:  #ffd709;
    --black:   #111111;

    /* Tonal shades derived from the three core colors */
    --yellow-light: rgba(255, 215, 9, 0.10);   /* very faint yellow for backgrounds */
    --yellow-mid:   rgba(255, 215, 9, 0.3);    /* chip/card accent */
    --yellow-glow:  rgba(255, 215, 9, 0.18);
    --black-muted:  rgba(17, 17, 17, 0.5);     /* secondary text */
    --black-faint:  rgba(17, 17, 17, 0.06);    /* subtle section bg shift */
    --line-ghost:   rgba(17, 17, 17, 0.10);

    --ambient-shadow: 0 20px 40px rgba(17, 17, 17, 0.08);
    --nav-height: 72px;
}

/* ─── Reset ─────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--white);
    color: var(--black);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.02em;
}

/* ─── Typography ─────────────────────────────────────────── */
.display-lg {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

@media (min-width: 768px) {
    .display-lg {
        font-size: 4rem;
    }
}

.headline-lg {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ─── Navigation ─────────────────────────────────────────── */
.nav-glass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fffef8;
    border-bottom: 1px solid rgba(17,17,17,0.03);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s ease, box-shadow 0.4s ease;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-hidden {
    transform: translateY(-100%);
}

.nav-scrolled {
    box-shadow: var(--ambient-shadow);
    background: var(--white);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    font-family: 'Manrope', sans-serif;
    letter-spacing: -0.01em;
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--black-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--yellow);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--black);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 3rem;
}

@media (min-width: 992px) {
    .nav-desktop {
        display: flex;
    }
}

#mobileMenuToggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    color: var(--black);
    z-index: 2000;
}

@media (min-width: 992px) {
    #mobileMenuToggle {
        display: none;
    }
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
    background: var(--yellow);
    color: var(--black);
    padding: 1rem 2.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--yellow);
    cursor: pointer;
    letter-spacing: -0.01em;
}

.btn-primary:hover {
    background: var(--black);
    border-color: var(--black);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--black);
    padding: 1rem 2.5rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--line-ghost);
    transition: all 0.25s ease;
    letter-spacing: -0.01em;
}

.btn-secondary:hover {
    border-color: var(--black);
    background: var(--black);
    color: var(--white);
}

/* ─── Chip / Pill ────────────────────────────────────────── */
.chip-ai {
    background-color: var(--yellow);
    color: var(--black);
    padding: 0.45rem 1.1rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Manrope', sans-serif;
}

.chip-ai::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--black);
    border-radius: 50%;
    opacity: 0.5;
}

/* ─── Cards ──────────────────────────────────────────────── */
.editorial-card {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--line-ghost);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.editorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(17, 17, 17, 0.1);
    border-color: var(--yellow);
}

/* ─── Case Studies ───────────────────────────────────────── */
.case-study-row {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.case-study-image-container {
    transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
    box-shadow: 0 32px 64px rgba(17, 17, 17, 0.04);
}

.case-study-row:hover .case-study-image-container {
    transform: scale(1.02);
    box-shadow: 0 40px 80px rgba(17, 17, 17, 0.08);
}

.case-study-row .btn-secondary:hover {
    gap: 1.25rem !important;
    color: var(--yellow) !important;
}

@media (max-width: 992px) {
    .case-study-row {
        gap: 2.5rem !important;
        flex-direction: column !important;
    }
    .case-study-row:nth-child(even) {
        flex-direction: column !important;
    }
    .case-study-image-container {
        aspect-ratio: 4/3 !important;
    }
}

/* ─── AI Glow ────────────────────────────────────────────── */
.ai-glow {
    position: absolute;
    width: 480px;
    height: 480px;
    background: var(--yellow);
    filter: blur(100px);
    opacity: 0.12;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* ─── Section backgrounds ────────────────────────────────── */
/* alternate sections get a barely-there yellow wash */
.section-alt {
    background-color: var(--yellow-light);
}

/* Dark section (stats) */
.section-dark {
    background-color: var(--black);
    color: var(--white);
}

/* ─── Layout ─────────────────────────────────────────────── */
.container-editorial {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container-editorial {
        padding: 0 2.5rem;
    }
}

/* ─── Grid Utilities ─────────────────────────────────────── */
.grid-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

@media (min-width: 1024px) {
    .grid-stack-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.section-padding {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 8rem 0;
    }
}

/* ─── Material icons ─────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* ─── Logo ───────────────────────────────────────────────── */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--white); }
::-webkit-scrollbar-thumb { background: var(--yellow); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--black); }

/* ─── Kinetic animation (testimonials) ───────────────────── */
.kinetic-animation-container {
    width: 140px;
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kinetic-core {
    width: 48px;
    height: 48px;
    background-color: var(--yellow);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 5s ease-in-out infinite;
    box-shadow: 0 0 32px rgba(255, 215, 9, 0.5);
}

@keyframes morph {
    0%   { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    33%  { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    66%  { border-radius: 30% 60% 30% 70% / 50% 60% 30% 40%; }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
}

.kinetic-node {
    position: absolute;
    border-radius: 50%;
    animation: orbit 4s linear infinite;
}

.kinetic-node:nth-child(2) {
    width: 12px; height: 12px;
    background: var(--yellow);
    animation-delay: 0s;
}
.kinetic-node:nth-child(3) {
    width: 8px; height: 8px;
    background: var(--black);
    opacity: 0.6;
    animation-delay: -1s;
}
.kinetic-node:nth-child(4) {
    width: 10px; height: 10px;
    background: var(--yellow);
    opacity: 0.4;
    animation-delay: -2s;
}
.kinetic-node:nth-child(5) {
    width: 6px; height: 6px;
    background: var(--black);
    opacity: 0.3;
    animation-delay: -3s;
}

@keyframes orbit {
    0%   { transform: rotate(0deg)   translateX(52px) rotate(0deg);    opacity: 0.5; }
    50%  { transform: rotate(180deg) translateX(60px) rotate(-180deg); opacity: 1;   }
    100% { transform: rotate(360deg) translateX(52px) rotate(-360deg); opacity: 0.5; }
}

/* ─── Section transitions ────────────────────────────────── */
section { transition: background-color 0.4s ease; }

/* ─── Mobile Hero Spacing ────────────────────────────────── */
@media (max-width: 768px) {
    #hero-section {
        padding-top: 8rem !important;
        align-items: flex-start !important;
        min-height: auto !important;
    }
}
