/* ==========================================================================
   NextWave IT Union — Bright & Friendly Theme
   2026 Redesign · custom styles (Tailwind handles layout utilities)
   ========================================================================== */

:root {
    --brand: #5b6cff;
    --brand-dark: #4338ca;
    --brand-light: #eef0ff;
    --accent: #ff6b6b;
    --mint: #18c29c;
    --amber: #ffb020;
    --ink: #1a1c2e;
    --muted: #5b6178;
}

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 96px;
}

body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
        system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', 'Apple SD Gothic Neo', sans-serif;
    background-color: #fbfbff;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

.font-mono {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* --- Ambient gradient background ---------------------------------------- */
.aurora {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora::before,
.aurora::after {
    content: "";
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    will-change: transform;
}

.aurora::before {
    top: -15vw;
    left: -10vw;
    background: radial-gradient(circle at center, rgba(91, 108, 255, 0.55), transparent 65%);
    animation: drift1 22s ease-in-out infinite alternate;
}

.aurora::after {
    top: 10vw;
    right: -15vw;
    background: radial-gradient(circle at center, rgba(255, 107, 107, 0.4), transparent 65%);
    animation: drift2 26s ease-in-out infinite alternate;
}

.aurora .blob3 {
    position: absolute;
    bottom: -20vw;
    left: 30vw;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(24, 194, 156, 0.32), transparent 65%);
    filter: blur(90px);
    opacity: 0.5;
    animation: drift3 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(8vw, 6vw) scale(1.15); }
}
@keyframes drift2 {
    from { transform: translate(0, 0) scale(1.05); }
    to   { transform: translate(-6vw, 10vw) scale(0.9); }
}
@keyframes drift3 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-8vw, -6vw) scale(1.2); }
}

/* --- Gradient text ------------------------------------------------------ */
.text-gradient {
    background: linear-gradient(100deg, var(--brand) 0%, #8b5cf6 45%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* --- Cards & glass ------------------------------------------------------ */
.card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(91, 108, 255, 0.1);
    box-shadow: 0 10px 40px -16px rgba(35, 40, 90, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px -18px rgba(91, 108, 255, 0.4);
    border-color: rgba(91, 108, 255, 0.4);
}

/* --- Buttons ------------------------------------------------------------ */
.btn-primary {
    background: linear-gradient(120deg, var(--brand) 0%, #7c4dff 100%);
    color: #fff;
    box-shadow: 0 12px 28px -10px rgba(91, 108, 255, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -10px rgba(91, 108, 255, 0.8);
    filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: #fff;
    color: var(--brand-dark);
    border: 1.5px solid rgba(91, 108, 255, 0.25);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--brand);
    background: var(--brand-light);
}

/* --- Pills / badges ----------------------------------------------------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* --- Nav link underline ------------------------------------------------- */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: width 0.25s ease;
}
.nav-link:hover::after,
.nav-link-active::after {
    width: 100%;
}
.nav-link-active {
    color: var(--brand-dark) !important;
    font-weight: 700;
}

/* --- Scroll reveal ------------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .aurora::before, .aurora::after, .aurora .blob3 { animation: none; }
    html { scroll-behavior: auto; }
}

/* --- FAQ accordion ------------------------------------------------------ */
.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.faq-item.open .faq-answer {
    max-height: 320px;
}
.faq-item .faq-icon {
    transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
}
.faq-item.open .faq-q {
    color: var(--brand-dark);
}

/* --- Cinematic hero captions ------------------------------------------- */
#hero-stage {
    --hero-dark: 0;
    --hero-scrim: 1;
    --hero-mood-shift: -52%;
    --hero-mood-sweep: 0;
}

#hero-3d {
    z-index: 0;
    opacity: 1;
}

#hero-mood {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: var(--hero-dark);
    background:
        radial-gradient(circle at 50% 42%, rgba(91, 108, 255, 0.26), transparent 34%),
        radial-gradient(circle at 72% 56%, rgba(255, 107, 107, 0.22), transparent 32%),
        linear-gradient(180deg, rgba(7, 10, 28, 0.9), rgba(13, 18, 44, 0.82));
    transition: opacity 0.18s linear;
}

