/* ============================================================
   쪼가리 (JJOGARI) — one-page landing site
   Design tokens ported 1:1 from the Genspark Design handoff.
   Palette is strictly 2 colors + opacity variants of --ink.
   ============================================================ */

:root {
  --bg: #F4EEE4;         /* warm ivory background */
  --ink: #2A211C;        /* deep brown text */
  --ink-80: rgba(42, 33, 28, 0.82);
  --ink-70: rgba(42, 33, 28, 0.70);
  --ink-50: rgba(42, 33, 28, 0.50);
  --ink-30: rgba(42, 33, 28, 0.30);
  --ink-15: rgba(42, 33, 28, 0.15);
  --ink-08: rgba(42, 33, 28, 0.08);

  --serif: 'Instrument Serif', 'Nanum Myeongjo', ui-serif, Georgia, serif;
  --sans: 'Inter', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--ink); color: var(--bg); }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 28px;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.2) blur(16px);
  -webkit-backdrop-filter: saturate(1.2) blur(16px);
  font-size: 13px; letter-spacing: 0.02em;
  transition: padding 240ms ease;
}
.nav.scrolled { padding: 12px 28px; }
.nav .brand {
  font-family: var(--serif);
  font-size: 22px; letter-spacing: -0.01em;
}
.nav .links { display: flex; gap: 26px; color: var(--ink-70); }
.nav .links a { position: relative; }
.nav .links a:hover { color: var(--ink); }
.nav .links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: center;
  transition: transform 300ms ease;
}
.nav .links a:hover::after { transform: scaleX(1); }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 120px 24px 60px;
  text-align: center;
  position: relative;
}
.hero .eyebrow {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-50); margin-bottom: 32px;
  font-weight: 400;
}
.hero .wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 14vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-70);
  max-width: 22ch;
  margin: 0 auto;
}
.hero .quilt {
  margin-top: clamp(48px, 8vw, 80px);
  width: min(540px, 76vw);
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink-15);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 40px 80px -32px rgba(42, 33, 28, 0.32);
}
.hero .quilt img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.88) contrast(0.98);
  transition: transform 1600ms var(--ease);
}
.hero .quilt:hover img { transform: scale(1.04); }

.hero .meta {
  margin-top: clamp(40px, 6vw, 56px);
  display: flex; align-items: center; gap: 20px;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-50);
}
.hero .meta .dot {
  width: 3px; height: 3px; border-radius: 50%; background: currentColor;
  flex: none;
}

/* ============ SECTION SHELL ============ */
section {
  padding: clamp(120px, 18vw, 200px) 24px;
  max-width: 1120px; margin: 0 auto;
  position: relative;
}
.section-label {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-50); margin-bottom: 32px;
  font-weight: 500;
}

/* ============ SECTION 1 — 한 줄 소개 ============ */
.intro { text-align: center; }
.intro .line {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 6.8vw, 76px);
  line-height: 1.16;
  letter-spacing: -0.018em;
  max-width: 20ch;
  margin: 0 auto;
}
.intro .line em { font-style: italic; color: var(--ink-70); }
.intro .rule {
  width: 40px; height: 1px; background: var(--ink-30);
  margin: clamp(32px, 5vw, 48px) auto;
}
.intro .sub {
  font-size: clamp(15px, 1.6vw, 17px);
  color: var(--ink-70);
  max-width: 36ch; margin: 0 auto;
  line-height: 1.75;
}

/* ============ SECTION 2 — 만드는 과정 ============ */
.process .head {
  text-align: center; margin-bottom: clamp(72px, 12vw, 128px);
}
.process .head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5.6vw, 56px);
  line-height: 1.18; letter-spacing: -0.018em;
  max-width: 22ch; margin: 0 auto;
}
.process .head h2 em { font-style: italic; color: var(--ink-70); }

.steps {
  display: grid; grid-template-columns: 1fr; gap: clamp(96px, 14vw, 160px);
}
.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
  position: relative;
}
.step .thumb {
  width: 100%; aspect-ratio: 4 / 3;
  border-radius: 3px; overflow: hidden;
  background: var(--ink-15);
  position: relative;
}
.step .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.88) contrast(0.98);
  transition: transform 1400ms var(--ease);
}
.step:hover .thumb img { transform: scale(1.03); }

