[hidden] { display: none !important; }

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

html {
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* 한글 줄바꿈은 어절(띄어쓰기) 단위로만 — 기본값(글자 단위 줄바꿈)은
     "촬영해 올리는"이 "올리"/"는"으로 쪼개지는 식의 단어 중간 줄바꿈을 만든다
     (2026-09-15 보스 지적으로 발견). URL처럼 띄어쓰기 없는 긴 토큰은
     overflow-wrap으로 넘침 없이 강제 줄바꿈되도록 예외 처리. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

::selection { background: var(--accent-pale); color: var(--text); }

.shell {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

/* ---- type ---- */

.display {
  font-family: var(--font-display-kr);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.032em;
}

.display-en {
  font-family: var(--font-display-en);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.chrome {
  background: var(--chrome);
  background-size: 100% 210%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: chrome-drift 10s var(--ease-soft) infinite alternate;
}

@keyframes chrome-drift {
  from { background-position: 50% 4%; }
  to { background-position: 50% 96%; }
}

.slate {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.lede {
  /* 2026-09-15 보스 지시로 포인트 소폭 확대 (기존 1.05~1.2rem → 1.12~1.3rem). */
  font-size: clamp(1.12rem, 1.3vw, 1.3rem);
  line-height: 1.78;
  color: var(--text-muted);
  max-width: 44ch;
}

.note {
  font-size: 0.97rem;
  line-height: 1.72;
  color: var(--text-muted);
  max-width: 46ch;
}

/* ---- buttons ---- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  padding: 0.95em 1.9em;
  font-size: 0.95rem;
  font-weight: 400;
  border: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  color: var(--text);
  transition: color 0.5s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--rule-strong);
  z-index: -2;
  transition: border-color 0.5s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  z-index: -1;
  transition: transform 0.55s var(--ease);
}

.btn:hover { color: var(--page); }
.btn:hover::after { transform: scaleY(1); }
.btn:hover::before { border-color: var(--accent); }

.btn--solid { color: var(--page); }
.btn--solid::after { transform: scaleY(1); }
.btn--solid::before { border-color: var(--accent); }
.btn--solid:hover::after { transform: scaleY(0); }
.btn--solid:hover { color: var(--accent); }

.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.35; cursor: not-allowed; }
.btn:disabled:hover { color: var(--text); }
.btn:disabled:hover::after { transform: scaleY(0); }

/* ---- fixed layers ---- */

.rails {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  mix-blend-mode: multiply;
  opacity: 0.5;
}
.rails span { border-left: 1px solid rgba(35, 32, 26, 0.09); }
.rails span:first-child { border-left: none; }

.grain {
  position: fixed;
  inset: -150%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  25%  { transform: translate3d(-3%, 2%, 0); }
  50%  { transform: translate3d(2%, -3%, 0); }
  75%  { transform: translate3d(-2%, -2%, 0); }
  100% { transform: translate3d(3%, 1%, 0); }
}

.cursor,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 90;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s var(--ease-soft);
}
.cursor {
  width: 5px; height: 5px;
  background: var(--accent);
  margin: -2.5px 0 0 -2.5px;
}
.cursor-ring {
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 1px solid rgba(142, 106, 46, 0.5);
  transition: opacity 0.4s var(--ease-soft), width 0.45s var(--ease), height 0.45s var(--ease), margin 0.45s var(--ease), border-color 0.4s var(--ease-soft);
}
body.cursor-live .cursor,
body.cursor-live .cursor-ring { opacity: 1; }
body.cursor-hot .cursor-ring {
  width: 66px; height: 66px;
  margin: -33px 0 0 -33px;
}
body.cursor-dark .cursor { background: var(--accent-soft); }
body.cursor-dark .cursor-ring { border-color: rgba(224, 196, 137, 0.55); }

/* ---- reveal primitives (driven by GSAP, with a no-JS safe default) ---- */

.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; }

html.motion-ready .reveal-line > span { transform: translateY(105%); }
html.motion-ready .fade-up { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.motion-ready .reveal-line > span { transform: none; }
  html.motion-ready .fade-up { opacity: 1; }
  .grain { display: none; }
}