#hero-mood::before {
    content: "";
    position: absolute;
    inset: -18% -24%;
    background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.18) 44%, transparent 54%);
    transform: translateX(var(--hero-mood-shift));
    opacity: var(--hero-mood-sweep);
    filter: blur(1px);
}

.hero-copy-scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: var(--hero-scrim);
    background:
        radial-gradient(circle at 50% 48%, rgba(251, 251, 255, 0.74) 0%, rgba(251, 251, 255, 0.52) 30%, rgba(251, 251, 255, 0.2) 52%, transparent 76%),
        linear-gradient(180deg, rgba(251, 251, 255, 0.18), rgba(251, 251, 255, 0.64));
    transition: opacity 0.18s linear;
}

.hero-copy-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: clamp(5.5rem, 13vh, 8rem) 1.25rem clamp(4.5rem, 9vh, 6rem);
    pointer-events: none;
}

.hero-cap {
    grid-area: 1 / 1;
    width: min(100%, 64rem);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    position: relative;
    will-change: opacity, transform, filter;
}

.hero-cap::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(68rem, 112vw);
    height: min(24rem, 42vh);
    border-radius: 9999px;
    pointer-events: none;
    background: linear-gradient(100deg, transparent 24%, rgba(255, 255, 255, 0.72) 44%, rgba(139, 92, 246, 0.28) 50%, transparent 68%);
    filter: blur(18px);
    opacity: 0;
    transform: translate(-140%, -50%) skewX(-12deg);
}

.hero-cap.cap-on::before {
    animation: heroSweep 0.92s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes heroSweep {
    0% { opacity: 0; transform: translate(-150%, -50%) skewX(-12deg); }
    22% { opacity: 0.92; }
    100% { opacity: 0; transform: translate(54%, -50%) skewX(-12deg); }
}

.hero-cap-intro {
    width: min(100%, 34rem);
}

.hero-cap.cap-on a,
.hero-cap.cap-on button {
    pointer-events: auto;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.42rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(91, 108, 255, 0.18);
    background: rgba(255, 255, 255, 0.76);
    color: var(--brand-dark);
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: clamp(0.72rem, 1.4vw, 0.88rem);
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 12px 34px -24px rgba(67, 56, 202, 0.65);
    transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hero-symbol {
    display: inline-grid;
    place-items: center;
    min-width: clamp(4.2rem, 10vw, 7rem);
    height: clamp(4.2rem, 10vw, 7rem);
    margin: 0 auto 1rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(91, 108, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(238, 240, 255, 0.7)),
        radial-gradient(circle at 30% 20%, rgba(255, 107, 107, 0.22), transparent 58%);
    color: var(--brand-dark);
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 22px 50px -34px rgba(67, 56, 202, 0.75);
    transition: color 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hero-symbol-wide {
    min-width: clamp(6.5rem, 16vw, 11rem);
    padding: 0 0.8rem;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.hero-title {
    margin: 0 auto;
    max-width: 15ch;
    color: var(--ink);
    font-size: clamp(2.35rem, 7vw, 5.8rem);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: 0;
    text-wrap: balance;
    transition: color 0.22s ease, text-shadow 0.22s ease;
}

.hero-meaning .hero-title {
    max-width: 16.5ch;
    font-size: clamp(2.35rem, 6.4vw, 5.35rem);
}

.hero-body {
    max-width: 38rem;
    margin: 1.2rem auto 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.72;
    font-weight: 600;
    text-wrap: balance;
    transition: color 0.22s ease, text-shadow 0.22s ease;
}

.hero-body-compact {
    max-width: 30rem;
    color: var(--brand-dark);
    font-size: clamp(0.98rem, 1.8vw, 1.08rem);
    line-height: 1.68;
}

.hero-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem 1rem;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
}

#hero-scrollhint {
    z-index: 4;
    transition: opacity 0.3s ease;
}

#hero-stage.is-dark .hero-meaning .hero-kicker {
    color: #dfe7ff;
    border-color: rgba(161, 176, 255, 0.28);
    background: rgba(12, 17, 40, 0.68);
    box-shadow: 0 18px 50px -28px rgba(120, 137, 255, 0.8);
}

#hero-stage.is-dark .hero-meaning .hero-symbol {
    color: #eef3ff;
    border-color: rgba(173, 187, 255, 0.26);
    background:
        linear-gradient(135deg, rgba(24, 31, 68, 0.76), rgba(79, 93, 190, 0.48)),
        radial-gradient(circle at 30% 20%, rgba(255, 107, 107, 0.3), transparent 58%);
    box-shadow: 0 24px 68px -28px rgba(105, 125, 255, 0.95);
}

