@charset "UTF-8";
/* =============================================================
   akeweb.com — 첫 화면(랜딩) 전용 스타일
   index.html 에서만 style.css 다음에 읽힙니다.

   구조
     .fullpage          ← 화면 단위로 끊기는 스크롤 컨테이너
       .fp-section        ← 정확히 화면 높이 하나
         #intro             검정 첫 화면 + 사진 구체(src/js/sphere.js) + 한 줄 문구

   첫 화면은 색이 고정이라 테마 변수를 쓰지 않습니다.
   ============================================================= */

:root {
  --lp-bg:        #010504;
  --lp-line:      #00FF99;   /* 네온 그린 */
  /* 첫 문구의 초록 단어 — 영화 매트릭스 코드 비의 색(참고 이미지에서 추출, 색상각 120°)
     글자 #4AE548 · 가장 밝은 중심 #5BFB5A · 번지는 빛 #2EA12F → #1F7F1F */
  --lp-matrix:       #4AE548;
  --lp-matrix-glow:  0 0 2px rgb(91 251 90 / 90%), 0 0 8px rgb(46 161 47 / 75%),
                     0 0 18px rgb(31 127 31 / 55%);
  --lp-gold:      #FFC84A;
  --lp-text:      #FFFFFF;
  --lp-text-sub:  rgb(255 255 255 / 64%);
  --lp-hair:      rgb(255 255 255 / 12%);
  --lp-header-h:  72px;
  --lp-pad:       20px;
  /* 캐러셀에서 '가장자리(가장 가까운)' 카드의 너비. 가운데 카드는 원근 때문에
     이 값의 절반쯤으로 보입니다. */
  --lp-stage-card: clamp(190px, 60vw, 260px);
  --lp-stage-center: 56%;     /* 카드 띠의 세로 중심(화면 높이 기준) */
}

@media (min-width: 768px) {
  :root {
    --lp-pad: 40px; --lp-header-h: 80px;
    --lp-stage-card: clamp(260px, 30vw, 380px);
  }
}
@media (min-width: 1280px) {
  :root { --lp-pad: 56px; --lp-stage-card: clamp(310px, 23vw, 420px); }
}
@media (min-width: 1680px) {
  :root { --lp-pad: 72px; --lp-stage-card: clamp(340px, 22vw, 450px); }
}
/* 화면이 낮으면 카드와 글자가 만나지 않도록 글과 카드를 함께 줄입니다. */
@media (max-height: 820px) {
  :root { --lp-stage-card: clamp(240px, 26vw, 420px); --lp-stage-center: 58%; }
}

/* -------------------------------------------------------------
   1. 화면 단위 스크롤
   ------------------------------------------------------------- */
html.landing,
body.landing {
  height: 100%;
  margin: 0;
  overflow: hidden;            /* 바깥 스크롤바를 만들지 않습니다 */
  background: var(--lp-bg);
  overscroll-behavior: none;
}

.fullpage {
  height: 100vh;
  height: 100svh;              /* 주소창이 보일 때의 높이 — 오프닝 중에 화면이 출렁이지 않게 */
  overflow: hidden;            /* 직접 스크롤하지 않습니다 — landing.js 가 한 페이지씩 넘깁니다 */
  scroll-behavior: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.fullpage::-webkit-scrollbar { width: 0; height: 0; }

@media (prefers-reduced-motion: reduce) {
  .fullpage { scroll-behavior: auto; }
}

.fp-section {
  position: relative;
  height: 100vh;
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;    /* 한 번의 휠에 한 화면만 넘어갑니다 */
  overflow: hidden;            /* 두 화면이 서로 침범하지 않게 */
  isolation: isolate;
}

/* -------------------------------------------------------------
   2. 상단 바 — 두 화면 위에 떠 있고, 화면에 따라 색이 바뀝니다
   ------------------------------------------------------------- */
.lp-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--lp-header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding-inline: var(--lp-pad);
  color: var(--lp-text);
  transition: color 320ms var(--ease), background-color 320ms var(--ease),
              border-color 320ms var(--ease);
  border-bottom: 1px solid transparent;
}

/* 두 번째 화면(흰 배경)에 들어가면 글자색을 뒤집습니다. */
.lp-header[data-on='light'] {
  color: #131517;
  background: rgb(255 255 255 / 86%);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: #E5E7EA;
}

.lp-header .wordmark { flex: none; position: relative; }
.lp-header .wordmark__img { height: 58px; width: auto; }   /* 처음 크기(29px)의 2배 */
.lp-header .wordmark__img--light { display: none; }
.lp-header .wordmark__img--dark { display: block; }
.lp-header[data-on='light'] .wordmark__img--light { display: block; }
.lp-header[data-on='light'] .wordmark__img--dark { display: none; }

/* 로고의 매트릭스 모드 — 로고 PNG 를 마스크로 써서 같은 모양의 초록 판을 겹칩니다.
   글로우(drop-shadow)는 마스크에 잘리지 않도록 바깥 span 에, 마스크는 안쪽 i 에 둡니다. */
.wordmark__matrix,
.wordmark__code {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.wordmark__matrix {
  filter: drop-shadow(0 0 1.5px rgb(91 251 90 / 90%)) drop-shadow(0 0 7px rgb(46 161 47 / 70%));
}
.wordmark__matrix i {
  position: absolute;
  inset: 0;
  background: var(--lp-matrix);
  -webkit-mask: url('../img/logo-dark.png') center / contain no-repeat;
  mask: url('../img/logo-dark.png') center / contain no-repeat;
}
.wordmark__code {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-matrix);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: pre;
  text-shadow: 0 0 3px rgb(91 251 90 / 95%), 0 0 10px rgb(46 161 47 / 80%);
}
/* 해독 중 — 세부 움직임은 glitch.js 가 프레임마다 정합니다. */
.wordmark[data-matrix='glitch'] .wordmark__matrix { opacity: 1; }
.wordmark[data-matrix='glitch'] .wordmark__code { opacity: 1; }
/* 완성 — 흰 로고는 숨기고 초록 로고로 고정, 130ms 동안 선명해집니다. */
.wordmark[data-matrix='on'] .wordmark__img { opacity: 0; }
.wordmark[data-matrix='on'] .wordmark__matrix {
  opacity: 1;
  animation: lp-resolve 130ms ease-out 1;
}
@media (prefers-reduced-motion: reduce) {
  .wordmark[data-matrix='on'] .wordmark__matrix { animation: none; }
}

