/* JING 静 — SPORTIF / sport-premium variant
   On Running × Bala × Hoka × Aimé Leon Dore × Allbirds.
   Mobile-first. 390×844 baseline. Full-bleed colorblocks.
*/

/* ---------- TOKENS ---------- */
:root {
  --paper: #F2EADA;
  --paper-deep: #E5D9C0;
  --jade: #7B9486;
  --jade-deep: #5C7869;
  --clay: #B8826D;
  --clay-deep: #9A6953;
  --walnut: #5C4533;
  --walnut-deep: #432F1F;
  --ink: #1A1814;
  --cream: #F2EADA;

  --fg-on-light: #1A1814;
  --fg-on-dark:  #F2EADA;

  --font-display: "Inter Tight", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
  --font-serif:   "Fraunces", Georgia, serif;
  --font-zh:      "Noto Sans SC", "PingFang SC", system-ui, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur: 720ms;

  --pad-x: clamp(20px, 6vw, 40px);
  --rule: 1px solid currentColor;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--fg-on-light);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

.mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.zh   { font-family: var(--font-zh); }

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad-x);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in oklab, var(--paper) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  transition: color .5s var(--ease), background .5s var(--ease), border-color .5s var(--ease);
}
.nav__brand { color: inherit; text-decoration: none; display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; }
.nav__mark { letter-spacing: .14em; }
.nav__zh { font-family: var(--font-zh); font-size: 13px; }
.nav__model { justify-self: center; opacity: .7; }
.nav__cta {
  justify-self: end;
  color: inherit; text-decoration: none;
  border: 1px solid currentColor;
  padding: 7px 12px 6px;
  border-radius: 999px;
  font-weight: 600;
}

/* Nav inverts on dark blocks via JS */
body.nav-dark .nav { color: var(--cream); background: color-mix(in oklab, var(--ink) 60%, transparent); border-bottom-color: color-mix(in oklab, var(--cream) 18%, transparent); }

/* ---------- BLOCK SYSTEM ---------- */
.block {
  position: relative;
  min-height: 100svh;
  padding: 92px var(--pad-x) 64px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.block--paper  { background: var(--paper);  color: var(--ink); }
.block--jade   { background: var(--jade);   color: var(--cream); }
.block--clay   { background: var(--clay);   color: var(--cream); }
.block--walnut { background: var(--walnut); color: var(--cream); }
.block--ink    { background: var(--ink);    color: var(--cream); }

.block__edge {
  position: absolute;
  top: 64px;
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .72;
  pointer-events: none;
  z-index: 3;
}
.block__edge::before, .block__edge::after { content: ""; }
.block__edge::before {
  position: absolute;
  left: 0; right: 0;
  top: -10px;
  height: 1px;
  background: currentColor;
  opacity: .25;
}

/* ---------- DISPLAY TYPE ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: .88;
  letter-spacing: -.035em;
  text-transform: uppercase;
  margin: 0;
  font-size: clamp(56px, 17vw, 168px);
}
.display > span { display: block; }
.display__alt { font-style: normal; font-weight: 800; opacity: .94; }

.display--mid { font-size: clamp(44px, 13vw, 120px); line-height: .9; }
.display--lg  { font-size: clamp(64px, 19vw, 180px); }

/* ---------- HERO ---------- */
.hero { padding-top: 76px; }
.hero__stage {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  margin: 8px -4vw 8px;
  min-height: 46svh;
}
.hero__type { padding-top: 4px; }
.hero__meta { margin-top: 18px; font-size: 10px; letter-spacing: .16em; opacity: .75; }

.scroll-cue {
  position: absolute;
  bottom: 20px; left: var(--pad-x);
  font-size: 10px; letter-spacing: .2em;
  display: inline-flex; align-items: center; gap: 10px;
  opacity: .7;
}
.cue-line {
  display: inline-block;
  width: 38px; height: 1px;
  background: currentColor;
  animation: cue 2.2s var(--ease) infinite;
  transform-origin: left center;
}
@keyframes cue { 0%,100% { transform: scaleX(.4); } 50% { transform: scaleX(1); } }

/* ---------- BALL ---------- */
.ball {
  position: relative;
  width: min(82vw, 460px);
  aspect-ratio: 1;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.18));
  will-change: transform;
}
.ball__svg { width: 100%; height: 100%; border-radius: 50%; }
.ball__tag {
  position: absolute;
  bottom: -22px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .68;
  white-space: nowrap;
}
.ball--float { animation: float 7s var(--ease) infinite; }
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-14px) rotate(8deg); }
}
.ball--anchor {
  position: absolute;
  right: -10vw; bottom: -8vw;
  width: min(86vw, 520px);
  z-index: 1;
}

