/* =========================================================================
   향담 (Hyangdam) — Apple-style one-page landing
   Ported from the Genspark Design handoff (designer2-796beea1).
   Two-color palette only: --bg (warm off-white) + --ink (near black).
   Typography: Fraunces (serif) + Noto Sans KR (sans), fluid clamp() scale.
   ========================================================================= */

:root {
  --bg: #f4f1ec;            /* off-white paper */
  --ink: #1a1a1a;           /* near black */
  --ink-60: rgba(26, 26, 26, .60);
  --ink-40: rgba(26, 26, 26, .40);
  --ink-15: rgba(26, 26, 26, .15);
  --serif: 'Fraunces', 'Noto Serif KR', ui-serif, Georgia, serif;
  --sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  /* Dark-inverted section tokens (class band) */
  --paper-85: rgba(244, 241, 236, .85);
  --paper-65: rgba(244, 241, 236, .65);
  --paper-55: rgba(244, 241, 236, .55);
  --paper-40: rgba(244, 241, 236, .40);
  --paper-18: rgba(244, 241, 236, .18);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* IMPORTANT: never put overflow-x:hidden on <html>. It silently breaks
   position:sticky in some engines by promoting html to its own scroll
   container. Clip horizontal overflow on <body> only. */
html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--bg); }

/* ---------------------------------------------------------------- Nav --- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 50;
  background: rgba(244, 241, 236, .72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--ink-15);
}

.nav .brand {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 18px;
  letter-spacing: .02em;
}

.nav .brand em {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-60);
  margin-left: 6px;
  letter-spacing: .1em;
}

.nav .cta {
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  transition: background .25s ease, color .25s ease;
}

.nav .cta:hover { background: var(--ink); color: var(--bg); }

/* ----------------------------------------------------------- Sections --- */
section { padding: 0 22px; position: relative; }
.wrap { max-width: 1100px; margin: 0 auto; }

/* --------------------------------------------------------------- Hero --- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 70px;
  padding-bottom: 40px;
}

/* When the pinned scroll sequence boots, the static hero candle is removed
   from flow so it doesn't duplicate the pinned one. */
.has-scrollseq .hero .stage { opacity: 0; visibility: hidden; pointer-events: none; height: 0; margin: 0; }
.has-scrollseq .hero { padding-bottom: 0; min-height: 88svh; }

.hero .eyebrow {
  font-size: 12px;
  letter-spacing: .34em;
  color: var(--ink-60);
  text-transform: uppercase;
  margin-bottom: 22px;
  font-weight: 400;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(44px, 12vw, 92px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin-bottom: 14px;
  text-wrap: balance;
}

.hero h1 .cn {
  font-size: .55em;
  color: var(--ink-40);
  letter-spacing: .18em;
  margin-left: .35em;
  vertical-align: .15em;
}

.hero .tag {
  font-size: clamp(15px, 3.6vw, 18px);
  color: var(--ink-60);
  font-weight: 300;
  max-width: 22ch;
  margin: 0 auto;
}

.hero .stage {
  width: min(72vw, 420px);
  aspect-ratio: 1 / 1;
  margin: 44px auto 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .10)) drop-shadow(0 4px 8px rgba(0, 0, 0, .05));
  transform: translateY(20px) scale(.98);
  opacity: 0;
  animation: rise 1.4s cubic-bezier(.22, .61, .36, 1) .15s forwards;
}

@keyframes rise { to { transform: translateY(0) scale(1); opacity: 1; } }

.hero .scroll {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .32em;
  color: var(--ink-40);
  text-transform: uppercase;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); opacity: .55; }
  50%      { transform: translate(-50%, 6px); opacity: 1; }
}

