/* ==========================================================================
   Meal Tracker — 랜딩 페이지 스타일
   1. 토큰 / 기본       2. 공통 유틸      3. 내비게이션    4. 히어로
   5. 티커              6. 01 문제        7. 02 시그널     8. 03 플랫폼
   9. 04 활용 시나리오  10. 시나리오 필름 팝업   11. 문의 모달
  12. 배너             13. CTA                  14. 푸터
  15. 법적고지 페이지   16. 반응형               17. 애니메이션
   ========================================================================== */

/* 1. 토큰 / 기본 ---------------------------------------------------------- */

:root {
  /* 색 */
  --paper: #f5f1e8;
  --paper-2: #ede7da;
  --paper-hover: #efe8d9;
  --ink: #1a1712;
  --ink-2: #3c362c;
  --accent: #e2532b;
  --muted: #6b6459;
  --muted-2: #8b8375;
  --muted-3: #a39a88;
  --line: #d8d2c4;
  --line-2: #e5dfd2;
  --line-strong: #b8b0a0;

  /* 서체 */
  --font-sans: 'Space Grotesk', 'Noto Sans KR', sans-serif;
  --font-serif: 'Instrument Serif', 'Gowun Batang', serif;

  /* 여백 */
  --gutter: 48px;
  --section-y: 112px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

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

img {
  display: block;
  max-width: 100%;
}

/* 2. 공통 유틸 ------------------------------------------------------------ */

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

.section {
  padding: var(--section-y) var(--gutter);
  border-bottom: 1px solid var(--line);
}

/* 라벨 + 본문 + 이미지 3단 그리드 (01 섹션) */
.section--split {
  display: grid;
  grid-template-columns: 220px minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 56px;
}

/* 라벨 + 본문 2단 헤더 (02 / 03 섹션) */
.section__head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  margin-bottom: 64px;
}

.section__label {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

.section__title em,
.display-title em,
.modal__title em {
  color: var(--accent);
}

/* 히어로 / 배너 / CTA 의 대형 제목 */
.display-title {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

.lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
  max-width: 60ch;
  text-wrap: pretty;
}

/* 맥동하는 점 (히어로 아이브로우 · 밴드 배지) */
.dot {
  width: var(--dot-size, 8px);
  height: var(--dot-size, 8px);
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
  animation: pulse 2.4s ease-in-out infinite;
}

/* 3. 내비게이션 ----------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line);
}

.nav__brand-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.nav__brand {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__tagline {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-left: auto; /* 브랜드는 왼쪽, 링크 + 언어 토글은 오른쪽 */
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav__links a {
  white-space: nowrap;
}

.nav__cta {
  color: var(--accent);
}

.nav__cta:hover {
  color: var(--ink);
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--ink);
}

.lang-btn {
  border: none;
  cursor: pointer;
  padding: 7px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-family: var(--font-sans);
  background: transparent;
  color: var(--ink);
}

.lang-btn.is-active {
  background: var(--ink);
  color: var(--paper);
}

/* 4. 히어로 --------------------------------------------------------------- */

.hero {
  position: relative;
  height: 92vh;
  min-height: 640px;
  border-bottom: 1px solid var(--line);
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(26, 23, 18, 0.62) 0%,
    rgba(26, 23, 18, 0.58) 18%,
    transparent 40%,
    transparent 52%,
    rgba(26, 23, 18, 0.62) 88%,
    rgba(26, 23, 18, 0.55) 96%,
    transparent 100%
  );
}

.hero__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 64px var(--gutter) 72px;
  pointer-events: none;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--paper-2);
}

