/* ===== DOROLAND V7 Kit Landing — Production CSS ===== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Hahmlet:wght@600;700;800;900&family=Noto+Sans+KR:wght@400;500;700;800;900&display=swap');

/* ===== 1. Design Tokens ===== */
:root {
  /* Color */
  --bg-page: #040814;
  --bg-surface: #081221;
  --bg-card: rgba(10, 18, 34, 0.88);
  --bg-card-soft: rgba(255, 255, 255, 0.05);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text-primary: #f1f5f9;
  --text-secondary: #b8c7da;
  --text-muted: #8fa2ba;

  /* Chapter Colors */
  --teal: #14b8a6;
  --purple: #8b5cf6;
  --rose: #f472b6;
  --amber: #f59e0b;
  --sky: #38bdf8;
  --coral: #fb7185;
  --cyan: #67e8f9;

  /* Shadow */
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.24);
  --shadow-panel: 0 28px 60px rgba(0, 0, 0, 0.32);

  /* Radius */
  --radius-card: 24px;
  --radius-panel: 28px;
  --radius-pill: 999px;

  /* Spacing */
  --page-gutter: clamp(12px, 4vw, 32px);
  --content-width: min(1180px, calc(100vw - var(--page-gutter) * 2));

  /* Typography */
  --font-display: "Hahmlet", serif;
  --font-body: "Noto Sans KR", sans-serif;
}

/* ===== 2. Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 12%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 86% 80%, rgba(139, 92, 246, 0.14), transparent 30%),
    linear-gradient(180deg, #040814 0%, #07101d 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ===== 3. Accessibility ===== */
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== 4. Layout ===== */
.page {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.012) 3px, rgba(255,255,255,0.012) 6px),
    linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0));
}

.shell {
  position: relative;
  padding-bottom: 120px;
}

.section {
  width: var(--content-width);
  margin: 36px auto 0;
}

/* Glow effects */
.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.5;
  pointer-events: none;
}
.glow.teal   { width: 520px; height: 520px; left: -120px; top: 220px; background: rgba(20, 184, 166, 0.12); }
.glow.purple { width: 480px; height: 480px; right: -140px; top: 1320px; background: rgba(139, 92, 246, 0.12); }

/* ===== 5. Navigation ===== */
.nav {
  width: calc(100% - var(--page-gutter) * 2);
  max-width: 1348px;
  margin: 20px auto 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(20, 184, 166, 0.14);
  background: rgba(4, 8, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  position: sticky;
  top: 12px;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(4, 8, 20, 0.96);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand .version {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(20, 184, 166, 0.52);
  color: #b8fff7;
  font-size: 12px;
  font-weight: 800;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-chip {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.nav-chip.primary {
  color: var(--text-primary);
  border-color: rgba(20, 184, 166, 0.42);
  background: rgba(20, 184, 166, 0.14);
}

.nav-chip.lang-toggle {
  width: 44px;
  padding: 0;
  font-weight: 900;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .nav-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line-strong);
  }
}

/* ===== 6. Hero ===== */
.hero {
  width: var(--content-width);
  margin: 34px auto 0;
  padding: clamp(24px, 5vw, 58px) clamp(18px, 5vw, 72px) clamp(20px, 4vw, 52px);
  border-radius: 36px;
  border: 1px solid rgba(20, 184, 166, 0.08);
  background:
    linear-gradient(180deg, rgba(7, 16, 29, 0.9), rgba(7, 16, 29, 0.72)),
    linear-gradient(90deg, rgba(20,184,166,0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20,184,166,0.06) 1px, transparent 1px);
  background-size: auto, 42px 42px, 42px 42px;
  box-shadow: var(--shadow-panel);
  text-align: center;
}

.hero-logo {
  width: clamp(178px, 22vw, 280px);
  display: block;
  margin: 0 auto 20px;
  filter: drop-shadow(0 0 24px rgba(20, 184, 166, 0.26));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(20, 184, 166, 0.82);
  background: rgba(20, 184, 166, 0.12);
  color: #d2fffa;
  font-size: clamp(13px, 1.4vw, 14px);
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-title {
  margin: 0 auto 20px;
  max-width: 860px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.625rem);
  line-height: 1.38;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-title .accent {
  background: linear-gradient(90deg, #67e8f9 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 28px;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-soft);
  border: 1px solid var(--line-soft);
  color: var(--text-secondary);
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 700;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-badge strong { color: var(--text-primary); }

.hero-showcase {
  width: 100%;
  height: clamp(200px, 30vw, 390px);
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: var(--radius-panel);
  border: 1px solid var(--line-soft);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.34);
  background: rgba(7, 14, 28, 0.92);
}

.scroll-mark {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

/* ===== 7. Section Head ===== */
.section-head {
  text-align: center;
  margin-bottom: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-soft);
  border: 1px solid var(--line-soft);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.32;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.7;
}

/* ===== 8. DIMC Grid ===== */
.dimc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.dimc-card {
  padding: clamp(20px, 2.4vw, 28px) clamp(18px, 2.2vw, 26px);
  border-radius: var(--radius-card);
  background: rgba(11, 21, 40, 0.72);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dimc-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(20, 184, 166, 0.32);
  font-size: 24px;
  margin-bottom: 14px;
}

.dimc-card h3 {
  margin: 0 0 10px;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.dimc-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(14px, 1.3vw, 15px);
  line-height: 1.7;
}

@media (hover: hover) and (pointer: fine) {
  .dimc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.32);
  }
}

/* ===== 9. Quest Grid ===== */
.quest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.quest-card {
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .quest-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.32);
  }
}