/* --------------------------------------------- Shared section headers --- */
.band {
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

.kicker {
  font-size: 12px;
  letter-spacing: .34em;
  color: var(--ink-60);
  text-transform: uppercase;
  margin-bottom: 22px;
  font-weight: 400;
}

h2 {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(36px, 8.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-align: center;
  max-width: 16ch;
  margin: 0 auto;
  text-wrap: balance;
}

h2 .accent { color: var(--ink-40); }

.lede {
  margin-top: 22px;
  text-align: center;
  font-size: clamp(15px, 3.6vw, 18px);
  color: var(--ink-60);
  max-width: 32ch;
}

/* ------------------------------------------- Sticky scroll sequence --- */
/* A tall track that pins a stage inside while the user scrolls.
   The candle rotates + shrinks + drifts left; copy lines fade in. */
.scrollseq {
  position: relative;
  height: 420svh;   /* total scroll distance */
  padding: 0;
}

.scrollseq .stick {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* NOTE: do NOT add `contain: paint` — it can break sticky in some engines. */
}

.seq-candle {
  /* Flex-centered in the flow (not absolute) so sticky math stays sane.
     Position/scale/rotation are driven purely by CSS variables from JS. */
  width: min(72vw, 360px);
  aspect-ratio: 1 / 1;
  transform:
    translate3d(var(--tx, 0px), var(--ty, 0px), 0)
    scale(var(--sc, 1))
    rotate(var(--rot, 0deg));
  transform-origin: center center;
  transition: none;
  will-change: transform;
  pointer-events: none;
  flex: none;
}

.seq-candle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .12)) drop-shadow(0 6px 10px rgba(0, 0, 0, .06));
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.seq-lines {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 22px;
  pointer-events: none;
}

.seq-lines .col {
  width: min(100%, 520px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: right;
}

.seq-lines .line {
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(22px, 6vw, 38px);
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--ink);
  opacity: 0;
  transform: translate3d(24px, 0, 0);
  transition: opacity .7s ease, transform .8s cubic-bezier(.22, .61, .36, 1);
  text-wrap: balance;
}

.seq-lines .line small {
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-top: 6px;
}

.seq-lines .line.on { opacity: 1; transform: none; }

/* Progress rail — thin vertical ticks marking sequence progress. */
.seq-rail {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
}

.seq-rail i {
  display: block;
  width: 1px;
  height: 22px;
  background: var(--ink-15);
  transition: background .4s ease, height .4s ease;
}

.seq-rail i.on { background: var(--ink); height: 32px; }

/* ------------------------------------------------------ Intro band --- */
/* Superseded by the scroll sequence when JS is active; kept as a
   no-JS fallback one-line intro band. */
.has-scrollseq .intro { display: none; }
.intro h2 { font-size: clamp(34px, 8vw, 64px); }

.intro .sub {
  margin-top: 44px;
  display: flex;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--ink-60);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.intro .sub span { position: relative; }

.intro .sub span + span::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-40);
  transform: translateY(-50%);
}

/* --------------------------------------------------- Blending steps --- */
.steps { padding-bottom: 120px; }
.steps h2 { margin-bottom: 12px; }
.steps .lede { margin-bottom: 64px; }

.steplist {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
  border-top: 1px solid var(--ink-15);
}

.step {
  padding: 38px 4px;
  border-bottom: 1px solid var(--ink-15);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 18px;
  align-items: baseline;
}

.step .num {
  font-family: var(--serif);
  font-weight: 200;
  font-size: 34px;
  color: var(--ink-40);
  line-height: 1;
  letter-spacing: -.02em;
}

.step .body h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 5.4vw, 30px);
  letter-spacing: -.01em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.step .body p {
  color: var(--ink-60);
  font-size: 15px;
  line-height: 1.6;
  max-width: 38ch;
}

.step .body .time {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-40);
}

/* ---------------------------------------------- Class info (inverted) --- */
.class {
  background: var(--ink);
  color: var(--bg);
  padding-top: 110px;
  padding-bottom: 110px;
}

.class .kicker { color: var(--paper-55); }
.class h2 { color: var(--bg); }
.class h2 .accent { color: var(--paper-40); }
.class .lede { color: var(--paper-65); }

