/* JiHee · site theme and page-local layout. The engine (scrollcraft.css) owns the
   mechanism; this file owns the tokens and the page's own classes. */

:root {
  --sc-canvas:     #F8F8F8;
  --sc-surface:    #E8E6E1;
  --sc-ink:        #17140F;
  --sc-ink-soft:   #6A6258;
  --sc-accent:     #F2B705;
  --sc-accent-ink: #17140F;
  --sc-font-display: "Archivo", "Noto Sans KR", system-ui, sans-serif;
  --sc-font-text:    "Geist", "Noto Sans KR", system-ui, sans-serif;
  --paper: #F8F8F8;
  --film-white: #F8F8F8;
  --hair: rgba(23, 20, 15, .14);
}
html[lang="ko"] {
  --sc-font-display: "Noto Sans KR", "Archivo", system-ui, sans-serif;
  --sc-font-text:    "Noto Sans KR", "Geist", system-ui, sans-serif;
}
html[lang="ko"] .sc-display { letter-spacing: -0.01em; font-weight: 700; }

body { background: var(--sc-canvas); color: var(--sc-ink); }
[lang="ko"] { font-family: "Noto Sans KR", var(--sc-font-text); }

/* ------------------------------------------------------------------ bar */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(.75rem, 1.6vw, 1.25rem) var(--sc-gutter, 5vw);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__mark { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; color: var(--sc-ink); }
.bar__name { font-family: var(--sc-font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.bar__ko { font-size: .8rem; color: var(--sc-ink-soft); }
.bar__right { display: flex; align-items: center; gap: 1rem; }
.lang { display: inline-flex; border: 1px solid var(--hair); border-radius: 999px; padding: 2px; background: color-mix(in oklab, var(--paper) 82%, white); }
.lang__btn {
  appearance: none; border: 0; background: transparent; color: var(--sc-ink-soft);
  font: 500 .8rem/1 var(--sc-font-text); padding: .45rem .7rem; border-radius: 999px; cursor: pointer;
  transition: background 140ms var(--sc-ease-out, ease-out), color 140ms;
}
.lang__btn[aria-pressed="true"] { background: var(--sc-ink); color: var(--paper); }
.lang__btn:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  font: 600 .95rem/1 var(--sc-font-text); letter-spacing: 0;
  padding: .95rem 1.35rem; border-radius: 999px; border: 0; text-decoration: none; cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 18px -8px rgba(242, 183, 5, .55);
  transition: transform 140ms var(--sc-ease-out, ease-out), box-shadow 140ms;
}
.cta:hover { box-shadow: 0 10px 24px -10px rgba(242, 183, 5, .7); }
.cta:active { transform: translateY(1px) scale(.985); }
.cta:focus-visible { outline: 2px solid var(--sc-ink); outline-offset: 3px; }
.cta--bar { padding: .75rem 1.1rem; font-size: .85rem; }
@media (max-width: 640px) { .cta--bar { display: none; } .bar__ko { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero__stage { overflow: hidden; background: var(--paper); }

.hero__word {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 4vw; pointer-events: none; white-space: nowrap;
  font-family: "Noto Sans KR", var(--sc-font-display); font-weight: 900;
  font-size: clamp(9rem, 28vw, 32rem); line-height: 1;
  color: color-mix(in oklab, var(--sc-ink) 7%, var(--paper));
  user-select: none;
}
.hero__word span { display: block; transform: translateY(-4%); }
.hero__word span + span { transform: translateY(6%); }

.film { position: absolute; inset: 0; touch-action: pan-y; }
.leg { position: absolute; inset: 0; margin: 0; opacity: 0; will-change: opacity; }
.leg[data-on] { opacity: 1; }
.leg__poster, .film__canvas {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: 100%; width: auto; max-width: none; aspect-ratio: 9 / 16; object-fit: cover;
  background: var(--film-white);
}
.film__canvas { opacity: 0; pointer-events: none; }   /* site.js turns it on once a frame is drawn */

/* copy sits in the free canvas left of her on wide screens */
.hero__copy { max-width: min(38vw, 34rem); top: 50%; bottom: auto; translate: 0 -50%; }
.hero__copy .sc-display--lg { text-wrap: balance; }
.hero__sub { margin-top: 1rem; max-width: 30ch; color: var(--sc-ink-soft); }
/* The button drops well below the paragraph — clear of the giant 안 glyph
   behind it, which is vertically centred on the stage same as this text —
   instead of sitting right under "Ready when you are." like the other cues. */
.hero__copy--last .cta { position: absolute; left: 0; top: 100%; margin-top: clamp(3rem, 13vh, 8rem); }
.hero__scrim { display: none; }

.looks {
  position: absolute; right: var(--sc-gutter, 5vw); top: 50%; transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem;
}
.looks button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font: 500 .78rem/1 var(--sc-font-text); color: var(--sc-ink-soft); letter-spacing: .02em;
  display: flex; align-items: center; gap: .55rem; padding: .35rem .2rem;
  transition: color 160ms;
}
.looks button::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .45; transition: transform 160ms var(--sc-ease-out, ease-out), opacity 160ms; }
.looks button[aria-current="true"] { color: var(--sc-accent); }
.looks button[aria-current="true"]::before { opacity: 1; transform: scale(1.5); }
.looks button:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; border-radius: 4px; }