.hero__title {
  font-size: clamp(52px, 6.4vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.hero__sub {
  font-size: 18px;
  line-height: 1.55;
  max-width: 52ch;
  margin: 0;
  color: var(--paper-2);
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.btn {
  pointer-events: auto;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn--primary {
  background: var(--accent);
  color: var(--paper);
  padding: 15px 30px;
}

.btn--primary:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--ghost {
  padding: 15px 24px;
  border: 1px solid var(--paper);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 사진 위 수치 마커 */
.hero__mark {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.hero__mark--a {
  left: 62%;
  top: 24%;
}

.hero__mark--b {
  left: 78%;
  top: 63%;
}

.hero__mark-ping {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(226, 83, 43, 0.3);
  animation: ping 3.6s ease-out infinite;
  animation-delay: var(--delay, 0s);
  margin-bottom: 8px;
}

.hero__mark-value {
  font-family: var(--font-serif);
  font-size: 40px;
  color: var(--paper);
  line-height: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.hero__mark-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-2);
  max-width: 20ch;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* 5. 티커 ----------------------------------------------------------------- */

.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  background: var(--paper);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: tick 28s linear infinite;
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.ticker__track > span {
  padding-right: 48px;
}

.ticker__sep {
  color: var(--accent);
}

/* 6. 01 문제 -------------------------------------------------------------- */

.problem__body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 840px;
}

.viz {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ink);
  margin-top: 20px;
}

.viz__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.viz__row--accent {
  align-items: center;
  padding: 20px 28px;
  background: rgba(226, 83, 43, 0.08);
  border-bottom: none;
}

.viz__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.viz__name {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.viz__name--accent {
  color: var(--accent);
}

.viz__note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* 수동 기록 이탈 그래프 */
.decay {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 88px;
  position: relative;
  min-width: 0;
}

.decay__bar {
  flex: 1;
  height: var(--h);
  background: var(--ink);
  opacity: var(--o, 1);
  animation: decay 9s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.decay__bar--ghost {
  animation: none;
}

.decay__bar--peak {
  background: var(--accent);
  position: relative;
  animation: none;
}

.decay__flag {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  text-align: center;
}

/* 제로 인풋 흐름 바 */
.flowbar {
  flex: 1 1 auto;
  min-width: 40px;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #b8390f, #e2532b 40%, #ff8656 50%, #e2532b 60%, #b8390f);
  background-size: 220% 100%;
  animation: flow 3.2s linear infinite;
}

.viz__flow {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.viz__flow-label {
  flex: 0 1 auto;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
}

.viz__axis {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 28px 16px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.viz__axis-line {
  flex: 1;
  height: 1px;
  background: var(--muted);
  position: relative;
}

.viz__axis-line::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
}

/* 밴드 사진 */
.problem__figure {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
  margin: 0;
}

.problem__photo {
  position: relative;
  flex: 1;
  min-height: 380px;
  min-width: 0;
}

.problem__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotspot {
  position: absolute;
  left: 58%;
  top: 32%;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.hotspot__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(245, 241, 232, 0.9);
  animation: ping 3.6s ease-out infinite;
}

.hotspot__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px;
  border-radius: 50%;
  background: var(--paper);
  animation: breathe 3.6s ease-in-out infinite;
}

.badge {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  background: rgba(26, 23, 18, 0.72);
  backdrop-filter: blur(2px);
  padding: 7px 12px;
  border-radius: 2px;
  max-width: calc(100% - 32px);
  width: max-content;
}

.badge__text {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--paper);
}

.problem__caption {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* 7. 02 시그널 ------------------------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

/* 카드를 누르면 문의 모달이 열린다 (동작은 main.js) */
.card {
  background: var(--paper);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  cursor: pointer;
}

.card:hover {
  background: var(--paper-hover);
}

.card__num {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent);
}

.card__viz {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card__legend b {
  color: var(--accent);
  text-align: right;
  font-weight: inherit;
}

.card__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__title {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
}

.card__body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

.signal__foot {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 28px 0 0;
  text-transform: uppercase;
}

.signal__foot em {
  color: var(--accent);
  font-style: normal;
}

/* 카드 막대 그래프 */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 72px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  position: relative;
}

.bars--beat {
  align-items: center;
  animation: beat 1.7s ease-out infinite;
  transform-origin: center;
}

.bars__bar {
  flex: 1;
  height: var(--h);
  background: var(--ink);
  opacity: var(--o, 1);
}

.bars__bar--accent {
  background: var(--accent);
}

.bars__bar--void {
  background: transparent;
}

.bars__bar--rise {
  transform-origin: bottom;
  animation: rise 7s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.bars__bar--bite {
  animation: bite 2.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* 위치 정보 카드 (지도) — 카드 높이가 달라져도 72px 를 유지한다 */
.map {
  position: relative;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  flex: none;
  border: 1px solid var(--ink);
  overflow: hidden;
  background: repeating-linear-gradient(
      90deg,
      transparent 0 26px,
      rgba(26, 23, 18, 0.09) 26px 27px
    ),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(26, 23, 18, 0.09) 19px 20px);
}

.map__road {
  position: absolute;
  background: rgba(26, 23, 18, 0.1);
}

.map__road--h {
  left: 0;
  right: 0;
  top: var(--y);
  height: 3px;
}

.map__road--v {
  top: 0;
  bottom: 0;
  left: var(--x);
  width: 3px;
}

.map__trail {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink);
  animation: trail 4.5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.map__pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  animation: ping 4.5s ease-out infinite;
  animation-delay: var(--delay, 0s);
}

/* 8. 03 플랫폼 ------------------------------------------------------------ */

.platform .section__head {
  margin-bottom: 72px;
}

.platform__intro,
.usecases__intro {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.platform__intro p,
.usecases__intro p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
  max-width: 56ch;
  text-wrap: pretty;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline__axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.timeline__band {
  position: relative;
  height: 96px;
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent calc(100% / 12 - 1px),
    var(--line-2) calc(100% / 12 - 1px),
    var(--line-2) calc(100% / 12)
  );
}

.timeline__window {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--left);
  width: var(--width);
  background: linear-gradient(90deg, transparent, rgba(226, 83, 43, var(--peak)) 50%, transparent);
  animation: breathe 8s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.timeline__callouts {
  position: relative;
  height: 470px;
}

.callout {
  position: absolute;
  left: var(--left);
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.callout--flip {
  align-items: flex-end;
  transform: translateX(-100%);
}

.callout__line {
  width: 1px;
  height: var(--line-h);
  background: var(--accent);
  position: relative;
  z-index: 0;
}

.callout__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 0 8px;
  transform: translateX(-4px);
  position: relative;
  z-index: 0;
}

.callout--flip .callout__dot {
  transform: translateX(4px);
}

.callout__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 180px;
  padding: 0 0 0 14px;
  text-align: left;
  position: relative;
  z-index: 1;
  background: var(--paper);
}

.callout--flip .callout__box {
  padding: 0 14px 0 0;
  text-align: right;
}

.callout__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.callout__time {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
}

.callout__dur {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* 9. 04 활용 시나리오 ------------------------------------------------------ */

/* 정확도 / 의료 활용 등급 축 */
.usecases__axis {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.usecases__axis > span {
  white-space: nowrap;
}

.usecases__axis-hi {
  color: var(--accent);
  text-align: right;
}

.usecases__axis-line {
  flex: 1;
  position: relative;
  height: 9px;
  background-image: linear-gradient(var(--line-strong), var(--line-strong));
  background-repeat: no-repeat;
  background-position: 4px 4px;
  background-size: calc(100% - 8px) 1.4px;
}

.usecases__axis-line::before,
.usecases__axis-line::after {
  content: '';
  position: absolute;
  top: 0;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
}

.usecases__axis-line::before {
  left: 0;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.usecases__axis-line::after {
  right: 0;
  border-right: 1px solid var(--accent);
  border-top: 1px solid var(--accent);
}

.usecases__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--ink);
}

/* 카드를 누르면 문의 모달이 열린다 (동작은 main.js) */
.usecase {
  background: var(--paper);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
}

.usecase:hover {
  background: var(--paper-hover);
}

.usecase__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  height: 34px;
  flex: none;
  overflow: hidden;
}

.usecase__num {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--accent);
}

.usecase__tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

/* 카드 제목은 2줄 높이로 고정해 카드끼리 줄을 맞춘다 */
.usecase__title {
  font-size: 19px;
  font-weight: 500;
  margin: 0;
  height: 2.6em;
  line-height: 1.3;
  flex: none;
}

.usecase__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

.usecase__more {
  margin-top: auto;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
  cursor: pointer;
}

/* 등급 표시 (4단계 세그먼트) */
.grade {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 16px;
  flex: none;
}

.grade__seg {
  flex: 0 0 20px;
  width: 20px;
  height: 4px;
  background: var(--line);
}

.grade__seg--on {
  background: var(--accent);
}

.grade__label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/**
 * 카드 픽토그램 박스.
 * 안쪽 SVG 는 디자인 원본을 그대로 옮긴 아트워크라 획 색·굵기를 SVG 속성으로 둡니다.
 * 강조색 #E2532B / 본문색 #1A1712 은 :root 의 --accent / --ink 와 같은 값입니다.
 */
.plot {
  position: relative;
  height: 120px;
  min-height: 120px;
  max-height: 120px;
  flex: none;
  border: 1px solid var(--ink);
  overflow: hidden;
  padding: 6px;
}

.plot svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* 10. 시나리오 필름 레이어 팝업 --------------------------------------------- */

.film-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 23, 18, 0.86);
}

/* display:flex 가 hidden 속성을 덮어쓰지 않도록 */
.film-modal[hidden] {
  display: none;
}

/**
 * 필름은 1080x1080 정사각형 + 그 아래 재생바(약 46px) 구성입니다.
 * 패널 높이를 폭에서 직접 끌어내야 위아래에 빈 띠가 남지 않습니다.
 * 폭은 화면 높이로도 한 번 더 조여서 세로 화면에서 잘리지 않게 합니다.
 */
.film-modal__panel {
  --film-bar: 46px;
  --film-w: min(92vw, 900px, calc(92vh - var(--film-bar)));

  position: relative;
  width: var(--film-w);
  height: calc(var(--film-w) + var(--film-bar));
  border: 1px solid var(--accent);
  background: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.film-modal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.film-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--muted);
  background: rgba(26, 23, 18, 0.72);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.film-modal__close:hover,
.film-modal__close:focus-visible {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

@media (max-width: 720px) {
  .film-modal {
    padding: 12px;
  }

  .film-modal__panel {
    --film-w: min(96vw, calc(92vh - var(--film-bar)));
  }
}

/* 11. 문의 모달 ------------------------------------------------------------ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(26, 23, 18, 0.6);
}

.modal[hidden] {
  display: none;
}

.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 560px;
  padding: 56px 48px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--accent);
  text-align: center;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.modal__signal {
  position: relative;
  width: 120px;
  height: 40px;
}

.modal__signal-node {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--accent);
  animation: ping 3.6s ease-out infinite;
  animation-delay: var(--delay, 0s);
}

.modal__signal-node--a {
  left: 14px;
}

.modal__signal-node--b {
  right: 14px;
}

.modal__signal-line {
  position: absolute;
  left: 30px;
  right: 30px;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(226, 83, 43, 0.25), var(--accent));
}

.modal__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.18;
  margin: 0;
  text-wrap: balance;
}

.modal__body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--line);
  margin: 0;
  max-width: 38ch;
  text-wrap: pretty;
}

.modal__cta {
  display: inline-block;
  margin-top: 6px;
  padding: 14px 30px;
  background: var(--accent);
  color: var(--paper);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal__cta:hover {
  background: var(--paper);
  color: var(--ink);
}

.modal__mail {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 12. 배너 ---------------------------------------------------------------- */

.ad {
  position: relative;
  height: 36vh;
  min-height: 300px;
}

.ad__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
}

.ad__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: xfade 40s linear infinite;
  animation-delay: var(--delay, 0s);
}

