/* ── Home Hero — "The Voice" (kinetic typography) ── */
.hero-voice {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: #050810;
    color: var(--color-white);
    overflow: hidden;
    font-family: var(--font-primary);
    isolation: isolate;
}

/* B&W photo backdrop — wrapper handles ken-burns drift; children crossfade. */
.hero-voice__photo-stack {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform: scale(1);
    animation: hvPhotoZoom 18s ease-in-out infinite alternate;
    will-change: transform;
}

.hero-voice__photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 38%;
    filter: brightness(0.55) contrast(1.05) blur(1px);
    opacity: 0;
    animation: hvPhotoCycle var(--hero-voice-cycle, 24s) infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* Single backdrop — no cycle, hold visible */
.hero-voice__photo:only-child {
    opacity: 1;
    animation: none;
}

@keyframes hvPhotoZoom {
    0%   { transform: scale(1); }
    100% { transform: scale(1.20); }
}

/* Tuned for N photos × 6s slots — visible window covers ~1/N of the cycle
   plus a small overlap with the next photo's fade-in. For N=3 (18s cycle):
   each photo fully visible 0.54s–6s, then crossfades into the next over ~0.7s. */
@keyframes hvPhotoCycle {
    0%   { opacity: 0; }
    3%   { opacity: 1; }
    33%  { opacity: 1; }
    37%  { opacity: 0; }
    100% { opacity: 0; }
}

/* Dark vignette + bottom fade so the type and ticker stay legible */
.hero-voice__vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 50%, transparent 0%, transparent 30%, rgba(5, 8, 16, 0.55) 75%, rgba(5, 8, 16, 0.85) 100%),
        linear-gradient(180deg, rgba(5, 8, 16, 0) 35%, rgba(5, 8, 16, 0.55) 75%, rgba(5, 8, 16, 0.92) 100%);
}