.hero__hint {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  margin: 0; font-size: .78rem; color: var(--sc-ink-soft); opacity: 0; transition: opacity 400ms;
}
.hero__hint[data-show] { opacity: 1; }
@media (hover: none), (pointer: coarse) { .hero__hint { display: none; } }

@media (max-width: 860px) {
  .hero__copy { max-width: none; left: var(--sc-gutter, 5vw); right: var(--sc-gutter, 5vw); top: auto; bottom: 6.25rem; translate: none; }
  .hero__copy--last .cta { position: static; margin-top: 1.25rem; }  /* already sits low on mobile */
  .hero__copy .sc-display--xl { font-size: var(--sc-t-2xl, 2.4rem); }
  .hero__copy .sc-display--lg { font-size: clamp(1.5rem, 6.4vw, 2rem); }
  .hero__scrim { display: block; position: absolute; inset: auto 0 0 0; height: 46%; pointer-events: none;
    background: linear-gradient(to top, var(--paper) 46%, transparent); height: 52%; }
  .leg__poster, .film__canvas { height: 64%; top: 37%; }
  .looks { right: auto; left: 50%; top: auto; bottom: 1rem; transform: translateX(-50%); grid-auto-flow: column; gap: .1rem; }
  .looks button { font-size: 0; padding: .5rem .35rem; }
  .looks button::before { width: .5rem; height: .5rem; }
  .hero__word { font-size: 38vw; padding: 0 2vw; align-items: flex-start; padding-top: 10vh; }
}

/* ------------------------------------------------------------------ reviews */
.reviews { background: var(--sc-surface); }
.rail { display: flex; align-items: flex-end; gap: clamp(1.5rem, 3vw, 3rem); padding: 0 var(--sc-gutter, 5vw); height: 100%; box-sizing: border-box; }
.rail__lead { flex: 0 0 auto; width: min(34rem, 60vw); align-self: center; }
.rail__lead p { margin-top: .9rem; max-width: 32ch; color: var(--sc-ink-soft); }

/* Five stars down the right edge, spread over the full height. Fixed to the
   stage, so the rail pans behind them. Drawn as a mask, not a ★ glyph —
   the character's shape and weight vary wildly between fonts. */
.stars {
  position: absolute; right: 0; top: 0; bottom: 0; z-index: 2;
  width: clamp(5rem, 11vw, 9rem);
  margin: 0; padding: clamp(2.5rem, 9vh, 6rem) clamp(1.2rem, 3vw, 2.5rem) clamp(2.5rem, 9vh, 6rem) 0;
  list-style: none;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  pointer-events: none;
  /* Its own lane: quotes pan behind this and fade out before they reach a
     star, so the column never collides with a line of text. */
  background: linear-gradient(to right, transparent, var(--sc-surface) 62%);
}
.stars li {
  width: clamp(.9rem, 1.5vw, 1.35rem); aspect-ratio: 1; background: var(--sc-ink);
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
}
:root { --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .8l3.1 7.6 8.2.6-6.3 5.3 2 8-7-4.4-7 4.4 2-8L.7 9l8.2-.6z'/%3E%3C/svg%3E"); }
@media (max-width: 860px) { .stars { display: none; } }
.rail__end { flex: 0 0 auto; width: 22rem; align-self: center; color: var(--sc-ink-soft); padding-right: var(--sc-gutter, 5vw); }
.quote {
  flex: 0 0 auto; width: clamp(17rem, 26vw, 24rem); margin: 0; align-self: center;
  padding: 0 0 .25rem; border-bottom: 1px solid var(--hair);
  font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1.15rem, 1.6vw, 1.55rem); line-height: 1.3; letter-spacing: -0.005em;
  text-wrap: pretty;
}
.quote--wide { width: clamp(22rem, 38vw, 36rem); font-size: clamp(1.35rem, 2vw, 2rem); align-self: flex-start; margin-top: 14vh; }
.quote:nth-of-type(even) { align-self: flex-end; margin-bottom: 12vh; }
.quote p { margin: 0; }
.quote p + p { margin-top: .5rem; }
.quote--ko p[lang="ko"] { font-weight: 700; font-size: 1.15em; }
.quote__tr { font-family: var(--sc-font-text); font-weight: 400; font-size: .9rem; color: var(--sc-ink-soft); }
.quote cite { display: block; margin-top: .9rem; font: 500 .78rem/1 var(--sc-font-text); font-style: normal; color: var(--sc-ink-soft); letter-spacing: .02em; }
@media (prefers-reduced-motion: no-preference) {
  .quote { opacity: calc(0.55 + 0.45 * clamp(0, (var(--sc-p, 1) - var(--at, 0)) * 7, 1)); }
}
@media (max-width: 860px) {
  .rail__lead { width: 78vw; }
  .quote, .quote--wide { width: 74vw; margin-top: 0; margin-bottom: 0; align-self: center; }
}

