:root {
  color-scheme: light;
  --bg: #faf8f3;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --text: #24313f;
  --muted: #66727d;
  --navy: #2c3e50;
  --orange: #ff8a3d;
  --story: #eef9f5;
  --economy: #eef6ff;
  --life: #f9f5ee;
  --line: rgba(44, 62, 80, 0.12);
  --shadow: 0 18px 44px rgba(44, 62, 80, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

body.dark {
  color-scheme: dark;
  --bg: #18212b;
  --surface: #202c37;
  --surface-strong: #253442;
  --text: #f6f1e9;
  --muted: #c7c0b7;
  --navy: #e9f1fb;
  --story: #19352f;
  --economy: #1c3048;
  --life: #332d24;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  color: var(--navy);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: var(--navy);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 1;
  font-size: 0.94rem;
  color: var(--muted);
}

.main-nav a:hover,
.text-link:hover {
  color: var(--orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-button,
.solid-button,
.theme-toggle,
.menu-toggle,
.resource-grid button {
  border: 0;
  cursor: pointer;
}

.ghost-button,
.solid-button,
.secondary-button,
.cta-button,
.resource-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.ghost-button {
  background: transparent;
  color: var(--navy);
}

.solid-button,
.cta-button,
.resource-grid button {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 12px 24px rgba(255, 138, 61, 0.22);
}

.secondary-button {
  color: var(--navy);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--navy);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--navy);
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 72px);
  align-items: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  align-items: center;
  justify-items: center;
  opacity: 0.2;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  transform: rotate(-8deg) scale(1.08);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 0.88rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  color: var(--navy);
  font-size: clamp(2.6rem, 8vw, 5.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.2;
}

h3 {
  color: var(--navy);
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions,
.icon-row,
.meta {
  display: flex;
  align-items: center;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.content-hub,
.resources {
  background: var(--surface);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.hub-grid,
.card-grid,
.resource-grid,
.split-section {
  display: grid;
  gap: 20px;
}

.hub-grid,
.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hub-card,
.recommend-card,
.panel,
.resource-grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.hub-card {
  min-height: 270px;
  padding: 28px;
}

.hub-card.story {
  background: var(--story);
}

.hub-card.economy {
  background: var(--economy);
}

.hub-card.life {
  background: var(--life);
}

.icon-row {
  gap: 8px;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.hub-card p,
.card-body p,
.site-footer p {
  color: var(--muted);
}

.hub-card a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--orange);
  font-weight: 800;
}

.recommended {
  background: var(--bg);
}

.recommend-card {
  overflow: hidden;
  background: var(--surface-strong);
}

.thumb {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--navy);
  font-size: 1.25rem;
  font-weight: 800;
}

.story-thumb {
  background: var(--story);
}

.economy-thumb {
  background: var(--economy);
}

.life-thumb {
  background: var(--life);
}

.card-body {
  padding: 22px;
}

.pill {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--navy);
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 800;
}

.meta {
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.split-section {
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--surface);
}

.panel {
  padding: 28px;
  background: var(--surface-strong);
}

.row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.text-link {
  color: var(--navy);
  font-weight: 800;
}

.board-list,
.notice-list {
  display: grid;
  gap: 10px;
}

.board-list a,
.notice-list li {
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--bg);
}

.board-list a {
  display: grid;
  gap: 4px;
}

.board-list span {
  color: var(--muted);
  font-size: 0.93rem;
}

.notice-list {
  margin: 0;
  padding-left: 22px;
}

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

.resource-grid article {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--surface-strong);
}

.resource-grid span {
  color: var(--orange);
  font-weight: 800;
}

.resource-grid button {
  width: 100%;
}

.site-footer {
  display: grid;
  gap: 16px;
  padding: 42px clamp(18px, 5vw, 72px);
  color: var(--text);
  background: var(--surface-strong);
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
}

.signup-dialog {
  width: min(92vw, 560px);
  padding: 0;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.signup-dialog::backdrop {
  background: rgba(20, 28, 36, 0.48);
}

.signup-form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.close-dialog {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: var(--bg);
  cursor: pointer;
  font-size: 1.45rem;
}

.signup-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.signup-form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.agreement-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg);
}

.agreement-box label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agreement-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.full {
  width: 100%;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--orange) 80%, white);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  .menu-toggle {
    display: block;
  }

  .main-nav,
  .header-actions {
    display: none;
  }

  .site-header.is-open {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .site-header.is-open .main-nav,
  .site-header.is-open .header-actions {
    display: flex;
    width: 100%;
  }

  .site-header.is-open .main-nav {
    align-items: stretch;
    flex-direction: column;
    order: 3;
  }

  .site-header.is-open .header-actions {
    order: 4;
  }

  .hub-grid,
  .card-grid,
  .resource-grid,
  .split-section {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 50px 18px;
  }

  .hero {
    min-height: auto;
    padding-top: 74px;
  }

  .hero-pattern {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }

  .hub-grid,
  .card-grid,
  .resource-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .ghost-button,
  .solid-button {
    flex: 1;
  }

  .hero-actions a {
    width: 100%;
  }

  .meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
