
/* ==========================================================================
   HERO — Premium 2026 (editorial layout, kinetic type, glass frame)
   Trends: text-first heroes, quiet motion, glass panels, status badges
   ========================================================================== */

/* --- Calmer background (editorial focus on typography) --- */
.hero--editorial #particleCanvas {
    display: none;
}

.hero--editorial #heroCanvas {
    opacity: 0.58;
    z-index: 2;
}

html[data-theme="light"] .hero--editorial #heroCanvas {
    opacity: 0.38;
}

@media (max-width: 768px) {
    .hero--editorial #heroCanvas {
        opacity: 0.42;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero--editorial #heroCanvas {
        display: none;
    }

    .hero--editorial .hero-hologram,
    .hero--editorial .hero-energy-grid,
    .hero--editorial .hero-background::before,
    .hero--editorial .hero-background::after {
        animation: none !important;
    }
}

.hero--editorial .hero-gradient-orb {
    opacity: 0.22 !important;
    filter: blur(80px);
}

.hero--editorial .hero-gradient-orb-3 {
    display: none;
}

.hero--editorial .hero-hologram {
    opacity: 0.35;
}

.hero--editorial .hero-energy-grid {
    opacity: 0.12;
}

.hero--editorial .hero-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
}

html[data-theme="light"] .hero--editorial .hero-vignette {
    background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 50%, rgba(250, 248, 245, 0.7) 100%);
}

/* --- Layout & spacing (floating nav clearance) --- */
.hero--editorial {
    padding: clamp(7rem, 14vh, 9rem) clamp(1.5rem, 4vw, 3rem) clamp(5rem, 10vh, 7rem);
    align-items: center;
}

/* Visible by default — overrides legacy styles.css hidden states */
.hero--editorial .hero-intro {
    opacity: 1;
    transform: none;
}

/* Editorial hero: avoid clipping display type at section edge */
.hero.hero--editorial {
    overflow-x: clip;
}

.hero.hero--editorial .hero-title,
.hero.hero--editorial .hero-title .title-line {
    text-wrap: nowrap;
}

@media (max-width: 768px) {
    .hero.hero--editorial .hero-title {
        letter-spacing: 0;
    }
}

.hero--editorial .hero-content {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
    overflow: visible;
}

/* --- Vertical ticker (desktop editorial accent) --- */
.hero-ticker {
    position: absolute;
    left: clamp(0.75rem, 2vw, 1.5rem);
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
    font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent-color);
    opacity: 0.45;
}

.hero-ticker span {
    display: inline-block;
    animation: heroTickerDrift 28s linear infinite;
}

@keyframes heroTickerDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Meta row & status badge --- */
.hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 2rem;
    margin-bottom: 2rem;
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hero-meta-label {
    font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-color);
    opacity: 0.85;
}

