:root {
  --serif: 'Nanum Myeongjo', 'Noto Serif KR', serif;
  --sans: 'Noto Sans KR', system-ui, sans-serif;
  --radius: 6px;
}

/* Each scene carries its whole palette. */
:root[data-scene='door'] {
  color-scheme: dark;
  --page: #14130f;
  --band: #1e1c16;
  --ink: #f3ead8;
  --muted: #b3a990;
  --line: #3a3528;
  --accent: #e8a13c;
  --on-accent: #231704;
  --hero-ink: #fbf3e2;
  --hero-muted: #e0d6c0;
  --scrim: linear-gradient(to top, rgba(10, 9, 6, .9) 0%, rgba(10, 9, 6, .55) 32%, rgba(10, 9, 6, 0) 62%);
  --soon-bg: transparent;
}
:root[data-scene='window'] {
  color-scheme: light;
  --page: #f7f3e9;
  --band: #efe9da;
  --ink: #232a20;
  --muted: #5f6655;
  --line: #d9d2bf;
  --accent: #1f4d36;
  --on-accent: #f7f3e9;
  --hero-ink: #16291d;
  --hero-muted: #2c3b2e;
  --scrim: radial-gradient(ellipse 75% 75% at 0% 0%, rgba(250, 248, 240, .94) 0%, rgba(250, 248, 240, .72) 45%, rgba(250, 248, 240, 0) 75%);
  --soon-bg: rgba(250, 248, 240, .82);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  overflow-x: hidden;
}
h1, h2 { font-family: var(--serif); font-weight: 700; margin: 0; word-break: keep-all; }
p { margin: 0; word-break: keep-all; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

:root[data-scene='door'] .only-window,
:root[data-scene='window'] .only-door { display: none; }

/* Top bar */
.top {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 48px);
  color: var(--ink);
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.logo { font: 700 28px/1 var(--serif); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a, .top nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--band);
  color: var(--ink);
  font: 500 15px/1.4 var(--sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.top nav a:hover, .top nav button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.top nav a:active, .top nav button:active { transform: translateY(1px); }
.top nav :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
  background: var(--page);
}
.art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease;
}
.art-door { object-position: 62% 50%; }
.art-window { object-position: 72% 50%; }
:root[data-scene='door'] .art-door,
:root[data-scene='window'] .art-window { opacity: 1; }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--scrim);
}
.hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 96px clamp(16px, 5vw, 64px) clamp(40px, 7vh, 72px);
  color: var(--hero-ink);
  display: flex;
  flex-direction: column;
}
:root[data-scene='door'] .hero-text { justify-content: flex-end; }
:root[data-scene='window'] .hero-text { justify-content: flex-start; padding-top: clamp(96px, 15vh, 140px); }
.hero h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.28; letter-spacing: -.01em; }
.hero p { margin-top: 14px; font-size: clamp(16px, 1.5vw, 19px); color: var(--hero-muted); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 26px; }
.button {
  display: inline-block;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--radius);
  font: 700 16px/1.3 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { filter: brightness(1.08); }
.soon { font-size: 14px; color: var(--hero-muted); padding: 4px 10px; border-radius: 99px; background: var(--soon-bg); }

