:root {
  color-scheme: light;
  --ink: #291d18;
  --muted: #74655c;
  --paper: #fffdf9;
  --ivory: #f7f1e8;
  --peach: #e8b08c;
  --brown: #6c3f2b;
  --line: #dfd4c7;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.55;
  word-break: keep-all;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.brand img { border-radius: 10px; }
.header-download { padding: 9px 15px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 700; }

main { overflow: hidden; }
.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: 670px;
  margin: 32px auto 110px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(50px, 8vw, 110px);
}
.eyebrow { margin: 0 0 16px; color: var(--brown); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 26px; font-size: clamp(42px, 5.1vw, 70px); line-height: 1.16; letter-spacing: -.055em; }
.hero-description { max-width: 520px; margin-bottom: 32px; color: var(--muted); font-size: 18px; }
.app-store-button { width: fit-content; min-width: 178px; padding: 10px 18px; display: flex; align-items: center; gap: 12px; color: #fff; background: #191817; border-radius: 14px; text-decoration: none; }
.app-store-button svg { width: 26px; fill: currentColor; }
.app-store-button span { display: grid; line-height: 1.1; }
.app-store-button small { font-size: 10px; }
.app-store-button strong { margin-top: 3px; font-size: 18px; }

.room-card { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #d6aa82; border: 1px solid #cba982; border-radius: 26px; box-shadow: 0 28px 70px rgba(65, 39, 27, .18); }
.room-background { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.librarian { position: absolute; z-index: 2; left: 31%; bottom: 10%; width: 35%; image-rendering: pixelated; filter: drop-shadow(0 12px 8px rgba(45, 26, 18, .14)); }
.speech { position: absolute; z-index: 3; left: 9%; bottom: 39%; padding: 10px 14px; color: #4b3a31; background: rgba(255, 253, 249, .94); border: 1px solid rgba(99, 73, 58, .18); border-radius: 13px; font-size: clamp(12px, 1.5vw, 15px); box-shadow: 0 7px 24px rgba(57, 34, 23, .1); }
.speech::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; background: inherit; border-right: inherit; border-bottom: inherit; transform: rotate(45deg); }

.features { padding: 110px max(20px, calc((100vw - 1180px) / 2)); background: var(--ivory); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 48px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { margin-bottom: 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.2; letter-spacing: -.045em; }
.feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.feature-grid article { min-height: 225px; padding: 26px; background: var(--paper); border: 1px solid rgba(111, 79, 60, .12); border-radius: 20px; }
.feature-grid article:nth-child(-n+3) { grid-column: span 2; }
.feature-grid article:nth-child(n+4) { grid-column: span 3; }
.feature-number { color: var(--peach); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.feature-grid h3 { margin: 48px 0 12px; font-size: 22px; letter-spacing: -.03em; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 15px; }

.download-card { width: min(1000px, calc(100% - 40px)); margin: 110px auto; padding: 42px clamp(32px, 7vw, 90px); display: flex; align-items: center; justify-content: center; gap: clamp(30px, 7vw, 80px); background: #f3e3d4; border-radius: 28px; }
.download-card img { width: min(220px, 30vw); image-rendering: pixelated; }
.download-card h2 { margin-bottom: 12px; }
.download-card p:not(.eyebrow) { color: var(--muted); }
.text-link { display: inline-block; margin-top: 10px; font-weight: 800; text-underline-offset: 5px; }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 52px; display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; border-top: 1px solid var(--line); }
.footer-brand { display: flex; gap: 10px; align-items: baseline; }
.footer-brand strong { letter-spacing: .1em; }
.footer-brand span, .copyright { color: var(--muted); font-size: 13px; }
footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; }
footer nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.copyright { grid-column: 1 / -1; margin: 0; }

a:focus-visible { outline: 3px solid #d4875e; outline-offset: 4px; }
.header-download:hover, .text-link:hover, footer nav a:hover { color: var(--brown); }
.app-store-button:hover { background: #392a24; }

@media (max-width: 780px) {
  .site-header { width: min(100% - 32px, 620px); height: 68px; }
  .hero { width: min(100% - 32px, 620px); min-height: 0; margin: 46px auto 82px; grid-template-columns: 1fr; gap: 50px; }
  h1 { font-size: clamp(39px, 12vw, 58px); }
  .hero-description { font-size: 16px; }
  .room-card { width: 100%; border-radius: 20px; }
  .features { padding-top: 76px; padding-bottom: 76px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid article:nth-child(n) { grid-column: auto; min-height: 190px; }
  .feature-grid h3 { margin-top: 34px; }
  .download-card { margin: 76px auto; padding: 38px 28px; flex-direction: column; text-align: center; }
  .download-card img { width: 180px; }
  footer { width: calc(100% - 32px); grid-template-columns: 1fr; }
  footer nav { justify-content: flex-start; }
}

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