.specs {
  margin-top: 72px;
  display: grid;
  grid-template-columns: 1fr;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  border-top: 1px solid var(--paper-18);
}

.spec {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 26px 4px;
  border-bottom: 1px solid var(--paper-18);
  gap: 16px;
}

.spec .k {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--paper-55);
  font-weight: 400;
}

.spec .v {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(22px, 5vw, 28px);
  letter-spacing: -.01em;
  text-align: right;
}

.spec .v .unit {
  font-size: .55em;
  color: var(--paper-55);
  margin-left: 6px;
  letter-spacing: .02em;
}

.class .takeaway {
  margin-top: 56px;
  text-align: center;
  font-family: var(--serif);
  font-weight: 200;
  font-size: clamp(20px, 4.8vw, 26px);
  color: var(--paper-85);
  line-height: 1.4;
  letter-spacing: -.01em;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

/* ---------------------------------------------------------- Booking --- */
.book { padding-top: 120px; padding-bottom: 120px; text-align: center; }
.book h2 { margin-bottom: 22px; }
.book .lede { margin-bottom: 44px; }

.book .btn {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .02em;
  padding: 16px 34px;
  border-radius: 999px;
  transition: transform .3s ease, background .3s ease;
}

.book .btn:hover { transform: translateY(-2px); background: #000; }

.book .meta {
  margin-top: 28px;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--ink-60);
  font-size: 13px;
}

.book .meta a { border-bottom: 1px solid var(--ink-40); padding-bottom: 2px; }

.book .addr {
  margin-top: 64px;
  padding-top: 44px;
  border-top: 1px solid var(--ink-15);
  color: var(--ink-60);
  font-size: 13px;
  letter-spacing: .06em;
  line-height: 1.9;
}

.book .addr strong {
  color: var(--ink);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
}

/* ----------------------------------------------------------- Footer --- */
footer {
  padding: 32px 22px 44px;
  text-align: center;
  color: var(--ink-40);
  font-size: 12px;
  letter-spacing: .14em;
  border-top: 1px solid var(--ink-15);
}

footer .fbrand {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-60);
  letter-spacing: .08em;
  margin-bottom: 6px;
}

/* --------------------------------------------- Generic scroll reveal --- */
/* Fail-open: only hide when JS confirms it can animate (html.js-anim). */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.22, .61, .36, 1);
}

.js-anim .reveal.in { opacity: 1; transform: none; }

.js-anim .step {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22, .61, .36, 1);
}

.js-anim .step.in { opacity: 1; transform: none; }

/* ------------------------------------------------- Desktop ≥ 780px --- */
@media (min-width: 780px) {
  .nav { padding: 0 44px; height: 60px; }
  section { padding: 0 44px; }

  .hero .stage { width: min(34vw, 480px); margin-top: 52px; }

  .scrollseq { height: 460svh; }
  .seq-candle { width: min(38vw, 460px); }
  .seq-lines { padding: 0 6vw; }
  .seq-lines .col { width: 46vw; max-width: 560px; gap: 28px; }
  .seq-lines .line { font-size: clamp(28px, 3.6vw, 48px); }
  .seq-rail { left: 44px; }

  .steplist { max-width: 720px; }
  .step { grid-template-columns: 100px 1fr; gap: 28px; padding: 52px 4px; }
  .step .num { font-size: 44px; }

  .specs { max-width: 680px; }
  .spec { padding: 32px 8px; }
}

/* ------------------------------------------------ Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  /* Keep the candle centered and static; only fade the copy lines in. */
  .seq-candle { transition: none; transform: scale(.85) !important; }
  .seq-lines .line { transition: opacity .3s ease; transform: none; }

  .hero .stage img { animation: none; transform: none; opacity: 1; }
  .hero .scroll { animation: none; }

  .js-anim .reveal,
  .js-anim .step { transition: opacity .3s ease; transform: none; }
}