.hero-meta-value {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

html[data-theme="dark"] .hero-meta-value {
    color: rgba(255, 255, 255, 0.65);
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

a.hero-status--cta {
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.25s ease;
}

a.hero-status--cta:hover {
    color: var(--accent-color);
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.14);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

a.hero-status--cta:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.hero-status-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

a.hero-status--cta:hover .hero-status-arrow {
    transform: translateX(3px);
    opacity: 1;
}

html[data-theme="dark"] .hero-status {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(212, 175, 55, 0.1);
}

.hero-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    animation: heroStatusPulse 2.5s ease-in-out infinite;
}

@keyframes heroStatusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* --- Kinetic typography (container-aware, no glyph clipping) --- */
.hero--editorial .hero-text {
    container-type: inline-size;
    container-name: hero-text;
    min-width: 0;
    overflow: visible;
}

.hero--editorial .hero-title {
    font-size: clamp(3.25rem, 9.5vw, 8.75rem);
    line-height: 0.92;
    margin-bottom: 1.5rem;
    overflow: visible;
    text-wrap: nowrap;
    max-width: 100%;
    letter-spacing: -0.01em;
}

@supports (font-size: 1cqi) {
    .hero--editorial .hero-title {
        font-size: clamp(3.25rem, min(9.5vw, 20cqi), 8.75rem);
    }
}

.hero--editorial .title-line {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding-bottom: 0.1em;
    padding-right: 0.08em;
}

.hero--editorial .title-line--last {
    margin-top: -0.02em;
    /* Italic Bodoni overshoots right edge of layout box */
    padding-right: 0.22em;
}

.hero--editorial .hero-title-word {
    display: inline-block;
    will-change: transform;
    transform-origin: left bottom;
    padding-right: 0.02em;
}

.hero--editorial .hero-title-word--accent {
    font-style: italic;
    padding-right: 0.1em;
}

/* After reveal: no mask clipping on serifs */
.hero--editorial .hero-title.hero-title--revealed .title-line {
    overflow: visible;
}

@container hero-text (max-width: 480px) {
    .hero--editorial .hero-title {
        font-size: clamp(2.75rem, 16cqi, 4rem);
        letter-spacing: 0;
    }

    .hero--editorial .title-line--last {
        padding-right: 0.28em;
    }
}

@container hero-text (min-width: 481px) and (max-width: 720px) {
    .hero--editorial .hero-title {
        font-size: clamp(3rem, 18cqi, 6.5rem);
    }
}

/* --- Role accent --- */
.hero--editorial .role-text--accent {
    color: var(--accent-color) !important;
    -webkit-text-fill-color: var(--accent-color);
    opacity: 1 !important;
}

/* --- Credential pills --- */
.hero-credentials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.hero-credentials li {
    margin: 0;
}

.hero-credential {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 100px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease;
}

.hero-credential:hover {
    color: var(--accent-color);
    border-color: rgba(212, 175, 55, 0.45);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-1px);
}

.hero-credential:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

html[data-theme="light"] .hero-credential {
    background: rgba(10, 10, 10, 0.03);
    color: rgba(10, 10, 10, 0.65);
}

html[data-theme="dark"] .hero-credential {
    color: rgba(255, 255, 255, 0.55);
}

/* --- Quick paths (mirrors nav sections) --- */
.hero-paths {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.hero-path {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.hero-path:hover {
    color: var(--accent-color);
}

.hero-path:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    border-radius: 2px;
}

.hero-path-num {
    color: var(--accent-color);
    opacity: 0.75;
    font-size: 0.6rem;
}

.hero-path--accent {
    color: var(--accent-color);
    font-weight: 500;
}

.hero-path--accent:hover {
    color: #f4d03f;
}

/* --- Glass portrait frame --- */
.hero-frame {
    position: relative;
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .hero-frame {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow:
        0 24px 60px rgba(10, 10, 10, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-frame-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--accent-color);
    border-style: solid;
    opacity: 0.7;
    pointer-events: none;
}

.hero-frame-corner--tl {
    top: 10px;
    left: 10px;
    border-width: 1px 0 0 1px;
}

.hero-frame-corner--br {
    bottom: 10px;
    right: 10px;
    border-width: 0 1px 1px 0;
}

.hero-frame-label {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    z-index: 2;
    font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent-color);
    opacity: 0.7;
}

.hero--editorial .hero-image-wrapper {
    max-width: 100%;
}

.hero--editorial .image-container {
    margin-bottom: 0;
}

.hero--editorial .hero-image {
    border: none;
    filter: grayscale(15%) contrast(1.05);
}

.hero-stats--frame {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.hero--editorial .stat-box--link {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border-radius: 4px;
    padding: 0.35rem 0.25rem;
    margin: -0.35rem -0.25rem;
    transition:
        background 0.25s ease,
        transform 0.2s ease;
}

.hero--editorial .stat-box--link:hover {
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}

.hero--editorial .stat-box--link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.hero--editorial .stat-box--link .stat-value {
    transition: color 0.2s ease;
}

.hero--editorial .stat-box--link:hover .stat-value {
    color: #f4d03f;
}

.hero--editorial .hero-visual {
    opacity: 1;
    transform: none;
}

/* --- Hero CTA buttons (subtle premium) --- */
.hero--editorial .hero-btn-primary {
    gap: 0.6rem;
}

.hero--editorial .hero-btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero--editorial .hero-btn-primary:hover svg {
    transform: translateX(4px);
}

/* --- Scroll indicator (pill link) --- */
.hero--editorial .scroll-indicator {
    bottom: clamp(1.5rem, 4vh, 2.5rem);
    flex-direction: column-reverse;
    gap: 0.65rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.3s ease, background 0.3s ease;
}

html[data-theme="light"] .hero--editorial .scroll-indicator {
    background: rgba(255, 255, 255, 0.5);
}

.hero--editorial .scroll-indicator:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.08);
    transform: translateX(-50%) translateY(-2px);
}