.step .copy { position: relative; }
.step .copy .big-num {
  font-family: var(--serif); font-style: italic;
  font-weight: 400;
  font-size: clamp(120px, 20vw, 220px);
  line-height: 0.85;
  color: var(--ink-08);
  position: absolute;
  top: -0.15em; left: -0.05em;
  z-index: 0;
  pointer-events: none;
  letter-spacing: -0.04em;
}
.step .copy .inner { position: relative; z-index: 1; padding-top: clamp(24px, 4vw, 44px); }
.step .copy .num {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-50); margin-bottom: 20px;
}
.step .copy h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.8vw, 42px);
  letter-spacing: -0.012em; line-height: 1.2;
  margin-bottom: 20px;
}
.step .copy p {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--ink-70); line-height: 1.75;
  max-width: 38ch;
}

/* ============ SECTION 3 — 클래스 정보 ============ */
.info { text-align: center; }
.info .head { margin-bottom: clamp(64px, 10vw, 96px); }
.info .head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5.6vw, 56px);
  line-height: 1.18; letter-spacing: -0.018em;
  max-width: 22ch; margin: 0 auto;
}
.info .head h2 em { font-style: italic; color: var(--ink-70); }

.price-card {
  max-width: 640px; margin: 0 auto clamp(48px, 6vw, 72px);
  padding: clamp(40px, 6vw, 64px) 24px;
  border-top: 1px solid var(--ink-15);
  border-bottom: 1px solid var(--ink-15);
  text-align: center;
}
.price-card .k {
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-50); margin-bottom: 20px;
}
.price-card .v {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(72px, 14vw, 132px);
  line-height: 1; letter-spacing: -0.025em;
}
.price-card .v .unit {
  font-size: 0.34em; letter-spacing: 0.02em; margin-left: 10px;
  color: var(--ink-70);
}
.price-card .u {
  font-size: 13px; color: var(--ink-50); margin-top: 20px;
  letter-spacing: 0.04em;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--ink-15);
  border-top: 1px solid var(--ink-15);
  border-bottom: 1px solid var(--ink-15);
}
.info-cell {
  background: var(--bg);
  padding: clamp(32px, 4.5vw, 44px) 20px;
  text-align: center;
}
.info-cell .k {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-50); margin-bottom: 18px;
}
.info-cell .v {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15; letter-spacing: -0.01em;
}
.info-cell .u {
  font-size: 12px; color: var(--ink-50); margin-top: 10px;
  letter-spacing: 0.02em;
}

.info .foot {
  margin-top: clamp(48px, 6vw, 72px);
  font-size: 14px; color: var(--ink-70); line-height: 1.75;
  max-width: 44ch; margin-left: auto; margin-right: auto;
}
.info .foot em { font-style: italic; color: var(--ink); }

/* ============ SECTION 4 — 예약 안내 ============ */
.book {
  text-align: center;
  padding-top: clamp(100px, 16vw, 180px);
  padding-bottom: clamp(120px, 18vw, 200px);
}
.book .kicker {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--ink-70); margin-bottom: 28px;
}
.book h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 9vw, 104px);
  line-height: 1.02; letter-spacing: -0.022em;
  max-width: 14ch; margin: 0 auto clamp(48px, 7vw, 72px);
}
.book h2 em { font-style: italic; color: var(--ink-70); }

.cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 20px 40px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px; letter-spacing: 0.08em; font-weight: 400;
  color: var(--ink);
  transition: background 320ms ease, color 320ms ease;
}
.cta:hover, .cta:focus-visible { background: var(--ink); color: var(--bg); }
.cta .arrow {
  display: inline-block; transition: transform 320ms ease;
}
.cta:hover .arrow, .cta:focus-visible .arrow { transform: translateX(6px); }

