:root {
  --cream: #f3eee4;
  --paper: #fbf6ed;
  --paper-deep: #e8dfd0;
  --ink: #5b5144;
  --ink-dark: #3c332b;
  --green: #66705a;
  --mint: #779a93;
  --orange: #c96f42;
  --sunset: #b95f38;
  --shadow: rgba(68, 49, 28, 0.18);
  --pad: clamp(22px, 5vw, 76px);
  --serif: "Gowun Batang", "KoPub Batang", "Nanum Myeongjo", serif;
  --sans: "Noto Sans KR", "Pretendard", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--cream); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, textarea { font: inherit; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: grid;
  grid-template-columns: 220px 1fr 42px;
  align-items: center;
  gap: 24px;
  padding: 22px var(--pad);
  color: #fff8ec;
  background: linear-gradient(180deg, rgba(58, 44, 30, .32), rgba(58, 44, 30, 0));
  text-shadow: 0 1px 16px rgba(0,0,0,.28);
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}
.nav-links,
.site-footer nav {
  display: flex;
  justify-content: center;
  gap: clamp(30px, 6vw, 90px);
  font-size: 14px;
}
.sound-toggle,
.menu-button {
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.menu-button {
  justify-self: end;
  width: 32px;
  height: 24px;
  display: grid;
  gap: 5px;
  padding: 0;
}
.menu-button span {
  height: 1px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: #fffaf0;
}
.hero picture,
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-image {
  object-fit: cover;
  object-position: center;
  filter: saturate(.98) contrast(.98);
  transform: scale(1.025);
  animation: hero-breathe 18s var(--ease) infinite alternate;
}
.hero-shadow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(60,45,29,.56), rgba(60,45,29,.12) 42%, rgba(60,45,29,.05)),
    linear-gradient(0deg, rgba(55,38,20,.2), transparent 38%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(570px, calc(100% - 48px));
  padding: clamp(152px, 23vh, 230px) 0 0 clamp(28px, 7.4vw, 105px);
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 4.8vw, 78px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.hero h1 span {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: title-in 1.15s var(--ease) forwards;
}
.hero h1 span:nth-child(2) { animation-delay: .18s; }
.hero h1 span:nth-child(3) { animation-delay: .36s; }
.hero p {
  margin: 30px 0 40px;
  font-family: var(--serif);
  font-size: clamp(17px, 1.45vw, 21px);
}
.line-link,
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid currentColor;
  font-family: var(--serif);
}
.line-link::after,
.more-link::after { content: "→"; }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .12em;
  color: rgba(255,248,236,.86);
}
.scroll-cue span {
  width: 1px;
  height: 42px;
  background: currentColor;
}
.petal {
  position: absolute;
  z-index: 2;
  width: 44px;
  opacity: .72;
  pointer-events: none;
}
.petal-a { right: 18%; top: 19%; animation: petal-sway 7s ease-in-out infinite alternate; }
.petal-b { right: 8%; top: 43%; width: 34px; animation: petal-sway 9s ease-in-out infinite alternate-reverse; }

.quiet-transition {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 64px var(--pad);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(201,111,66,.08), transparent 45%),
    var(--paper);
  overflow: hidden;
}
.quiet-transition.first { min-height: 260px; }
.quiet-transition.after-model { min-height: 240px; }
.quiet-transition.before-letter { min-height: 300px; }
.quiet-transition.before-ending { min-height: 360px; }
.quiet-transition p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--serif);
  color: #9a8974;
  line-height: 1.9;
}
.quiet-transition p::after {
  content: "";
  display: block;
  width: 74px;
  height: 1px;
  margin: 20px auto 0;
  background: #c9b89d;
}
.tiny-petal {
  width: 30px;
  margin-bottom: 12px;
  opacity: .58;
}
.stamp-mark {
  position: absolute;
  right: 18%;
  top: 52px;
  width: 160px;
  opacity: .32;
}
.quiet-transition.before-ending img {
  width: min(420px, 70vw);
  opacity: .26;
  margin-bottom: 24px;
}

.model-scene {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  color: #fff7eb;
  background: #2b2118;
}
.model-image-wrap,
.model-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.model-image {
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(.96) brightness(.88);
  transform: scale(1.01);
  animation: slow-zoom 16s var(--ease) infinite alternate;
}
.model-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 16%, rgba(43,31,19,.08) 44%, rgba(43,31,19,.64));
}
.curtain-glow {
  position: absolute;
  left: 19%;
  top: 8%;
  width: 24%;
  height: 80%;
  background: linear-gradient(90deg, rgba(255,255,255,.12), rgba(255,255,255,0));
  filter: blur(10px);
  mix-blend-mode: screen;
  animation: curtain-sway 7s ease-in-out infinite alternate;
}
.glass-glint {
  position: absolute;
  right: 33.7%;
  top: 59%;
  width: 70px;
  height: 110px;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  filter: blur(4px);
  animation: glint 5s ease-in-out infinite;
}
.model-copy {
  position: absolute;
  z-index: 2;
  right: clamp(34px, 12vw, 180px);
  top: 50%;
  transform: translateY(-50%);
  max-width: 420px;
}
.model-copy h2,
.letter-intro h2,
.ending-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 2.8vw, 46px);
  font-weight: 400;
  line-height: 1.45;
}
.model-copy p {
  margin: 30px 0 0;
  font-family: var(--serif);
  color: rgba(255,248,236,.86);
}

