/* =========================================================
   EOLGANI STUDIO — v3 "Molten idea"
   검은 무대(3D 입자) ↔ 밝은 종이(소개·공동대표)를 오가는 원페이지.
   글꼴은 Archivo 한 가족, 정상 폭. 극적인 표현은 3D(빛 번짐·커서 불티·전환 폭발)가 맡는다.
   ========================================================= */

:root {
  --black: #000;
  --paper: #EDEDE9;
  --ink: #121212;
  --ash: #8C8C88;
  --ember: #FF5A1F;
  --hot: #FFE2CC;
  --rule-dark: rgba(255, 255, 255, .16);
  --rule-light: rgba(18, 18, 18, .16);

  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--black);
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; left: var(--gutter); top: 12px; z-index: 50;
  padding: 10px 16px; border-radius: 999px; background: var(--paper); color: var(--ink);
  transform: translateY(-160%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* Lenis(부드러운 스크롤) 기본 규칙 */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- 큰 글씨 ---------- */
.display {
  font-weight: 800;
  font-variation-settings: "wdth" var(--wdth, 100);
  line-height: .88;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.dot { color: var(--ember); }

/* ---------- 3D 무대 ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--black); }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); }
.stage.is-live .stage-canvas { opacity: 1; }
/* WebGL 이 없을 때 보이는 정지 화면: 녹은 빛 덩어리 */
.stage-poster {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 66% 46%, rgba(255, 226, 204, .55) 0, rgba(255, 90, 31, .5) 7%, rgba(255, 90, 31, .16) 20%, transparent 38%),
    radial-gradient(ellipse 60% 40% at 66% 50%, rgba(255, 90, 31, .08), transparent 70%);
  transition: opacity 1.2s var(--ease);
}
.stage.is-live .stage-poster { opacity: 0; }

/* ---------- 머리글 ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  color: var(--paper);
  transition: color .4s var(--ease);
}
.motion-on .site-header { position: fixed; }
.site-header.on-paper { color: var(--ink); --hdr-bg: var(--paper); }
/* 스크롤 중 글자가 머리글 밑으로 지나갈 때 겹쳐 읽히지 않게 위에서부터 옅어지는 바탕 */
.motion-on .site-header::before {
  content: ""; position: absolute; inset: 0 0 -28px; z-index: -1; pointer-events: none;
  background: linear-gradient(color-mix(in srgb, var(--hdr-bg, var(--black)) 82%, transparent) 30%, transparent);
  transition: background .4s var(--ease);
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.logo__mark { width: 18px; height: 18px; border-radius: 4px; background: currentColor; }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px;
  border: 1px solid currentColor; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  cursor: pointer;
}
.pill:hover { background: var(--ember); border-color: var(--ember); color: var(--black); }
.pill[aria-disabled="true"] { opacity: .45; pointer-events: none; cursor: default; }
.pill--light { background: var(--paper); border-color: var(--paper); color: var(--black); }

main { position: relative; z-index: 1; }

/* ---------- 1. 인트로 (카운트다운 / 종료 후 HERO) ---------- */
.intro {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--header-h) + 24px) var(--gutter) clamp(28px, 5vh, 56px);
}
.launch, .hero { display: flex; flex-direction: column; gap: clamp(28px, 5vh, 56px); }
.is-launched .launch { display: none; }
html:not(.is-launched) .hero { display: none; }

.intro__title { font-size: clamp(60px, 14vw, 232px); --wdth: 100; }
.intro__line { display: block; }
.intro__line--end { color: var(--ash); padding-left: 16vw; }

.hero .intro__title { font-size: clamp(52px, 10.4vw, 172px); }
.hero__cta { align-self: flex-start; }

