:root {
  color-scheme: light;
  --bg: #f9f4e8;
  --bg-2: #ffe6b9;
  --text: #2c2a27;
  --muted: #6a6158;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-border: rgba(255, 255, 255, 0.65);
  --button-bg: #2c2a27;
  --button-text: #fff8ea;
  --button-border: #2c2a27;
  --shadow: rgba(65, 47, 16, 0.2);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131722;
  --bg-2: #1c2541;
  --text: #f7f4ef;
  --muted: #cbc5bd;
  --surface: rgba(32, 39, 56, 0.75);
  --surface-border: rgba(148, 163, 184, 0.25);
  --button-bg: #f7f4ef;
  --button-text: #131722;
  --button-border: #f7f4ef;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  padding: 2rem 1.25rem 3rem;
  background:
    radial-gradient(circle at 15% 10%, var(--bg-2) 0%, transparent 40%),
    radial-gradient(circle at 80% 85%, #ffc9ab 0%, transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: "Trebuchet MS", "Noto Sans KR", sans-serif;
  position: relative;
  overflow-x: hidden;
}

.landing-body {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.landing {
  width: min(760px, 100%);
  border: 1px solid var(--surface-border);
  border-radius: 1.3rem;
  background: var(--surface);
  box-shadow: 0 18px 35px var(--shadow);
  padding: clamp(1.6rem, 4vw, 3rem);
  text-align: center;
  animation: reveal 700ms ease forwards;
}

.landing-badge {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--muted);
}

.landing-copy {
  margin: 0.7rem auto 0;
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.7;
}

.landing-cta {
  display: inline-block;
  margin-top: 1.3rem;
  text-decoration: none;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 0.72rem 1.25rem;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 700;
}

.page-transition {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #ffcf7d, #8bd3dd, #f7aef8);
  transform: translateY(100%);
  z-index: 999;
  pointer-events: none;
}

body.is-exiting .page-transition {
  animation: coverIn 520ms ease forwards;
}

@keyframes coverIn {
  to {
    transform: translateY(0);
  }
}

.background-shapes {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.6;
}

.shape-1 {
  width: 14rem;
  height: 14rem;
  top: 8%;
  right: -3rem;
  background: #ffcf7d;
  animation: float 7s ease-in-out infinite;
}

.shape-2 {
  width: 11rem;
  height: 11rem;
  bottom: 7%;
  left: -2rem;
  background: #8bd3dd;
  animation: float 9s ease-in-out infinite reverse;
}

.shape-3 {
  width: 8rem;
  height: 8rem;
  top: 45%;
  left: 75%;
  background: #f7aef8;
  animation: float 6s ease-in-out infinite;
}

.page {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 1.2rem;
}

.hero,
.card,
.story,
.contact,
.quick-nav,
.knowledge,
.faq,
.policy,
.site-footer {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 1.1rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 28px var(--shadow);
}

.hero {
  padding: 2rem 1.5rem;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--muted);
}

