/* ============================================================
   GROUND K® — Creative Digital Studio
   다크 프리미엄 + 강한 타이포 대비 + 창의적 인터랙션
   색/폰트/문구는 :root 와 각 섹션에서 수정하세요.
   ============================================================ */

:root {
  --bg: #0d0d0f;
  --surface: #16161a;
  --fg: #f0efe9;
  --muted: #86867e;
  --accent: #b6e84a;      /* 라임 포인트 */
  --line: rgba(240, 239, 233, 0.14);

  --display: "Syne", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --sans: "Pretendard", "Pretendard Variable", system-ui, "Malgun Gothic", sans-serif;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-style: normal; color: var(--accent); }
sup { font-size: 0.4em; vertical-align: super; }
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }

section { position: relative; padding: clamp(5rem, 12vh, 11rem) var(--pad); }

/* ============================================================ 로더 */
.loader {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-end; padding: var(--pad);
  transition: transform 1s var(--ease);
}
.loader.done { transform: translateY(-100%); }
.loader__row { display: flex; justify-content: space-between; align-items: flex-end; }
.loader__word { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 8vw, 6rem); line-height: 0.9; }
.loader__count { font-family: var(--mono); font-size: clamp(2rem, 8vw, 6rem); color: var(--accent); }
.loader__bar { margin-top: 1.5rem; height: 2px; background: var(--line); }
.loader__bar span { display: block; height: 100%; width: 0%; background: var(--accent); }

/* ============================================================ 커서 / 진행바 */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9990; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); pointer-events: none; transform: translate(-50%, -50%);
  display: grid; place-items: center; mix-blend-mode: difference;
}
.cursor.is-hover { width: 78px; height: 78px; }
.cursor__label { font-family: var(--mono); font-size: 0.65rem; color: #000; opacity: 0; text-transform: uppercase; }
.cursor.has-label .cursor__label { opacity: 1; }
@media (hover: hover) and (pointer: fine) { body { cursor: none; } a, button { cursor: none; } }
@media (hover: none) { .cursor { display: none; } }

.progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 9980; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ============================================================ 상단바 / 메뉴 */
.topbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad); mix-blend-mode: difference;
}
.brand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.topbar__status { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; display: flex; align-items: center; gap: 0.5rem; }
.topbar__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.menu-btn { z-index: 600; width: 48px; height: 48px; border: 1px solid var(--fg); border-radius: 50%; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { width: 18px; height: 1.5px; background: var(--fg); transition: transform .4s var(--ease); }
.menu-btn.open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }
@media (max-width: 640px) { .topbar__status { display: none; } }

.menu {
  position: fixed; inset: 0; z-index: 550; background: var(--accent); color: #0d0d0f;
  display: flex; flex-direction: column; justify-content: center; padding: var(--pad);
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease); pointer-events: none;
}
.menu.open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.menu__list { list-style: none; }
.menu__list li { overflow: hidden; }
.menu__list a { display: flex; align-items: baseline; gap: 1.5rem; font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 11vw, 8rem); line-height: 1.05; letter-spacing: -0.02em; }
.menu__idx { font-family: var(--mono); font-size: 0.9rem; opacity: 0.5; }
.menu__foot { display: flex; justify-content: space-between; margin-top: 3rem; font-family: var(--mono); font-size: 0.8rem; }

/* ============================================================ 01. HERO */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding-top: 22vh; padding-bottom: 4vh; overflow: hidden; }
/* 히어로 배경 이미지 (풀블리드). images/home/hero.jpg 넣으면 자동 표시, 없으면 기본 다크 배경만 보임(깨짐 없음) */
.hero__bg { position: absolute; inset: 0; z-index: 0; background-position: center; background-size: cover; background-repeat: no-repeat;
  background-image:
    linear-gradient(to bottom, rgba(13,13,15,0.5) 0%, rgba(13,13,15,0.72) 55%, rgba(13,13,15,0.94) 100%),
    url("../images/home/hero.jpg"); }
