:root {
  /* 공간팀 키컬러: #101010 · #FCFCFC · Cloud Dancer #F0EEE9 · #C4B6A0 */
  --bg: #FCFCFC;
  --ink: #101010;
  --sub: #8C8A86;
  --line: #E6E3DD;
  --film: #F0EEE9;
  --accent: #C4B6A0;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter: clamp(16px, 5vw, 96px);
  color-scheme: light;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
::view-transition-group(mark) { animation-duration: .6s; animation-timing-function: var(--ease); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: -0.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
svg, .mark img { display: block; width: 100%; height: auto; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ko { font-family: "Noto Sans KR", system-ui, sans-serif; text-transform: none; font-size: 12px; line-height: 1.5; letter-spacing: 0; color: var(--sub); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* reveal */
.rv { opacity: 0; transform: translateY(6px); animation: rv .7s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms + 40ms); }
@keyframes rv { to { opacity: 1; transform: none; } }

/* ---------- home ---------- */
.home {
  flex: 1;
  width: 100%;
  max-width: calc(1280px + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 168px) var(--gutter) clamp(64px, 10vh, 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.home .mark { width: clamp(200px, 24vw, 440px); view-transition-name: mark; }
.home .dept { width: clamp(120px, 9vw, 176px); margin-top: clamp(40px, 8vh, 96px); }
.home .intro { margin-top: clamp(36px, 6.5vh, 80px); font-size: clamp(15px, 0.9vw, 17px); color: var(--ink); opacity: .72; font-weight: 300; max-width: 48em; }
.home .intro { text-wrap: balance; }
.home .intro span { display: block; }

.teams {
  margin-top: clamp(56px, 11vh, 140px);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.teams a {
  position: relative;
  padding: clamp(26px, 4vh, 48px) 8px clamp(24px, 3.6vh, 44px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1vh, 12px);
  transition: color .4s var(--ease);
}
.teams a + a { border-left: 1px solid var(--line); }
.teams .no { color: var(--sub); transition: color .4s var(--ease); }
.teams .lg { height: clamp(30px, 2.2vw, 42px); margin: 4px 0 2px; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.teams .lg svg { height: 100%; width: auto; max-width: clamp(120px, 8.5vw, 172px); }
.teams .lg.ph { width: clamp(76px, 5.5vw, 106px); background: var(--film); }
.teams .tt { font-size: 12px; color: var(--sub); opacity: 0; transform: translateY(-3px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.teams a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.teams a:hover::after, .teams a:focus-visible::after { transform: scaleX(1); }
.teams a:hover .no, .teams a:focus-visible .no { color: var(--ink); }
.teams a:hover .tt, .teams a:focus-visible .tt { opacity: 1; transform: none; }
.teams a:focus-visible { outline-offset: -1px; }

/* ---------- footer ---------- */
.foot {
  width: 100%;
  padding: 24px var(--gutter) 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--sub);
}
.foot .keys { white-space: nowrap; }
.home ~ .foot { justify-content: center; text-align: center; }
.team ~ .foot { max-width: calc(1280px + var(--gutter) * 2); margin: 0 auto; }

/* ---------- team ---------- */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bar .back { color: var(--ink); justify-self: start; display: inline-flex; align-items: center; padding: 10px 10px 10px 0; }
.bar .back svg { width: 28px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: square; stroke-linejoin: miter; overflow: visible; transition: transform .4s var(--ease); }
.bar .back:hover svg { transform: translateX(-4px); }
.bar .mark { width: 92px; view-transition-name: mark; }
.bar .count { justify-self: end; color: var(--sub); }
.bar .count b { color: var(--ink); font-weight: 400; }

.team {
  flex: 1;
  width: 100%;
  max-width: calc(1280px + var(--gutter) * 2);
  margin: 0 auto;
  padding: clamp(40px, 10vh, 128px) var(--gutter) clamp(48px, 8vh, 112px);
}
.team .head { display: grid; grid-template-columns: 1fr; gap: clamp(10px, 1.4vh, 16px); }
.team .head .mono { color: var(--sub); }
.team h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 300; line-height: 1.1; letter-spacing: -0.04em; }
.team .head .title { font-size: 17px; font-weight: 400; }

.film {
  position: relative;
  margin-top: clamp(40px, 8vh, 104px);
  aspect-ratio: 16 / 9;
  background: var(--film);
  overflow: hidden;
}
.film video, .film iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.film .play .ko { color: inherit; }
.film .play {
  position: absolute; inset: 0; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit;
}
.film .play .tri { width: 0; height: 0; border-left: 14px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent; transition: transform .5s var(--ease); }
.film .play:hover .tri { transform: scale(1.18); }
.film .play[disabled] { cursor: default; color: var(--sub); }
.film .play[disabled] .tri { border-left-color: transparent; width: 22px; height: 1px; border: 0; background: currentColor; }
.film figcaption { position: absolute; left: 16px; bottom: 14px; color: var(--sub); pointer-events: none; }

.about {
  margin-top: clamp(48px, 10vh, 128px);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  align-items: start;
  gap: clamp(32px, 7vw, 144px);
}
.film.reel { margin-top: 0; aspect-ratio: 9 / 16; }
.about .text dl { margin-top: clamp(40px, 6vh, 72px); }
.about .lead { font-size: clamp(18px, 1.15vw, 22px); line-height: 1.75; font-weight: 400; letter-spacing: -0.02em; }
.about .body { margin-top: clamp(20px, 3vh, 32px); opacity: .72; font-weight: 300; }
.about dl { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; row-gap: 10px; align-content: start; border-top: 1px solid var(--line); padding-top: 18px; }
.about dl { align-items: baseline; }
.about dt { color: var(--sub); line-height: 24px; }
.about dd { font-size: 14px; line-height: 24px; }

.switch {
  margin-top: clamp(64px, 14vh, 176px);
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.switch .label { color: var(--sub); }
.switch ol { list-style: none; display: flex; gap: 6px; }
.switch ol a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 22px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: .04em;
  transition: border-color .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.switch ol a:hover { border-color: var(--ink); }
.switch ol a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--ink); }


.foot .dept-s { width: 34px; color: var(--ink); }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .home .intro span { display: inline; }
  .home .intro span + span::before { content: " "; }
  .home .intro { font-size: 14px; }
  .teams { grid-template-columns: 1fr; border-bottom: 0; }
  .teams a { flex-direction: row; justify-content: space-between; padding: 18px 2px; border-bottom: 1px solid var(--line); text-align: left; gap: 16px; }
  .teams a + a { border-left: 0; }
  .teams .lg { height: 24px; margin: 0 auto 0 0; justify-content: flex-start; }
  .teams .lg.ph { width: 64px; }
  .teams .lg svg { max-width: 120px; }
  .teams .no { order: -1; width: 28px; }
  .teams .tt { opacity: 1; transform: none; }
  .teams a::after { bottom: -1px; }
  .about { grid-template-columns: 1fr; }
  .about .reel { order: 2; }
  .foot { flex-direction: column; gap: 6px; }
  .foot .keys { display: none; }
  .bar .mark { width: 72px; }
  .bar .back span { display: none; }
  .switch { flex-direction: column; align-items: flex-start; }
  .switch ol { width: 100%; justify-content: space-between; }
}

@media (hover: none) {
  .teams .tt { opacity: 1; transform: none; }
  .foot .keys { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rv { animation: none; opacity: 1; transform: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  * { transition: none !important; }
}