h1 {
  margin: 0.7rem 0 0.6rem;
  line-height: 1.15;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.intro {
  margin: 0;
  font-size: 1.04rem;
  color: var(--muted);
  max-width: 62ch;
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.lang-switch {
  display: inline-flex;
  gap: 0.45rem;
}

.lang-button {
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.58rem 0.95rem;
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

html[data-theme="dark"] .lang-button {
  background: rgba(18, 24, 38, 0.65);
}

.lang-button.active {
  border-color: var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
}

#theme-toggle {
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

#theme-toggle:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.quick-nav {
  padding: 0.95rem 1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.quick-nav a {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.5);
}

html[data-theme="dark"] .quick-nav a {
  background: rgba(18, 24, 38, 0.65);
}

.info-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.25rem 1.15rem;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.story {
  padding: 1.4rem 1.2rem;
}

.story p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.knowledge,
.faq,
.policy,
.discovery,
.archives {
  padding: 1.4rem 1.2rem;
}

.section-intro {
  margin: 0.2rem 0 1rem;
  color: var(--muted);
  line-height: 1.65;
}

.knowledge-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.knowledge-card {
  border: 1px solid var(--surface-border);
  border-radius: 0.9rem;
  padding: 0.95rem;
  background: rgba(255, 255, 255, 0.42);
}

html[data-theme="dark"] .knowledge-card {
  background: rgba(18, 24, 38, 0.5);
}

.knowledge-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.knowledge-card p,
.faq-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.discovery-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.9rem;
}

.map-canvas {
  position: relative;
  min-height: 320px;
  border-radius: 1rem;
  border: 1px solid var(--surface-border);
  background:
    radial-gradient(circle at 30% 30%, rgba(139, 211, 221, 0.7), transparent 42%),
    radial-gradient(circle at 75% 65%, rgba(255, 207, 125, 0.65), transparent 40%),
    linear-gradient(140deg, #ecf8ff, #dceef8 45%, #ebf8ef);
  overflow: hidden;
}

html[data-theme="dark"] .map-canvas {
  background:
    radial-gradient(circle at 30% 30%, rgba(82, 168, 181, 0.5), transparent 42%),
    radial-gradient(circle at 75% 65%, rgba(198, 144, 64, 0.45), transparent 40%),
    linear-gradient(140deg, #1b2a3f, #1f3348 45%, #1c3b35);
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 0.45rem 0.78rem;
  background: rgba(255, 255, 255, 0.88);
  color: #1f2937;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.12);
}

.map-pin.active {
  background: var(--button-bg);
  color: var(--button-text);
}

.discovery-card {
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.45);
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

html[data-theme="dark"] .discovery-card {
  background: rgba(18, 24, 38, 0.5);
}

#discovery-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.75rem;
}

.discovery-card h3,
.archive-item h3 {
  margin: 0;
}

.discovery-card p,
.archive-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.discovery-card a {
  color: var(--text);
  font-weight: 700;
}

.archives-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.archive-item {
  border: 1px solid var(--surface-border);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.42);
}

html[data-theme="dark"] .archive-item {
  background: rgba(18, 24, 38, 0.5);
}

.faq {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  border: 1px solid var(--surface-border);
  border-radius: 0.9rem;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.42);
}

html[data-theme="dark"] .faq-item {
  background: rgba(18, 24, 38, 0.5);
}

.faq-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.policy ul {
  margin: 0;
  padding-left: 1.2rem;
}

.policy li {
  color: var(--muted);
  margin-bottom: 0.55rem;
  line-height: 1.6;
}

.contact {
  padding: 1.4rem 1.2rem;
}

.contact-intro {
  margin: 0 0 1rem;
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 0.8rem;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--surface-border);
  border-radius: 0.8rem;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.75);
}

html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
  background: rgba(18, 24, 38, 0.8);
}

.contact-form textarea {
  resize: vertical;
}

#contact-submit {
  justify-self: start;
  border: 1px solid var(--button-border);
  border-radius: 999px;
  padding: 0.68rem 1.12rem;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 600;
  cursor: pointer;
}

.site-footer {
  padding: 1rem 1.1rem;
}

.site-footer p {
  margin: 0.2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 700ms ease forwards;
}

.hero.reveal {
  animation-delay: 100ms;
}

.quick-nav.reveal {
  animation-delay: 180ms;
}

.info-grid.reveal {
  animation-delay: 260ms;
}

.story.reveal {
  animation-delay: 420ms;
}

.knowledge.reveal {
  animation-delay: 500ms;
}

.discovery.reveal {
  animation-delay: 540ms;
}

.archives.reveal {
  animation-delay: 560ms;
}

.faq.reveal {
  animation-delay: 600ms;
}

.policy.reveal {
  animation-delay: 680ms;
}

.contact.reveal {
  animation-delay: 760ms;
}

.site-footer.reveal {
  animation-delay: 840ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@media (max-width: 880px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

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

  .discovery-layout {
    grid-template-columns: 1fr;
  }

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

  .hero,
  .card,
  .story,
  .contact,
  .quick-nav,
  .knowledge,
  .faq,
  .policy,
  .site-footer {
    border-radius: 0.95rem;
  }
}
