:root {
  --ink: #17231d;
  --muted: #5c6963;
  --paper: #fbfcf8;
  --line: rgba(23, 35, 29, 0.14);
  --white: #ffffff;
  --jade: #1f7a5a;
  --jade-dark: #15583f;
  --gold: #c59b45;
  --sky: #dceaf0;
  --shadow: 0 22px 60px rgba(21, 38, 31, 0.17);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 82px 22px 82px;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(251, 252, 248, 0.18) 58%, var(--paper) 100%),
    url("./assets/img/cheon-il-guk-mountains.png") center / cover no-repeat;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(180deg, rgba(10, 33, 28, 0.08), rgba(13, 35, 29, 0.2) 68%, rgba(251, 252, 248, 0.86) 100%);
}

.hero-content {
  width: min(920px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 18px rgba(9, 24, 20, 0.36);
}

.hero-logo {
  width: clamp(164px, 20vw, 248px);
  height: clamp(164px, 20vw, 248px);
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 12px 28px rgba(12, 30, 24, 0.32));
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 860px;
  font-family: "Noto Serif KR", Georgia, serif;
  font-size: clamp(2.84rem, calc(8.2vw - 5px), 7.49rem);
  line-height: 0.95;
  font-weight: 700;
}

.hero-content p {
  max-width: 760px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  line-height: 1.7;
  font-weight: 500;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  color: #fff;
  background: var(--jade);
  box-shadow: 0 14px 32px rgba(13, 79, 55, 0.3);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--jade-dark);
}

.button.secondary {
  color: #11261c;
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.78);
  text-shadow: none;
}

.directory,
.host {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.directory {
  padding: 76px 0 56px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr);
  gap: 26px;
  align-items: end;
  margin-bottom: 28px;
}

h2 {
  font-family: "Noto Serif KR", Georgia, serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

.section-heading p,
.host p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

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

.family-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 42px rgba(26, 43, 35, 0.07);
}

.family-card:hover,
.family-card:focus-visible {
  border-color: rgba(31, 122, 90, 0.42);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-3px);
}

.family-card,
.family-card * {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.card-domain {
  color: var(--jade);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-card h3 {
  margin: 14px 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.family-card p {
  color: var(--muted);
  line-height: 1.62;
}

.card-link {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

.family-card:hover .card-link,
.family-card:focus-visible .card-link {
  color: var(--jade-dark);
}

.host {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 58px;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(31, 122, 90, 0.94), rgba(24, 85, 70, 0.96)),
    var(--jade);
  color: #fff;
  box-shadow: var(--shadow);
}

.host h2 {
  max-width: 720px;
  font-size: clamp(1.85rem, 3.5vw, 3.1rem);
}

.host p {
  max-width: 700px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.84);
}

.host .button.primary {
  flex: 0 0 auto;
  color: var(--jade-dark);
  background: #fff;
  box-shadow: 0 12px 28px rgba(4, 28, 19, 0.18);
}

@media (max-width: 840px) {
  .hero {
    min-height: 90vh;
    padding: 72px 18px 66px;
  }

  .section-heading,
  .family-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .hero-actions,
  .hero-actions .button,
  .host .button {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.34rem, calc(15vw - 5px), 3.99rem);
  }

  .hero-content p {
    line-height: 1.55;
  }

  .family-card {
    min-height: 208px;
  }
}

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