#hero-stage.is-dark .hero-meaning .hero-title {
    color: #f8fbff;
    text-shadow: 0 20px 60px rgba(4, 7, 19, 0.7);
}

#hero-stage.is-dark .hero-meaning .hero-body {
    color: rgba(229, 235, 255, 0.86);
    text-shadow: 0 16px 44px rgba(4, 7, 19, 0.7);
}

#hero-stage.is-dark #hero-scrollhint {
    color: rgba(226, 232, 255, 0.85);
}

@media (max-width: 640px) {
    .hero-copy-layer {
        padding-top: 5.25rem;
        padding-bottom: 4.25rem;
    }
    .hero-title {
        max-width: 11ch;
        font-size: clamp(2.25rem, 12vw, 3.55rem);
        line-height: 1.08;
    }
    .hero-meaning .hero-title {
        max-width: 11.5ch;
        font-size: clamp(2.2rem, 11vw, 3.35rem);
    }
    .hero-symbol {
        margin-bottom: 0.8rem;
        border-radius: 1rem;
    }
    .hero-body {
        max-width: 19rem;
        margin-top: 1rem;
        font-size: 0.96rem;
        line-height: 1.62;
    }
    .hero-chip-row {
        font-size: 0.82rem;
        gap: 0.35rem 0.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* 정적 폴백처럼 첫 캡션만 보이도록 */
    .hero-cap[data-from="0.00"] { opacity: 1 !important; transform: none !important; }
    .hero-cap.cap-on::before { animation: none; }
}

/* --- Activity icon tile ------------------------------------------------- */
.icon-tile {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 28px;
}

/* --- Marquee for awards ribbon ----------------------------------------- */
.marquee {
    display: flex;
    gap: 1rem;
    width: max-content;
    animation: marquee 32s linear infinite;
}
.marquee-track:hover .marquee { animation-play-state: paused; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- Scroll-to-top ------------------------------------------------------ */
#to-top {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#to-top.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* --- Misc --------------------------------------------------------------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* gentle floating animation for hero card */
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}
.floaty { animation: floaty 6s ease-in-out infinite; }

/* --- 3D wordmark stage -------------------------------------------------- */
.stage-3d {
    position: relative;
    height: 46vh;
    min-height: 300px;
    max-height: 520px;
    border-radius: 2rem;
    overflow: hidden;
    background:
        radial-gradient(130% 130% at 50% 0%, rgba(124, 77, 255, 0.4), transparent 58%),
        linear-gradient(160deg, #15162e 0%, #1e1b48 45%, #0d0e20 100%);
    border: 1px solid rgba(124, 77, 255, 0.28);
    box-shadow: 0 36px 90px -34px rgba(91, 108, 255, 0.65),
                inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.stage-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(124, 77, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 77, 255, 0.14) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 25%, transparent 72%);
    mask-image: radial-gradient(circle at 50% 45%, #000 25%, transparent 72%);
    pointer-events: none;
}

.stage-canvas {
    position: absolute;
    inset: 0;
}
.stage-canvas canvas {
    display: block;
    pointer-events: none;
}

.stage-fallback {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 800;
    font-size: clamp(2.1rem, 9vw, 5.5rem);
    letter-spacing: 0.04em;
    background: linear-gradient(100deg, #8ea2ff, #b388ff 45%, #ff8e8e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.6s ease;
    pointer-events: none;
    text-align: center;
}
.stage-3d.webgl-ready .stage-fallback { opacity: 0; }

.stage-badge {
    position: absolute;
    top: 14px;
    left: 16px;
    font-size: 10px;
    letter-spacing: 0.22em;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 3px 9px;
    border-radius: 9999px;
    pointer-events: none;
}

.stage-hint {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    pointer-events: none;
    animation: hintpulse 2.4s ease-in-out infinite;
}
@keyframes hintpulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, 0); }
    50%      { opacity: 0.9; transform: translate(-50%, 3px); }
}

@media (prefers-reduced-motion: reduce) {
    .stage-hint { animation: none; }
}
