/* ═════════════════════════════════════════════════════
   HALO GROUP — Shared design tokens & motion utilities
   Used by index.html and dubi.html
   ═════════════════════════════════════════════════════ */

:root {
    --halo-sand: #c4a882;
    --halo-sand-muted: rgba(196, 168, 130, 0.65);
    --halo-marina: #0d3b4c;
    --halo-dusk: #1a1028;
    --halo-cream: #f5f0e8;
    --halo-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --halo-ease-spring: cubic-bezier(0.2, 1, 0.3, 1);
    --halo-body-size: 1.05rem;
    --halo-body-lh: 1.75;
}

/* ── Scroll progress ── */
.halo-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 10001;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.06);
}

.halo-scroll-progress__bar {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--gold-grad, linear-gradient(90deg, #c89938, #ffec93, #c89938));
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.45);
    transition: width 0.08s linear;
}

/* ── Hero scroll cue ── */
.halo-scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 12;
    opacity: 0;
    animation: haloCueIn 1.2s var(--halo-ease-out) 1.4s forwards;
}

.halo-scroll-cue span:first-child {
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--halo-sand-muted);
    font-family: 'Montserrat', 'Inter', sans-serif;
}

.halo-scroll-cue__line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--halo-sand), transparent);
    animation: haloCuePulse 2s ease-in-out infinite;
}

@keyframes haloCueIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes haloCuePulse {
    0%, 100% { transform: scaleY(1); opacity: 0.7; }
    50% { transform: scaleY(0.55); opacity: 1; }
}

/* ── Cinematic grain (hero only) ── */
.halo-grain::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0.035;
    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='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* ── Split-text reveal ── */
[data-halo-split] .halo-split__unit {
    display: inline-block;
    opacity: 0;
    transform: translateY(1.1em);
    filter: blur(6px);
}

[data-halo-split].halo-split--ready .halo-split__unit {
    animation: haloSplitReveal 0.9s var(--halo-ease-out) forwards;
    animation-delay: calc(var(--halo-i, 0) * 0.045s + 0.15s);
}

.hero h1 .halo-split__unit,
.hd-hero__title-line .halo-split__unit {
    background: var(--gold-grad, linear-gradient(90deg, #c89938, #ffec93, #c89938));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes haloSplitReveal {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ── Stagger children on scroll ── */
[data-halo-stagger] > * {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.85s var(--halo-ease-out), transform 0.85s var(--halo-ease-out);
    transition-delay: calc(var(--halo-i, 0) * 0.08s);
}

[data-halo-stagger].halo-stagger--visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ── Scroll storytelling blocks ── */
[data-halo-scroll] {
    --halo-scroll-p: 0;
}

[data-halo-scroll] .halo-scroll__pin {
    will-change: transform, opacity;
    transition: transform 0.1s linear, opacity 0.1s linear;
}

/* ── 3D tilt cards ── */
.halo-tilt-card {
    transform-style: preserve-3d;
    transition: box-shadow 0.4s var(--halo-ease-out);
}

.halo-tilt-card.is-tilting {
    transition: box-shadow 0.4s var(--halo-ease-out);
}

.halo-tilt-card:hover {
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(201, 168, 76, 0.15);
}

/* ── Section rhythm: light corporate band ── */
.halo-section--sand {
    background: linear-gradient(165deg, var(--halo-dusk) 0%, #12100e 40%, #0a0908 100%);
    position: relative;
}

.halo-section--sand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 20% 0%, rgba(196, 168, 130, 0.08), transparent 60%);
    pointer-events: none;
}

/* ── Eyebrow label (corporate) ── */
.halo-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--halo-sand);
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-weight: 500;
    margin-bottom: 12px;
}

/* ── Section titles: solid white (reserve gold for hero) ── */
.halo-title-section {
    color: var(--white, #fff);
    font-weight: 600;
}

.halo-title-section .halo-title-accent {
    color: var(--halo-sand);
    font-style: italic;
}

/* ── Card hover line (replaces generic +) ── */
.halo-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--halo-sand);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s var(--halo-ease-out), transform 0.4s var(--halo-ease-out);
}

.halo-tilt-card:hover .halo-card-action,
.dest-card:hover .halo-card-action {
    opacity: 1;
    transform: translateY(0);
}

.halo-card-action__line {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--halo-sand);
    transition: width 0.4s var(--halo-ease-out);
}

.halo-tilt-card:hover .halo-card-action__line,
.dest-card:hover .halo-card-action__line {
    width: 40px;
}

@media (prefers-reduced-motion: reduce) {
    .halo-scroll-cue,
    .halo-scroll-cue__line,
    [data-halo-split] .halo-split__unit,
    [data-halo-stagger] > * {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .halo-scroll-progress__bar {
        transition: none;
    }
}
