/* ================================================
   KAKAO Productions - custom.css
   Base theme layer and component polish
   ================================================ */

/* Show key content when JavaScript is disabled */
.no-js .reveal,
.no-js .reveal-left,
.no-js .reveal-right,
.no-js .reveal-scale,
.no-js .hero-content-wrap .hero-eyebrow,
.no-js .hero-content-wrap .hero-subtitle,
.no-js .hero-content-wrap .hero-ctas,
.no-js .hero-content-wrap .hero-scroll {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Reduce perceived font swap by using close fallback stacks */
html,
body {
    font-family: 'Outfit', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-synthesis: none;
}

.font-display {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

.hero-content-wrap {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
}

.hero-title {
    margin: 0 0 clamp(1rem, 2.8vw, 2rem);
    line-height: 1.02;
    letter-spacing: 0.015em;
    text-wrap: balance;
}

.hero-title .hero-word:last-child {
    letter-spacing: 0.12em;
    line-height: 1.2;
}

.hero-subtitle {
    max-width: min(100%, 760px);
    margin-inline: auto;
    margin-bottom: clamp(1.5rem, 3.2vw, 2.5rem);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(0.85rem, 1.5vw, 1.2rem);
    width: 100%;
}

.hero-ctas> a,
.hero-ctas> button {
    justify-content: center;
}

.hero-scroll {
    opacity: 0.88;
}

@media (max-width: 768px) {
    .hero-content-wrap {
        padding-top: 120px;
    }

    .hero-title .hero-word:last-child {
        font-size: clamp(1.35rem, 7.1vw, 2rem) !important;
        letter-spacing: 0.08em !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
        max-width: 360px;
        margin-inline: auto;
    }

    .hero-ctas> a,
    .hero-ctas> button {
        width: 100%;
    }

    .hero-scroll {
        position: static !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin-top: 0.75rem;
    }
}

/* ── CSS Variables ─────────────────────────────── */
:root {
    --kakao-dark: #050A24;
    --kakao-darker: #03061A;
    --kakao-brown: #0B1A45;
    --kakao-gold: #60A5FA;
    --kakao-golden: #93C5FD;
    --kakao-orange: #3B82F6;
    --kakao-cream: #E6F0FF;
    --kakao-muted: #7DA9D9;
    --nav-height: 80px;
}

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--kakao-darker);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--kakao-gold), var(--kakao-orange));
    border-radius: 3px;
}

/* ── Selection ─────────────────────────────────── */
::selection {
    background: rgba(96, 165, 250, 0.3);
    color: var(--kakao-cream);
}

/* ── Scroll Reveal ─────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

.delay-600 {
    transition-delay: 0.6s;
}

/* ── Gradient Text ──────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #60A5FA 0%, #93C5FD 50%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(260deg, #60A5FA, #93C5FD, #3B82F6, #60A5FA);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    will-change: background-position;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ── Glassmorphism ──────────────────────────────── */
.glass {
    background: rgba(11, 26, 69, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 165, 250, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glass-gold {
    background: rgba(96, 165, 250, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(96, 165, 250, 0.25);
}

.glass-hover {
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    will-change: background, border-color, box-shadow, transform;
}

.glass-hover:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(96, 165, 250, 0.15);
    transform: translateY(-4px);
}

/* ── Glow Effects ───────────────────────────────── */
.glow-gold {
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.3), 0 0 60px rgba(96, 165, 250, 0.15);
}

.glow-orange {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3), 0 0 60px rgba(59, 130, 246, 0.1);
}

.text-glow {
    text-shadow: 0 0 20px rgba(96, 165, 250, 0.5), 0 0 40px rgba(96, 165, 250, 0.3);
}

/* ── Buttons ────────────────────────────────────── */
.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 34px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    cursor: pointer;
}

