/* ============================
   OZX — style.css (v5)
   ============================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --black: #000;
    --white: #fff;
    --f-display: 'owners-xwide', sans-serif;
    --f-narrow:  'owners-narrow', sans-serif;
    --f-body:    'Pretendard', sans-serif;
    --pad-x: 80px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--f-body);
    overflow-x: hidden;
    cursor: none;
}

a { color: inherit; text-decoration: none; }
em { font-style: normal; }

/* ============================
   LOADER
   ============================ */
#loader {
    position: fixed; inset: 0;
    background: #000;
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}

.loader-box { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.loader-logo {
    width: clamp(120px, 18vw, 240px);
    height: auto;
    display: block;
    mix-blend-mode: screen;
    animation: loaderGlow 1.5s ease-in-out infinite alternate;
}

@keyframes loaderGlow {
    0%   { filter: drop-shadow(0 0 16px rgba(255,255,255,0.18)) brightness(0.85); }
    100% { filter: drop-shadow(0 0 44px rgba(255,255,255,0.45)) brightness(1.1); }
}

.loader-counter {
    display: flex; align-items: baseline; gap: 2px;
    font-family: var(--f-narrow); font-weight: 500;
    font-size: 11px; letter-spacing: 0.14em;
    color: rgba(255,255,255,0.28);
}

.lc-num {
    display: inline-block;
    min-width: 3ch; text-align: right;
    font-variant-numeric: tabular-nums;
}


/* ============================
   PROGRESS BAR
   ============================ */
#progress-bar {
    position: fixed; top: 0; left: 0;
    height: 2px; width: 0%;
    background: linear-gradient(to right, rgba(100,0,25,0.4), #640019);
    z-index: 9999; pointer-events: none;
}

/* ============================
   CURSOR
   ============================ */
#c-cursor {
    position: fixed; pointer-events: none; z-index: 9998;
    transform: translate(-50%, -50%);
}

.cursor-img {
    width: 28px; height: auto; display: block;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* ============================
   HEADER
   ============================ */
#header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-start;
    padding: 20px var(--pad-x);
    transition: background .5s, backdrop-filter .5s;
}


.header-left { display: flex; flex-direction: column; gap: 7px; }

.logo-mark { display: inline-block; opacity: 0; transition: opacity .3s; }
.logo-mark:hover { opacity: 0.65 !important; }
.logo-mark-img {
    height: 32px; width: auto; display: block;
    filter: brightness(0) invert(1);
}

.header-center {
    display: flex; align-items: center; justify-content: center;
    padding-top: 2px;
}

.header-brand {
    display: flex;
    align-items: center;
    transition: opacity .3s;
}

.header-brand:hover { opacity: 0.65; }

.header-wordmark-wrap {
    position: relative;
    display: inline-block;
}

.hwm-white {
    height: 20px; width: auto; display: block;
    filter: brightness(0) invert(1);
    animation: wmWhite 2.5s ease-in-out infinite;
}

.hwm-burg {
    position: absolute; top: 0; left: 0;
    height: 20px; width: auto; display: block;
    filter: url(#wm-burgundy);
    animation: wmBurg 2.5s ease-in-out infinite;
    opacity: 0;
}

@keyframes wmWhite {
    0%, 35%  { opacity: 1; }
    50%, 85% { opacity: 0; }
    100%     { opacity: 1; }
}

@keyframes wmBurg {
    0%, 35%  { opacity: 0; }
    50%, 85% { opacity: 1; }
    100%     { opacity: 0; }
}

@keyframes wmBlackWhite {
    0%, 35%  { filter: brightness(0) invert(1); }
    50%, 85% { filter: brightness(0); }
    100%     { filter: brightness(0) invert(1); }
}

.main-nav { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.nav-a {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: 16px; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    transition: color .3s;
    position: relative; padding-bottom: 1px;
}

.nav-a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 1px; background: #fff;
    transition: width .35s cubic-bezier(0.16,1,0.3,1);
}

.nav-a:hover { color: #fff; }
.nav-a:hover::after { width: 100%; }

/* ============================
   HERO
   ============================ */
#hero {
    position: relative; width: 100%; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #000;
}

#hero-canvas { position: absolute; inset: 0; z-index: 1; }

.hero-center {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    gap: 24px; text-align: center;
}

.hero-logo-wrap { position: relative; display: inline-block; }
#hero-logo-wrap { opacity: 0; }

.hero-logo-img {
    width: clamp(200px, 30vw, 440px);
    height: auto; display: block;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.1));
    animation: heroGlow 4s ease-in-out infinite alternate;
    will-change: filter;
}

