/* 홈 화면 (index.html). 토큰·헤더·푸터 기본은 base.css. 모바일 먼저.
   방향: 어두운 몰입형 첫 화면 + 흰 섹션 + 어두운 벤토 타일. 글은 크고 적게, 그림은 크게. */

.home-body {
  --ink: #0b0d12;
  --ink-2: #12151c;
  --ink-line: rgba(255, 255, 255, 0.1);
  --ink-text: #f3f5f9;
  --ink-muted: rgba(243, 245, 249, 0.62);
  --glow-a: #2563eb;
  --glow-b: #7c3aed;
  --glow-c: #22d3ee;
  background: var(--surface);
  overflow-x: clip; /* 가로 넘침만 자르고 스크롤 컨테이너는 만들지 않는다(전체 화면 캡처·스크롤 복원에 안전) */
}

/* ---- 떠 있는 알약 내비 ---- */
.pill-nav {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(100% - 20px, 760px);
  padding: 6px 6px 6px 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  color: var(--ink-text);
}

.pill-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.pill-brand svg {
  width: 26px;
  height: 26px;
}

.pill-brand span {
  display: none;
}

.pill-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.pill-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(243, 245, 249, 0.8);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.pill-links a:hover {
  color: var(--ink-text);
  background: rgba(255, 255, 255, 0.08);
}

.pill-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.home {
  margin: 0;
  padding: 0;
}

