/**
 * fp-hero-home.css
 * Part of SouthKorea theme — extracted from fp-hero-home.php
 * @package SouthKorea
 */

/* ═══════════════════════════════════════════════════
   HOMEPAGE HERO SLIDESHOW — .hph namespace
   Tokens from :root in style.css, not redeclared here
   ═══════════════════════════════════════════════════ */

.hph {
    position: relative;
    height: 100svh;
    min-height: 580px;
    max-height: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    max-width: none;
    isolation: isolate;
}

/* ── Stage stack ─────────────────────────────────── */
.hph-stages { position: absolute; inset: 0; z-index: 0; }

.hph-stage {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity .7s ease;
    pointer-events: none;
}
.hph-stage.is-active { opacity: 1; }

.hph-stage-img {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center 35%;
    transform: scale(1);
    transition: transform 7s ease;
    will-change: transform;
}
.hph-stage.is-active .hph-stage-img { transform: scale(1.06); }

.hph-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(4,6,12,.65) 0%,
        rgba(4,6,12,.35) 38%,
        rgba(4,6,12,.55) 62%,
        rgba(4,6,12,.93) 100%
    );
}

/* ── Zoom canvas ─────────────────────────────────── */
.hph-zoom-canvas {
    position: absolute; inset: 0;
    z-index: 5;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center 35%;
    pointer-events: none;
    opacity: 0;
    border-radius: 4px;
    will-change: clip-path, opacity, border-radius;
}

/* ── Inner content ───────────────────────────────── */
.hph-inner {
    position: relative; z-index: 10;
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
    gap: 0;
    padding: 30px 32px 0;
    width: 100%; max-width: 820px;
    box-sizing: border-box;
}

/* ── Pill ────────────────────────────────────────── */
.hph-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px;
    border: 1px solid rgba(255,255,255,.13);
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 99px;
    font-family: 'DM Sans', sans-serif;
    font-size: 10px; font-weight: 500;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: rgba(255,255,255,.55);
    margin-bottom: 22px;
    opacity: 0;
    animation: hphUp .8s cubic-bezier(.22,1,.36,1) forwards .15s;
}
.hph-pill-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--neon, #00c8ff);
    box-shadow: 0 0 8px rgba(0,200,255,.9);
    flex-shrink: 0;
    animation: hphPulse 2.4s ease-in-out infinite;
}

/* ── Headline ────────────────────────────────────── */
.hph-h1 {
    font-family: 'Bebas Neue', sans-serif;
    margin: 0 0 16px; line-height: 1;
    opacity: 0;
    animation: hphUp 1s cubic-bezier(.22,1,.36,1) forwards .3s;
}
.hph-h1-top {
    display: block;
    font-size: clamp(18px, 2.8vw, 38px);
    letter-spacing: clamp(4px, .8vw, 12px);
    color: rgba(255,255,255,.42);
    text-transform: uppercase; margin-bottom: 6px;
}
.hph-h1-main {
    display: block;
    font-size: clamp(52px, 8vw, 92px);
    letter-spacing: clamp(2px, .4vw, 6px);
    color: #fff;
    text-shadow: 0 2px 40px rgba(0,0,0,.4);
}
.hph-h1-main em {
    font-style: normal; color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,.55);
}
.hph-dot {
    color: var(--neon, #00c8ff);
    text-shadow: 0 0 28px rgba(0,200,255,.55);
    -webkit-text-stroke: 0;
}

/* ── Slide text transitions ──────────────────────── */
.hph-slide-title,
.hph-slide-sub,
.hph-slide-cta span {
    transition: opacity .28s ease, transform .32s cubic-bezier(.22,1,.36,1);
}
.hph-text-out .hph-slide-title,
.hph-text-out .hph-slide-sub,
.hph-text-out .hph-slide-cta span {
    opacity: 0; transform: translateY(8px);
}
.hph-text-in .hph-slide-title,
.hph-text-in .hph-slide-sub,
.hph-text-in .hph-slide-cta span {
    opacity: 1; transform: translateY(0);
}

/* ── Sub ─────────────────────────────────────────── */
.hph-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(12px, 1.4vw, 15px); font-weight: 300;
    color: rgba(255,255,255,.48); letter-spacing: .6px; line-height: 1.8;
    margin: 0 0 30px;
    opacity: 0;
    animation: hphUp 1s cubic-bezier(.22,1,.36,1) forwards .45s;
}