.hero__top, .hero__title, .hero__bottom { position: relative; z-index: 1; }
.hero__top { display: flex; justify-content: space-between; }
.hero__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.24rem, 10.5vw, 10.5rem); line-height: 0.86; letter-spacing: -0.03em; text-transform: uppercase; margin: auto 0; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word { display: inline-block; }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.hero__lead { font-size: clamp(1rem, 2vw, 1.35rem); color: var(--muted); max-width: 40ch; }
.hero__lead strong { color: var(--fg); }
.scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.scroll-hint__line { width: 1px; height: 54px; background: var(--line); position: relative; overflow: hidden; }
.scroll-hint__line::after { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 40%; background: var(--accent); animation: scrolldown 1.8s var(--ease) infinite; }
@keyframes scrolldown { 0%{transform:translateY(-100%)} 100%{transform:translateY(250%)} }

/* ============================================================ 02. MANIFESTO */
.manifesto { padding-top: clamp(6rem,16vh,14rem); padding-bottom: clamp(6rem,16vh,14rem); }
.manifesto__label { margin-bottom: 2.5rem; }
.manifesto__text { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4.2vw, 3.6rem); line-height: 1.3; letter-spacing: -0.01em; max-width: 20ch; word-break: keep-all; }
.manifesto__text .w { transition: color .3s; }

/* ============================================================ 03. MARQUEE */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; padding: 1.4rem 0; }
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__track span { font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 4vw, 3rem); text-transform: uppercase; }
.marquee__track span em, .marquee__track span { color: var(--fg); }

/* ============================================================ 04. SELECTED WORK (가로 핀) */
.work { background: var(--bg); }
.work__pin { height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.work__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 var(--pad); margin-bottom: 2.5rem; }
.work__count { font-family: var(--display); font-weight: 800; font-size: 1.4rem; }
.work__count i { color: var(--muted); font-style: normal; font-size: 1rem; }
.work__track { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); padding: 0 var(--pad); width: max-content; }
.proj { flex: 0 0 auto; width: clamp(260px, 34vw, 460px); }
.proj__media { position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 4px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #86867e) 24%, var(--surface)), var(--surface)); }
.proj__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.proj:hover .proj__media img { transform: scale(1.06); }
.proj__media::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 4px; }
.proj__info { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 0.75rem; margin-top: 1rem; }
.proj__no { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; }
.proj__info h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.5rem); }
.proj__cat { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); text-transform: uppercase; }

/* ============================================================ 05. SIGNATURE (3개) */
.spotlights { padding-inline: 0; }
.spotlights__head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 var(--pad); margin-bottom: clamp(2rem,6vh,5rem); }
.spotlights__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 9vw, 7rem); line-height: 0.9; text-transform: uppercase; text-align: right; }
.spotlight { margin-bottom: clamp(4rem, 10vh, 9rem); }
.spotlight:last-child { margin-bottom: 0; }
.spotlight__media { position: relative; height: min(84vh, 760px); overflow: hidden;
  background: linear-gradient(135deg, var(--surface), var(--bg)); }
/* 실제 이미지 준비 전, 깨진 img가 아닌 조용한 자리표시로 보이도록 */
.proj__media img, .spotlight__media > img { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.spotlight__media > img { width: 100%; height: 122%; object-fit: cover; }
/* 이미지 박스 전체를 클릭 링크로 (View Case 버튼과 동일 이동) + 호버 상태 */
a.spotlight__media { display: block; cursor: pointer; text-decoration: none; }
.spotlight__media::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(13,13,15,0); transition: background .45s var(--ease); }
a.spotlight__media:hover::after { background: rgba(13,13,15,0.22); }
.spotlight__title { transition: color .35s var(--ease); }
a.spotlight__media:hover .spotlight__title { color: var(--accent); }
.spotlight__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.75rem; padding: var(--pad); z-index: 2; }
.spotlight__overlay .mono { color: var(--fg); }
.spot--right .spotlight__overlay { align-items: flex-end; text-align: right; }
.spot--center .spotlight__overlay { align-items: center; text-align: center; }
.spotlight__title { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 12vw, 10rem); line-height: 0.9; text-transform: uppercase; }
.spotlight__desc { color: var(--fg); }
.spotlight__overlay .spotlight__cta { color: var(--accent); font-weight: 700; letter-spacing: 0.02em; margin-top: 0.4rem;
  opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
a.spotlight__media:hover .spotlight__cta { opacity: 1; transform: translateY(0); }
@media (hover: none) { .spotlight__cta { opacity: 1; transform: none; } }
.spotlight__meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; padding: 2rem var(--pad) 0; }
.spot--right .spotlight__meta { flex-direction: row-reverse; text-align: right; }
.spotlight__meta p { max-width: 46ch; font-size: clamp(1rem, 2vw, 1.25rem); color: var(--muted); }