@keyframes heroGlow {
    0%   { filter: drop-shadow(0 0 20px rgba(255,255,255,0.08)); }
    100% { filter: drop-shadow(0 0 60px rgba(255,255,255,0.22)); }
}

.hero-sub-wrap { overflow: hidden; }

.hero-sub {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: clamp(8px, 0.9vw, 11px);
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.55);
    transform: translateY(110%); display: block;
}

.scroll-cue {
    position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
    z-index: 2; display: flex; flex-direction: column; align-items: center;
    gap: 8px; opacity: 0;
}

.scroll-line {
    width: 1px; height: 44px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.45), transparent);
    animation: scrollDrop 2s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes scrollDrop {
    0%   { transform: scaleY(0); opacity: 1; }
    50%  { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

.scroll-cue span {
    font-family: var(--f-narrow); font-weight: 500; font-size: 8px;
    letter-spacing: 0.18em; color: rgba(255,255,255,0.28);
}

/* ============================
   MARQUEE
   ============================ */
.marquee-wrap {
    width: 100%; overflow: hidden;
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.07);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 13px 0;
}

.marquee-track {
    display: flex; width: max-content;
    animation: marqueeScroll 32s linear infinite;
}

.marquee-inner {
    display: flex; align-items: center;
    white-space: nowrap;
}

.marquee-inner span {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: 10px; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.25); padding: 0 18px;
}

.marquee-inner .sep { color: rgba(255,255,255,0.1); padding: 0; }

@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================
   IDENTITY
   ============================ */
#identity {
    position: relative;
    min-height: 100vh;
    background: #000;
    overflow: hidden;
}


.id-inner {
    position: relative; z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px var(--pad-x);
    text-align: center;
}

.id-title-block {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(28px);
    will-change: opacity, transform;
}

.id-title-block.in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.1s cubic-bezier(0.16,1,0.3,1), transform 1.1s cubic-bezier(0.16,1,0.3,1);
}

.id-tagline {
    font-family: var(--f-narrow);
    font-weight: 500;
    font-size: clamp(44px, 9vw, 128px);
    line-height: 0.93;
    letter-spacing: -0.01em;
    text-align: center;
    text-transform: uppercase;
}

.id-placeholder {
    display: block;
    margin-top: 10px;
    color: #fff;
    font-style: italic;
}

/* Character split — GSAP controls chars */
.char-w { display: inline-block; overflow: hidden; vertical-align: top; }
.char-i { display: inline-block; will-change: transform; }

.id-desc {
    font-family: var(--f-body);
    font-size: clamp(13px, 1.1vw, 14.5px);
    font-weight: 300; line-height: 2.1;
    color: #fff;
    text-align: center;
    opacity: 0; transform: translateY(18px);
    transition: opacity .9s ease .5s, transform .9s ease .5s;
}

.id-desc.in { opacity: 1; transform: translateY(0); }

/* ============================
   SHARED BACKGROUND — WHAT WE DO + OPERATING STRENGTH
   background-attachment: fixed makes both sections show the
   same viewport-fixed image, appearing as one continuous bg
   ============================ */
.bg-img {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
}

.bg-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.68) 0%,
        rgba(0,0,0,0.44) 35%,
        rgba(0,0,0,0.50) 65%,
        rgba(0,0,0,0.74) 100%
    );
}

/* ============================
   WHAT WE DO
   ============================ */
#space {
    position: relative;
    overflow: hidden;
    padding: 110px var(--pad-x) 90px;
}

.sec-wrap {
    position: relative; z-index: 2;
    max-width: 1280px; margin: 0 auto;
}

.sec-head { margin-bottom: 52px; }

.sec-h2 {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: clamp(16px, 2.6vw, 34px);
    letter-spacing: 0.03em;
    margin-bottom: 20px;
    position: relative; display: inline-block;
    opacity: 0; transform: translateY(20px);
    transition: opacity .7s ease, transform .7s ease;
}

.sec-h2.in { opacity: 1; transform: translateY(0); }

.sec-h2::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    height: 1px; width: 0;
    background: rgba(255,255,255,0.2);
    transition: width 1.1s cubic-bezier(0.16,1,0.3,1) .3s;
}

.sec-h2.in::after { width: 100%; }

/* Glitch */
.sec-h2.glitch-active::before {
    content: attr(data-text); position: absolute; inset: 0;
    color: rgba(255,55,55,0.7);
    clip-path: polygon(0 15%, 100% 15%, 100% 45%, 0 45%);
    animation: glitchA .16s steps(1) 3;
}
.sec-h2.glitch-active::after {
    content: attr(data-text); position: absolute; inset: 0;
    color: rgba(50,120,255,0.7);
    clip-path: polygon(0 60%, 100% 60%, 100% 90%, 0 90%);
    animation: glitchB .16s steps(1) 3;
}