/* 애니메이션이 돌지 않는 환경에서도 배너가 비지 않도록 첫 장은 노출 */
.ad__media img:first-child {
  opacity: 1;
}

.ad__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px var(--gutter) 44px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(26, 23, 18, 0.5) 45%,
    rgba(26, 23, 18, 0.82) 100%
  );
}

.ad__title {
  font-size: clamp(44px, 5.6vw, 84px);
  line-height: 1.06;
  margin: 0 0 16px;
  color: var(--paper);
}

.ad__sub {
  font-size: 16px;
  color: var(--paper-2);
  margin: 0;
  max-width: 48ch;
}

/* 13. CTA ----------------------------------------------------------------- */

.cta {
  background: var(--ink);
  color: var(--paper);
  padding: 120px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  text-align: center;
  border-bottom: none;
}

.cta__title {
  font-size: clamp(44px, 5.6vw, 84px);
  line-height: 1.08;
}

.cta__signup {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
  width: 100%;
}

.cta__form {
  display: flex;
  width: 100%;
}

.cta__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--muted);
  border-right: none;
  color: var(--paper);
  padding: 16px 20px;
  font-size: 15px;
  font-family: var(--font-sans);
  outline: none;
}

.cta__input::placeholder {
  color: var(--muted-3);
}

.cta__input:focus {
  border-color: var(--accent);
}

