/* The doneness picker of a steakhouse app, alone on black. GSAP moves only whole elements (the thumb, the core of
   the cut, the sheen, the lines of text, the ticks); colours, edges and states live in CSS on classes. A GSAP element
   never has a transform in the CSS. */
:root {
  --page: #000000;          /* the page */
  --card: #121010;          /* the card */
  --edge: rgba(255, 240, 230, 0.08);  /* the card edge */
  --ink: #f4efe9;           /* the main text */
  --muted: #8f8580;         /* labels and notes */
  --faint: #34302e;         /* the ticks at rest, the track */
  --ember: #e8845a;         /* the one accent: the marker, the thumb ring, the chef's pick */
  --fat: #eadfcd;           /* the fat seam and the marbling of the cut */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--page);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 12px;
}

/* ---- the card ---- */
.cook {
  position: relative;
  width: min(360px, 92vw);
  padding: clamp(13px, 3.2vh, 20px) clamp(13px, 4vw, 18px) clamp(12px, 2.8vh, 18px);
  border-radius: 24px;
  background: linear-gradient(180deg, #1a1615 0%, var(--card) 44%);
  border: 1px solid var(--edge);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 18px 30px -18px rgba(0, 0, 0, 0.9),
    0 40px 80px -40px rgba(120, 50, 30, 0.35);
  display: grid;
  gap: clamp(7px, 1.9vh, 12px);
  user-select: none;
  -webkit-user-select: none;
}
.cook__glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(90% 50% at 50% 18%, rgba(232, 132, 90, 0.16), transparent 70%);
  opacity: 0.6;
}

/* ---- the head ---- */
.head { display: flex; align-items: center; gap: 10px; }
.mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #2a201c, #1a1412);
  border: 1px solid rgba(232, 132, 90, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  flex: none;
}
.mark svg { width: 15px; height: 15px; fill: none; stroke: var(--ember); stroke-width: 1.6; stroke-linejoin: round; }
.head__txt { display: grid; gap: 1px; min-width: 0; flex: 1; }
.head__name { font-size: 13.5px; font-weight: 640; font-variation-settings: "wdth" 108; letter-spacing: 0.005em; }
.head__sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price {
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 5px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---- the cut ---- */
.slice { display: grid; place-items: center; margin: 0 -4px; }
.slice__svg { display: block; width: 100%; height: clamp(84px, 25vh, 150px); overflow: visible; }
.fat { fill: var(--fat); opacity: 0.82; }
.marble path { fill: none; stroke: var(--fat); stroke-width: 1.3; stroke-linecap: round; opacity: 0.34; }
.rim { fill: none; stroke: rgba(255, 220, 200, 0.16); stroke-width: 1; }

/* ---- the readout ---- */
.read { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.read__left, .read__right { display: grid; gap: 2px; }
.read__left { flex: 1; min-width: 0; }
.read__right { justify-items: end; flex: none; }
.read__name, .read__note { position: relative; display: block; overflow: hidden; height: 1.3em; }
.read__name { font-size: clamp(17px, 4.6vh, 21px); font-weight: 620; font-variation-settings: "wdth" 112; letter-spacing: -0.01em; height: 1.25em; }
.read__note { font-size: 12px; color: var(--muted); }
.line { position: absolute; left: 0; top: 0; white-space: nowrap; }
.read__label { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.temp { display: flex; align-items: baseline; font-size: clamp(22px, 6vh, 28px); font-weight: 560; letter-spacing: -0.02em; line-height: 1; font-variation-settings: "wdth" 100; }
.temp__d { position: relative; display: inline-block; width: 0.6em; height: 1.05em; overflow: hidden; }
.temp__d > span { position: absolute; left: 0; right: 0; top: 0; text-align: center; }
.temp__u { font-size: 0.5em; color: var(--muted); margin-left: 2px; font-weight: 500; align-self: flex-start; margin-top: 0.18em; }

/* ---- the scale ---- */
.scale { position: relative; height: 16px; }
.scale__ticks { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: flex-end; }
.scale__ticks i { display: block; width: 1px; height: 6px; background: #4a4340; transform-origin: 50% 100%; border-radius: 1px; }
.scale__mark {
  position: absolute; left: 0; bottom: -3px;
  width: 2px; height: 20px; margin-left: -1px; border-radius: 2px;
  background: var(--ember);
  box-shadow: 0 0 10px rgba(232, 132, 90, 0.55);
}

/* ---- the track ---- */
.track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: clamp(38px, 10vh, 44px);
  padding: 3px;
  border-radius: 14px;
  background: #0a0908;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.04);
  touch-action: none;
  cursor: grab;
}
.track.is-drag { cursor: grabbing; }
.thumb { position: absolute; left: 0; top: 3px; bottom: 3px; pointer-events: none; }
.thumb__face {
  position: absolute; inset: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #2c2422 0%, #1e1918 100%);
  border: 1px solid rgba(232, 132, 90, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 6px 14px -6px rgba(0, 0, 0, 0.9),
    0 0 18px -6px rgba(232, 132, 90, 0.45);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.track.is-drag .thumb__face { border-color: rgba(232, 132, 90, 0.7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px -6px rgba(0, 0, 0, 0.95), 0 0 24px -4px rgba(232, 132, 90, 0.6); }
.opt {
  position: relative; z-index: 1;
  appearance: none; border: 0; background: none;
  font: inherit; color: var(--muted);
  font-size: clamp(10.5px, 2.9vw, 12px);
  font-weight: 520;
  font-variation-settings: "wdth" 88;
  letter-spacing: 0.005em;
  white-space: nowrap;
  border-radius: 11px;
  cursor: inherit;
  transition: color 0.25s ease, font-variation-settings 0.35s ease, font-weight 0.35s ease;
}
.opt[aria-checked="true"] { color: var(--ink); font-weight: 640; font-variation-settings: "wdth" 104; }
.opt:focus-visible { outline: 1.5px solid var(--ember); outline-offset: -2px; }
@media (hover: hover) {
  .opt:hover { color: #cfc6c0; }
  .opt[aria-checked="true"]:hover { color: var(--ink); }
}

/* ---- the chef's pick ---- */
.pick { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--muted); height: 14px; }
.pick svg { width: 12px; height: 12px; fill: var(--ember); flex: none; }
.pick span { white-space: nowrap; }

.ghost {
  position: fixed; left: 0; top: 0;
  width: 22px; height: 22px;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}
.ghost path { fill: #f4efe9; stroke: #000; stroke-width: 1.4; stroke-linejoin: round; }

@media (max-height: 460px) {
  .pick { display: none; }
}