/* ------------------------------------------------------------------ how */
.how { background: var(--paper); }
.how__ground { position: absolute; right: 0; top: 0; bottom: 0; width: 46vw; margin: 0; pointer-events: none; }
.how__ground img, .how__canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 100%; width: auto; max-width: none; aspect-ratio: 9 / 16; }
.how__canvas { opacity: 0; }   /* site.js turns it on once a frame is drawn; she turns with the pointer */
.how__lines { position: absolute; left: var(--sc-gutter, 5vw); right: 46vw; top: 50%; translate: 0 -50%; display: grid; gap: clamp(.9rem, 1.6vw, 1.4rem); }
.how__lines > * { margin: 0; text-wrap: balance; }
.how__lines .sc-display--lg { font-size: clamp(1.5rem, 1.3rem + 1.4vw, 2.4rem); }
.how__h2 { color: var(--sc-ink-soft); font-size: var(--sc-t-lg, 1.4rem); margin-bottom: .4rem; }
.how__you { color: var(--sc-accent); }
@media (max-width: 860px) {
  .how__ground { width: 100vw; opacity: .07; }
  .how__canvas { display: none; }
  .how__h2 { color: var(--sc-ink); }
  .how__lines { right: var(--sc-gutter, 5vw); }
  .how__lines .sc-display--lg { font-size: clamp(1.35rem, 5.6vw, 1.8rem); }
}

/* ------------------------------------------------------------------ pricing */
.pricing { background: var(--sc-surface); padding-block: clamp(4rem, 10vw, 8rem); }
.pricing__wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.pricing__num { font-family: var(--sc-font-display); font-weight: 800; font-size: clamp(5rem, 14vw, 11rem); line-height: .9; letter-spacing: -0.05em; margin: 1rem 0 .75rem; font-variant-numeric: tabular-nums; }
.pricing__cur { font-size: .42em; vertical-align: top; margin-right: .06em; color: var(--sc-ink-soft); font-weight: 600; }
.pricing__big .sc-body { max-width: 30ch; color: var(--sc-ink-soft); }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.05rem 0; border-top: 1px solid var(--hair); font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1rem, 1.35vw, 1.25rem); }
.ledger li:last-child { border-bottom: 1px solid var(--hair); }
.ledger__n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger__n small { font: 500 .78rem/1 var(--sc-font-text); color: var(--sc-accent); margin-left: .5rem; }
/* two rows break out of the column: the pack bleeds left, the monthly bleeds right, square corners */
.ledger .ledger__row--ink, .ledger .ledger__row--accent { padding: 1.35rem 1.25rem; border-radius: 0; border-top-color: transparent; }
.ledger .ledger__row--ink { background: var(--sc-ink); color: var(--paper); margin-inline: -7rem -1.25rem; padding-left: 7rem; }
.ledger .ledger__row--accent { background: var(--sc-accent); color: var(--sc-accent-ink); margin-inline: -1.25rem -7rem; padding-right: 7rem; }
.ledger__row--ink .ledger__n small { color: var(--sc-accent); }
.ledger__row--ink + li, .ledger__row--accent + li { border-top-color: transparent; }
.ledger__was { text-decoration: line-through; opacity: .6; font-weight: 500; margin-right: .35rem; }
/* black bleeds from the left, yellow bleeds from the right: they slide in from
   those same edges as the ledger enters view, instead of the default rise-in */