/* ---------- WHAT IT IS ---------- */
.what { gap: 28px; }
.what__copy { position: relative; z-index: 2; padding-top: 12px; }
.what__body { margin-top: 28px; max-width: 38ch; }
.what__body p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; color: color-mix(in oklab, var(--cream) 92%, transparent); }
.what__body .zh { font-size: 13.5px; opacity: .82; }
.what__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 40svh;
  margin-top: 8px;
}
.what__stage .ball {
  position: absolute;
  right: -12vw; bottom: -10vw;
  width: min(78vw, 440px);
}

/* annotation svg overlay */
.annot {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.annot--what { top: 18px; left: 0; width: 60%; max-width: 320px; height: auto; }
.annot--room { bottom: 26vw; right: 6vw; width: 56%; max-width: 280px; }
.annot__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-dasharray: 1 0;
  opacity: .8;
}
.annot__dot { fill: currentColor; }
.annot__label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: currentColor;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.annot__label--sub { opacity: .7; }

/* draw-in for annotation lines */
.annot__line[data-draw] {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 900ms var(--ease);
}
.annot__line.is-drawn { stroke-dashoffset: 0; }

/* ---------- ROOMS ---------- */
.rooms { display: block; }
.room {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding-top: 84px;
  gap: 18px;
}
.room__head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: end; margin-top: 4px; }
.room__num {
  font-size: clamp(52px, 18vw, 140px);
  line-height: .8;
  font-weight: 500;
  letter-spacing: -.02em;
}
.room__name h3 {
  font-family: var(--font-display);
  font-weight: 900;
  margin: 0;
  font-size: clamp(28px, 9vw, 64px);
  letter-spacing: -.02em;
  line-height: .9;
}
.room__name .zh { font-size: 11px; opacity: .7; margin-top: 4px; }

.room .display { margin-top: 10px; max-width: 14ch; }

.room .ball--anchor {
  right: -16vw; bottom: -12vw;
  width: min(88vw, 520px);
}

/* ---------- CONSTRUCTION ---------- */
.build { align-items: center; text-align: center; padding-top: 92px; }
.build .display { text-align: left; align-self: start; }
.xray {
  margin: 18px 0;
  width: min(96vw, 560px);
}
.xray__svg { width: 100%; height: auto; color: var(--ink); }
.xray .annot__label { font-size: 8.5px; letter-spacing: .16em; }
.build__note { margin-top: auto; padding-top: 28px; font-size: 10px; letter-spacing: .16em; opacity: .7; text-align: center; }

/* ---------- COLOURWAYS ---------- */
.colours { padding-top: 92px; }
.cw {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}
.cw__item {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid color-mix(in oklab, var(--cream) 22%, transparent);
}
.cw__item:last-child { border-bottom: 1px solid color-mix(in oklab, var(--cream) 22%, transparent); }
.cw__ball { width: 92px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.cw__ball svg { width: 100%; height: 100%; }
.cw__ball--ink svg circle { stroke: color-mix(in oklab, var(--cream) 22%, transparent); stroke-width: 1; }
.cw__meta { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; }
.cw__no { font-size: 11px; opacity: .7; }
.cw__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 6vw, 36px);
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.cw__hex { font-size: 10px; opacity: .7; letter-spacing: .12em; }