/* ── CTAs ────────────────────────────────────────── */
.hph-ctas {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; justify-content: center;
    margin: 0 0 28px;
    opacity: 0;
    animation: hphUp 1s cubic-bezier(.22,1,.36,1) forwards .6s;
}
.hph-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 30px;
    background: var(--neon, #00c8ff); color: #000;
    font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none;
    border: 2px solid transparent;
    transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .25s;
    white-space: nowrap; cursor: none;
}
.hph-btn-primary:hover {
    background: transparent; color: var(--neon, #00c8ff);
    border-color: var(--neon, #00c8ff); transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,200,255,.22);
}
.hph-btn-primary:active { transform: scale(.97); }

.hph-btn-ghost {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 13px 24px;
    background: transparent; color: rgba(255,255,255,.58);
    font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
    letter-spacing: .5px; text-decoration: none;
    border: 1px solid rgba(255,255,255,.16);
    transition: border-color .2s, color .2s, background .2s;
    white-space: nowrap; cursor: none;
}
.hph-btn-ghost:hover { border-color: rgba(255,255,255,.38); color: #fff; background: rgba(255,255,255,.05); }
.hph-btn-ghost svg { transition: transform .2s; }
.hph-btn-ghost:hover svg { transform: translateX(3px); }

/* ── Social proof ────────────────────────────────── */
.hph-proof {
    display: flex; align-items: center; gap: 10px;
    opacity: 0;
    animation: hphUp 1s cubic-bezier(.22,1,.36,1) forwards .75s;
}
.hph-avatars { display: flex; align-items: center; }
.hph-av {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid rgba(4,6,12,.6);
    object-fit: cover; display: block;
    margin-left: -7px; flex-shrink: 0;
    background: #1a2a3a; transition: transform .2s;
}
.hph-av:first-child { margin-left: 0; }
.hph-avatars:hover .hph-av { transform: translateY(-2px); }

.hph-proof-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.hph-stars { color: #f5c518; font-size: 10px; letter-spacing: 2px; line-height: 1; }
.hph-proof-label {
    font-family: 'DM Sans', sans-serif; font-size: 11px;
    color: rgba(255,255,255,.38); letter-spacing: .2px;
    white-space: nowrap; font-weight: 300;
}
.hph-count { font-weight: 600; color: rgba(255,255,255,.65); font-variant-numeric: tabular-nums; transition: color .15s ease; }
.hph-count--tick { color: var(--neon, #00c8ff); }

/* ══════════════════════════════════════════════════
   Thumbnail nav — vertical strip, right side
   ══════════════════════════════════════════════════ */
.hph-thumbs {
    position: absolute;
    top: 50%; right: 36px;
    transform: translateY(-50%)!important;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Entrance: slide in from right, staggered per-button */
    opacity: 0;
    animation: hphSlideRight .9s cubic-bezier(.22,1,.36,1) forwards 1s;
}

/* Individual thumb card */
.hph-thumb {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 160px;
    height: 56px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(6,8,14,.52);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
    cursor: none;
    flex-shrink: 0;
    /* Staggered entrance via CSS custom property set inline */
    opacity: 0;
    animation: hphSlideRight .7s cubic-bezier(.22,1,.36,1) forwards calc(1s + var(--stagger-delay, 0ms));
    transition:
        border-color .28s ease,
        background .28s ease,
        transform .35s cubic-bezier(.22,1,.36,1),
        box-shadow .35s ease;
    outline: none;
    /* Each card slides from right — composited on GPU */
    will-change: transform, opacity;
}
.hph-thumb:hover {
    border-color: rgba(255,255,255,.42);
    background: rgba(6,8,14,.72);
    transform: translateX(-5px);
    box-shadow: -6px 0 22px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.hph-thumb.is-active {
    border-color: var(--neon, #00c8ff);
    background: rgba(0,200,255,.06);
    box-shadow: -4px 0 24px rgba(0,200,255,.18), 0 0 0 1px rgba(0,200,255,.12) inset;
}
.hph-thumb:focus-visible {
    outline: 2px solid var(--neon, #00c8ff);
    outline-offset: 2px;
}

/* Thumbnail image block */
.hph-thumb-media {
    position: relative;
    flex-shrink: 0;
    width: 64px; height: 56px;
    overflow: hidden;
}
.hph-thumb-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    filter: brightness(.6) saturate(1.1);
    transition: filter .35s ease, transform .6s cubic-bezier(.22,1,.36,1);
    will-change: filter, transform;
}
.hph-thumb:hover .hph-thumb-img { filter: brightness(.85) saturate(1.3); transform: scale(1.08); }
.hph-thumb.is-active .hph-thumb-img { filter: brightness(.9) saturate(1.4); }

/* City info */
.hph-thumb-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 6px;
    min-width: 0;
}
.hph-thumb-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px; font-weight: 700;
    letter-spacing: 1.8px; text-transform: uppercase;
    color: rgba(255,255,255,.82);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .2s;
}
.hph-thumb-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 9px; font-weight: 400;
    letter-spacing: 1px;
    color: rgba(255,255,255,.3);
    white-space: nowrap;
    transition: color .2s;
}
.hph-thumb.is-active .hph-thumb-label { color: #fff; }
.hph-thumb.is-active .hph-thumb-sub   { color: rgba(0,200,255,.6); }
.hph-thumb:hover .hph-thumb-label     { color: #fff; }

/* Progress bar — left edge vertical fill */
.hph-thumb-progress {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 2px;
    background: rgba(255,255,255,.07);
}
.hph-thumb-bar {
    width: 100%; height: 0%;
    background: linear-gradient(to bottom, var(--neon, #00c8ff), rgba(0,200,255,.5));
    box-shadow: 0 0 6px rgba(0,200,255,.6);
    transition: none; /* driven by rAF */
}

/* Active glow dot top-right corner */
.hph-thumb-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--neon, #00c8ff);
    box-shadow: 0 0 8px rgba(0,200,255,.9);
    opacity: 0;
    transform: scale(0);
    transition: opacity .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.hph-thumb.is-active .hph-thumb-dot {
    opacity: 1;
    transform: scale(1);
    animation: hphPulse 2.4s ease-in-out infinite;
}

/* ── Trust strip ─────────────────────────────────── */
.hph-trust {
    position: absolute; bottom: 0; left: 0; right: 0;
    z-index: 10; display: flex; justify-content: center;
    background: rgba(6,8,14,.75);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,.07);
    opacity: 0;
    animation: hphFade 1s ease forwards 1.15s;
}
.hph-trust-item {
    display: flex; align-items: center; gap: 7px;
    padding: 12px 20px;
    border-right: 1px solid rgba(255,255,255,.06);
    transition: background .2s; cursor: default;
}
.hph-trust-item:last-child { border-right: none; }
.hph-trust-item:hover { background: rgba(0,200,255,.04); }
.hph-trust-icon { font-size: 14px; line-height: 1; opacity: .7; }
.hph-trust-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
    color: rgba(255,255,255,.34); font-weight: 500; white-space: nowrap;
}

/* ── Scroll hint ─────────────────────────────────── */
.hph-scroll {
    position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%);
    z-index: 10;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    pointer-events: none;
    opacity: 0; animation: hphFade 1s ease forwards 1.6s;
}
.hph-scroll span {
    font-family: 'DM Sans', sans-serif; font-size: 9px;
    letter-spacing: 3px; text-transform: uppercase; color: rgba(255,255,255,.2);
}
.hph-scroll-line {
    width: 1px; height: 26px;
    background: linear-gradient(to bottom, rgba(0,200,255,.45), transparent);
    animation: hphScrollLine 2s ease-in-out infinite;
}

/* ── Photo credit (KOGL Type 1 attribution) ──────── */
.hph-credit {
    position: absolute;
    bottom: 6px; right: 10px;
    z-index: 15;
    margin: 0; padding: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 9px; font-weight: 400;
    letter-spacing: .4px;
    color: rgba(255,255,255,.28);
    pointer-events: none;
    /* Fade in with page, swap with same crossfade as other slide text */
    opacity: 0;
    animation: hphFade .8s ease forwards 1.2s;
    transition: opacity .3s ease, transform .3s ease;
    white-space: nowrap;
    /* Keep above trust strip on desktop */
    bottom: 52px;
}
/* Hidden state when credit string is empty */
.hph-credit--hidden {
    opacity: 0 !important;
    animation: none;
}
/* Crossfade states — driven by same .hph-text-out / .hph-text-in on .hph-inner
   Credit sits outside .hph-inner so we toggle it separately in JS */
.hph-credit.hph-credit--out {
    opacity: 0;
    transform: translateY(4px);
}
.hph-credit.hph-credit--in {
    opacity: 1;
    transform: translateY(0);
}
/* On mobile push above the thumb strip */
@media (max-width: 768px) {
    .hph-credit { bottom: 116px; right: 8px; }
}
@media (max-width: 480px) {
    .hph-credit { bottom: 108px; font-size: 8px; right: 50%; transform: translateX(50%) !important;}
}

/* ── Keyframes ───────────────────────────────────── */
@keyframes hphUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes hphFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hphPulse {
    0%,100% { opacity: .6; transform: scale(1); }
    50%      { opacity: 1;  transform: scale(1.35); }
}
@keyframes hphScrollLine {
    0%,100% { opacity: .35; transform: scaleY(1); }
    50%      { opacity: 1;   transform: scaleY(1.15) translateY(2px); }
}
/* Right-side nav entrance: slides in from right */
@keyframes hphSlideRight {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Light mode ──────────────────────────────────── */
@media (prefers-color-scheme: light) {
    .hph-overlay {
        background: linear-gradient(to bottom, rgba(4,6,12,.52) 0%, rgba(4,6,12,.30) 38%, rgba(4,6,12,.54) 62%, rgba(4,6,12,.90) 100%);
    }
    .hph-trust { background: rgba(8,10,18,.80); }
    .hph-pill  { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
}
.light-mode .hph-overlay {
    background: linear-gradient(to bottom, rgba(4,6,12,.48) 0%, rgba(4,6,12,.26) 38%, rgba(4,6,12,.52) 62%, rgba(4,6,12,.88) 100%);
}
.light-mode .hph-trust { background: rgba(8,10,18,.80); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 1200px) {
    .hph-thumbs { right: 20px; gap: 8px; }
    .hph-thumb  { width: 140px; }
}

@media (max-width: 1024px) {
    .hph-inner  { padding-top: 80px; max-width: 680px; }
    .hph-thumbs { right: 16px; }
    .hph-thumb  { width: 130px; height: 50px; }
    .hph-thumb-media { width: 56px; height: 50px; }
    .hph-trust-item { padding: 11px 15px; }
}

@media (max-width: 768px) {
    .hph { max-height: none; }
    .hph-inner { padding: 76px 24px 0; }
    .hph-h1-main { letter-spacing: 1px; }
    .hph-sub { letter-spacing: .3px; margin-bottom: 22px; }
    /* Move nav to bottom on tablet — compact horizontal strip */
    .hph-thumbs {
        top: auto; right: auto; bottom: 56px; left: 50%;
        transform: translateX(-50%)!important;
        flex-direction: row;
        gap: 7px;
        animation: hphFade 1s ease forwards 1s;
    }
    .hph-thumb {
        width: 80px; height: 52px;
        flex-direction: column;
        animation: hphFade .7s ease forwards calc(1s + var(--stagger-delay, 0ms));
    }
    .hph-thumb:hover { transform: translateY(-4px) scale(1.04); }
    .hph-thumb-media { width: 80px; height: 52px; }
    .hph-thumb-info { display: none; }
    .hph-thumb-progress {
        top: auto; left: 0; right: 0; bottom: 0;
        width: auto; height: 2px;
    }
    .hph-thumb-bar { width: 0%; height: 100%; }
    .hph-thumb-dot { top: 4px; right: 4px; }
    .hph-trust { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
    .hph-trust::-webkit-scrollbar { display: none; }
    .hph-trust-item:first-child { padding-left: 20px; }
    .hph-trust-item:last-child  { padding-right: 20px; }
    .hph-scroll { display: none; }
}

@media (max-width: 480px) {
    .hph { justify-content: flex-end; padding-bottom: 110px; max-height: none; }
    .hph-inner { text-align: left; align-items: flex-start; padding: 0 20px 20px; max-width: 100%; }
    .hph-pill  { font-size: 9px; letter-spacing: 2px; margin-bottom: 14px; }
    .hph-h1-main { font-size: clamp(44px, 13vw, 64px); }
    .hph-h1 { margin-bottom: 10px; }
    .hph-sub { margin-bottom: 18px; max-width: 100%; }
    .hph-ctas { flex-direction: column; align-items: stretch; width: 100%; margin-bottom: 18px; }
    .hph-btn-primary, .hph-btn-ghost { justify-content: center; width: 100%; }
    .hph-proof { align-self:center; }
    .hph-thumbs { bottom: 50px; gap: 5px; }
    .hph-thumb  { width: 62px; height: 44px; }
    .hph-thumb-media { width: 62px; height: 44px; }
    .hph-thumb-dot { display: none; }
}

/* Reduced motion: disable zoom & ken-burns, keep crossfade */
@media (prefers-reduced-motion: reduce) {
    .hph-pill, .hph-h1, .hph-sub, .hph-ctas, .hph-proof, .hph-trust, .hph-scroll, .hph-thumbs, .hph-thumb, .hph-credit {
        animation: none; opacity: 1;
    }
    .hph-credit--hidden { opacity: 0 !important; }
    .hph-pill-dot { animation: none; opacity: .8; }
    .hph-scroll-line { animation: none; opacity: .4; }
    .hph-stage     { transition: opacity .4s ease; }
    .hph-stage-img { transition: none; transform: scale(1) !important; }
    .hph-zoom-canvas { display: none !important; }
    .hph-count { transition: none; }
    .hph-slide-title, .hph-slide-sub, .hph-slide-cta span { transition: none; }
    .hph-thumb-dot { animation: none; }
    .hph-thumb-img { transition: none; }
}