.btn-primary {
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(135deg, #60A5FA, #93C5FD);
    color: #050A24;
    will-change: transform, box-shadow;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #93C5FD, #3B82F6);
    opacity: 0;
    transition: opacity 0.25s ease;
    will-change: opacity;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 34px rgba(96, 165, 250, 0.32);
}

.btn-outline {
    border: 2px solid rgba(96, 165, 250, 0.5);
    background: transparent;
    color: #60A5FA;
    will-change: transform, border-color, background, box-shadow;
}

.btn-outline:hover {
    border-color: rgba(96, 165, 250, 0.9);
    background: rgba(96, 165, 250, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(96, 165, 250, 0.18);
}

.btn-primary span,
.btn-outline span {
    position: relative;
    z-index: 1;
}

.btn-primary:focus-visible,
.btn-outline:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.85);
    outline-offset: 3px;
}

.btn-lg {
    min-height: 58px;
    padding-inline: 42px;
    font-size: 1rem;
}

.kakao-button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.kakao-evento-card {
    margin-bottom: 1.25rem;
    border-radius: 1.25rem !important;
    border: 1px solid rgba(96, 165, 250, 0.18) !important;
    background: linear-gradient(135deg, rgba(11, 26, 69, 0.82), rgba(22, 8, 0, 0.72)) !important;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.3);
}

.kakao-evento-date {
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.03));
    border-right: 1px solid rgba(96, 165, 250, 0.14);
}

.kakao-evento-card:hover {
    border-color: rgba(96, 165, 250, 0.32) !important;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
}

.kakao-evento-card .btn-primary,
.kakao-evento-card .btn-outline {
    min-width: 172px;
}

.kakao-evento-card-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.kakao-evento-card-action {
    align-self: center;
    margin: 0 1.5rem 1.5rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.58rem 1.45rem;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    background: rgba(96, 165, 250, 0.03);
    color: var(--kakao-muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.filter-btn:hover {
    color: var(--kakao-gold);
    border-color: rgba(96, 165, 250, 0.62);
}

.filter-btn.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #60A5FA, #93C5FD);
    color: #050A24;
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.22);
}

.show-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-social-link:hover {
    background: rgba(96, 165, 250, 0.25) !important;
    border-color: rgba(96, 165, 250, 0.6) !important;
}

.contact-social-pill:hover {
    background: linear-gradient(135deg, #60A5FA, #93C5FD);
    border-color: transparent !important;
    color: #050A24;
}

.hero-scroll-line {
    background: rgba(96, 165, 250, 0.2);
}

.hero-scroll-indicator {
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(300%);
    }
}

@media (max-width: 900px) {
    .btn-lg {
        min-height: 52px;
        padding-inline: 28px;
        font-size: 0.9375rem;
    }

    .kakao-evento-card {
        padding: 0 !important;
    }

    .kakao-evento-date {
        width: 8rem !important;
        min-width: 8rem;
        padding: 1rem 0.65rem !important;
    }

    .kakao-evento-card .btn-primary,
    .kakao-evento-card .btn-outline {
        width: 100%;
        min-width: 0;
    }

    .kakao-evento-card-action {
        margin: 0 1.2rem 1.2rem;
    }

    .kakao-evento-card-cta {
        width: 100%;
        align-items: stretch;
    }
}

@media (min-width: 768px) {
    .kakao-evento-card-action {
        margin: 0 2rem 0 0;
    }
}

/* ── Section Dividers ───────────────────────────── */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.3), transparent);
    margin: 0 auto;
}

/* ── Ticker ─────────────────────────────────────── */
.ticker-wrapper {
    overflow: hidden;
    white-space: nowrap;
    background: rgba(96, 165, 250, 0.08);
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    border-bottom: 1px solid rgba(96, 165, 250, 0.2);
    padding: 12px 0;
}