@keyframes glitchA {
    0%,100% { transform: translate(0,0); }
    33%  { transform: translate(-3px,0); }
    66%  { transform: translate(3px,0); }
}
@keyframes glitchB {
    0%,100% { transform: translate(0,0); }
    33%  { transform: translate(3px,0); }
    66%  { transform: translate(-3px,0); }
}

.sec-lead {
    font-family: var(--f-body);
    font-size: clamp(12px, 1.1vw, 13.5px);
    font-weight: 300; line-height: 2;
    color: #fff;
    max-width: 620px;
}

.fade-up { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* --- Service Stack --- */
.service-stack {
    display: grid;
    grid-template-rows: auto;
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    max-width: 860px;
    margin: 0 auto;
}

.service-row {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 52px 0;
    will-change: opacity, transform;
}

.sr-left { display: flex; flex-direction: column; justify-content: space-between; }

.sr-title {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: clamp(22px, 3.5vw, 46px);
    line-height: 0.95; letter-spacing: 0.01em;
    margin-bottom: 14px;
}

.sr-ko {
    font-family: var(--f-body);
    font-size: 13px; font-weight: 300;
    color: #fff;
    max-width: 220px;
}

.sr-right { display: flex; flex-direction: column; padding-top: 6px; }

.sr-num {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: 36px; letter-spacing: 0;
    color: #fff;
    display: block; margin-bottom: 18px;
}

.sr-body {
    font-family: var(--f-body);
    font-size: 12.5px; font-weight: 300;
    line-height: 2; color: #fff;
}

/* ============================
   OUR OPERATING STRENGTH
   ============================ */
#partners {
    position: relative;
    overflow: hidden;
    padding: 110px var(--pad-x) 90px;
}

.strength-lead { max-width: 660px; }

.strength-lead p {
    font-family: var(--f-body);
    font-size: clamp(12px, 1.1vw, 13.5px);
    font-weight: 300; line-height: 2.2;
    color: #fff;
    margin-bottom: 10px;
}
.strength-lead p:last-child { margin-bottom: 0; }

/* --- Pill Cards --- */
.pill-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 64px;
}

.pill-card {
    padding: 0 0 44px;
    opacity: 0; transform: translateY(40px);
    will-change: clip-path, opacity, transform;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
}

.pill-label {
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 100px;
    padding: 12px 36px;
    font-family: var(--f-narrow); font-weight: 500;
    font-size: clamp(16px, 2vw, 26px);
    letter-spacing: 0.06em;
    margin-bottom: 24px;
    transition: border-color .3s, background .3s;
}

.pill-card:hover .pill-label {
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.04);
}

.pill-ko {
    font-family: var(--f-body);
    font-size: 13px; font-weight: 500;
    color: #fff;
    margin-bottom: 12px;
    text-align: center;
}

.pill-body {
    font-family: var(--f-body);
    font-size: 12.5px; font-weight: 300;
    line-height: 2; color: #fff;
    text-align: center;
    max-width: 360px;
}

/* ============================
   NEWS
   ============================ */
.news-placeholder {
    min-height: 14vh; background: #000;
    display: flex; align-items: center; justify-content: center;
}

.news-text {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: clamp(13px, 2vw, 26px);
    letter-spacing: 0.08em; color: rgba(255,255,255,0.05);
}

/* ============================
   FOOTER
   ============================ */
footer {
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 60px var(--pad-x) 44px;
}

.footer-inner { max-width: 1280px; margin: 0 auto; }

.f-top { display: flex; align-items: baseline; gap: 20px; margin-bottom: 36px; }

.f-logo {
    font-family: var(--f-narrow); font-weight: 500;
    font-size: clamp(18px, 2.5vw, 32px); letter-spacing: 0.05em;
}

.f-tagline {
    font-family: var(--f-narrow); font-weight: 500; font-size: 9.5px;
    letter-spacing: 0.12em; color: rgba(255,255,255,0.22);
}

.f-mid { margin-bottom: 44px; }

.f-nav { display: flex; gap: 30px; flex-wrap: wrap; }

.f-nav a {
    font-family: var(--f-narrow); font-weight: 500; font-size: 10px;
    letter-spacing: 0.08em; color: rgba(255,255,255,0.28);
    transition: color .3s;
}

