:root {
  --hanji: #f6efe0;
  --hanji-dark: #eadfc6;
  --ink: #1d1a17;
  --red: #c8102e;
  --blue: #003478;
  --yellow: #e9b52f;
  --green: #2f6b4f;
  --paper: #fffaf0;
  --shadow: 0 6px 20px rgba(29, 26, 23, 0.15);
  --font-head: "Noto Serif KR", "Batang", "Georgia", serif;
  --font-body: "Noto Sans KR", "Malgun Gothic", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.7;
  background-color: var(--hanji);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.55), transparent 40%),
    repeating-linear-gradient(45deg, rgba(120, 90, 40, 0.035) 0 2px, transparent 2px 7px);
  padding-top: 68px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.25;
}

a {
  color: var(--red);
}

.container {
  width: min(1000px, 92%);
  margin: 0 auto;
}

/* ---------- header ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 68px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--hanji);
  border-bottom: 5px solid transparent;
  border-image: linear-gradient(90deg, var(--red) 0 20%, var(--yellow) 20% 40%, var(--blue) 40% 60%, var(--green) 60% 80%, var(--hanji) 80%) 1;
}

.menu-btn {
  order: 2;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 2px solid var(--yellow);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--yellow);
  border-radius: 2px;
  transition: 0.3s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.menu-btn:focus-visible,
.drawer a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--hanji);
}

.brand .logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--hanji);
  border: 2px solid var(--yellow);
  object-fit: cover;
  flex-shrink: 0;
}

.brand b {
  font-family: var(--font-head);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

.brand small {
  display: block;
  font-size: 0.72rem;
  color: var(--yellow);
  letter-spacing: 0.2em;
  margin-top: -4px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- menu ---------- */
.drawer {
  position: fixed;
  top: 68px;
  right: 0;
  bottom: 0;
  width: 290px;
  max-width: 85vw;
  z-index: 40;
  background: var(--paper);
  border-left: 4px double var(--red);
  transform: translateX(105%);
  transition: transform 0.35s ease;
  padding: 24px 0;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.drawer.open {
  transform: translateX(0);
}

.drawer h2 {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--blue);
  padding: 0 26px 10px;
  text-transform: uppercase;
}

.drawer a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  text-decoration: none;
  color: var(--ink);
  border-left: 6px solid transparent;
  font-weight: 500;
  transition: 0.2s;
}

.drawer a .kr {
  font-family: var(--font-head);
  color: var(--red);
  width: 3.2em;
  font-size: 0.95rem;
}

.drawer a:hover,
.drawer a.active {
  background: var(--hanji-dark);
  border-left-color: var(--red);
}

.drawer .sep {
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--red) 0 8px, transparent 8px 14px);
  margin: 14px 26px;
}

.overlay {
  position: fixed;
  inset: 68px 0 0 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 30;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Hero ---------- */
.hero {
  position: center;
  text-align: center;
  color: var(--hanji);
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px);
  padding: 80px 20px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, rgba(233, 181, 47, 0.25), transparent 55%),
    linear-gradient(160deg, #8e0b20, var(--red) 60%, #a30d25);
}

.hero::before,
.hero::after {
  /* Wellenmuster Seigaiha */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 100%, transparent 0 14px, #fff 15px 16px, transparent 17px 24px, #fff 25px 26px, transparent 27px) 0 0/40px 20px;
}

.hero .kr-big {
  font-family: var(--font-head);
  font-size: clamp(4rem, 14vw, 9rem);
  color: var(--yellow);
  line-height: 1;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  position: relative;
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  margin: 10px 0;
  position: relative;
}

.hero p {
  max-width: 620px;
  margin: 0 auto 26px;
  position: relative;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border: 2px solid var(--yellow);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: 0.2s;
  position: relative;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.btn:hover {
  background: transparent;
  color: var(--yellow);
}

.btn.ghost {
  background: transparent;
  color: var(--hanji);
  border-color: var(--hanji);
  margin-left: 10px;
}

.btn.ghost:hover {
  background: var(--hanji);
  color: var(--red);
}

.btn.dark {
  background: var(--ink);
  color: var(--hanji);
  border-color: var(--ink);
}

.btn.dark:hover {
  background: transparent;
  color: var(--ink);
}

/* ---------- sectors ---------- */
section {
  padding: 56px 0;
}

.sec-title {
  text-align: center;
  margin-bottom: 34px;
}

.sec-title .kr {
  display: block;
  color: var(--red);
  font-family: var(--font-head);
  letter-spacing: 0.3em;
  font-size: 0.95rem;
}

.sec-title h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.sec-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 6px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--red) 33%, var(--yellow) 33% 66%, var(--blue) 66%);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  background: var(--paper);
  padding: 26px 22px;
  border: 1px solid var(--hanji-dark);
  border-top: 6px solid var(--red);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.25s;
}