.hero--editorial .scroll-indicator:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

.hero--editorial .scroll-text {
    font-family: var(--font-family-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    letter-spacing: 0.25em;
}

.hero--editorial .scroll-line {
    height: 28px;
}

/* Scroll hint visible without GSAP */
.hero--editorial .scroll-indicator {
    opacity: 1;
}

/* --- GSAP pending: hide until animated (set via JS, fallback = visible) --- */
html.hero-animate-pending .hero--editorial .hero-meta-row {
    opacity: 0;
    transform: translateY(16px);
}

html.hero-animate-pending .hero--editorial .hero-intro {
    opacity: 0;
    transform: translateY(16px);
}

html.hero-animate-pending .hero--editorial .intro-line {
    max-width: 0;
}

html.hero-animate-pending .hero--editorial .hero-title-word {
    transform: translateY(110%);
}

html.hero-animate-pending .hero--editorial .hero-role {
    opacity: 0;
    transform: translateX(-20px);
}

html.hero-animate-pending .hero--editorial .hero-description {
    opacity: 0;
    transform: translateY(16px);
}

html.hero-animate-pending .hero--editorial .hero-buttons {
    opacity: 0;
    transform: translateY(16px);
}

html.hero-animate-pending .hero--editorial .hero-credentials li {
    opacity: 0;
    transform: translateY(12px);
}

html.hero-animate-pending .hero--editorial .hero-paths {
    opacity: 0;
    transform: translateY(12px);
}

html.hero-animate-pending .hero--editorial .hero-frame {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
}

html.hero-animate-pending .hero--editorial .stat-box {
    opacity: 0;
    transform: translateY(12px);
}

html.hero-animate-pending .hero--editorial .scroll-indicator {
    opacity: 0;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .hero-ticker span {
        animation: none;
    }

    .hero-status-dot {
        animation: none;
    }

    html.hero-animate-pending .hero--editorial .hero-title-word,
    html.hero-animate-pending .hero--editorial .hero-meta-row,
    html.hero-animate-pending .hero--editorial .hero-intro,
    html.hero-animate-pending .hero--editorial .hero-role,
    html.hero-animate-pending .hero--editorial .hero-description,
    html.hero-animate-pending .hero--editorial .hero-buttons,
    html.hero-animate-pending .hero--editorial .hero-credentials li,
    html.hero-animate-pending .hero--editorial .hero-paths,
    html.hero-animate-pending .hero--editorial .hero-frame,
    html.hero-animate-pending .hero--editorial .stat-box,
    html.hero-animate-pending .hero--editorial .scroll-indicator {
        opacity: 1 !important;
        transform: none !important;
    }

    html.hero-animate-pending .hero--editorial .intro-line {
        max-width: 100px !important;
    }

    .hero--editorial .hero-title .title-line {
        overflow: visible !important;
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-ticker {
        display: none;
    }

    .hero--editorial .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero--editorial .hero-visual {
        order: -1;
        max-width: 380px;
        margin: 0 auto;
        width: 100%;
    }

    .hero--editorial .hero-text {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }

    .hero--editorial .hero-title {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .hero--editorial .title-line {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-meta-row {
        justify-content: center;
    }

    .hero--editorial .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero--editorial .hero-buttons {
        justify-content: center;
    }

    .hero-credentials {
        justify-content: center;
    }

    .hero-paths {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero--editorial {
        padding-top: 6.5rem;
        padding-left: max(1.25rem, env(safe-area-inset-left));
        padding-right: max(1.25rem, env(safe-area-inset-right));
    }

    .hero--editorial .hero-title {
        font-size: clamp(2.5rem, 11.5vw, 3.75rem);
        letter-spacing: 0;
    }

    .hero--editorial .title-line--last {
        padding-right: 0.32em;
    }

    .hero-frame-label {
        display: none;
    }
}
