/* Vetta Rental Supply — the playthrough player. Light only, one ink, depth from surface + shadow. */

@font-face {
  font-family: 'Outfit';
  font-weight: 100 900;
  font-display: swap;
  src: url('./Outfit-variable.woff2') format('woff2');
}

:root {
  --canvas: #E9EBF1;
  --card: #FFFFFF;
  --well: #F4F5F8;
  --well-2: #ECEEF3;
  --raise: #FFFFFF;
  --text: #16181D;
  --text-2: #5D626E;
  --muted: #969BA7;
  --faint: #C6CAD3;
  --hairline: rgba(22, 24, 29, .08);
  --sh-card: 0 2px 4px rgba(25, 35, 70, .03), 0 12px 32px rgba(25, 35, 70, .07);
  --sh-hover: 0 4px 8px rgba(25, 35, 70, .05), 0 18px 44px rgba(25, 35, 70, .11);
  --sh-raise: 0 2px 10px rgba(25, 35, 70, .10);
  --r-card: 24px;
  --r-inner: 16px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(.2, .8, .3, 1);
  --accent: #101114;
  --bezel: #16181D;
  --hdr: 56px;
  --gut: 20px;
  --t: .25s var(--ease-out);
  --t-slow: .35s var(--ease-out);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--canvas);
  color: var(--text);
  font: 15px/1.45 'Outfit', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-pill); }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { display: block; }

.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card); }
.eyebrow { font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.wordmark { font-size: 14px; font-weight: 600; letter-spacing: .44em; text-transform: uppercase; color: var(--text); padding-left: .44em; }

/* ---------- app shell ---------- */
.app { height: 100%; display: flex; flex-direction: column; }

.hdr {
  flex: 0 0 var(--hdr);
  height: var(--hdr);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.hdr-l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.vsep { width: 1px; height: 18px; background: var(--hairline); }
.hdr-shop { font-size: 15px; font-weight: 500; }
.hdr-sub { font-size: 15px; font-weight: 400; color: var(--text-2); }
.hdr-r { display: flex; align-items: center; gap: 12px; }
.hdr-ch { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--r-pill);
  display: grid; place-items: center; color: var(--text-2);
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--card); color: var(--text); }
.icon-btn svg, .tbtn svg { width: 20px; height: 20px; }

.main {
  flex: 1 1 auto; min-height: 0;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--gut);
  padding: 0 var(--gut) var(--gut);
}