/* Golden glow spilling from the top — like morning sun */
.hero-voice__glow {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: screen;
    background:
        radial-gradient(ellipse 70% 45% at 52% -8%, rgba(232, 196, 134, 0.55) 0%, rgba(201, 169, 110, 0.32) 28%, rgba(201, 169, 110, 0.12) 55%, transparent 78%),
        radial-gradient(ellipse 50% 30% at 70% 0%, rgba(255, 222, 170, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 82% 88%, rgba(0, 229, 255, 0.06) 0%, transparent 60%);
    animation: hvGlowBreathe 9s ease-in-out infinite alternate;
}

@keyframes hvGlowBreathe {
    0%   { opacity: 0.85; }
    100% { opacity: 1; }
}

/* SVG fractal-noise grain */
.hero-voice__noise {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    opacity: 0.07;
    mix-blend-mode: screen;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* Stage that holds the kinetic word — vertically centred in upper area */
.hero-voice__stage {
    position: absolute;
    inset: 0 0 240px 0;
    display: grid;
    place-items: center;
    z-index: 3;
}

.hero-voice__word-stack {
    position: relative;
    width: 100%;
    height: 60vh;
    display: grid;
    place-items: center;
}

.hero-voice__word {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(72px, 20vw, 320px);
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: var(--color-warm-accent);
    white-space: nowrap;
    opacity: 0;
    text-shadow:
        0 2px 24px rgba(0, 0, 0, 0.45),
        0 0 80px rgba(232, 196, 134, 0.18);
    animation: hvWord var(--hero-voice-cycle, 24s) infinite cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

/* Tuned for N words × 6s slots — old word fully clears before the next slides
   in, with a brief breath of empty space between (about 0.25s on the 18s cycle). */
@keyframes hvWord {
    0%   { opacity: 0; transform: translateX(-40px); }
    3%   { opacity: 1; transform: translateX(0); }
    28%  { opacity: 1; transform: translateX(0); }
    32%  { opacity: 0; transform: translateX(40px); }
    100% { opacity: 0; transform: translateX(40px); }
}

/* Caption block (lead text + CTAs) — bottom-centre */
.hero-voice__caption {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
    width: min(680px, 88%);
}

.hero-voice__lead {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    max-width: 540px;
    margin: 0;
    text-wrap: balance;
}

.hero-voice__lead em {
    color: var(--color-warm-accent);
    font-style: italic;
}

.hero-voice__cta-rail {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-voice__cta {
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    padding: 1.05rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: var(--color-white);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

.hero-voice__cta--solid {
    background: var(--color-warm-accent);
    border-color: var(--color-warm-accent);
    color: var(--color-dark);
}

.hero-voice__cta:hover,
.hero-voice__cta:focus-visible {
    background: var(--color-white);
    color: var(--color-dark);
    border-color: var(--color-white);
    outline: none;
}

/* Index rail — ticks in sync with the active word */
.hero-voice__index-rail {
    position: absolute;
    top: 84px;
    right: 36px;
    z-index: 6;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.55);
}

.hero-voice__index-rail .row {
    display: flex;
    gap: 8px;
    align-items: center;
    opacity: 0.5;
    transition: color 0.35s ease, opacity 0.35s ease;
}

.hero-voice__index-rail .row .num {
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.hero-voice__index-rail .row .bar {
    width: 18px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
    transition: width 0.35s ease, opacity 0.35s ease, background-color 0.35s ease;
}

.hero-voice__index-rail .row.is-active {
    color: var(--color-warm-accent);
    opacity: 1;
}

.hero-voice__index-rail .row.is-active .bar {
    width: 36px;
    opacity: 1;
}

/* Bottom ticker — credentials marquee */
.hero-voice__ticker {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    overflow: hidden;
    height: 70px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-voice__ticker-track {
    display: flex;
    gap: 3rem;
    white-space: nowrap;
    padding-left: 3rem;
    animation: hvTicker 60s linear infinite;
    will-change: transform;
}

.hero-voice__ticker-track > span {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.hero-voice__ticker-track > span::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--color-warm-accent);
    transform: rotate(45deg);
}

@keyframes hvTicker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* RTL — flip the ticker direction and rail anchor so it still reads naturally */
[dir="rtl"] .hero-voice__index-rail {
    right: auto;
    left: 36px;
}

[dir="rtl"] .hero-voice__ticker-track {
    animation-direction: reverse;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
    .hero-voice__index-rail {
        top: 78px;
        right: 24px;
        gap: 12px;
    }
    [dir="rtl"] .hero-voice__index-rail { left: 24px; }
}

@media (max-width: 768px) {
    .hero-voice__stage {
        inset: 0 0 200px 0;
    }
    .hero-voice__caption {
        bottom: 96px;
        gap: var(--space-md);
        width: 90%;
    }
    .hero-voice__lead {
        font-size: 1rem;
    }
    .hero-voice__cta-rail {
        flex-direction: column;
        width: 100%;
    }
    .hero-voice__cta {
        width: 100%;
        text-align: center;
    }
    .hero-voice__index-rail {
        display: none;
    }
    .hero-voice__ticker {
        height: 56px;
    }
    .hero-voice__ticker-track > span {
        font-size: 0.6rem;
    }
}

/* ── Reduced motion — freeze drift / breathing / word & photo cycles ── */
@media (prefers-reduced-motion: reduce) {
    .hero-voice__photo-stack,
    .hero-voice__glow,
    .hero-voice__ticker-track {
        animation: none !important;
    }
    .hero-voice__photo,
    .hero-voice__word {
        animation: none !important;
        opacity: 0;
    }
    .hero-voice__photo:first-child,
    .hero-voice__word:first-child {
        opacity: 1;
        transform: none;
    }
}

/* ── Page Hero ───────────────────────────── */
.hero-page {
    position: relative;
    padding: var(--space-6xl) 0 var(--space-3xl);
    overflow: hidden;
    padding-top: calc(var(--header-height) + var(--space-5xl));
}

.hero-page__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-page__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.15;
}

.hero-page--no-image {
    background: var(--color-light-bg);
}

.hero-page__content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-page__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: var(--color-dark);
    margin-bottom: var(--space-md);
}

.hero-page__subtitle {
    font-size: var(--font-size-base);
    color: var(--color-text-light);
    font-weight: 300;
    max-width: 600px;
    margin-inline: auto;
}

/* ── Dark Hero Variant ─────────────────── */
.hero-page--dark {
    background: var(--color-dark);
    position: relative;
}

.hero-page--dark .hero-page__bg img {
    opacity: 0.35;
    filter: grayscale(40%);
}

.hero-page--dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.5) 0%,
        rgba(15, 23, 42, 0.55) 40%,
        rgba(15, 23, 42, 0.75) 100%
    );
    z-index: 0;
    pointer-events: none;
}

.hero-page--dark .hero-page__content {
    z-index: 2;
}

.hero-page--dark .hero-page__title {
    color: var(--color-white);
}

.hero-page--dark .hero-page__subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.hero-page--dark .breadcrumb a,
.hero-page--dark .breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

.hero-page--dark .breadcrumb a:hover {
    color: var(--color-white);
}

.hero-page--dark .breadcrumb__current {
    color: var(--color-accent);
}

@media (max-width: 768px) {
    .hero-page {
        padding-top: calc(var(--header-height) + var(--space-3xl));
        padding-bottom: var(--space-2xl);
    }
}