.cta__submit {
  background: var(--accent);
  color: var(--paper);
  border: none;
  padding: 16px 30px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
}

.cta__submit:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
}

.cta__submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* 등록 결과 안내 */
.cta__msg {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.cta__msg:empty {
  display: none;
}

.cta__msg.is-success {
  color: #34d07a;
}

.cta__msg.is-error {
  color: #ff7a6b;
}

.cta__note {
  font-size: 13px;
  color: var(--muted-3);
  margin: 0;
}

.cta__note a {
  color: var(--paper);
  border-bottom: 1px solid var(--accent);
}

.cta__note a:hover {
  color: var(--accent);
}

/* 14. 푸터 ---------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 32px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-footer__brand {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
  white-space: nowrap;
}

.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
}

.site-footer__legal a {
  color: var(--muted-2);
}

.site-footer__legal a:hover {
  color: var(--accent);
}

/* 15. 법적고지 페이지 (privacy.html / terms.html) --------------------------- */

.legal {
  max-width: 880px;
  margin: 0 auto;
  padding: 88px var(--gutter) 112px;
}

.legal__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.legal__meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.legal__body h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.35;
  margin: 0 0 20px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

/* 한국어 h2 축소 규칙(아래 반응형 절)이 본문 조 제목까지 건드리지 않도록 고정 */
html[lang='ko'] .legal__body h2 {
  font-size: 26px;
  line-height: 1.35;
}

.legal__body p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
  margin: 0 0 14px;
  text-wrap: pretty;
}