/* ============================================================ 06. APPROACH */
.approach { border-top: 1px solid var(--line); }
.approach__intro { max-width: 60ch; margin-bottom: clamp(2.5rem,7vh,5rem); }
.approach__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 9vw, 7rem); text-transform: uppercase; line-height: 1; margin: 1rem 0 1.5rem; }
.approach__lead { font-size: clamp(1.1rem,2.4vw,1.5rem); color: var(--muted); }
.approach__list { list-style: none; counter-reset: none; }
.astep { display: grid; grid-template-columns: minmax(4rem, 12vw) 1fr; gap: 1.5rem 3rem; align-items: baseline; padding: clamp(1.5rem,4vh,2.75rem) 0; border-top: 1px solid var(--line); }
.astep:last-child { border-bottom: 1px solid var(--line); }
.astep__no { font-family: var(--mono); color: var(--accent); font-size: clamp(1rem,2vw,1.4rem); }
.astep h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem,4.5vw,3.2rem); }
.astep p { color: var(--muted); margin-top: 0.75rem; max-width: 52ch; font-size: 1.05rem; }

/* ============================================================ 라임 마퀴 */
.marquee--alt { background: var(--accent); border-color: transparent; }
.marquee--alt .marquee__track span { color: #0d0d0f; }

/* ============================================================ RECOGNITION */
.awards { border-top: 1px solid var(--line); }
.awards__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2.5rem; }
.awards__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 9vw, 7rem); text-transform: uppercase; line-height: 1; }
.awards__list { list-style: none; border-top: 1px solid var(--line); }
.award { display: grid; grid-template-columns: 6rem 1fr auto; gap: 1.5rem; align-items: baseline; padding: clamp(1.1rem,2.6vw,1.9rem) 0.5rem; border-bottom: 1px solid var(--line); transition: padding-left .4s var(--ease), background .4s var(--ease), color .4s var(--ease); }
.award:hover { padding-left: 1.5rem; background: var(--fg); color: #0d0d0f; }
.award:hover .mono { color: #0d0d0f; }
.award__name { font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem,3vw,2rem); }
@media (max-width: 640px) { .award { grid-template-columns: 4rem 1fr; } .award__proj { grid-column: 2; } }

/* Career 변형: 기간 텍스트가 길어 첫 컬럼을 넓히고 회사명 폰트는 조금 줄임 */
.career .award { grid-template-columns: 12rem 1fr auto; }
.career .award__name { font-size: clamp(1rem, 2.4vw, 1.5rem); }
@media (max-width: 760px) { .career .award { grid-template-columns: 1fr; row-gap: 0.4rem; } .career .award__name, .career .award__proj { grid-column: 1; } }

/* ============================================================ 06. SERVICES (스택) */
.services { background: var(--surface); }
.services__intro { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3rem; }
.services__title { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 9vw, 7rem); text-transform: uppercase; line-height: 1; }
.services__stack { display: flex; flex-direction: column; gap: 1.25rem; }
.scard {
  position: sticky; top: calc(14vh + var(--i) * 2.2rem);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: clamp(1.75rem, 4vw, 3rem);
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem 2.5rem; align-items: start;
}
.scard__no { align-self: start; }
.scard h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4vw, 3rem); grid-column: 2; }
.scard p { grid-column: 2; color: var(--muted); max-width: 44ch; font-size: 1.02rem; }
.scard ul { grid-column: 3; grid-row: 1 / span 2; list-style: none; text-align: right; display: flex; flex-direction: column; gap: 0.5rem; }
.scard ul li { color: var(--fg); }
@media (max-width: 760px) {
  .scard { grid-template-columns: 1fr; gap: 1rem; }
  .scard h3, .scard p, .scard ul { grid-column: 1; grid-row: auto; text-align: left; }
  .scard ul { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
}

/* ============================================================ 07. NUMBERS */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; border-top: 1px solid var(--line); }
.stat__v { font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 8vw, 6.5rem); line-height: 1; letter-spacing: -0.03em; }
.stat p { margin-top: 0.75rem; }
@media (max-width: 720px) { .numbers { grid-template-columns: repeat(2, 1fr); gap: 3rem 1.5rem; } }