.timer {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule-dark);
  padding-top: 14px;
  max-width: 1100px;
}
.timer__unit { display: flex; flex-direction: column; gap: 6px; }
.timer__num {
  font-size: clamp(36px, 7vw, 108px);
  font-weight: 400; line-height: .95; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.timer__lbl { font-size: 14px; color: var(--ash); }

/* JS 가 있으면 첫 장면은 motion.js 가 등장시킨다. 2.4초 안에 못 오면 그냥 보인다 */
html:not(.no-js):not(.motion-on) .intro__title,
html:not(.no-js):not(.motion-on) .timer,
html:not(.no-js):not(.motion-on) .hero__cta,
html:not(.no-js):not(.motion-on) .site-header { visibility: hidden; animation: show-anyway 0s 2.4s forwards; }
@keyframes show-anyway { to { visibility: visible; } }

/* ---------- 2. 서비스 ---------- */
.services { padding: 24vh var(--gutter) 0; }
.services__title {
  max-width: 15ch;
  font-size: clamp(32px, 5vw, 76px);
  font-weight: 600; line-height: 1.04; letter-spacing: -.02em;
}
.services__pin {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: var(--header-h) 0 64px;
}
.services__list { display: flex; flex-direction: column; gap: clamp(2px, .6vh, 8px); }
.service {
  display: inline-flex; align-items: baseline; gap: 20px; flex-wrap: wrap;
  font-size: clamp(40px, 8vw, 132px);
  font-weight: 800; line-height: .95; letter-spacing: -.02em; text-transform: uppercase;
  transition: color .6s var(--ease), opacity .6s var(--ease), transform .8s var(--ease);
}
.service__go {
  font-size: 15px; font-weight: 600; letter-spacing: .01em; text-transform: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
  color: var(--ember);
  display: none;
}
.service.has-link .service__go { display: inline; }
.service.has-link:hover { color: var(--ember); }

/* 스크롤 연출이 켜졌을 때: 지금 보는 서비스만 넓고 밝게 */
.motion-pin .service { color: var(--ash); opacity: .32; }
.motion-pin .service.is-active { color: var(--paper); opacity: 1; transform: translateX(.18em); }
.motion-pin .service .service__go { opacity: 0; transition: opacity .4s var(--ease); }
.motion-pin .service.is-active .service__go { opacity: 1; }

.services__meter {
  position: absolute; left: 0; right: 0; bottom: 32px;
  height: 1px; background: var(--rule-dark);
  display: none;
}
.motion-pin .services__meter { display: block; }
.services__meter span { position: absolute; inset: 0; background: var(--paper); transform-origin: left; transform: scaleX(0); }

/* ---------- 3·4. 종이 구간 ---------- */
.paper {
  position: relative; z-index: 2;
  background: var(--paper); color: var(--ink);
  border-radius: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 0 0;
  margin-top: 18vh;
}
.statement { padding: clamp(96px, 22vh, 220px) var(--gutter) clamp(80px, 18vh, 180px); }
.statement__text {
  max-width: 18ch;
  font-size: clamp(36px, 6vw, 100px);
  font-weight: 700; line-height: 1.0; letter-spacing: -.025em;
}
.word { display: inline-block; }

.founders { padding: 0 var(--gutter) clamp(96px, 20vh, 200px); }
.founders__title { font-size: clamp(40px, 6.6vw, 112px); text-transform: none; margin-bottom: clamp(40px, 8vh, 80px); }
.founders__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); max-width: 900px; }
.founder:nth-child(2) { margin-top: clamp(24px, 5vw, 72px); }
.founder:nth-child(3) { margin-top: clamp(12px, 2.5vw, 36px); }
.founder__photo { overflow: hidden; border-radius: clamp(14px, 1.6vw, 22px); aspect-ratio: 4 / 5; background: #d9d9d5; }
.founder__photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transform-origin: 50% 40%; will-change: transform; }
.founder figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; border-bottom: 1px solid var(--rule-light); padding-bottom: 12px; }
.founder__name { font-size: clamp(15px, 1.4vw, 20px); font-weight: 700; letter-spacing: -.01em; }
.founder__role { font-size: 14px; color: #6d6d69; }

/* ---------- 5. 푸터 ---------- */
.site-footer {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 28px;
  padding: 18vh var(--gutter) 28px;
}
.site-footer__brand { font-size: clamp(52px, 14vw, 240px); }
.site-footer__line { display: block; }
.site-footer__line + .site-footer__line { padding-left: 12vw; }
.site-footer__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--rule-dark); padding-top: 18px; }
.site-footer__meta { font-size: 14px; color: var(--ash); }
.social { display: flex; gap: 8px; }
.social__link {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--rule-dark); border-radius: 999px;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.social__link svg { width: 18px; height: 18px; }
.social__link:hover { background: var(--ember); border-color: var(--ember); color: var(--black); }

/* ---------- 커서 링 (마우스 기기만) ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid #fff; border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0; transition: opacity .3s, width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: #fff; }

/* ---------- 태블릿 / 모바일 ---------- */
@media (max-width: 900px) {
  .founder:nth-child(n) { margin-top: 0; }
}
@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .logo { font-size: 17px; }
  .pill { padding: 0 16px; font-size: 14px; }
  .intro__line--end { padding-left: 8vw; }
  .timer__lbl { font-size: 12px; }
  .service { font-size: clamp(32px, 10vw, 60px); }
  .founders__list { gap: 10px; }
  .founder figcaption { flex-direction: column; gap: 2px; padding-top: 10px; }
  .founder__name { font-size: clamp(12px, 3.6vw, 17px); white-space: nowrap; }
  .founder__role { font-size: 12px; }
  .site-footer__line + .site-footer__line { padding-left: 6vw; }
}

/* 세로 화면(폰·세로 태블릿): 3D는 위, 서비스 이름은 아래 */
@media (max-aspect-ratio: 1/1) {
  .motion-pin .services__pin { align-items: flex-end; padding-bottom: 72px; }
}

/* 높이가 낮은 가로 화면(폰 가로): 글자를 화면 높이에 맞춘다 */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  :root { --header-h: 60px; }
  .intro { padding-top: calc(var(--header-h) + 8px); padding-bottom: 16px; }
  .launch, .hero { gap: 14px; }
  .intro__title { font-size: min(14vw, 24vh); }
  .hero .intro__title { font-size: min(10.4vw, 19vh); }
  .timer { padding-top: 8px; }
  .timer__num { font-size: min(7vw, 13vh); }
  .timer__lbl { font-size: 12px; }
  .services { padding-top: 16vh; }
  .services__title { font-size: min(5vw, 11vh); }
  .services__pin { padding: var(--header-h) 0 36px; }
  .service { font-size: min(8vw, 12.5vh); }
  .services__meter { bottom: 16px; }
  .statement__text { font-size: min(6vw, 13vh); }
  .founders__list { max-width: 520px; }
  .site-footer__brand { font-size: min(14vw, 26vh); }
}

/* ---------- 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .founder__photo img { transform: none; }
}