/* ---------- SPECS ---------- */
.specs { padding-top: 92px; }
.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: color-mix(in oklab, var(--ink) 18%, transparent);
  border: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  margin: 28px 0 24px;
}
.tile {
  background: var(--paper);
  padding: 28px 18px 18px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tile__big {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 18vw, 120px);
  line-height: .85;
  letter-spacing: -.04em;
}
.tile__big--zh { font-family: var(--font-zh); font-weight: 500; letter-spacing: 0; font-size: clamp(44px, 14vw, 96px); }
.tile__lbl { font-size: 10px; letter-spacing: .14em; opacity: .72; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
}
.spec-table th, .spec-table td {
  padding: 12px 0;
  text-align: left;
  border-top: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  font-weight: 500;
  text-transform: uppercase;
}
.spec-table th { width: 42%; opacity: .65; }
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: 1px solid color-mix(in oklab, var(--ink) 18%, transparent); }

/* ---------- SERIF MOMENT ---------- */
.serif {
  background: #FAF6EE;
  color: var(--ink);
  min-height: 60svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px var(--pad-x);
  gap: 12px;
}
.serif__line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(34px, 9vw, 72px);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -.01em;
}
.serif__line em { font-style: italic; }
.serif__tag { font-size: 10px; letter-spacing: .2em; opacity: .55; }

/* ---------- RESERVE ---------- */
.reserve { padding-top: 92px; gap: 24px; }
.reserve__form { display: grid; gap: 14px; margin-top: 28px; position: relative; }
.reserve__field {
  display: grid; gap: 8px;
  border-bottom: 1px solid color-mix(in oklab, var(--cream) 40%, transparent);
  padding-bottom: 10px;
}
.reserve__field span { font-size: 10px; letter-spacing: .18em; opacity: .7; }
.reserve__field input {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--cream);
  font: 500 20px/1.2 var(--font-display);
  letter-spacing: -.01em;
  padding: 4px 0;
  outline: none;
}
.reserve__field input::placeholder { color: color-mix(in oklab, var(--cream) 45%, transparent); }
.reserve__btn {
  appearance: none;
  border: 1px solid var(--cream);
  background: transparent;
  color: var(--cream);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease);
}
.reserve__btn:hover { background: var(--cream); color: var(--walnut); }
.reserve__arrow { font-family: var(--font-display); font-size: 18px; }

.reserve__done {
  position: absolute; left: 0; right: 0; bottom: -34px;
  font-size: 10px; opacity: 0;
  transition: opacity .4s var(--ease);
}
.reserve__form.is-done .reserve__done { opacity: .9; }
.reserve__form.is-done .reserve__field, .reserve__form.is-done .reserve__btn { opacity: .35; pointer-events: none; }

.reserve__caption { margin-top: auto; padding-top: 32px; font-size: 10px; letter-spacing: .18em; opacity: .7; }

/* ---------- FOOTER ---------- */
.foot { background: var(--ink); color: var(--cream); padding: 28px var(--pad-x); }
.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: .16em;
  opacity: .85;
}

/* ---------- REVEAL ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- BREAKPOINTS ---------- */
@media (min-width: 720px) {
  body { font-size: 16px; }
  .block { padding: 110px 6vw 80px; }
  .room__head { grid-template-columns: 1fr auto; align-items: end; }
  .room .display { max-width: 16ch; }
  .cw { grid-template-columns: 1fr 1fr; gap: 18px 32px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .tile { aspect-ratio: auto; min-height: 220px; }
  .ball--anchor { right: -6vw; bottom: -4vw; width: min(54vw, 560px); }
  .room .ball--anchor { right: -4vw; bottom: -6vw; width: min(52vw, 560px); }
  .what__stage .ball { right: -4vw; bottom: -4vw; width: min(48vw, 520px); }
}

@media (min-width: 1100px) {
  .hero__stage { min-height: 60svh; }
  .display { font-size: clamp(80px, 12vw, 200px); }
  .display--mid { font-size: clamp(64px, 9vw, 144px); }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .annot__line[data-draw] { stroke-dashoffset: 0; }
}