.f-nav a:hover { color: #fff; }

.f-bot { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 18px; }

.f-bot p {
    font-family: var(--f-body); font-size: 10px;
    font-weight: 300; color: rgba(255,255,255,0.14);
}

/* ============================
   O / Z — XWIDE SWAP
   ============================ */
.oz-char {
    font-family: var(--f-display);
    font-weight: 500;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
    :root { --pad-x: 36px; }

    .service-row {
        grid-area: unset;
        grid-template-columns: 1fr;
        gap: 20px; padding: 44px 0;
    }

    .service-stack { display: block; }

    .pill-grid { grid-template-columns: 1fr; }
    .pill-card { padding: 0 0 38px; }
}

@media (max-width: 640px) {
    :root { --pad-x: 20px; }
    .header-center { display: none; }
    .bg-img { background-attachment: scroll; }
    .id-logo-img { width: clamp(220px, 80vw, 400px); }
}

/* ============================
   THEME TOGGLE — BURGUNDY
   ============================ */
body {
    transition: background 0.5s ease, color 0.5s ease;
}

body.burgundy {
    background: #640019;
    color: #000;
}

/* 명시적 배경색 재정의 */
body.burgundy #hero          { background: #640019; }
body.burgundy #identity      { background: #640019; }
body.burgundy .marquee-wrap  { background: #640019; border-color: rgba(0,0,0,0.1); }
body.burgundy .news-placeholder { background: #640019; }
body.burgundy footer         { background: #640019; border-top-color: rgba(0,0,0,0.1); }

/* 로고 필터 — 흰색 로고를 검은색으로 */
body.burgundy .logo-mark-img,
body.burgundy .header-wordmark-img { filter: brightness(0); transition: filter 0.5s; }

body.burgundy .hero-logo-img,
body.burgundy .loader-logo {
    filter: brightness(0) !important;
    mix-blend-mode: normal !important;
    animation: none !important;
}

/* 네비 */
body.burgundy .nav-a               { color: rgba(0,0,0,0.5); }
body.burgundy .nav-a:hover         { color: #000; }
body.burgundy .nav-a::after        { background: #000; }

/* 히어로 */
body.burgundy .hero-sub            { color: rgba(0,0,0,0.55); }
body.burgundy .scroll-cue span     { color: rgba(0,0,0,0.28); }
body.burgundy .scroll-line         { background: linear-gradient(to bottom, rgba(0,0,0,0.45), transparent); }

/* 마키 */
body.burgundy .marquee-inner span  { color: rgba(0,0,0,0.25); }
body.burgundy .marquee-inner .sep  { color: rgba(0,0,0,0.1); }

/* 명시적 흰색 텍스트 재정의 */
body.burgundy .id-desc,
body.burgundy .id-placeholder,
body.burgundy .sec-lead,
body.burgundy .sr-ko,
body.burgundy .sr-num,
body.burgundy .sr-body,
body.burgundy .strength-lead p,
body.burgundy .pill-ko,
body.burgundy .pill-body           { color: #000; }

body.burgundy .news-text           { color: rgba(0,0,0,0.06); }

/* 섹션 헤딩 */
body.burgundy .sec-h2::after       { background: rgba(0,0,0,0.2); }

/* 서비스 스택 */
body.burgundy .service-stack       { border-color: rgba(0,0,0,0.12); }
body.burgundy .service-stack .border-bottom { border-color: rgba(0,0,0,0.07); }

/* 필 카드 */
body.burgundy .pill-label          { border-color: rgba(0,0,0,0.4); }
body.burgundy .pill-card:hover .pill-label {
    border-color: rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.04);
}

/* 푸터 */
body.burgundy .f-tagline           { color: rgba(0,0,0,0.4); }
body.burgundy .f-nav a             { color: rgba(0,0,0,0.4); }
body.burgundy .f-nav a:hover       { color: #000; }
body.burgundy .f-bot               { border-top-color: rgba(0,0,0,0.1); }
body.burgundy .f-bot p             { color: rgba(0,0,0,0.3); }

/* 커서 */
body.burgundy .cursor-img          { filter: brightness(0); }

/* 워드마크 — 버건디 테마에서는 검은색 ↔ 흰색 */
body.burgundy .hwm-white {
    animation: wmBlackWhite 2.5s ease-in-out infinite !important;
    opacity: 1 !important;
}
body.burgundy .hwm-burg {
    animation: none !important;
    opacity: 0 !important;
}

/* 로고 */
body.burgundy .logo-mark-img { filter: brightness(0); }

/* 프로그레스 바 */
body.burgundy #progress-bar {
    background: linear-gradient(to right, rgba(0,0,0,0.3), #000);
}