.ledger[data-sc-stagger] > .ledger__row--ink { transform: translate3d(-6rem, 0, 0); }
.ledger[data-sc-stagger] > .ledger__row--accent { transform: translate3d(6rem, 0, 0); }
.ledger[data-sc-stagger] > .ledger__row--ink.sc-in,
.ledger[data-sc-stagger] > .ledger__row--accent.sc-in { transform: none; }
@media (max-width: 860px) { .pricing__wrap { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ close */
.close { background: var(--paper); display: grid; grid-template-rows: 1fr auto; }
.close__inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding: 6rem var(--sc-gutter, 5vw) 2rem; }
.close__copy .sc-body { margin-top: 1rem; max-width: 30ch; color: var(--sc-ink-soft); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.field { display: grid; gap: .4rem; font: 500 .82rem/1.2 var(--sc-font-text); color: var(--sc-ink-soft); }
.field--wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  font: 400 1rem/1.4 var(--sc-font-text); color: var(--sc-ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--hair); border-radius: 0;
  padding: .65rem .1rem; width: 100%; box-sizing: border-box;
  transition: border-color 140ms, box-shadow 140ms;
}
.field textarea { resize: none; min-height: 4.5rem; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%236A6258' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .15rem center; background-size: .85rem;
  padding-right: 1.3rem;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 0; border-color: var(--sc-accent); box-shadow: 0 1px 0 0 var(--sc-accent);
}
.field input:user-invalid { border-color: var(--sc-accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__row { grid-column: 1 / -1; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .25rem; }
.form__msg { margin: 0; font-size: .9rem; color: var(--sc-ink-soft); }
.form__msg[data-ok] { color: var(--sc-ink); }
.form[data-busy] .cta { opacity: .6; pointer-events: none; }
.foot { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.5rem var(--sc-gutter, 5vw) max(1.5rem, env(safe-area-inset-bottom)); font-size: .78rem; background: var(--sc-ink); color: #fff; border-top: 0; }
.foot__mark { font-family: var(--sc-font-display); font-weight: 700; color: #fff; }
@media (max-width: 860px) {
  .ledger .ledger__row--ink, .ledger .ledger__row--accent { margin-inline: calc(-1 * var(--sc-gutter, 5vw)); padding-inline: var(--sc-gutter, 5vw); }
  .close__inner { grid-template-columns: 1fr; padding-top: 5rem; gap: 1.5rem; }
  .form { grid-template-columns: 1fr; }
  .foot { flex-direction: column; gap: .35rem; }
}

/* reduced motion: posters carry the hero; no frames are fetched (see site.js) */
@media (prefers-reduced-motion: reduce) {
  .film__canvas, .how__canvas { display: none; }
  .hero__hint { display: none; }
  .ledger[data-sc-stagger] > .ledger__row--ink,
  .ledger[data-sc-stagger] > .ledger__row--accent { transform: none; }
}

/* ------------------------------------------------------------ boot raffle
   Portraits hard-cut in the middle of a bare page, faster and faster, and
   land on one. That one fades out while 안녕 fades in, gathered in the middle;
   the syllables then slide apart and the figure, copy, header and look list
   arrive in the gap. The hide rules live inline in index.html so the first
   frame is right; site.js walks is-booting -> is-word -> is-arrived. */
#boot { transition: opacity 400ms ease; }
#boot[data-out] { opacity: 0; }

/* No card: the portrait sits straight on the page. */
.boot__win { position: relative; width: clamp(9.5rem, 30vmin, 17rem); aspect-ratio: 1; }
.boot__reel { position: absolute; inset: 0; }
.boot__reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.boot__reel img[data-on] { opacity: 1; }   /* no transition on purpose — the cut is the effect */

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Handoff to the hero. The word fades in over the fading portrait; then the
   syllables part (a transition — nothing else moves them) and the rest
   arrive by animation, so the engine's inline opacity/transform on the copy
   is never fought. */
.hero__word { transition: opacity 400ms ease; }
.hero__word span { transition: transform 800ms cubic-bezier(.2, .7, .1, 1); }
html.is-arrived .film       { animation: boot-arrive 600ms ease 150ms both; }
html.is-arrived .hero__copy { animation: boot-arrive-copy 500ms ease 400ms both; }
html.is-arrived .bar        { animation: boot-arrive 450ms ease 600ms both; }
html.is-arrived .looks      { animation: boot-arrive 450ms ease 700ms both; }
@keyframes boot-arrive      { from { opacity: 0; } to { opacity: 1; } }
@keyframes boot-arrive-copy { from { filter: opacity(0); } to { filter: opacity(1); } }

@media (prefers-reduced-motion: reduce) {
  #boot, .hero__word, .hero__word span { transition: none; }
  html.is-arrived .film, html.is-arrived .bar, html.is-arrived .looks, html.is-arrived .hero__copy { animation: none; }
}