.legal__body p.legal__item {
  padding-left: 18px;
  margin-bottom: 6px;
}

.legal__body a {
  border-bottom: 1px solid var(--line);
}

/* 16. 반응형 -------------------------------------------------------------- */

/* 내비 항목이 늘어나 1140px 부터 태그라인을 접는다 */
@media (max-width: 1140px) {
  .nav__tagline {
    display: none;
  }

  .nav__links {
    gap: 22px;
  }
}

@media (max-width: 1240px) {
  .section--split {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .problem__figure {
    grid-column: 1 / -1;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1000px) {
  .hero__mark--a {
    left: 20px;
    top: 20px;
    align-items: flex-start;
    text-align: left;
    max-width: 42%;
  }

  .hero__mark--b {
    left: auto;
    right: 20px;
    top: 20px;
    align-items: flex-end;
    text-align: right;
    max-width: 44%;
  }

  /* "HR 125%↑" 처럼 짧은 수치가 두 줄로 쪼개지지 않게 한다 */
  .hero__mark-value {
    font-size: 24px;
    white-space: nowrap;
    line-height: 1.15;
  }

  .hero__mark-label {
    font-size: 10px;
    max-width: 100%;
  }

  .hero__mark-ping {
    margin-bottom: 4px;
  }
}

@media (max-width: 900px) {
  .timeline__callouts {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 22px;
  }

  .callout,
  .callout--flip {
    position: static;
    transform: none;
    align-items: flex-start;
    flex-direction: row;
    gap: 12px;
  }

  .callout__line {
    width: 2px;
    height: auto;
    align-self: stretch;
  }

  .callout__dot {
    display: none;
  }

  .callout__box,
  .callout--flip .callout__box {
    width: auto;
    padding: 0;
    text-align: left;
  }

  .viz__row {
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: stretch;
    padding-left: 20px;
    padding-right: 20px;
  }

  .decay__flag {
    left: auto;
    right: 0;
    transform: none;
    white-space: normal;
    width: 9ch;
    text-align: right;
  }

  .section--split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section__head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 820px) {
  /* 1행: 브랜드 + 언어 토글 / 2행: 링크 목록 */
  .nav {
    flex-wrap: wrap;
    padding: 10px 16px;
    gap: 8px;
  }

  .nav__brand-group {
    margin-right: auto;
  }

  .nav__tagline {
    display: none;
  }

  .nav__brand {
    font-size: 20px;
  }

  .lang-toggle {
    order: 1;
  }

  /* 항목이 늘어난 만큼 좁은 화면에서는 스크롤바 없이 가로로 밀어 본다 */
  .nav__links {
    order: 2;
    width: 100%;
    margin-left: 0;
    gap: 14px;
    font-size: 10px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    letter-spacing: 0.06em;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .nav__links::-webkit-scrollbar {
    display: none;
  }

  .lang-btn {
    padding: 5px 9px;
    font-size: 10px;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 24px;
    --section-y: 64px;
  }

  .nav {
    padding: 16px 20px;
    gap: 10px;
  }

  .hero {
    min-height: 520px;
  }

  .hero__inner {
    padding: 32px 24px 40px;
  }

  .section--split {
    gap: 28px;
  }

  .problem__figure {
    margin-top: 16px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .cta__form {
    flex-direction: column;
    gap: 10px;
  }

  .cta__input {
    border-right: 1px solid var(--muted);
  }

  .ad {
    height: 26vh;
    min-height: 220px;
  }

  .legal {
    padding: 56px var(--gutter) 80px;
  }

  .legal__body h2 {
    padding-top: 36px;
  }
}

/* 한국어 제목은 영문보다 한 단계 작게 */
html[lang='ko'] h1 {
  font-size: clamp(34px, 4.6vw, 68px);
  line-height: 1.12;
}

html[lang='ko'] h2 {
  font-size: clamp(26px, 3.2vw, 48px);
  line-height: 1.16;
}

@media (max-width: 820px) {
  html[lang='ko'] h1 {
    font-size: clamp(30px, 8vw, 44px);
  }

  html[lang='ko'] h2 {
    font-size: clamp(24px, 6.4vw, 36px);
  }
}

/* 17. 애니메이션 ---------------------------------------------------------- */

@keyframes tick {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

@keyframes rise {
  0%,
  100% {
    transform: scaleY(0.62);
  }
  45% {
    transform: scaleY(1);
  }
}

@keyframes beat {
  0%,
  100% {
    transform: scaleY(0.94);
  }
  6% {
    transform: scaleY(1);
  }
  14% {
    transform: scaleY(0.94);
  }
  22% {
    transform: scaleY(0.99);
  }
  30% {
    transform: scaleY(0.94);
  }
}

@keyframes bite {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 1;
  }
}

@keyframes ping {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(226, 83, 43, 0.28);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(226, 83, 43, 0);
  }
}

@keyframes trail {
  0%,
  100% {
    opacity: 0.18;
  }
  50% {
    opacity: 0.75;
  }
}

@keyframes decay {
  0%,
  12% {
    opacity: 1;
  }
  55%,
  100% {
    opacity: 0.14;
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes flow {
  0% {
    background-position: 220% 0;
  }
  100% {
    background-position: 0% 0;
  }
}

@keyframes xfade {
  0% {
    opacity: 0;
  }
  6% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  26% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* 모션 최소화 설정을 켠 사용자에게는 애니메이션을 멈춘다 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