.card:nth-child(2n) {
  border-top-color: var(--blue);
}

.card:nth-child(3n) {
  border-top-color: var(--yellow);
}

.card:hover {
  transform: translateY(-5px);
}

.card .icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.band {
  background: var(--paper);
  border-block: 1px solid var(--hanji-dark);
}

.lead {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
}

#question {
  max-width: 860px;
  margin: 0 auto 26px;
  text-align: center;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 30px;
}

.fact {
  text-align: center;
  width: 150px;
  padding: 18px 10px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 8px 8px / 30% 30% 8px 8px;
  background: var(--hanji);
}

.fact b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  color: var(--red);
}

/* ---------- recipe ---------- */
.recipe-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 780px) {
  .recipe-layout {
    grid-template-columns: 1fr;
  }
}

.box {
  background: var(--paper);
  padding: 24px;
  border: 1px solid var(--hanji-dark);
  box-shadow: var(--shadow);
  border-left: 6px solid var(--blue);
}

.box h3 {
  margin-bottom: 12px;
}

.servings {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.servings button {
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  background: var(--hanji);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
}

.servings button:hover {
  background: var(--yellow);
}

.ingredients {
  list-style: none;
}

.ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #b9a98a;
}

.ingredients li label {
  cursor: pointer;
  display: flex;
  gap: 8px;
}

.ingredients input:checked + span {
  text-decoration: line-through;
  opacity: 0.55;
}

.steps {
  list-style: none;
  counter-reset: s;
}

.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 22px 64px;
}

.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: var(--hanji);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px var(--hanji), 0 0 0 6px var(--red);
}

.steps h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.tip {
  background: #fff3c9;
  border-left: 6px solid var(--yellow);
  padding: 14px 18px;
  margin-top: 20px;
}

/* ---------- presentation ---------- */
.slide {
  background: var(--paper);
  border: 1px solid var(--hanji-dark);
  box-shadow: var(--shadow);
  padding: 34px;
  margin-bottom: 34px;
  position: relative;
  border-image: linear-gradient(90deg, var(--red), var(--yellow), var(--blue)) 1;
  border-width: 0 0 0 8px;
  border-style: solid;
}

.slide .no {
  position: absolute;
  right: 20px;
  top: 8px;
  font-family: var(--font-head);
  font-size: 3.8rem;
  color: rgba(200, 16, 46, 0.15);
}

.slide h2 {
  margin-bottom: 12px;
}

.slide ul {
  margin: 12px 0 0 22px;
}

.slide li {
  margin-bottom: 6px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.timeline div {
  background: var(--hanji);
  padding: 14px;
  border-top: 5px solid var(--blue);
  text-align: center;
}

.timeline b {
  display: block;
  color: var(--red);
  font-family: var(--font-head);
}

.quiz button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 8px 0;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  background: var(--hanji);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.quiz button:hover {
  background: var(--hanji-dark);
}

.quiz button.right {
  background: #bfe3c9;
  border-color: var(--green);
}

.quiz button.wrong {
  background: #f4c3c9;
  border-color: var(--red);
}

/* ---------- legal docs ---------- */
.legal {
  background: var(--paper);
  padding: 34px;
  box-shadow: var(--shadow);
  border-top: 6px solid var(--red);
  margin: 40px auto;
}

.legal h1 {
  margin-bottom: 18px;
}

.legal h2 {
  margin: 22px 0 6px;
  font-size: 1.2rem;
  color: var(--blue);
}

/* ---------- footer ---------- */
footer {
  background: var(--ink);
  color: var(--hanji);
  text-align: center;
  padding: 30px 16px;
  margin-top: 40px;
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg, var(--red) 0 20%, var(--yellow) 20% 40%, var(--blue) 40% 60%, var(--green) 60% 80%, var(--hanji) 80%) 1;
}

footer a {
  color: var(--yellow);
  margin: 0 10px;
}

footer .kr {
  font-family: var(--font-head);
  color: var(--yellow);
  letter-spacing: 0.3em;
  margin-bottom: 6px;
}

/* ---------- annis---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: 0.7s;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- logo ---------- */
.hero-logo {
  display: block;
  width: clamp(180px, 38vw, 340px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto 18px;
  position: relative;
  border-radius: 50%;
  background: var(--hanji);
  border: 6px solid var(--yellow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero .kr-big {
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin-bottom: 4px;
}