.ticker-inner {
    display: inline-flex;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.ticker-wrapper:hover .ticker-inner {
    animation-play-state: paused;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ── Cards ──────────────────────────────────────────── */
.card-show {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    /* Use aspect-ratio for responsive height instead of fixed px */
    aspect-ratio: 3 / 4;
    contain: layout style;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    will-change: transform;
}

.card-show:hover {
    transform: scale(1.03) translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(96, 165, 250, 0.1);
}

.card-show-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(3, 6, 26, 0.95) 0%, rgba(3, 6, 26, 0.35) 55%, transparent 100%);
    transition: background 0.4s ease;
    will-change: background;
}

.card-show:hover .card-show-overlay {
    background: linear-gradient(0deg, rgba(3, 6, 26, 0.98) 30%, rgba(5, 10, 36, 0.55) 65%, transparent 100%);
}

.card-show img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.card-show:hover img {
    transform: scale(1.05);
}

.card-show-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

/* ── Flip Card (Miembros) ───────────────────────────── */
.flip-card {
    perspective: 1000px;
    /* Aspect ratio replaces fixed h-[420px] */
    aspect-ratio: 3 / 4;
    min-height: 320px;
    max-height: 460px;
    contain: layout;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #0B1A45, #3B82F6);
    border: 1px solid rgba(96, 165, 250, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 24px;
    text-align: center;
    gap: 4px;
}

/* ── Timeline ───────────────────────────────────── */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #60A5FA, #3B82F6, #60A5FA);
    transform: translateX(-50%);
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #60A5FA;
    border: 3px solid #050A24;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3), 0 0 20px rgba(96, 165, 250, 0.4);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* ── Parallax ───────────────────────────────────────── */
.parallax-container {
    overflow: hidden;
}

.parallax-img {
    will-change: transform;
}

/* ── Content-visibility for paint performance ────────── */
/* Skip paint for off-screen sections on initial load */
.cv-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

/* ── Counter ─────────────────────────────────────── */
.counter-value {
    font-variant-numeric: tabular-nums;
}

/* ── Hero Particles ─────────────────────────────── */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
    opacity: 0;
    will-change: transform, opacity;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* ── Splide custom ──────────────────────────────── */
.splide__pagination__page.is-active {
    background: #60A5FA;
    transform: scale(1.3);
    will-change: transform;
}

.splide__pagination__page {
    background: rgba(96, 165, 250, 0.3);
}

.splide__arrow {
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #60A5FA;
    will-change: background;
}

.splide__arrow:hover {
    background: rgba(96, 165, 250, 0.3);
}

.splide__arrow svg {
    fill: #60A5FA;
}

/* ── Logo animation ─────────────────────────────── */
.kakao-logo {
    transition: transform 0.3s ease, filter 0.3s ease;
    will-change: transform, filter;
}

.kakao-logo,
.kakao-logo .custom-logo-link,
.kakao-logo .kakao-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.kakao-logo .custom-logo,
.kakao-logo .kakao-logo-img,
.kakao-logo .kakao-logo-link svg {
    display: block;
    width: auto;
    height: auto;
    max-height: 56px;
    max-width: min(54vw, 240px);
}

.kakao-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.5));
}

@media (max-width: 1024px) {
    .kakao-logo .custom-logo,
    .kakao-logo .kakao-logo-img,
    .kakao-logo .kakao-logo-link svg {
        max-height: 44px;
        max-width: min(58vw, 180px);
    }
}

/* ── Form styles ─────────────────────────────────── */
.kakao-input {
    background: rgba(11, 26, 69, 0.6);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 12px;
    padding: 14px 20px;
    color: #E6F0FF;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    outline: none;
    will-change: border-color, box-shadow, background;
}

.kakao-input:focus {
    border-color: rgba(96, 165, 250, 0.6);
    background: rgba(96, 165, 250, 0.06);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
}

.kakao-input::placeholder {
    color: rgba(59, 130, 246, 0.7);
}

.kakao-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #60A5FA;
    margin-bottom: 8px;
}