.channels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--ink-15);
  border-top: 1px solid var(--ink-15);
  border-bottom: 1px solid var(--ink-15);
  max-width: 780px; margin-left: auto; margin-right: auto;
  margin-top: clamp(72px, 10vw, 112px);
}
.channel {
  background: var(--bg);
  padding: clamp(28px, 4vw, 40px) 20px;
  text-align: center;
  transition: background 240ms ease;
}
.channel:hover, .channel:focus-visible { background: color-mix(in oklab, var(--bg) 92%, var(--ink)); }
.channel .lbl {
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-50); margin-bottom: 14px;
}
.channel .val {
  font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px);
  color: var(--ink); letter-spacing: -0.005em;
}
.channel .sub {
  font-size: 12px; color: var(--ink-50); margin-top: 8px;
  letter-spacing: 0.02em;
}

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--ink-15);
  padding: 44px 24px 52px;
  text-align: center;
}
footer .brand-mini {
  font-family: var(--serif); font-size: 20px;
  color: var(--ink); margin-bottom: 12px; letter-spacing: -0.01em;
}
footer .meta {
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-50); line-height: 1.8;
}
footer .meta .sep { display: inline-block; margin: 0 10px; color: var(--ink-30); }
footer .copy { margin-top: 12px; color: var(--ink-30); }

/* ============ PIN SCROLL SECTION ============ */
.pin-scroll {
  position: relative;
  /* 1 viewport of pinned content + extra scroll runway for progress */
  height: 380vh;
  /* prevent horizontal shift jitter on mobile */
  overflow: clip;
}
.pin-scroll .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}
.pin-scroll .visual {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  width: min(520px, 78vw);
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink-15);
  box-shadow: 0 40px 80px -32px rgba(42, 33, 28, 0.32);
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.pin-scroll .visual img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.88) contrast(0.98);
}
.pin-scroll .lines {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  width: 100%;
  max-width: 520px;
  text-align: center;
  pointer-events: none;
}
.pin-scroll .line-item {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 5.6vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  margin-bottom: clamp(20px, 3vw, 32px);
  will-change: opacity, transform;
}
.pin-scroll .line-item em { font-style: italic; color: var(--ink-70); }
.pin-scroll .line-item.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.pin-scroll .line-item.out {
  opacity: 0;
  transform: translate3d(0, -16px, 0);
}
.pin-scroll .progress {
  position: absolute;
  left: 24px; bottom: 32px;
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink-50);
}

/* ============ REVEAL ============ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1000ms ease, transform 1000ms var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* nav links hide on small screens */
@media (max-width: 620px) {
  .nav .links { display: none; }
  .nav { padding: 14px 22px; }
}

/* process steps: 2-col alternating */
@media (min-width: 820px) {
  .step { grid-template-columns: 1.05fr 1fr; gap: clamp(56px, 8vw, 112px); }
  .step:nth-child(even) .thumb { order: 2; }
  .step:nth-child(even) .copy .big-num { left: auto; right: -0.05em; }
}

/* info grid: 3-col */
@media (min-width: 760px) {
  .info-grid { grid-template-columns: repeat(3, 1fr); }
}

/* booking channels: 3-col */
@media (min-width: 700px) {
  .channels { grid-template-columns: repeat(3, 1fr); }
}

/* pin scroll: visual left, lines right */
@media (min-width: 820px) {
  .pin-scroll .stage {
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 8vw, 96px);
  }
  .pin-scroll .visual {
    grid-column: 1; grid-row: 1;
    justify-self: end;
  }
  .pin-scroll .lines {
    grid-column: 2; grid-row: 1;
    justify-self: start;
    text-align: left;
    max-width: 460px;
  }
  .pin-scroll .line-item {
    font-size: clamp(30px, 3.6vw, 44px);
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .quilt:hover img, .step:hover .thumb img { transform: none; }
  .pin-scroll { height: auto; }
  .pin-scroll .stage { position: static; height: auto; padding: 120px 24px; }
  .pin-scroll .visual { transform: none !important; opacity: 1 !important; }
  .pin-scroll .line-item { opacity: 1; transform: none; }
}