/* ============================================================ 06. PHILOSOPHY */
.philosophy { border-top: 1px solid var(--line); }
.philosophy__intro { margin-bottom: clamp(3rem, 8vh, 6rem); }
.philosophy__statement { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 3.2rem); line-height: 1.3; letter-spacing: -0.02em; margin-top: 1.5rem; max-width: 20ch; }
.philosophy__values { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
/* 열마다 좌우 패딩 → 텍스트가 구분선에 붙지 않음. 양끝 열은 섹션 여백에 맞춤 */
.pval { padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.5rem, 2.4vw, 2.5rem) clamp(2.5rem, 5vw, 4rem); border-right: 1px solid var(--line); }
.pval:first-child { padding-left: 0; }
.pval:last-child { padding-right: 0; border-right: none; }
.pval__no { color: var(--accent); font-size: 0.9rem; }
.pval h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 1.8vw, 1.5rem); margin: 2.5rem 0 0.9rem; }
.pval p { color: var(--muted); font-size: 0.98rem; line-height: 1.55; }
@media (max-width: 900px) {
  .philosophy__values { grid-template-columns: repeat(2, 1fr); }
  .pval { padding-left: clamp(1.5rem, 4vw, 2.5rem); padding-right: clamp(1.5rem, 4vw, 2.5rem); }
  .pval:nth-child(odd) { padding-left: 0; border-right: 1px solid var(--line); }
  .pval:nth-child(even) { padding-right: 0; border-right: none; }
}
@media (max-width: 520px) {
  .philosophy__values { grid-template-columns: 1fr; }
  .pval, .pval:nth-child(odd), .pval:nth-child(even) { border-right: none; border-bottom: 1px solid var(--line); padding: 1.75rem 0; }
  .pval:last-child { border-bottom: none; }
}

/* ============================================================ 09. CONTACT */
.contact { background: var(--bg); border-top: 1px solid var(--line); text-align: center; padding-top: clamp(6rem,14vh,12rem); }
.contact__eyebrow { margin-bottom: 2rem; }
.contact__mail { display: inline-block; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 9vw, 8rem); line-height: 1; letter-spacing: -0.03em; }
.contact__mail:hover { color: var(--accent); }
.contact__cta { margin-top: 3rem; }
.btn { display: inline-block; padding: 0.9rem 1.8rem; border: 1px solid var(--fg); border-radius: 100px; font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; transition: background .3s var(--ease), color .3s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #0d0d0f; }
.btn--lg { padding: 1.2rem 2.6rem; font-size: 0.95rem; }
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: left; margin-top: clamp(4rem, 10vh, 8rem); border-top: 1px solid var(--line); padding-top: 2.5rem; }
.contact__grid > div { display: flex; flex-direction: column; gap: 0.4rem; }
.contact__grid span.mono { margin-bottom: 0.5rem; }
.contact__grid a:hover { color: var(--accent); }
.contact__base { display: flex; justify-content: space-between; margin-top: 3rem; }
@media (max-width: 640px) { .contact__grid { grid-template-columns: 1fr; gap: 1.5rem; } .contact__base { flex-direction: column; gap: 0.5rem; } }

/* ============================================================ 리빌 유틸(폴백) */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
html.gsap-ready .reveal { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