/* ── Countdown ───────────────────────────────────── */
.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.countdown-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    color: #60A5FA;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #3B82F6;
    margin-top: 4px;
}

/* ── Page headers ─────────────────────────────────── */
.page-hero {
    padding-top: calc(var(--nav-height) + 80px);
    padding-bottom: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero > .relative.z-10 {
    width: min(95vw, 1480px);
    margin-inline: auto;
    padding-inline: clamp(16px, 2.8vw, 36px);
}

body:not(.is-front-page) section > .max-w-7xl,
body:not(.is-front-page) section > .max-w-6xl,
body:not(.is-front-page) section > .max-w-5xl,
body:not(.is-front-page) section > .max-w-4xl,
body:not(.is-front-page) article > .max-w-7xl,
body:not(.is-front-page) article > .max-w-6xl,
body:not(.is-front-page) article > .max-w-5xl,
body:not(.is-front-page) article > .max-w-4xl {
    width: min(95vw, 1480px);
    max-width: 1480px !important;
    margin-inline: auto;
    padding-inline: clamp(16px, 2.8vw, 36px);
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% -20%, rgba(96, 165, 250, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Prose overrides ────────────────────────────── */
.prose-kakao p {
    color: rgba(230, 240, 255, 0.8);
    margin-bottom: 1.5em;
    line-height: 1.8;
}

.prose-kakao strong {
    color: #93C5FD;
}

.prose-kakao h2,
.prose-kakao h3 {
    color: #60A5FA;
    font-family: 'Playfair Display', serif;
}

.prose-kakao a {
    color: #60A5FA;
    text-decoration: underline;
}

.prose-kakao blockquote {
    border-left-color: #60A5FA;
    color: #3B82F6;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .page-hero {
        padding-top: calc(var(--nav-height) + 58px);
        padding-bottom: 56px;
    }

    .page-hero > .relative.z-10 {
        width: min(95vw, 95vw);
        padding-inline: 12px;
    }

    .page-hero .gsap-title {
        font-size: clamp(2.3rem, 12vw, 3.5rem) !important;
        line-height: 1.04;
    }

    .page-hero .reveal.text-kakao-muted {
        font-size: clamp(1rem, 4.6vw, 1.25rem) !important;
        line-height: 1.45;
    }

    body:not(.is-front-page) section > .max-w-7xl,
    body:not(.is-front-page) section > .max-w-6xl,
    body:not(.is-front-page) section > .max-w-5xl,
    body:not(.is-front-page) section > .max-w-4xl,
    body:not(.is-front-page) article > .max-w-7xl,
    body:not(.is-front-page) article > .max-w-6xl,
    body:not(.is-front-page) article > .max-w-5xl,
    body:not(.is-front-page) article > .max-w-4xl {
        width: min(95vw, 95vw);
        max-width: 95vw !important;
        padding-inline: 12px;
    }

    .timeline-line {
        left: 20px;
    }

    .countdown-number {
        font-size: 1.8rem;
    }

    .flip-card-inner {
        transform: none !important;
    }

    .flip-card-back {
        display: none;
    }
}

/* ── Loading animation ──────────────────────────── */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.05) 25%, rgba(96, 165, 250, 0.1) 50%, rgba(96, 165, 250, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

/* ── Noise texture overlay ───────────────────────── */
.noise::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.04;
}

/* ── Mobile menu link size ──────────────────────────── */
@media (max-width: 1024px) {
    #mobile-menu .nav-link {
        font-size: 2rem;
    }
}

/* ── Remove fixed heights — use aspect-ratio ────────── */
/* Override any inline h-80 / h-96 on card-show elements */
.card-show.h-80,
.card-show.h-96 {
    height: auto !important;
}

/* Flip card — remove stale h-[420px] from template */
.flip-card.h-\[420px\] {
    height: auto !important;
}

/* ── Glassmorphism perf: use GPU composite ───────────── */
.glass,
.glass-gold {
    transform: translateZ(0);
    /* promote to own layer */
}

