/* Ttobak website: ink on hanji paper, one vermilion accent. Same palette as the app. */

@font-face {
  font-family: "Gowun Batang";
  src: url("/assets/fonts/gowun-batang-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/pretendard-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/pretendard-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --paper: #F6EFE1;
  --paper-raised: #FBF7EE;
  --paper-deep: #EDE3CF;
  --ink: #1F1C19;
  --ink-soft: #5A534B;
  --hairline: #D9CDB6;
  --vermilion: #A8241C;
  --gold: #C98A2E;
  --display: "Gowun Batang", "Apple SD Gothic Neo", serif;
  --ui: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --column: 1080px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--vermilion); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--vermilion); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; min-height: min(100vh, 900px); display: grid; align-items: center; }
.leaves { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.hero-inner {
  position: relative; z-index: 1;
  width: min(var(--column), 100% - 40px); margin: 0 auto; padding: 48px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}

.stage {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; justify-self: center;
  padding: 0; border: 0; background: var(--paper); cursor: pointer;
  isolation: isolate; /* keeps the multiply blend inside the stage */
}
.stage .writing { position: absolute; left: 0; top: 25%; width: 100%; height: 50%; overflow: visible; }
.stage .writing path { fill: none; stroke: var(--ink); stroke-width: 0.085; stroke-linecap: round; stroke-linejoin: round; }
.stage .layer { position: absolute; mix-blend-mode: multiply; opacity: 0; }
.stage .branch { inset: 0; width: 100%; height: 100%; }
.stage .bird { left: 0; top: 0; transform-origin: 50% 50%; }
.stage .perched { left: 23.28%; top: 12.93%; width: 47.07%; height: 39.14%; transform-origin: 50% 100%; }
.stage .seal {
  position: absolute; left: 81.4%; top: 65.5%; width: 10.5%; height: 10.5%;
  opacity: 0; transform: scale(1.6) rotate(-10deg);
}
.stage .seal.stamped { animation: stamp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes stamp { to { opacity: 1; transform: none; } }

.kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 12px; }
.hero h1 { font-size: clamp(56px, 9vw, 96px); letter-spacing: -0.01em; }
.roman { color: var(--ink-soft); margin: 8px 0 20px; }
.lede { font-size: 20px; max-width: 32em; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.button {
  display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
  font-weight: 600; padding: 14px 28px; border-radius: 14px; transition: transform 0.15s, opacity 0.15s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(0.97); opacity: 0.85; }
.text-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.text-link:hover { color: var(--vermilion); }

/* ---------- Sections ---------- */

.section { width: min(var(--column), 100% - 40px); margin: 0 auto; padding: 72px 0; }
.section h2 { font-size: clamp(30px, 4.4vw, 44px); margin-bottom: 14px; }
.section h2 [lang="ko"] { color: var(--vermilion); margin-right: 14px; }
.section-lede { color: var(--ink-soft); font-size: 18px; max-width: 40em; margin: 0 0 32px; }

.sound-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sound-card {
  background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 18px;
  padding: 24px 20px; display: grid; justify-items: center; gap: 6px; transition: border-color 0.2s;
}
.sound-card.playing { border-color: var(--vermilion); }
.glyph { font-family: var(--display); font-weight: 700; font-size: 72px; line-height: 1.1; }
.sound-name { color: var(--ink-soft); font-size: 14px; }
.plays { display: flex; gap: 8px; margin-top: 10px; }
.play {
  font: 600 14px var(--ui); color: var(--ink); background: var(--paper-deep);
  border: 0; border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer;
}
.play.active { background: var(--vermilion); color: var(--paper); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.features h3 { font-size: 34px; color: var(--vermilion); }
.feature-title { font-weight: 600; margin: 8px 0 6px; }
.features p { margin: 0; color: var(--ink-soft); }
.features .feature-title { color: var(--ink); }

.shot-row {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 20px; margin: 0 -4px;
}
.shot-row img {
  flex: 0 0 auto; width: min(240px, 62vw); height: auto; border-radius: 28px; scroll-snap-align: start;
  box-shadow: 0 2px 6px rgba(31, 28, 25, 0.08), 0 12px 32px rgba(31, 28, 25, 0.10);
}

.banner { margin: 24px 0 0; }
.banner img { display: block; width: 100%; height: auto; }
.banner figcaption { text-align: center; color: var(--ink-soft); font-size: 15px; padding: 14px 20px 0; }

.beta { text-align: center; }
.beta .section-lede { margin-left: auto; margin-right: auto; }
.fine { color: var(--ink-soft); font-size: 14px; }

/* ---------- Footer and text pages ---------- */

.site-footer {
  border-top: 1px solid var(--hairline); padding: 32px 20px 48px;
  display: grid; justify-items: center; gap: 10px; color: var(--ink-soft); font-size: 14px;
}
.site-footer nav { display: flex; gap: 24px; }
.site-footer nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { color: var(--vermilion); }
.site-footer p { margin: 0; }

.page-header { width: min(760px, 100% - 40px); margin: 0 auto; padding: 32px 0 0; display: flex; align-items: center; gap: 12px; }
.page-header a { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 24px; }
.prose { width: min(760px, 100% - 40px); margin: 0 auto; padding: 40px 0 72px; }
.prose h1 { font-size: 44px; margin-bottom: 6px; }
.prose h2 { font-size: 24px; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose .updated { color: var(--ink-soft); margin-top: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .stage { max-width: 340px; }
  .hero-copy { text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .sound-row, .features { grid-template-columns: 1fr; }
  .sound-row { gap: 12px; }
  .glyph { font-size: 56px; }
}