.records-section {
  min-height: 980px;
  padding: 86px var(--pad) 104px;
  background:
    radial-gradient(circle at 18% 0, rgba(201,111,66,.07), transparent 30%),
    var(--paper);
}
.section-title {
  text-align: center;
  margin-bottom: 58px;
}
.section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 3vw, 48px);
  font-weight: 400;
  color: var(--ink-dark);
}
.section-title p {
  margin: 8px 0 0;
  color: #9a8974;
  font-size: 14px;
}
.section-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin: 18px auto 0;
  background: #c9b89d;
}
.record-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
}
.record-card {
  position: relative;
  min-height: 312px;
  padding: 23px 18px 48px;
  border: 1px solid rgba(114,91,63,.18);
  background: rgba(255,252,245,.48);
  box-shadow: 0 16px 40px rgba(75,52,27,.055);
}
.record-card span {
  display: block;
  color: #9a8974;
  font-family: Georgia, serif;
  font-size: 14px;
  margin-bottom: 14px;
}
.record-card h3 {
  min-height: 42px;
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink-dark);
}
.record-card img {
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
  filter: saturate(.88) contrast(.96);
  transition: transform .7s var(--ease);
}
.record-card p {
  opacity: 0;
  margin: 14px 0 0;
  color: #8a7862;
  font-size: 13px;
  line-height: 1.65;
  transform: translateY(6px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.record-card:hover img { transform: scale(1.025); }
.record-card:hover p {
  opacity: 1;
  transform: translateY(0);
}
.record-card button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #8c7b64;
  border-radius: 50%;
  color: #7c6a55;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.more-link {
  width: max-content;
  margin: 44px auto 0;
  color: var(--ink);
}

.letter-section {
  position: relative;
  min-height: 900px;
  display: grid;
  grid-template-columns: .72fr 1.02fr .62fr;
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  padding: 100px var(--pad);
  overflow: hidden;
  background: var(--paper-deep);
}
.letter-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .82;
}
.letter-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(250,244,233,.34);
}
.letter-intro,
.letter-card,
.send-button,
.folded-letter,
.falling-petal,
.watermark,
.wax {
  position: relative;
  z-index: 2;
}
.letter-intro h2 { color: var(--ink-dark); }
.letter-intro p {
  margin: 18px 0 0;
  font-family: var(--serif);
}
.letter-card {
  min-height: 260px;
  padding: 48px 58px 34px;
  background: rgba(255,252,245,.88);
  box-shadow: 0 18px 60px var(--shadow);
  transform-origin: center bottom;
}
.letter-card label {
  display: block;
  margin-bottom: 30px;
  font-family: var(--serif);
  color: #9a8974;
}
.letter-card textarea {
  width: 100%;
  height: 96px;
  resize: none;
  border: 0;
  border-bottom: 1px solid #d9c8b0;
  outline: 0;
  color: var(--ink-dark);
  background:
    linear-gradient(#d9c8b0,#d9c8b0) left 53px/100% 1px no-repeat,
    transparent;
}
.letter-count {
  margin-top: 18px;
  text-align: right;
  color: #9a8974;
  font-size: 13px;
}
.send-button {
  align-self: end;
  justify-self: end;
  min-width: 238px;
  padding: 18px 26px;
  border: 0;
  color: #fff9ec;
  background: var(--green);
  box-shadow: 0 14px 28px rgba(73,66,40,.16);
  cursor: pointer;
  transition: transform .55s var(--ease), background .55s var(--ease);
}
.send-button::after { content: " →"; }
.send-button:hover { transform: translateY(-2px); background: #545c48; }
.watermark {
  position: absolute;
  left: 33%;
  bottom: 130px;
  width: 260px;
  opacity: .38;
}
.folded-letter {
  position: absolute;
  left: 48%;
  top: 50%;
  width: 260px;
  height: 168px;
  background: #faf4e9;
  box-shadow: 0 18px 40px rgba(68,49,28,.12);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.72) rotateX(72deg);
}
.falling-petal {
  position: absolute;
  right: 32%;
  top: 38%;
  width: 38px;
  opacity: 0;
}
.letter-section.is-sent .letter-card {
  animation: fold-paper 1.55s var(--ease) forwards;
}
.letter-section.is-sent .folded-letter {
  animation: envelope-in 1.55s .35s var(--ease) forwards;
}
.letter-section.is-sent .falling-petal {
  animation: petal-fall 1.8s 1.1s ease-in forwards;
}

.sunset-ending {
  position: relative;
  min-height: 92svh;
  overflow: hidden;
  color: #fff3df;
}
.sunset-ending > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.98) contrast(.96);
}
.sunset-warmth {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(55,37,18,.48), rgba(55,37,18,.08) 48%, rgba(55,37,18,.36)),
    linear-gradient(0deg, rgba(185,95,56,.22), transparent 56%);
  animation: sunset-temp 10s ease-in-out infinite alternate;
}
.ending-copy {
  position: relative;
  z-index: 2;
  padding: 86px var(--pad);
  max-width: 520px;
}