/* ---------- rail ---------- */
.rail { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px 12px 12px; scrollbar-width: thin; }
.rail-eyebrow { padding: 2px 12px 12px; }
.rail-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.rc-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px 0 12px; border-radius: var(--r-pill);
  color: var(--text-2); font-size: 14px; text-align: left;
  transition: background var(--t), color var(--t);
}
.rc-row:hover { background: var(--well); color: var(--text); }
.rc.cur .rc-row { background: var(--accent); color: #fff; }
.rc-n { width: 16px; flex: 0 0 16px; font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc.cur .rc-n { color: rgba(255, 255, 255, .6); }
.rc-t { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc.cur .rc-t { font-weight: 500; }
.rc-d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc.cur .rc-d { color: rgba(255, 255, 255, .6); }
.rc-cues { list-style: none; display: none; padding: 6px 0 8px 14px; }
.rc.cur .rc-cues { display: block; }
.rc-cue {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 10px; border-radius: 10px;
  font-size: 13px; line-height: 1.35; color: var(--text-2); text-align: left;
  transition: background var(--t), color var(--t);
}
.rc-cue:hover { background: var(--well); }
.rc-cue .d { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity var(--t); }
.rc-cue.on { color: var(--text); font-weight: 600; }
.rc-cue.on .d { opacity: 1; }

/* ---------- stage column ---------- */
.col { display: flex; flex-direction: column; gap: var(--gut); min-height: 0; min-width: 0; }

.stage {
  flex: 1 1 0; min-height: 0; position: relative;
  container-type: size;
  display: flex; align-items: center; justify-content: center;
}
.stage.cursor-hidden, .stage.cursor-hidden * { cursor: none !important; }

.frame {
  position: relative; overflow: hidden;
  width: min(100cqw, 160cqh); aspect-ratio: 16 / 10;
  border-radius: var(--r-card); background: var(--card); box-shadow: var(--sh-card);
}
.desk-host { position: absolute; inset: 0; }
.clip {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--card); display: block;
}
.v-hidden { visibility: hidden; pointer-events: none; }

/* the phone */
.phone-zone { display: none; }
.side-step { display: none; }

/* The phone is sized from the stage height in container units (100cqh = the stage), so both engines
   resolve the grid column: WebKit will not derive a width from aspect-ratio + a percentage height. */
.col[data-device="phone"] .frame {
  --ph-pad: 14px;
  --ph-h: calc(100cqh - 2 * var(--ph-pad));
  --ph-w: calc(var(--ph-h) * 0.4808);
  width: 100%; height: 100%; aspect-ratio: auto; overflow: visible;
  background: transparent; box-shadow: none;
  display: grid; grid-template-columns: var(--ph-w) minmax(0, 1fr); gap: 48px; align-items: center;
  padding: var(--ph-pad) 28px var(--ph-pad) 40px;
}
.col[data-device="phone"] .desk-host { display: none; }
.col[data-device="phone"] .phone-zone { display: flex; align-items: center; height: var(--ph-h); width: var(--ph-w); position: relative; }
.col[data-device="phone"] .side-step { display: flex; align-items: center; }
.phone-zone::before {
  content: ''; position: absolute; inset: -6% -30%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0));
}
.phone {
  position: relative; z-index: 1; height: 100%; width: 100%;
  border-radius: 48px; background: var(--bezel);
  box-shadow: 0 30px 70px rgba(25, 35, 70, .22), 0 2px 6px rgba(25, 35, 70, .14);
}
.phone::after {
  content: ''; position: absolute; inset: 0; border-radius: 48px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.phone-screen {
  position: absolute; inset: 10px; border-radius: 38px; overflow: hidden;
  background: #000; container-type: size;
}
.phone-screen .clip { object-fit: cover; background: #000; }

/* iOS Messages screen — sized in cqw so it scales with the phone */
.msgs {
  position: absolute; inset: 0; background: #fff; color: #000;
  display: flex; flex-direction: column;
  font-family: -apple-system, system-ui, 'Outfit', sans-serif;
}
.m-status { display: flex; align-items: center; justify-content: space-between; padding: 4.5cqw 8.5cqw 0; height: 12cqw; }
.m-time { font-size: 4cqw; font-weight: 600; letter-spacing: -.01em; }
.m-bat { width: 6.4cqw; height: 3.1cqw; border: .4cqw solid #16181D; border-radius: 1cqw; position: relative; display: block; }
.m-bat i { position: absolute; inset: .35cqw; right: .9cqw; background: #16181D; border-radius: .4cqw; }
.m-bat::after { content: ''; position: absolute; right: -1.1cqw; top: 25%; width: .6cqw; height: 50%; background: #16181D; border-radius: 0 .4cqw .4cqw 0; }
.m-head { display: flex; flex-direction: column; align-items: center; padding: 1cqw 0 2.6cqw; border-bottom: 1px solid rgba(0, 0, 0, .08); }
.m-avatar {
  width: 13cqw; height: 13cqw; border-radius: 50%;
  background: linear-gradient(#A9ADB6, #868B95); color: #fff;
  display: grid; place-items: center; font-size: 6cqw; font-weight: 500;
}
.m-name { margin-top: 1.4cqw; font-size: 3cqw; color: #000; display: flex; align-items: center; gap: .6cqw; }
.m-chev { width: 1.6cqw; height: 1.6cqw; border-right: .35cqw solid #B5B8BF; border-top: .35cqw solid #B5B8BF; transform: rotate(45deg); }
.m-body { flex: 1; padding: 3cqw 4cqw; display: flex; flex-direction: column; }
.m-ts { text-align: center; font-size: 2.8cqw; color: #8E8E93; line-height: 1.35; margin-bottom: 3cqw; }
.m-bub {
  align-self: flex-start; max-width: 80%;
  background: #E9E9EB; color: #000; border-radius: 4.6cqw; padding: 2.4cqw 3.4cqw;
  font-size: 4cqw; line-height: 1.3; overflow-wrap: anywhere;
  opacity: 0; transform: translateY(3cqw);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.m-bub.in { opacity: 1; transform: none; }
.m-foot { padding: 1.5cqw 4cqw 2.6cqw; }
.m-input {
  height: 9cqw; border: 1px solid rgba(0, 0, 0, .14); border-radius: var(--r-pill);
  padding: 0 4cqw; display: flex; align-items: center; font-size: 3.6cqw; color: #8E8E93;
}
.m-home { width: 36%; height: 1.3cqw; border-radius: var(--r-pill); background: #000; margin: 3cqw auto 0; }

/* card chapter */
.cardch {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 10%;
}
.cardch-title { font-size: 40px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.cardch-body { margin-top: 16px; font-size: 18px; color: var(--text-2); max-width: 52ch; line-height: 1.5; }

/* ---------- overlays (title card, end card, missing) ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: 40px 8%;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-slow);
}
.overlay.on { opacity: 1; pointer-events: auto; }
.rise { transform: translateY(8px); transition: transform var(--t-slow); display: flex; flex-direction: column; align-items: center; }
.overlay.on .rise { transform: none; }
.tc-title { font-size: 36px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin-top: 14px; max-width: 24ch; }
.tc-title.big { font-size: 40px; margin-top: 0; }
.tc-title.small { font-size: 28px; }
.tc-lead { font-size: 16px; color: var(--text-2); margin-top: 12px; max-width: 52ch; line-height: 1.5; }
.end-actions { display: flex; gap: 12px; margin-top: 28px; }

.btn {
  height: 44px; padding: 0 22px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500;
  transition: transform var(--t), box-shadow var(--t), background var(--t);
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { box-shadow: var(--sh-raise); }
.btn.ghost { background: var(--raise); color: var(--text); box-shadow: var(--sh-raise); }
.btn.ghost:hover { box-shadow: var(--sh-hover); }
.btn:active { transform: scale(.98); }

.play-big {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(16, 17, 20, .22);
  transition: transform var(--t), box-shadow var(--t);
}
.play-big svg { width: 38px; height: 38px; margin-left: 3px; }
.play-big:hover { box-shadow: 0 14px 36px rgba(16, 17, 20, .28); }
.play-big:active { transform: scale(.96); }
#titlePlay { margin-top: 28px; }

/* ---------- step card ---------- */
.step { flex: 0 0 auto; padding: 20px 24px 22px; }
.step-inner { transition: opacity var(--t); }
.step-target.swap .step-inner { opacity: 0; transition-duration: .12s; }
.step-title { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin-top: 8px; }
.step-body { font-size: 16px; font-weight: 400; color: var(--text-2); max-width: 60ch; line-height: 1.5; margin-top: 6px; min-height: 3em; }
.col[data-device="phone"] .step { display: none; }
.side-step { min-width: 0; padding-right: 4%; position: relative; z-index: 1; }
.side-step .step-title { font-size: 34px; margin-top: 14px; max-width: 20ch; }
.side-step .step-body { font-size: 19px; margin-top: 12px; max-width: 44ch; min-height: 0; }

/* ---------- transport ---------- */
.transport {
  flex: 0 0 80px; height: 80px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px 0 12px;
}
.tbtn {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r-pill);
  display: grid; place-items: center; color: var(--text);
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}
.tbtn:hover { background: var(--well); }
.tbtn.play {
  width: 56px; height: 56px; flex: 0 0 56px;
  background: var(--accent); color: #fff; box-shadow: var(--sh-raise);
}
.tbtn.play:hover { background: var(--accent); box-shadow: var(--sh-hover); }
.tbtn.play:active { transform: scale(.96); }
.tbtn.play svg { width: 24px; height: 24px; }
.tbtn.play svg.i-play { margin-left: 2px; }
.play-wrap { position: relative; flex: 0 0 56px; }
.hint {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
  white-space: nowrap; font-size: 12.5px; font-weight: 500; color: var(--text-2);
  background: var(--raise); box-shadow: var(--sh-raise); border-radius: var(--r-pill);
  padding: 6px 12px; opacity: 0; pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.hint.on { opacity: 1; transform: translate(-50%, 0); }

.prog { flex: 1 1 160px; min-width: 120px; position: relative; height: 32px; cursor: pointer; }
.prog-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--well-2); }
.prog-fill { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--accent); width: 0; }
.prog-ticks { position: absolute; inset: 0; pointer-events: none; }
.prog-ticks i { position: absolute; top: 50%; width: 2px; height: 10px; margin: -5px 0 0 -1px; border-radius: 1px; background: var(--faint); }
.prog-ticks i.done { background: var(--accent); }
.prog:hover .prog-track { background: var(--faint); }

.time { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; white-space: nowrap; }

.seg { display: flex; padding: 3px; border-radius: var(--r-pill); background: var(--raise); box-shadow: var(--sh-raise); flex: 0 0 auto; }
.seg button {
  height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums;
  transition: background var(--t), color var(--t);
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent); color: #fff; }

.toggle {
  height: 34px; padding: 0 14px 0 12px; border-radius: var(--r-pill); flex: 0 0 auto;
  background: var(--raise); box-shadow: var(--sh-raise);
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: color var(--t), box-shadow var(--t);
}
.toggle:hover { box-shadow: var(--sh-hover); }
.toggle .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity var(--t); }
.toggle.on { color: var(--text); }
.toggle.on .dot { opacity: 1; }

.quiet-link { font-size: 13px; color: var(--muted); white-space: nowrap; transition: color var(--t); padding: 6px 2px; }
.quiet-link:hover { color: var(--text-2); }
.transport .quiet-link { margin-left: auto; }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 50; background: var(--canvas);
  display: flex; align-items: center; justify-content: center;
  transition: opacity var(--t-slow);
}
.intro-inner { text-align: center; transform: none; }
.intro-shop { font-size: 34px; font-weight: 600; letter-spacing: -.01em; margin-top: 22px; line-height: 1.15; }
.intro-meta { font-size: 15px; color: var(--text-2); margin-top: 10px; }
#introPlay { margin-top: 40px; }
.intro-label { margin-top: 16px; font-size: 15px; font-weight: 500; }
#introRestart { margin-top: 4px; }
.intro-error { margin-top: 18px; font-size: 14px; color: var(--text-2); max-width: 44ch; }
.intro-keys { position: absolute; left: 0; right: 0; bottom: 32px; text-align: center; font-size: 13px; color: var(--muted); }
.app:not([data-state="intro"]):not([data-state="loading"]) .intro { opacity: 0; pointer-events: none; }

/* ---------- fullscreen ---------- */
.app.is-fs .hdr { display: none; }
.app.is-fs .main { padding: 14px; gap: 14px; }
.app.is-fs .col { gap: 14px; }
.app.is-fs .rail { padding-top: 14px; }

/* ---------- narrow (secondary) ---------- */
@media (max-width: 1100px) {
  .main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .rail { overflow-x: auto; overflow-y: hidden; padding: 10px 12px; }
  .rail-eyebrow { display: none; }
  .rail-list { flex-direction: row; gap: 6px; }
  .rc-row { height: 36px; white-space: nowrap; }
  .rc-cues { display: none !important; }
  .rc-t { overflow: visible; }
  .transport { flex-wrap: wrap; height: auto; padding: 10px 14px; row-gap: 8px; }
  .prog { order: 10; flex-basis: 100%; }
  .col[data-device="phone"] .frame { --ph-pad: 10px; gap: 24px; padding: var(--ph-pad) 16px; }
  .side-step .step-title { font-size: 26px; }
  .side-step .step-body { font-size: 16px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rise, .overlay.on .rise, .m-bub, .hint, .hint.on { transform: none !important; }
  .play-big:active, .tbtn.play:active, .btn:active { transform: none; }
  * { transition-duration: .15s !important; }
}
