:root {
  --ink: #142018;
  --muted: #4d5c55;
  --paper: #f2f4ef;
  --panel: #fbfbf7;
  --line: #c9d2c6;
  --accent: #2a5f4a;
  --accent-ink: #163528;
  --focus: #1a5f8a;
  --warm: #d8c4a0;
  --max: 42rem;
  --wide: 56rem;
  --hero: min(92vh, 40rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(42, 95, 74, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(216, 196, 160, 0.22), transparent 50%),
    linear-gradient(180deg, #e4ebe4 0%, var(--paper) 32%, #eef1ea 100%);
  line-height: 1.75;
  min-height: 100vh;
}

h1,
h2,
h3,
.brand,
.brand-mark {
  font-family: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 20;
  border-radius: 0.25rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.site-footer,
.search-bar,
main > .home-section,
main > .section-page,
main > .single-page {
  max-width: var(--wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-header {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  animation: rise 0.55s ease-out both;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nav-drawer {
  display: none;
  position: relative;
}

.nav-toggle {
  list-style: none;
  cursor: pointer;
  color: var(--accent-ink);
  font-size: 0.95rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  background: var(--panel);
}

.nav-toggle::-webkit-details-marker {
  display: none;
}

.nav-drawer[open] .site-nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 11rem;
  padding: 0.75rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(20, 32, 24, 0.08);
  z-index: 15;
}

a:focus-visible,
button:focus-visible,
.button:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.search-bar {
  padding-top: 0.85rem;
  padding-bottom: 0;
  animation: rise 0.65s ease-out both;
}

/* —— Home hero: one composition, brand first —— */
.home-hero {
  position: relative;
  max-width: none;
  min-height: var(--hero);
  display: flex;
  align-items: flex-end;
  padding: 0;
  margin: 0;
  overflow: hidden;
  animation: fade-in 0.9s ease-out both;
}

.home-hero__plane {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(20, 32, 24, 0.72) 0%, rgba(20, 32, 24, 0.35) 48%, rgba(42, 95, 74, 0.2) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(216, 196, 160, 0.35), transparent 55%),
    linear-gradient(160deg, #1a3328 0%, #2a5f4a 45%, #3d5348 100%);
  transform: scale(1.02);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.home-hero__copy {
  position: relative;
  z-index: 1;
  width: min(var(--wide), 100%);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.25rem;
  color: #f5f7f2;
}

.brand-mark {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  color: #fff;
}

.home-hero .eyebrow {
  margin: 0 0 0.85rem;
  color: var(--warm);
  font-size: 0.95rem;
  font-weight: 500;
}

.home-hero h1 {
  margin: 0 0 1rem;
  max-width: 18ch;
  font-size: clamp(1.55rem, 3.8vw, 2.35rem);
  color: #f8faf6;
  font-weight: 500;
}

.home-hero .lede {
  margin: 0 0 1.75rem;
  color: rgba(245, 247, 242, 0.88);
  font-size: 1.05rem;
  max-width: 36rem;
}

.cta-row {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-block;
  background: #f5f7f2;
  color: var(--accent-ink);
  text-decoration: none;
  padding: 0.7rem 1.15rem;
  border-radius: 0.15rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  background: #fff;
  transform: translateY(-1px);
}

.button--ghost {
  background: transparent;
  color: #f5f7f2;
  border-color: rgba(245, 247, 242, 0.45);
}

.button--ghost:hover {
  background: rgba(245, 247, 242, 0.12);
  color: #fff;
}

.home-section .button {
  background: var(--accent);
  color: #fff;
}

.home-section .button:hover {
  background: var(--accent-ink);
}

.home-section .button--ghost {
  background: transparent;
  color: var(--accent-ink);
  border-color: var(--line);
}

/* —— Home sections —— */
.home-section {
  padding-top: 3rem;
  padding-bottom: 1.5rem;
  animation: rise 0.7s ease-out both;
}

.home-section:nth-of-type(2) { animation-delay: 0.05s; }
.home-section:nth-of-type(3) { animation-delay: 0.08s; }
.home-section:nth-of-type(4) { animation-delay: 0.1s; }

.section-title {
  margin-bottom: 1.25rem;
  max-width: var(--max);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  color: var(--accent-ink);
}

.section-title__eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.85rem;
}

.identity-grid {
  display: grid;
  gap: 2rem;
  max-width: var(--wide);
}

@media (min-width: 720px) {
  .identity-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.identity-block h3 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  color: var(--accent-ink);
}

.prose {
  color: var(--ink);
  max-width: var(--max);
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.text-link {
  margin: 1rem 0 0;
}

.text-link a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.text-link a:hover,
.text-link a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.howto-body {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.home-sermon-list {
  max-width: var(--max);
}

.explore-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  max-width: var(--max);
}

.explore-list li {
  border-bottom: 1px solid var(--line);
}

.explore-list a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.95rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.explore-list a:hover,
.explore-list a:focus-visible {
  color: var(--accent);
  padding-left: 0.25rem;
}

.explore-hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.vision-split {
  display: grid;
  gap: 1.75rem;
  max-width: var(--wide);
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

@media (min-width: 720px) {
  .vision-split {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.vision-split h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--accent);
}

.vision-split p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
}

.greeting-panel {
  max-width: var(--max);
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 0;
}

.greeting-pending {
  margin: 0 0 0.35rem;
  font-family: "Noto Serif KR", serif;
  font-size: 1.15rem;
  color: var(--accent-ink);
}

.home-section.home-greeting {
  padding-bottom: 3.5rem;
}

.section-page,
.single-page {
  max-width: var(--max);
  padding: 2rem 1.25rem 3rem;
  animation: rise 0.8s ease-out both;
}

.section-header h1,
.single-header h1 {
  margin: 0 0 0.75rem;
}

.meta,
.list-count,
.empty-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.content-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.content-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.content-list time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
}

.content-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.content-list a:hover,
.content-list a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.video-embed {
  margin: 1.25rem 0 0.75rem;
  background: #0b1218;
  border-radius: 0.35rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-link a {
  color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
  margin-top: 1rem;
}

.site-footer__inner {
  max-width: var(--max);
}

.site-footer__brand {
  color: var(--ink);
  margin: 0 0 0.65rem;
}

.site-footer p {
  margin: 0 0 0.65rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site-footer__links a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  text-decoration: underline;
}

.site-footer__meta {
  margin-top: 1rem;
  font-size: 0.85rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.5%, 1%, 0); }
}

@media (max-width: 720px) {
  .site-nav--desktop {
    display: none;
  }

  .nav-drawer {
    display: block;
  }

  .content-list li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .home-hero__copy {
    padding-top: 3.25rem;
    padding-bottom: 2.5rem;
  }
}

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

  .site-header,
  .search-bar,
  .home-hero,
  .home-hero__plane,
  .home-section,
  .section-page,
  .single-page,
  .button,
  .explore-list a {
    animation: none !important;
    transition: none !important;
  }
}