/* Quest Banner */
.quest-banner {
  height: clamp(160px, 16vw, 208px);
  position: relative;
  background: rgba(7, 14, 28, 0.92);
  overflow: hidden;
}

.quest-banner img.kit-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(7, 14, 28, 0.92);
}

.quest-banner img.pos-speaker { object-position: center 68%; }
.quest-banner img.pos-mood    { object-position: center 58%; }
.quest-banner img.pos-robot   { object-position: center 72%; }
.quest-banner img.pos-car     { object-position: center 58%; }
.quest-banner img.pos-game    { object-position: center 25%; }
.quest-banner img.pos-piano   { object-fit: contain; object-position: center center; padding: 5px; }

.quest-number,
.quest-animal {
  position: absolute;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
  background: rgba(7, 14, 28, 0.82);
  border: 1px solid var(--line-soft);
}

.quest-number { left: 12px; color: #04111f; }
.quest-animal { right: 12px; padding: 3px; }
.quest-animal img { width: 100%; height: 100%; object-fit: contain; }

.n-emerald { background: #3ad7c8; }
.n-purple  { background: #b17cff; }
.n-rose    { background: #ff8fcb; }
.n-amber   { background: #ffc14d; }
.n-sky     { background: #59d2ff; }
.n-coral   { background: #ff94a3; }

/* Quest Content */
.quest-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 12px;
}

.quest-title {
  margin: 0;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.quest-desc {
  min-height: 52px;
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.65;
}

/* Learn Grid */
.learn-grid {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.learn-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

.learn-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.learn-value {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* Stats & Tags */
.stat-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-soft);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-chip span:first-child {
  color: var(--text-muted);
  font-weight: 700;
}

/* Quest Footer & CTA */
.quest-footer {
  margin-top: auto;
  padding-top: 8px;
}

.cta {
  min-height: 52px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  border: 2px solid;
  color: #ffffff;
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  background: rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

.cta.emerald { border-color: var(--teal);   background: rgba(45, 212, 191, 0.16); }
.cta.purple  { border-color: var(--purple); background: rgba(168, 85, 247, 0.16); }
.cta.rose    { border-color: var(--rose);   background: rgba(244, 114, 182, 0.16); }
.cta.amber   { border-color: var(--amber);  background: rgba(245, 158, 11, 0.16); }
.cta.sky     { border-color: var(--sky);    background: rgba(56, 189, 248, 0.16); }
.cta.coral   { border-color: var(--coral);  background: rgba(251, 113, 133, 0.16); }

@media (hover: hover) and (pointer: fine) {
  .cta.emerald:hover { background: var(--teal);   box-shadow: 0 14px 28px rgba(20, 184, 166, 0.3); }
  .cta.purple:hover  { background: var(--purple); box-shadow: 0 14px 28px rgba(139, 92, 246, 0.3); }
  .cta.rose:hover    { background: var(--rose);   box-shadow: 0 14px 28px rgba(244, 114, 182, 0.3); }
  .cta.amber:hover   { background: var(--amber);  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.3); }
  .cta.sky:hover     { background: var(--sky);    box-shadow: 0 14px 28px rgba(56, 189, 248, 0.3); }
  .cta.coral:hover   { background: var(--coral);  box-shadow: 0 14px 28px rgba(251, 113, 133, 0.3); }

  .cta:hover { transform: translateY(-2px); }
}

.cta:active { transform: scale(0.98); }

/* ===== 10. Story ===== */
.story-panel {
  padding: clamp(18px, 3vw, 34px) clamp(18px, 3vw, 36px);
  border-radius: var(--radius-panel);
  background: rgba(11, 21, 40, 0.76);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-panel);
}

.story-intro {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.animal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}

.animal-grid .cell {
  height: clamp(64px, 7vw, 88px);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .animal-grid .cell:hover { transform: scale(1.08); }
}

.animal-grid img {
  max-width: 56px;
  max-height: 56px;
  object-fit: contain;
}

.story-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-family: var(--font-display);
}

.story-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.75;
}

.role-map {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.role-pill {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  font-size: 14px;
  font-weight: 700;
}

/* ===== 11. Footer ===== */
.site-footer {
  width: var(--content-width);
  margin: 28px auto 0;
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ===== 12. Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.12s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.16s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.2s; }

/* Hero entrance */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-enter {
  animation: fadeInUp 0.8s ease forwards;
}

.hero-enter-delay-1 { animation-delay: 0.1s; opacity: 0; }
.hero-enter-delay-2 { animation-delay: 0.2s; opacity: 0; }
.hero-enter-delay-3 { animation-delay: 0.35s; opacity: 0; }
.hero-enter-delay-4 { animation-delay: 0.5s; opacity: 0; }
.hero-enter-delay-5 { animation-delay: 0.65s; opacity: 0; }

/* ===== 13. Responsive ===== */
@media (max-width: 960px) {
  .quest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-intro {
    grid-template-columns: 1fr;
  }

  .role-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav {
    flex-wrap: wrap;
    padding: 14px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
  }

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

@media (max-width: 520px) {
  .quest-grid,
  .dimc-grid {
    grid-template-columns: 1fr;
  }

  .role-map {
    grid-template-columns: 1fr;
  }

  .hero {
    border-radius: var(--radius-card);
  }

  .hero-badge {
    gap: 6px;
    padding: 10px 14px;
  }

  .section {
    margin-top: 22px;
  }
}