/* ---- 공통: 눈썹 글·제목 ---- */
.eyebrow {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.dark .eyebrow {
  color: var(--glow-c);
}

/* ---- 스크롤 나타나기(JS가 있을 때만) ---- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---- 첫 화면(어두움) ---- */
.hero {
  position: relative;
  padding: 92px 16px 56px;
  color: var(--ink-text);
  background: var(--ink);
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 70vh;
  background:
    radial-gradient(40% 50% at 30% 20%, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0) 70%),
    radial-gradient(35% 45% at 75% 10%, rgba(124, 58, 237, 0.24) 0%, rgba(124, 58, 237, 0) 70%),
    radial-gradient(30% 40% at 55% 55%, rgba(34, 211, 238, 0.1) 0%, rgba(34, 211, 238, 0) 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-text {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 11vw, 88px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero .grad {
  color: #a9c0ff; /* 그라데이션 글자는 윈도우에서 가장자리가 깨져 보여 단색으로 */
}

.hero .lead {
  margin: 6px 0 0;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(243, 245, 249, 0.74);
}

.br-m {
  display: inline;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-hero.primary {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.18);
}

.btn-hero.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(255, 255, 255, 0.26);
}

.btn-hero.ghost {
  color: var(--ink-text);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.btn-hero.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* 처음 뜰 때 글이 차례로 올라온다 */
.js .hero-text > * {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.js .hero-text > :nth-child(2) {
  animation-delay: 0.08s;
}

.js .hero-text > :nth-child(3) {
  animation-delay: 0.18s;
}

.js .hero-text > :nth-child(4) {
  animation-delay: 0.28s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* 3D 무대 */
.hero-stage {
  position: relative;
  max-width: 1120px;
  margin: 30px auto 0;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #151923 0%, #0e1118 100%);
  border: 1px solid var(--ink-line);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg .halo {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 90%;
  height: 80%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(37, 99, 235, 0.2) 0%, rgba(124, 58, 237, 0.1) 40%, rgba(0, 0, 0, 0) 70%);
  filter: blur(30px);
}

.hero-bg .grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 20%, transparent 100%);
}

.hero-bg .ground {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 76%;
  height: 18%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(99, 140, 255, 0.22) 0%, rgba(99, 140, 255, 0) 70%);
  filter: blur(6px);
}

.hero-poster,
.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.hero-poster {
  object-fit: cover;
  object-position: center 40%;
  transition: opacity 0.6s ease;
}

.hero-3d canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.hero-stage.is-3d .hero-poster {
  opacity: 0;
  pointer-events: none;
}

.hero-hint {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(243, 245, 249, 0.8);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
  pointer-events: none;
}

.hero-stage.is-3d .hero-hint {
  opacity: 1;
}

/* 3D 켜기 버튼: 정지 그림 위에 떠 있다가(JS가 보여 줌) 3D가 켜지면 사라진다 */
.hero-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(11, 13, 18, 0.62);
  color: #f3f5f9;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.hero-play:hover,
.hero-play:focus-visible {
  background: rgba(37, 99, 235, 0.8);
  border-color: rgba(255, 255, 255, 0.4);
  outline: none;
}

.hero-play[hidden],
.hero-stage.is-3d .hero-play,
.hero-stage.is-loading .hero-play {
  display: none;
}

.hero-tags {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.hero-tags li {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(20, 24, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--ink-text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.hero-tags li.right {
  left: auto;
  right: var(--r);
}

.hero-tags li.wide {
  display: none;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* ---- 흰 섹션 ---- */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 16px 0;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 7.5vw, 50px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.section-note {
  margin: 10px 0 0;
  font-size: 14px;
  color: #9aa3b2; /* 어두운 바탕용(흰 바탕 토큰 --faint보다 밝게) */
}

.section-note a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.tpl-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76%;
  gap: 12px;
  margin: 0 -16px;
  padding: 4px 16px 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tpl-grid::-webkit-scrollbar {
  display: none;
}

.tpl-grid li {
  scroll-snap-align: start;
}

.tpl-grid a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 20px;
  background: var(--surface-2);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s ease;
}

.tpl-grid a:hover,
.tpl-grid a:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 22px 50px rgba(20, 30, 50, 0.16);
}

.tpl-grid img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg);
}

.tpl-name {
  padding: 12px 14px 0;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.tpl-desc {
  padding: 2px 14px 14px;
  font-size: 14.5px;
  color: var(--muted);
}

/* ---- 어두운 벤토 ---- */
.bento-section {
  max-width: none;
  margin-top: 64px;
  padding: 64px 16px 72px;
  color: var(--ink-text);
  background: var(--ink);
}

.bento-section .section-head,
.bento {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.bento {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 200px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid var(--ink-line);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s ease;
}

.tile:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
}

.tile-text h3 {
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.tile-text p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: rgba(243, 245, 249, 0.74);
}

.tile .phone {
  align-self: center;
  width: min(200px, 58%);
  border-radius: 26px;
  border: 5px solid #262b36;
  overflow: hidden;
  background: #262b36;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.tile .phone.small {
  width: min(150px, 50%);
}

.tile .phone img,
.tile .desktop img {
  display: block;
  width: 100%;
  height: auto;
}

.tile .desktop {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch-row i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 6px 14px rgba(0, 0, 0, 0.35);
}

.big-num {
  margin: 0;
  font-size: clamp(56px, 14vw, 88px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: #fff;
}

.big-num small {
  font-size: 0.35em;
  letter-spacing: 0;
  margin-left: 4px;
}

.big-icon {
  margin: 0;
  font-size: 44px;
  line-height: 1;
}

/* ---- 숫자 한 줄 ---- */
.numbers {
  padding-top: 56px;
}

.num-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.num-grid li {
  padding: 16px 8px;
  border-radius: 18px;
  background: var(--surface-2);
}

.num-grid b {
  display: block;
  font-size: clamp(30px, 8vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 800;
}

.num-grid span {
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
}

/* ---- 더 알아보기 ---- */
.more-grid {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.more-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, transform 0.2s ease;
}

.more-grid a:hover {
  background: var(--accent-weak);
  transform: translateY(-2px);
}

.more-grid span {
  font-weight: 500;
  font-size: 14.5px;
  color: var(--muted);
}

.more-grid b {
  display: block;
  font-size: 17.5px;
}

.more-grid .arrow {
  color: var(--accent);
  font-size: 20px;
}

/* ---- 푸터(어두움) ---- */
.home-foot {
  margin-top: 64px;
  padding: 28px 16px 36px;
  text-align: center;
  font-size: 14px;
  color: rgba(243, 245, 249, 0.6);
  background: var(--ink);
}

.home-foot nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 8px;
}

.home-foot a {
  color: var(--ink-muted);
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .hero-text > * {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .hero-tags li {
    animation: none;
  }
}

/* ---- 데스크톱 ---- */
@media (min-width: 760px) {
  .pill-brand span {
    display: inline;
  }

  .pill-links a {
    padding: 9px 14px;
    font-size: 16px;
  }

  .hero {
    padding: 140px 24px 96px;
  }

  .hero .lead {
    font-size: 21px;
  }

  .br-m {
    display: none;
  }

  .hero-stage {
    margin-top: 44px;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
  }

  .hero-tags li {
    font-size: 15px;
    padding: 9px 14px;
  }

  .hero-tags li.wide {
    display: block;
  }

  .hero-bg .grid {
    background-size: 56px 56px;
  }

  .section {
    padding: 96px 24px 0;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .tpl-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-columns: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .bento-section {
    margin-top: 96px;
    padding: 96px 24px 104px;
  }

  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 14px;
  }

  .tile.big {
    grid-column: span 2;
    grid-row: span 2;
    flex-direction: row;
    align-items: flex-end;
  }

  .tile.big .phone {
    width: 46%;
    align-self: center;
  }

  .tile.wide {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
  }

  .tile.wide .desktop {
    width: 58%;
    flex: none;
  }

  .num-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .more-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-foot {
    margin-top: 96px;
  }
}


/* ================= 16차: 첫 화면 빠른 확인 폼 ================= */
.quick-check {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(560px, 100%);
  margin: 18px auto 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: left;
}

.quick-check label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: rgba(243, 245, 249, 0.7);
}

.quick-check .qc-item {
  grid-column: 1 / -1;
}

.quick-check input,
.quick-check select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(11, 13, 18, 0.55);
  color: #f3f5f9;
  font: inherit;
  font-size: 16px;
}

.quick-check input::placeholder {
  color: rgba(243, 245, 249, 0.35);
}

.quick-check input:focus,
.quick-check select:focus {
  outline: 2px solid #a9c0ff;
  outline-offset: 1px;
}

.quick-check .btn-hero {
  grid-column: 1 / -1;
  min-height: 50px;
  margin-top: 2px;
}

@media (min-width: 720px) {
  .quick-check {
    grid-template-columns: 1fr 1fr 1.6fr auto;
    align-items: end;
  }

  .quick-check .qc-item,
  .quick-check .btn-hero {
    grid-column: auto;
  }

  .quick-check .btn-hero {
    margin: 0;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .pill-links a[href="#scenes"] {
    display: none;
  }

  .pill-links a {
    padding: 9px 9px;
  }
}