.lp-nav {
  display: none;
  align-items: center;
  gap: var(--sp-7);
  margin-inline: auto;
}
@media (min-width: 900px) {
  .lp-nav { display: flex; }
}

.lp-nav a {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: inherit;
  opacity: 0.78;
  padding-block: 6px;
  transition: opacity var(--t-fast) var(--ease);
}
.lp-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}
.lp-nav a:hover { opacity: 1; }
.lp-nav a:hover::after { transform: scaleX(1); }

.lp-header__right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}
@media (min-width: 900px) {
  /* 로고 · 메뉴 · 오른쪽 버튼을 3칸으로 — 양옆 칸이 같은 폭(1fr)이라 메뉴가 화면 정중앙에 옵니다.
     화면이 좁아 로고가 칸보다 넓어지면 칸이 늘어나며 메뉴가 비켜 서서 겹치지 않습니다. */
  .lp-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .lp-header .wordmark { justify-self: start; }
  .lp-nav { margin-inline: 0; }
  .lp-header__right { margin-left: 0; justify-self: end; }
}

/* 상단 문의 버튼 */
.lp-cta {
  display: none;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-inline: 18px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: inherit;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
@media (min-width: 560px) {
  .lp-cta { display: inline-flex; }
}
.lp-cta:hover { background: var(--lp-text); color: #0A0F0D; }
.lp-header[data-on='light'] .lp-cta:hover { background: #131517; color: #FFFFFF; }

/* 메뉴 아이콘 */
.lp-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.lp-menu-btn svg { width: 22px; height: 22px; }
@media (min-width: 900px) {
  .lp-menu-btn { display: none; }
}

/* -------------------------------------------------------------
   3. SECTION 01 — 소개 화면
   ------------------------------------------------------------- */
/* 레이어 A — 기본 암전 공간. 딥 블랙 + 딥 그린, 가운데가 아주 조금 열리고
   가장자리로 갈수록 미세하게 더 어두워집니다. 구 뒤쪽(가운데 위)은 단순하게 둡니다.
   맨 위 겹은 파도 수평선 위에 아주 옅게 깔린 물안개 — 비와 파도의 경계를 이어 줍니다. */
.fp-intro {
  background:
    linear-gradient(to top, transparent 22%, rgb(74 229 72 / 5.5%) 31%, rgb(74 229 72 / 2.5%) 38%, transparent 48%),
    radial-gradient(130% 85% at 50% 42%, #061714 0%, #03110D 42%, #010504 78%, #000302 100%);
  color: var(--lp-text);
}

/* 레이어 B — 희미한 배경 그리드. 가까이 보면 보이고 멀리선 거의 안 보이는 정도.
   위 · 가운데에만 은은하게 남기고 아래(지형 쪽)로 갈수록 사라집니다. */
.fp-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(74 229 72 / 4.5%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(74 229 72 / 4.5%) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(120% 70% at 50% 30%, #000 0%, rgb(0 0 0 / 55%) 45%, transparent 75%);
  mask-image: radial-gradient(120% 70% at 50% 30%, #000 0%, rgb(0 0 0 / 55%) 45%, transparent 75%);
}

/* 코드 비 — 지형 위쪽의 빈 공간(구 뒤)에만 내립니다 (src/js/rain.js).
   지형 수평선 바로 위에서 끝나도록 높이를 정하고, 아래쪽 24% 와 맨 위(헤더 밑)를 서서히 지워
   파도와 겹치지 않고 헤더 · 메뉴도 깨끗하게 둡니다. */
.lp-rain {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 70%;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 10%, #000 76%, transparent 100%);
}
@media (max-width: 767px) {
  .lp-rain { height: 74%; }
}
.lp-rain canvas { display: block; }
@media (prefers-reduced-motion: reduce) {
  .lp-rain { display: none; }
}

/* 번개 — 먼 하늘이 은은하게 밝아집니다. 밝기는 wave.js 가 --flash(0 ~ 1)로 넣고,
   눈부심을 줄이려고 최대 18% 로 제한합니다. 구체 · 문구보다 뒤(z 0)에 있습니다. */
.fp-intro::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(90% 60% at 62% 8%, rgb(200 255 194 / 100%) 0%, rgb(74 229 72 / 45%) 38%, transparent 72%);
  opacity: calc(var(--flash, 0) * 0.18);
}

/* 레이어 C · D — 매트릭스 웨이브 지형과 신호 광선 · 광점 (src/js/wave.js)
   화면 아래부터 중경까지, 좌우 끝까지 꽉 채웁니다. 위쪽(수평선 너머)만 서서히 지웁니다. */
.wave {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;              /* 돌풍 때 뾰족하게 솟는 마루도 완성된 구의 아래쪽 카드에 닿지 않는 높이 */
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 62%, rgb(0 0 0 / 40%) 86%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, #000 62%, rgb(0 0 0 / 40%) 86%, transparent 100%);
}
@media (max-width: 767px) {
  .wave { height: 40%; }
}
.wave canvas { display: block; width: 100%; height: 100%; }
.wave[data-fallback='true'] { display: none; }

/* 본문 */
.fp-intro__inner {
  position: absolute;
  left: 0; right: 0;
  /* 완성된 구체의 바로 위 — 문구 아래쪽이 '구 윗부분 - 간격' 에 닿습니다.
     두 값은 화면 크기가 바뀔 때마다 landing.js 가 실제 구 위치로 계산해 넣습니다.
     (구를 그릴 수 없을 때는 괄호 안 기본값을 씁니다.) */
  top: calc(var(--sphere-top, 27%) - var(--title-gap, 40px));
  transform: translateY(-100%);
  z-index: 5;                     /* 가장 앞 — 구체보다 위 */
  padding-inline: var(--lp-pad);
  text-align: center;
}
/* 글 뒤쪽만 옅게 어둡게 해 오프닝의 큰 사진 위에서도 또렷하게 읽히게 합니다. */
.fp-intro__inner::before {
  content: '';
  position: absolute;
  left: 50%; top: 0;
  width: 150vw; height: 125%;
  transform: translateX(-50%);
  z-index: -1;
  background: radial-gradient(58% 72% at 50% 36%,
    rgb(0 0 0 / 62%) 0%, rgb(0 0 0 / 34%) 46%, rgb(0 0 0 / 0%) 78%);
  pointer-events: none;
}

.lp-eyebrow {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgb(255 255 255 / 70%);
}
.lp-eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--lp-line);
  box-shadow: 0 0 8px rgb(0 255 153 / 70%);
}

.lp-title {
  margin-top: 0;
  font-size: clamp(1.375rem, 0.95rem + 1.3vw, 2.25rem); /* 22 → 36px */
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}
.lp-title span { display: block; }
.lp-title__gold {
  color: var(--lp-gold);
  text-shadow: 0 0 26px rgb(255 200 74 / 14%);
}

.lp-lead {
  margin-top: clamp(14px, 1.8vh, 24px);
  margin-inline: auto;
  max-width: 42em;
  font-size: clamp(0.9375rem, 0.88rem + 0.3vw, 1.125rem);
  line-height: 1.75;
  color: var(--lp-text-sub);
}

.lp-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(18px, 2.6vh, 36px);
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding-inline: 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.lp-btn span { transition: transform 220ms var(--ease); }
.lp-btn:hover span { transform: translateX(4px); }

.lp-btn--primary {
  background: var(--lp-line);
  color: #042217;
  box-shadow: 0 8px 26px rgb(0 255 153 / 14%);
}
.lp-btn--primary:hover { background: #4DFFBA; }

.lp-btn--ghost {
  background: transparent;
  color: var(--lp-text);
  border-color: rgb(255 255 255 / 28%);
}
.lp-btn--ghost:hover { border-color: var(--lp-text); }

/* 하단 키워드 줄 */
.lp-keywords {
  position: absolute;
  left: 0; right: 0; bottom: clamp(12px, 2.4vh, 26px);
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  padding-inline: var(--lp-pad);
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: rgb(255 255 255 / 62%);
  text-shadow: 0 0 6px #010504, 0 0 12px #010504;   /* 아래 지형 선 위에서도 또렷하게 */
}
.lp-keywords li { display: flex; align-items: center; gap: 10px 18px; }
.lp-keywords li + li::before {
  content: '—';
  opacity: 0.5;
  letter-spacing: 0;
}

/* -------------------------------------------------------------
   3-1. 한 줄 문구 — 흰 글자는 부드럽게, 초록 글자는 매트릭스 스크램블로
   ------------------------------------------------------------- */
.lp-title {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.34em;
}

.lp-word {
  display: inline-block;
  white-space: nowrap;
}

/* 흰 단어 — 처음에는 숨어 있다가 0.6초 동안 부드럽게 나타납니다(글리치 없음).
   data-reveal 은 첫 화면이 한 번 그려진 뒤 glitch.js 가 붙입니다. */
.lp-word--plain {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(6px);
}
.lp-title[data-reveal='on'] .lp-word--plain {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  transition: opacity 600ms ease-out, filter 600ms ease-out, transform 600ms ease-out;
}
.lp-title[data-glitch-state='done'] .lp-word--plain {
  opacity: 1;
  filter: none;
  transform: none;
}

/* 초록 단어 — 진짜 글자는 자리만 차지한 채 투명하게 기다립니다(너비 고정). */
.lp-word--accent {
  position: relative;
  color: var(--lp-matrix);
  text-shadow: var(--lp-matrix-glow);
}
.lp-word__real {
  opacity: 0;
}
/* 해독이 끝나는 순간 130ms 동안 스르륵 선명해집니다. */
.lp-word--accent[data-done='true'] .lp-word__real {
  opacity: 1;
  animation: lp-resolve 130ms ease-out 1;
}
@keyframes lp-resolve {
  from { opacity: 0.35; filter: blur(4px); }
  to   { opacity: 1; filter: blur(0); }
}

/* 해독 중인 코드 — 진짜 글자 위에 겹쳐 그리며 자리를 차지하지 않습니다. */
.lp-word__fx {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lp-matrix);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0;
  white-space: pre;
  pointer-events: none;
  opacity: 0;
}
.lp-word--accent[data-active='true']:not([data-done='true']) .lp-word__fx {
  opacity: 1;
  text-shadow: 0 0 3px rgb(91 251 90 / 95%), 0 0 10px rgb(46 161 47 / 80%),
               0 0 22px rgb(31 127 31 / 60%);
  animation: lp-signal 260ms steps(1, end) infinite;
}
/* 신호가 불안정하게 들어오는 느낌 — 밝기만 짧게 흔들립니다. */
@keyframes lp-signal {
  0%   { filter: brightness(1); }
  22%  { filter: brightness(1.45); }
  37%  { filter: brightness(0.7); }
  58%  { filter: brightness(1.15); }
  81%  { filter: brightness(0.85); }
}
/* 디지털 노이즈 — 같은 코드를 가로 띠로 잘라 살짝 어긋나게 겹칩니다. */
.lp-word--accent[data-active='true']:not([data-done='true']) .lp-word__fx::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: pre;
  color: #5BFB5A;
  opacity: 0.55;
  animation: lp-slice 180ms steps(1, end) infinite;
}
@keyframes lp-slice {
  0%   { clip-path: inset(12% 0 70% 0); transform: translateX(-2px); }
  25%  { clip-path: inset(55% 0 28% 0); transform: translateX(2px); }
  50%  { clip-path: inset(0 0 100% 0);  transform: none; }
  75%  { clip-path: inset(72% 0 8% 0);  transform: translateX(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .lp-word--plain { opacity: 1; filter: none; transform: none; }
  .lp-word__real { opacity: 1; }
  .lp-word--accent[data-done='true'] .lp-word__real { animation: none; }
  .lp-word__fx { display: none; }
}

/* -------------------------------------------------------------
   4. 가운데 3D 사진 구체
   ------------------------------------------------------------- */
.sphere {
  position: absolute;
  inset: 0;
  z-index: 3;                 /* 글 아래 */
  pointer-events: none;       /* 조작을 받지 않습니다 */
}
.sphere canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* -------------------------------------------------------------
   4-1. 사진 업로드 버튼 — 누구에게나 보이고, 누르면 관리자 전용 안내만 뜹니다.
        관리자 서버로 열면 admin.css 가 이 버튼을 숨기고 실제 업로드 버튼을 띄웁니다.
   ------------------------------------------------------------- */
.lp-upload {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: rgb(4 14 11 / 82%);
  backdrop-filter: blur(10px);
  color: var(--lp-text);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.lp-upload:hover { border-color: var(--lp-matrix); }
.lp-upload:focus-visible { outline: 2px solid var(--lp-matrix); outline-offset: 3px; }
.lp-upload svg,
.lp-upload-notice svg {
  width: 17px; height: 17px;
  flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.lp-upload-notice {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 56px);
  z-index: 61;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(320px, calc(100vw - 32px));
  padding: 14px 12px 14px 16px;
  border: 1px solid rgb(74 229 72 / 35%);
  border-radius: 12px;
  background: rgb(4 14 11 / 94%);
  backdrop-filter: blur(12px);
  color: var(--lp-text);
  box-shadow: 0 12px 32px rgb(0 0 0 / 45%);
}
.lp-upload-notice[hidden] { display: none; }
.lp-upload-notice > svg { margin-top: 2px; color: var(--lp-matrix); }
.lp-upload-notice > div { flex: 1; min-width: 0; }
.lp-upload-notice__title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}
.lp-upload-notice__desc {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--lp-text-sub);
}
.lp-upload-notice__close {
  flex: none;
  width: 28px; height: 28px;
  margin: -4px -2px 0 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--lp-text-sub);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}
.lp-upload-notice__close:hover { color: var(--lp-text); background: rgb(255 255 255 / 8%); }
.lp-upload-notice__close:focus-visible { outline: 2px solid var(--lp-matrix); }

/* 자료실 버튼 — 사진 업로드 버튼 바로 위. 안내창은 두 버튼 위로 */
.lp-library { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 54px); }
.lp-upload-notice { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 110px); }