/* Steps */
.steps { background: var(--band); border-block: 1px solid var(--line); }
.steps ol {
  list-style: none;
  counter-reset: step;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 44px) clamp(16px, 5vw, 64px);
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 40px;
}
.steps li { counter-increment: step; word-break: keep-all; }
.steps li::before {
  content: counter(step);
  display: block;
  font: 700 22px/1 var(--serif);
  color: var(--accent);
  margin-bottom: 8px;
}
.steps b { display: block; font: 700 19px/1.4 var(--serif); }
.steps span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* Shelf */
.shelf-demo {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.shelf-copy h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.35; }
.shelf-copy p { margin-top: 18px; color: var(--muted); }
.shelf-copy .note { font-size: 14px; }
.covers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.6vw, 18px);
}
.covers li {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
  padding: 12px;
  color: #fbf6e8;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  overflow: hidden;
}
.covers b { font: 700 clamp(14px, 1.7vw, 20px)/1.35 var(--serif); word-break: keep-all; }
.covers i {
  position: absolute;
  right: 10px;
  bottom: 9px;
  font: 500 12px/1 var(--sans);
}
.c1 { background: linear-gradient(160deg, #8c1f2b, #3b1016); }
.c2 { background: linear-gradient(160deg, #39424d, #14181d); }
.c3 { background: linear-gradient(160deg, #6d6a8f, #e6d9c3 130%); }
.c4 { background: linear-gradient(160deg, #2f5a39, #122415); }
.c5 { background: linear-gradient(160deg, #6a6f73, #24272a); }
.c6 { background: linear-gradient(160deg, #7a5a2c, #2a1e0e); }
.covers .away { opacity: .62; box-shadow: none; outline: 1px dashed var(--muted); outline-offset: -1px; }

/* App */
.get-app {
  padding: clamp(56px, 8vw, 104px) clamp(16px, 5vw, 64px);
  background: var(--band);
  border-top: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.app-layout {
  max-width: 1120px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.app-eyebrow { display: block; margin-bottom: 20px; color: var(--accent); font-size: 13px; font-weight: 500; letter-spacing: .14em; }
.get-app h2 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.4; letter-spacing: -.035em; }
.app-intro { margin-top: 22px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.app-availability { max-width: 29em; margin-top: 32px; color: var(--muted); font-size: 13px; }
.app-web-link { display: inline-flex; gap: 24px; align-items: center; margin-top: 16px; padding-block: 10px; min-height: 44px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--muted); font-size: 14px; transition: color .2s, border-color .2s; }
.app-web-link:hover { color: var(--accent); border-color: var(--accent); }
.app-devices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 38px); align-items: start; }
.device-column { min-width: 0; text-align: center; }
.device-column:nth-child(2) { padding-top: 42px; }
.phone {
  position: relative;
  width: 100%;
  max-width: 222px;
  margin: 0 auto 25px;
  padding: 5px;
  border: 1px solid #77766f;
  border-radius: 30px;
  background: #33342f;
  box-shadow: 0 18px 32px -16px rgba(10, 9, 6, .5), inset 0 0 0 1px #1c1d19;
}
.phone::before { content: ''; position: absolute; right: -3px; top: 24%; width: 2px; height: 9%; background: #797970; border-radius: 0 2px 2px 0; }
.phone-iphone { padding: 5px; border-color: #b5ad9b; background: #9e9787; border-radius: 34px; box-shadow: 0 18px 32px -16px rgba(10, 9, 6, .5), inset 0 0 0 1px #ddd4c0; }
.phone-screen { position: relative; background: #f5f1e8; color: #282922; border-radius: 25px; overflow: hidden; }
.phone-iphone .phone-screen { border-radius: 29px; }
.phone-status { display: flex; justify-content: space-between; align-items: center; height: 25px; padding: 2px 14px 0; font: 700 8px/1 var(--sans); }
.phone-camera { position: absolute; top: 9px; left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: #252722; }
.phone-iphone .phone-camera { top: 6px; left: calc(50% - 20px); width: 40px; height: 12px; border-radius: 12px; }
.phone-battery { width: 12px; height: 6px; border: 1px solid #62635b; border-radius: 2px; background: #3d4035; box-shadow: inset -2px 0 #f5f1e8; }
.phone-screen img { display: block; width: 100%; height: auto; }
.phone-home { height: 14px; position: relative; }
.phone-home::after { content: ''; position: absolute; width: 30%; height: 3px; background: #33362d; border-radius: 3px; left: 35%; bottom: 5px; }
.device-label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.store-link { width: 100%; max-width: 222px; min-height: 62px; padding: 11px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-align: left; text-decoration: none; border: 1px solid var(--line); border-radius: 9px; background: var(--page); color: var(--ink); transition: border-color .2s, transform .2s, background .2s; }
.store-icon { width: 25px; height: 28px; flex-shrink: 0; }
.store-copy { display: flex; flex-direction: column; gap: 2px; }
.store-copy small { font: 400 10px/1.4 var(--sans); color: var(--muted); }
.store-copy strong { font: 500 clamp(14px, 1.5vw, 19px)/1.2 var(--sans); white-space: nowrap; letter-spacing: -.025em; }
.store-link[aria-disabled='true'] { cursor: default; }
.store-link[href]:hover { border-color: var(--accent); transform: translateY(-2px); }
.store-link[href]:active { transform: translateY(0); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 48px);
  font-size: 14px;
  color: var(--muted);
}

/* Settings */
dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--page);
  color: var(--ink);
}
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog h2 { font-size: 22px; margin-bottom: 16px; }
.scene-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scene-choices label {
  display: block;
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.scene-choices label:has(input:checked) { border-color: var(--accent); }
.scene-choices label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.scene-choices input { position: absolute; opacity: 0; }
.scene-choices img { display: block; width: 100%; height: auto; }
.scene-choices span { display: block; padding: 8px 10px; font-weight: 700; }
.scene-choices small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); word-break: keep-all; }
.close { margin-top: 18px; width: 100%; background: var(--band); color: var(--ink); }

@media (max-width: 760px) {
  .top nav a, .top nav button { padding-inline: 10px; font-size: 14px; }
  .steps ol, .shelf-demo { grid-template-columns: 1fr; }
  .app-layout { grid-template-columns: 1fr; gap: 40px; }
  .app-copy { text-align: center; }
  .app-intro { max-width: 32em; margin-inline: auto; }
  .app-availability { margin: 24px auto 0; }
  .app-devices { width: min(100%, 470px); margin-inline: auto; gap: clamp(16px, 5vw, 36px); }
  .device-column:nth-child(2) { padding-top: 28px; }
  .art-door { object-position: 80% 50%; }
  .art-window { object-position: 66% 50%; }
  :root[data-scene='window'] {
    --scrim: linear-gradient(to bottom, rgba(250, 248, 240, .93) 0%, rgba(250, 248, 240, .78) 42%, rgba(250, 248, 240, 0) 68%);
  }
}

@media (max-width: 380px) {
  .store-link { padding-inline: 8px; gap: 7px; }
  .store-icon { width: 20px; height: 24px; }
  .phone { border-radius: 24px; padding: 4px; }
  .phone-screen, .phone-iphone .phone-screen { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art { transition: none; }
  .store-link, .app-web-link { transition: none; }
  .top nav a, .top nav button { transition: none; }
}