.site-footer {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 24px var(--pad) 30px;
  color: #fff3df;
  background: #3c332b;
  font-size: 13px;
}
.footer-icons {
  display: flex;
  gap: 18px;
  font-size: 20px;
}

.record-overlay {
  position: fixed;
  z-index: 60;
  inset: 50% auto auto 50%;
  width: min(520px, calc(100vw - 40px));
  padding: 44px;
  color: var(--ink-dark);
  background: rgba(255,252,245,.96);
  box-shadow: 0 30px 90px rgba(55,37,18,.24);
  transform: translate(-50%, -50%);
}
.record-overlay button {
  position: absolute;
  right: 18px;
  top: 14px;
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--ink);
}
.record-overlay h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 34px;
}
.overlay-number {
  color: #9a8974;
  letter-spacing: .12em;
}

@keyframes title-in { to { opacity: 1; transform: translateY(0); } }
@keyframes hero-breathe { to { transform: scale(1.055); } }
@keyframes slow-zoom { to { transform: scale(1.025); } }
@keyframes curtain-sway { to { transform: translateX(8px); opacity: .8; } }
@keyframes glint { 50% { transform: translateX(18px); opacity: .75; } }
@keyframes petal-sway { to { transform: translate(4px, 10px) rotate(8deg); } }
@keyframes fold-paper {
  40% { transform: scale(.92) rotateX(55deg); opacity: .9; }
  100% { transform: translateY(48px) scale(.18) rotateX(82deg); opacity: 0; }
}
@keyframes envelope-in {
  30% { opacity: 1; transform: translate(-50%, -50%) scale(.95) rotateX(18deg); }
  100% { opacity: 1; transform: translate(86%, 38%) scale(.38) rotate(-8deg); }
}
@keyframes petal-fall {
  0% { opacity: 0; transform: translateY(-40px) rotate(0deg); }
  15% { opacity: .85; }
  100% { opacity: .85; transform: translate(-80px, 230px) rotate(115deg); }
}
@keyframes sunset-temp { to { background-color: rgba(185,95,56,.12); } }

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

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr 36px;
    padding: 18px 22px;
  }
  .nav-links { display: none; }
  .brand { font-size: 16px; }
  .hero-copy { padding: 112px 24px 0; }
  .hero h1 { font-size: clamp(39px, 10vw, 58px); }
  .scroll-cue { display: none; }
  .quiet-transition,
  .quiet-transition.first,
  .quiet-transition.after-model,
  .quiet-transition.before-letter,
  .quiet-transition.before-ending {
    min-height: 220px;
  }
  .model-scene {
    min-height: auto;
    display: grid;
    color: var(--ink-dark);
    background: var(--paper);
  }
  .model-image-wrap,
  .model-image {
    position: relative;
    height: 540px;
  }
  .model-image-wrap::after {
    background: linear-gradient(0deg, rgba(43,31,19,.42), transparent 44%);
  }
  .model-copy {
    position: relative;
    inset: auto;
    transform: none;
    padding: 44px 24px 64px;
    max-width: none;
    color: var(--ink-dark);
  }
  .model-copy p { color: var(--ink); }
  .curtain-glow,
  .glass-glint { display: none; }
  .records-section {
    min-height: auto;
    padding: 62px 24px 78px;
  }
  .record-grid {
    grid-template-columns: 1fr;
    max-width: 430px;
  }
  .record-card p {
    opacity: 1;
    transform: none;
  }
  .letter-section {
    min-height: 820px;
    grid-template-columns: 1fr;
    padding: 66px 24px;
  }
  .letter-bg { object-position: center; }
  .letter-card { padding: 34px 28px 28px; }
  .send-button { justify-self: stretch; }
  .watermark, .wax { display: none; }
  .sunset-ending { min-height: 82svh; }
  .ending-copy { padding: 70px 24px; }
  .site-footer {
    grid-template-columns: 1fr;
  }
  .site-footer nav {
    justify-content: start;
    flex-wrap: wrap;
    gap: 18px 28px;
  }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .hero-image { object-position: center; }
  .petal { display: none; }
  .model-image-wrap,
  .model-image { height: 500px; }
  .letter-intro p br { display: none; }
}