/* 소리 켜기 · 끄기 — 왼쪽 아래, 업로드 버튼과 같은 모양 */
.lp-sound {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 14px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 999px;
  background: rgb(4 14 11 / 82%);
  backdrop-filter: blur(10px);
  color: var(--lp-text);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.lp-sound:hover { border-color: var(--lp-matrix); }
.lp-sound:focus-visible { outline: 2px solid var(--lp-matrix); outline-offset: 3px; }
.lp-sound svg {
  width: 18px; height: 18px;
  flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.lp-sound__on { display: none; }
.lp-sound[aria-pressed='true'] { color: var(--lp-matrix); border-color: rgb(74 229 72 / 45%); }
.lp-sound[aria-pressed='true'] .lp-sound__on { display: block; }
.lp-sound[aria-pressed='true'] .lp-sound__off { display: none; }

/* 좁은 화면 — 하단 키워드 줄을 업로드 버튼 위로 올려 겹치지 않게 합니다. */
@media (max-width: 767px) {
  .lp-keywords { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 56px); }
}

/* WebGL 을 쓸 수 없을 때 — 아무것도 그리지 않고 배경만 남깁니다. */
.sphere[data-fallback='true'] { display: none; }

/* -------------------------------------------------------------
   5. 화면이 낮을 때 — 글을 줄여 카드와 만나지 않게 합니다.
   (앞의 선언을 덮어써야 하므로 파일 끝에 둡니다)
   ------------------------------------------------------------- */
@media (max-height: 820px) {
  .lp-eyebrow { font-size: 0.75rem; }
  .lp-title {
    margin-top: 10px;
    font-size: clamp(1.5rem, 0.85rem + 2.1vw, 2.5rem);
    line-height: 1.2;
  }
  .lp-lead {
    margin-top: 12px;
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  .lp-actions { margin-top: 18px; }
  .lp-btn { height: 46px; padding-inline: 22px; }
}

@media (max-height: 680px) {
  .lp-lead { display: none; }        /* 더 낮으면 소개 한 줄은 접습니다 */
}

/* 좁은 휴대폰 — 문구가 한 줄을 지키도록 글자 크기를 화면 너비에 맞춥니다.
   문구 너비는 글자 크기의 약 14.5배라, (화면 너비 - 좌우 여백) / 15 를 넘지 않게 하고
   휴대폰에서는 최대 22px 로 통일합니다(390px 이상 휴대폰은 22px 그대로). */
@media (max-width: 559px) {
  .lp-title { font-size: min(1.375rem, calc((100vw - 2 * var(--lp-pad)) / 15)); }
}

/* =============================================================
   6. 2 ~ 4 페이지 — 포트폴리오 카드 · 하는 일 · 회사 정보
   카드와 타일은 같은 카툰 문법을 씁니다: 두꺼운 검정 테두리 + 오른쪽 아래로 딱 떨어지는 그림자.
   ============================================================= */
:root {
  --pg-paper: #F4F6F1;          /* 밝은 페이지 바탕 — 초록 기운이 아주 살짝 도는 흰색 */
  --pg-ink: #111411;
  --pg-sub: #4A514B;
  --pg-line: #D9DED6;
  --pg-border: 2.5px;
  --pg-shadow: 6px 6px 0;
}

/* 밝은 페이지에서는 로고를 검정판으로(매트릭스 초록 겹은 끔) */
.lp-header[data-on='light'] .wordmark__matrix,
.lp-header[data-on='light'] .wordmark__code { opacity: 0 !important; animation: none !important; }
.lp-header[data-on='light'] .wordmark .wordmark__img--light { opacity: 1 !important; }

/* 1페이지 전용 버튼(소리 · 사진 업로드)은 다른 페이지에서 숨깁니다. */
html[data-page]:not([data-page='0']) .lp-sound,
html[data-page]:not([data-page='0']) .lp-upload,
html[data-page]:not([data-page='0']) .lp-upload-notice {
  opacity: 0;
  visibility: hidden;
}
.lp-sound, .lp-upload { transition: opacity 200ms var(--ease), visibility 200ms, border-color 160ms var(--ease); }

/* 페이지 전환 지지직 */
.fp-glitch {
  position: fixed;
  inset: 0;
  z-index: 85;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: none;
}
.fp-glitch.is-on { display: block; }

/* ---------- 2 · 3페이지 공통 — 어두운 매트릭스 바탕 · 원색 타일 ---------- */
.fp-services,
.fp-process,
.fp-company {
  background:
    radial-gradient(80% 70% at 85% 30%, rgb(74 229 72 / 10%) 0%, transparent 60%),
    linear-gradient(180deg, #030907 0%, #061210 100%);
  color: #fff;
}
.fp-services::before,
.fp-process::before,
.fp-company::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgb(74 229 72 / 5%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(74 229 72 / 5%) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 50%, #000 0%, transparent 85%);
  mask-image: radial-gradient(90% 80% at 50% 50%, #000 0%, transparent 85%);
}
.sv-inner {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: calc(var(--lp-header-h) + clamp(14px, 3vh, 36px)) var(--lp-pad) clamp(20px, 4vh, 44px);
}
.sv-eyebrow {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--lp-matrix);
}
.sv-title {
  margin: 0;
  font-size: clamp(2rem, 1.1rem + 2.8vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}
.sv-title span { display: block; }
.sv-title span:last-child { color: var(--lp-matrix); text-shadow: var(--lp-matrix-glow); }
.sv-lead {
  max-width: 30em;
  margin: clamp(14px, 2.4vh, 24px) 0 0;
  font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
  line-height: 1.7;
  color: rgb(255 255 255 / 66%);
}
.sv-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(18px, 3vh, 32px);
  height: 46px;
  padding: 0 22px;
  border: 2px solid #000;
  border-radius: 999px;
  background: var(--lp-matrix);
  box-shadow: 4px 4px 0 #000, 0 0 24px rgb(74 229 72 / 28%);
  font-size: 0.9375rem;
  font-weight: 800;
  color: #062A06;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.sv-cta:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000, 0 0 32px rgb(74 229 72 / 40%); }

.sv-tile {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: var(--pg-border) solid #000;
  border-radius: 14px;
  background: #F4F6F1;
  box-shadow: var(--pg-shadow) var(--lp-matrix);
  overflow: hidden;
  color: var(--pg-ink);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.sv-tile:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--lp-matrix); }
.sv-tile__art {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  background: var(--tile);
  border-bottom: var(--pg-border) solid #000;
}
.sv-tile__art svg {
  width: min(62%, 150px);
  height: auto;
  max-height: 80%;
  fill: none;
  stroke: #111;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 300ms var(--ease);
}
.sv-tile__art svg .fill { fill: #111; }
.sv-tile:hover .sv-tile__art svg { transform: scale(1.08) rotate(-2deg); }
.sv-tile__body { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 14px; }
.sv-tile__title { font-size: clamp(0.9375rem, 0.86rem + 0.3vw, 1.125rem); font-weight: 800; letter-spacing: -0.02em; }
.sv-tile__desc { font-size: 0.8125rem; line-height: 1.5; color: var(--pg-sub); }

/* ---------- 4페이지 — 회사 정보 · 메뉴 ---------- */
.fp-company { color: #fff; }
.co-inner { position: relative; }
.co-inner {
  box-sizing: border-box;
  height: 100%;
  max-width: 1320px;
  margin: 0 auto;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(26px, 5.5vh, 64px);
  padding: calc(var(--lp-header-h) + clamp(14px, 3vh, 36px)) var(--lp-pad) clamp(20px, 4vh, 40px);
}
.co-inner::-webkit-scrollbar { display: none; }
.co-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.co-brand {
  margin: 0;
  font-size: clamp(2.25rem, 1.4rem + 3vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
}
.co-brand span { color: var(--lp-matrix); text-shadow: var(--lp-matrix-glow); }
.co-tagline { margin: 10px 0 0; font-size: 0.9375rem; color: rgb(255 255 255 / 60%); }
.co-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: var(--pg-border) solid var(--pg-ink);
  border-radius: 999px;
  background: var(--lp-matrix);
  box-shadow: 4px 4px 0 var(--pg-ink);
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--pg-ink);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.co-cta:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000, 0 0 30px rgb(74 229 72 / 35%); }
.fp-company .co-cta { border-color: #000; box-shadow: 4px 4px 0 #000, 0 0 22px rgb(74 229 72 / 25%); color: #062A06; }
.co-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 24px;
}
.co-col__title { margin: 0 0 16px; font-size: 0.9375rem; font-weight: 800; }
.co-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.co-col__title { color: var(--lp-matrix); letter-spacing: 0.02em; }
.co-col a { font-size: 0.9375rem; color: rgb(255 255 255 / 66%); transition: color 140ms var(--ease); }
.co-col a:hover { color: var(--lp-matrix); text-decoration: underline; text-underline-offset: 3px; }
.co-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 800;
  vertical-align: 1px;
}
.co-badge--green { background: rgb(74 229 72 / 16%); color: var(--lp-matrix); box-shadow: inset 0 0 0 1px rgb(74 229 72 / 35%); }
.co-badge--pink { background: rgb(255 95 168 / 14%); color: #FF8CC4; box-shadow: inset 0 0 0 1px rgb(255 95 168 / 35%); }
.co-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 22px;
  border-top: 1px solid rgb(74 229 72 / 20%);
}
.co-biz { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 0.8125rem; color: rgb(255 255 255 / 55%); }
.co-biz div { display: flex; gap: 6px; }
.co-biz dt { font-weight: 700; color: rgb(255 255 255 / 85%); }
.co-biz dd { margin: 0; }
.co-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.co-social { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: 0.8125rem; font-weight: 700; }
.co-social a { color: #fff; }
.co-social a:hover { color: var(--lp-matrix); }
.co-copy { margin: 0; font-size: 0.75rem; color: rgb(255 255 255 / 40%); }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1023px) {
  .sv-inner { grid-template-columns: minmax(0, 1fr); align-content: center; align-items: start; }
  .co-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {

  .sv-inner { gap: 18px; }
  .sv-lead { display: none; }
  .sv-cta { display: none; }
  .sv-title { font-size: clamp(1.75rem, 1.2rem + 3vw, 2.25rem); }
  .sv-tile { box-shadow: 4px 4px 0 var(--lp-matrix); }
  .sv-tile__desc { display: none; }
  .sv-tile__body { padding: 9px 11px 11px; }

  .co-inner { justify-content: flex-start; gap: 26px; }
  .co-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .co-col__title { margin-bottom: 10px; }
  .co-col ul { gap: 9px; }
  .co-col a { font-size: 0.875rem; }
  .co-meta { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
}

/* ---------- 2페이지 — 로봇 공장 · 일하는 방식 ---------- */
.pr-inner {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.75fr);
  align-items: center;
  gap: clamp(20px, 3.5vw, 64px);
  padding: calc(var(--lp-header-h) + clamp(14px, 3vh, 36px)) var(--lp-pad) clamp(20px, 4vh, 44px);
}
.pr-steps {
  margin: clamp(18px, 3vh, 32px) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.pr-step {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 10px 12px;
  border-left: 2px solid rgb(74 229 72 / 18%);
  color: rgb(255 255 255 / 55%);
  transition: border-color 200ms var(--ease), color 200ms var(--ease), background-color 200ms var(--ease);
}
.pr-step__no {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  color: rgb(74 229 72 / 60%);
}
.pr-step__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pr-step__text b { font-size: 1rem; font-weight: 800; color: rgb(255 255 255 / 80%); }
.pr-step__text span { font-size: 0.8125rem; line-height: 1.5; }
/* 지금 로봇이 작업 중인 단계 */
.pr-step[data-on] {
  border-left-color: var(--lp-matrix);
  background: linear-gradient(90deg, rgb(74 229 72 / 12%), transparent 80%);
  color: rgb(255 255 255 / 80%);
}
.pr-step[data-on] .pr-step__no { color: var(--lp-matrix); text-shadow: var(--lp-matrix-glow); }
.pr-step[data-on] .pr-step__text b { color: #fff; }
.pr-stage {
  position: relative;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 1200 / 526;          /* 로봇 공장 그림(robot.js 의 VIEW_TOP ~ VIEW_BOTTOM)과 같은 비율 */
  align-self: center;
  min-height: 0;
  border: 1px solid rgb(74 229 72 / 22%);
  border-radius: 16px;
  background:
    radial-gradient(70% 60% at 50% 45%, rgb(74 229 72 / 7%), transparent 70%),
    rgb(2 10 7 / 60%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 40%), 0 0 40px rgb(74 229 72 / 6%);
  overflow: hidden;
}
.pr-canvas { display: block; width: 100%; height: 100%; }

/* ---------- 3페이지 — 원색 타일 포트폴리오 ---------- */
.pf-intro__row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pf-count {
  margin-top: clamp(18px, 3vh, 32px);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--lp-matrix);
  font-variant-numeric: tabular-nums;
}
.pf-stage {
  height: min(100%, 640px);
  min-height: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 4px;
}
.pf-arrow {
  grid-row: 1;
  justify-self: center;
  width: 34px;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lp-matrix);
  cursor: pointer;
  filter: drop-shadow(0 0 6px rgb(74 229 72 / 45%));
  transition: transform 160ms var(--ease);
}
.pf-arrow--prev { grid-column: 1; }
.pf-arrow--next { grid-column: 3; }
.pf-arrow svg { width: 20px; height: 24px; fill: currentColor; }
.pf-arrow--next:hover { transform: translateX(3px); }
.pf-arrow--prev:hover { transform: translateX(-3px); }
.pf-arrow:focus-visible { outline: 2px solid var(--lp-matrix); outline-offset: 2px; border-radius: 6px; }
.pf-viewport {
  grid-row: 1;
  grid-column: 2;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.pf-track {
  display: flex;
  height: 100%;
  transition: transform 560ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pf-grid {
  box-sizing: border-box;
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  padding: 4px 12px 12px 4px;          /* 초록 그림자가 잘리지 않을 여백 */
  list-style: none;
  display: grid;
  gap: clamp(14px, 1.6vw, 24px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.pf-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-tile__link { flex: 1; min-height: 0; display: flex; flex-direction: column; color: inherit; }
.pf-tile__link:focus-visible { outline: 3px solid var(--lp-matrix); outline-offset: 4px; border-radius: 12px; }
/* 사진은 원색 판 위에 테두리 액자로 */
.pf-tile__art { position: relative; display: block; }
.pf-tile__art img {
  position: absolute;
  inset: 10px;
  box-sizing: border-box;
  display: block;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  pointer-events: none;
  transition: transform 300ms var(--ease);
}
.pf-tile:hover .pf-tile__art img { transform: scale(1.03) rotate(-1deg); }
.pf-tile .sv-tile__desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.pf-tile .sv-tile__title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-tile__tags { display: flex; gap: 5px; overflow: hidden; }
.pf-tag {
  flex: none;
  padding: 2px 8px;
  border: 1.5px solid #000;
  border-radius: 999px;
  background: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}
.pf-tag--accent { background: #DFF8DC; }
.pf-tile--empty {
  display: grid;
  place-items: center;
  border: 2px dashed rgb(74 229 72 / 30%);
  background: transparent;
  box-shadow: none;
  color: rgb(74 229 72 / 55%);
  font-size: 0.8125rem;
  font-weight: 700;
}
.pf-tile--empty:hover { transform: none; box-shadow: none; }

/* ---------- 페이지 표시 · 아래로 더 있음 ---------- */
.fp-dots {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  top: 50%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease);
  --dot: rgb(255 255 255 / 45%);
  --dot-on: var(--lp-matrix);
}
.fp-dots.is-ready { opacity: 1; pointer-events: auto; }
.fp-dots[data-tone='light'] { --dot: rgb(17 20 17 / 35%); --dot-on: #111411; }
.fp-dots ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fp-dots button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dot);
  cursor: pointer;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.fp-dots__no { opacity: 0; transform: translateX(4px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.fp-dots__bar {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: width 260ms var(--ease), background-color 260ms var(--ease);
}
.fp-dots button:hover .fp-dots__no,
.fp-dots button:focus-visible .fp-dots__no,
.fp-dots button[aria-current] .fp-dots__no { opacity: 1; transform: none; }
.fp-dots button[aria-current] { color: var(--dot-on); }
.fp-dots button[aria-current] .fp-dots__bar { width: 30px; box-shadow: 0 0 8px currentColor; }
.fp-dots button:focus-visible { outline: 2px solid var(--dot-on); outline-offset: 3px; border-radius: 4px; }

/* SCROLL — 아래로 흐르는 빛이 선을 타고 내려갑니다. 마지막 페이지에서는 숨김. */
.fp-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  color: var(--dot);
  transition: opacity 300ms var(--ease);
}
.fp-scroll-hint i {
  position: relative;
  width: 2px;
  height: 46px;
  overflow: hidden;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.6;
}
.fp-scroll-hint i::after {
  content: '';
  position: absolute;
  left: 0;
  top: -40%;
  width: 100%;
  height: 40%;
  background: var(--dot-on);
  box-shadow: 0 0 8px var(--dot-on);
  animation: fp-scroll 1.8s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
.fp-scroll-hint b {
  writing-mode: vertical-rl;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.3em;
}
.fp-dots[data-last] .fp-scroll-hint { opacity: 0; }
@keyframes fp-scroll {
  0% { top: -40%; }
  100% { top: 100%; }
}

/* ---------- 2 · 3페이지 좁은 화면 ---------- */
@media (max-width: 1023px) {
  .pr-inner { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 16px; }
  .pr-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
  .pr-step { flex-direction: column; gap: 2px; padding: 8px 8px; }
  .pr-step__text span { display: none; }
  .pr-stage { height: auto; }
  .pf-stage { height: min(62vh, 560px); }
}
@media (max-width: 767px) {
  .pr-intro .sv-lead { display: none; }
  .pr-step__text b { font-size: 0.875rem; }
  .pf-stage { grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 2px; height: auto; flex: 1; }
  .pf-arrow { width: 24px; }
  .pf-arrow svg { width: 14px; height: 18px; }
  .pf-grid { gap: 12px; padding: 2px 8px 8px 2px; }
  .pf-tile__art img { inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); }
  .pf-tile .sv-tile__desc { display: none; }
  .pf-intro__row .sv-cta { display: none; }
  .pf-count { margin-top: 10px; }
  .fp-portfolio .sv-inner { display: flex; flex-direction: column; align-items: stretch; }
  .fp-portfolio .sv-intro { flex: none; }
  /* 좁은 화면 — 가장자리 여백(20px) 안에만 들어가게 작게 */
  .fp-dots { right: max(4px, env(safe-area-inset-right)); gap: 10px; }
  .fp-dots ol { gap: 2px; }
  .fp-dots button { height: 16px; }
  .fp-dots__no { display: none; }
  .fp-dots__bar { width: 6px; }
  .fp-dots button[aria-current] .fp-dots__bar { width: 12px; }
  .fp-scroll-hint { margin-right: 2px; }
  .fp-scroll-hint i { height: 30px; }
  .fp-scroll-hint b { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-track { transition: none; }
  .fp-scroll-hint i::after { animation: none; top: 30%; }
}

/* -------------------------------------------------------------
   7. 첫 화면이 아닌 페이지(작업 목록 · 상세 · 404)의 상단 바 — 같은 모양 · 같은 자리
   ------------------------------------------------------------- */
body:not(.landing) { padding-top: var(--lp-header-h); }
html:not(.landing) { scroll-padding-top: calc(var(--lp-header-h) + 24px); }
body:not(.landing) .lp-header {
  background: rgb(3 9 7 / 94%);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgb(74 229 72 / 12%);
}

/* -------------------------------------------------------------
   8. 3페이지 — 타일을 오른쪽 페이지 표시에서 떼어 왼쪽으로, ◀ ▶ 를 눈에 띄는 버튼으로
   ------------------------------------------------------------- */
.fp-portfolio .sv-inner {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.85fr);
  padding-right: calc(var(--lp-pad) + 64px);          /* 오른쪽 페이지 표시(01~04)와 겹치지 않게 */
}
.fp-portfolio .pf-stage {
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  gap: 10px;
}
.pf-arrow {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid var(--lp-matrix);
  border-radius: 50%;
  background: rgb(4 18 10 / 90%);
  color: var(--lp-matrix);
  filter: none;
  box-shadow: 0 0 0 4px rgb(74 229 72 / 10%), 0 0 22px rgb(74 229 72 / 35%);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
}
.pf-arrow svg { width: 16px; height: 19px; }
.pf-arrow--next svg { margin-left: 3px; }
.pf-arrow--prev svg { margin-right: 3px; }
/* 호버 — 채우거나 키우지 않고 테두리 · 화살표만 밝은 초록으로 */
.pf-arrow:hover,
.pf-arrow--next:hover,
.pf-arrow--prev:hover { background: rgb(4 18 10 / 90%); color: #C8FFC2; border-color: #C8FFC2; transform: none; }
/* 퍼져 나가는 신호 고리 — '더 있다'를 알림 */
.pf-arrow::before,
.pf-arrow::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--lp-matrix);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: pf-ping 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.pf-arrow::after { display: none; }
@keyframes pf-ping {
  0% { transform: scale(1); opacity: 0.45; }
  100% { transform: scale(1.5); opacity: 0; }
}
/* 버튼 아래 이름표 */
.pf-arrow > span {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  white-space: nowrap;
  color: var(--lp-matrix);
}
.pf-arrow--next > span { animation: pf-nudge 1.6s ease-in-out infinite; }
@keyframes pf-nudge {
  0%, 100% { transform: translateX(-50%); }
  50% { transform: translateX(-30%); }
}
@media (max-width: 1023px) {
  .fp-portfolio .sv-inner { grid-template-columns: minmax(0, 1fr); padding-right: calc(var(--lp-pad) + 24px); }
}
@media (max-width: 767px) {
  .fp-portfolio .sv-inner { padding-right: calc(var(--lp-pad) + 10px); }
  .fp-portfolio .pf-stage { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 4px; }
  .pf-arrow { width: 36px; height: 36px; box-shadow: 0 0 14px rgb(74 229 72 / 35%); }
  .pf-arrow svg { width: 11px; height: 14px; }
  .pf-arrow > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-arrow::before, .pf-arrow::after, .pf-arrow--next > span { animation: none; }
}
.pf-arrow[hidden] { display: none; }    /* 첫 묶음에서는 ◀ 를 숨김(위의 display:grid 가 hidden 을 덮지 않게) */
.lp-nav a:hover::after { background: var(--lp-matrix); }

/* -------------------------------------------------------------
   9. 3페이지 — 32칸, 오른쪽 영역 안에서 세로 스크롤
   ------------------------------------------------------------- */
.fp-portfolio .pf-stage {
  display: block;
  height: min(100%, 680px);
}
.fp-portfolio .pf-viewport {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  cursor: auto;
  padding: 6px 14px 14px 6px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #4AE548 rgb(74 229 72 / 10%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 46px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 46px), transparent 100%);
}
.fp-portfolio .pf-viewport::-webkit-scrollbar { width: 6px; }
.fp-portfolio .pf-viewport::-webkit-scrollbar-track { background: rgb(74 229 72 / 8%); border-radius: 6px; }
.fp-portfolio .pf-viewport::-webkit-scrollbar-thumb { background: #4AE548; border-radius: 6px; box-shadow: 0 0 8px #4AE548; }
.fp-portfolio .pf-grid {
  height: auto;
  padding: 12px 0 40px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: clamp(230px, 31vh, 300px);
}
.pf-count {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: clamp(18px, 3vh, 32px);
  letter-spacing: 0.12em;
}
.pf-count b { font-size: 1.5rem; color: #4AE548; text-shadow: var(--lp-matrix-glow); }
.pf-count span { margin-left: 8px; color: rgb(200 255 194 / 60%); animation: pf-scroll-hint 1.6s ease-in-out infinite; }
@keyframes pf-scroll-hint { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* 곧 채워질 슬롯 — 매트릭스 단말기 화면 */
.pf-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 2px dashed rgb(74 229 72 / 35%);
  border-radius: 14px;
  background:
    repeating-linear-gradient(to bottom, rgb(74 229 72 / 4%) 0 1px, transparent 1px 4px),
    radial-gradient(70% 60% at 50% 50%, rgb(74 229 72 / 9%), transparent 70%),
    rgb(3 12 8 / 85%);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  text-align: center;
  color: #4AE548;
}
.pf-slot::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 30%;
  top: -30%;
  background: linear-gradient(to bottom, transparent, rgb(74 229 72 / 10%), transparent);
  animation: pf-slot-scan 4s linear infinite;
}
.pf-slot:nth-child(3n + 2)::before { animation-delay: -1.3s; }
.pf-slot:nth-child(3n)::before { animation-delay: -2.6s; }
@keyframes pf-slot-scan { to { top: 100%; } }
.pf-slot__no { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.24em; color: rgb(200 255 194 / 55%); }
.pf-slot__msg { font-size: 0.9375rem; font-weight: 800; letter-spacing: 0.16em; color: #C8FFC2; text-shadow: 0 0 10px rgb(74 229 72 / 45%); }
.pf-slot__msg i { font-style: normal; margin-left: 2px; color: #4AE548; animation: pf-caret 1s steps(1) infinite; }
@keyframes pf-caret { 50% { opacity: 0; } }
.pf-slot__code { font-size: 0.625rem; font-weight: 700; letter-spacing: 0.2em; color: rgb(74 229 72 / 45%); }
@media (max-width: 1023px) {
  .fp-portfolio .pf-stage { height: min(60vh, 560px); }
}
@media (max-width: 767px) {
  .fp-portfolio .pf-stage { height: auto; flex: 1; min-height: 0; }
  .fp-portfolio .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(170px, 26vh, 220px); gap: 12px; }
  .pf-slot__msg { font-size: 0.75rem; padding: 0 8px; }
  .pf-slot__code { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-slot::before, .pf-slot__msg i, .pf-count span { animation: none; }
}