/* ── Skeleton shimmer optimized ─────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
            rgba(96, 165, 250, 0.04) 25%,
            rgba(96, 165, 250, 0.10) 50%,
            rgba(96, 165, 250, 0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s ease infinite;
    border-radius: 8px;
    min-height: 16px;
}

/* ── Event placeholder card ─────────────────────────── */
.event-placeholder {
    min-height: 100px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
}

/* Respect user motion preferences and reduce GPU pressure */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ticker-inner {
        animation: none !important;
        transform: none !important;
    }

    .glass-hover:hover,
    .card-show:hover,
    .btn-primary:hover,
    .btn-outline:hover {
        transform: none !important;
    }
}

/* Blog load more */
.blog-card-hidden {
    display: none !important;
}

.blog-show-more-btn {
    min-height: 56px;
    border-radius: 9999px !important;
    padding: 0 24px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.blog-show-more-btn span {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.blog-show-more-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.blog-show-more-btn:hover svg {
    transform: translateY(2px);
}

/* Tailwind compiled utility overrides (keeps palette in sync without rebuild) */
.bg-kakao-dark {
    --tw-bg-opacity: 1;
    background-color: rgb(5 10 36 / var(--tw-bg-opacity, 1)) !important;
}

.bg-kakao-gold {
    --tw-bg-opacity: 1;
    background-color: rgb(96 165 250 / var(--tw-bg-opacity, 1)) !important;
}

.text-kakao-cream {
    --tw-text-opacity: 1;
    color: rgb(230 240 255 / var(--tw-text-opacity, 1)) !important;
}

.text-kakao-cream\/70 {
    color: rgba(230, 240, 255, 0.7) !important;
}

.text-kakao-cream\/80 {
    color: rgba(230, 240, 255, 0.8) !important;
}

.text-kakao-cream\/90 {
    color: rgba(230, 240, 255, 0.9) !important;
}

.text-kakao-dark {
    --tw-text-opacity: 1;
    color: rgb(5 10 36 / var(--tw-text-opacity, 1)) !important;
}

.text-kakao-gold {
    --tw-text-opacity: 1;
    color: rgb(96 165 250 / var(--tw-text-opacity, 1)) !important;
}

.text-kakao-gold\/50 {
    color: rgba(96, 165, 250, 0.5) !important;
}

.text-kakao-muted {
    --tw-text-opacity: 1;
    color: rgb(125 169 217 / var(--tw-text-opacity, 1)) !important;
}

.text-kakao-muted\/30 {
    color: rgba(125, 169, 217, 0.3) !important;
}

.text-kakao-muted\/60 {
    color: rgba(125, 169, 217, 0.6) !important;
}

.text-kakao-muted\/80 {
    color: rgba(125, 169, 217, 0.8) !important;
}

.text-kakao-orange {
    --tw-text-opacity: 1;
    color: rgb(59 130 246 / var(--tw-text-opacity, 1)) !important;
}

.border-kakao-gold\/30 {
    border-color: rgba(96, 165, 250, 0.3) !important;
}

.hover\:bg-kakao-gold\/10:hover {
    background-color: rgba(96, 165, 250, 0.1) !important;
}

.hover\:text-kakao-gold:hover {
    --tw-text-opacity: 1;
    color: rgb(96 165 250 / var(--tw-text-opacity, 1)) !important;
}

.hover\:text-kakao-golden:hover {
    --tw-text-opacity: 1;
    color: rgb(147 197 253 / var(--tw-text-opacity, 1)) !important;
}

.hover\:shadow-gold:hover {
    --tw-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
    --tw-shadow-colored: 0 0 30px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow) !important;
}

.group:hover .group-hover\:text-kakao-gold {
    --tw-text-opacity: 1;
    color: rgb(96 165 250 / var(--tw-text-opacity, 1)) !important;
}
