:root {
  --bg: #f2eee8;
  --card: #ffffff;
  --ink: #1a1517;
  --soft: #857c80;
  --faint: #c3bbbd;
  --line: rgba(26, 21, 23, 0.08);
  --accent: #8c1d3b;
  --base: #f1ebe6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(110% 80% at 50% 0%, #f8f5f1 0%, rgba(248, 245, 241, 0) 62%),
    var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 12px;
}

/* the card: everything inside is in em, and the em follows both the width and the height of the window */
.card {
  position: relative;
  font-size: clamp(8px, min(3.15vw, 2.32vh), 15.5px);
  width: min(30em, 100%);
  padding: 1.25em 0.8em 0.85em;
  border-radius: 1.7em;
  background: linear-gradient(180deg, #ffffff 0%, #fdfbfa 100%);
  box-shadow:
    0 0 0 1px rgba(26, 21, 23, 0.06),
    0 1px 0 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 2px rgba(26, 21, 23, 0.05),
    0 8px 18px -8px rgba(26, 21, 23, 0.12),
    0 32px 64px -26px rgba(110, 24, 52, 0.26);
}
.card__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(55% 38% at 22% 18%, color-mix(in srgb, var(--wine, var(--accent)) 9%, transparent), transparent 72%);
}
.card__grain {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.45 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  padding: 0 0.55em 0.7em;
}
.head__who { display: flex; align-items: center; gap: 0.7em; min-width: 0; }
.head__mark {
  flex: none;
  width: 2.3em;
  height: 2.3em;
  fill: var(--ink);
  stroke: #ffffff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.head__mark rect { stroke: none; }
.head__mark path { fill: none; }
.head__brand { font-size: 0.78em; color: var(--soft); font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; }
.head__sep { color: var(--faint); }
.head__title { font-size: 1.22em; font-weight: 640; font-stretch: 104%; letter-spacing: -0.01em; line-height: 1.2; white-space: nowrap; }

.flight {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  height: 2.2em;
  padding: 0 0.45em 0 0.8em;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 560;
  background: #f6f2ef;
  box-shadow: 0 0 0 1px rgba(26, 21, 23, 0.06) inset;
}
.flight__n {
  display: inline-grid;
  place-items: center;
  min-width: 1.55em;
  height: 1.55em;
  border-radius: 999px;
  overflow: hidden;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.92em;
  font-weight: 620;
}
.flight__roll { display: block; line-height: 1.55em; }

/* the reading: the wheel on the left, the nose and the structure on the right */
.read {
  position: relative;
  display: grid;
  grid-template-columns: 14.2em minmax(0, 1fr);
  align-items: center;
  gap: 1em;
  padding: 0.2em 0.55em 0.9em;
  border-bottom: 1px solid var(--line);
  margin: 0 0.15em 0.55em;
}
.wheel { position: relative; width: 14.2em; height: 14.2em; }
.wheel__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wheel__plate { fill: #fcfaf8; stroke: rgba(26, 21, 23, 0.07); stroke-width: 0.6; }
.wheel__notch { fill: var(--ink); }
.tick { stroke: rgba(26, 21, 23, 0.18); stroke-width: 0.5; stroke-linecap: round; }
.tick.is-long { stroke: rgba(26, 21, 23, 0.34); }
.ring-base { fill: none; stroke: var(--base); }
.ring-on { fill: none; stroke: var(--wine, var(--accent)); }
.spike { fill: none; stroke: var(--wine, var(--accent)); stroke-width: 0.9; stroke-linecap: round; }
.rim { fill: none; stroke: rgba(26, 21, 23, 0.12); stroke-width: 0.5; }
.wheel__labels text {
  font-size: 7.2px;
  font-weight: 560;
  font-stretch: 112%;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--soft);
}
.wheel__labels text.is-lead { fill: var(--ink); }
.glass__shadow { fill: rgba(40, 10, 20, 0.22); }
.glass__rim { fill: none; stroke: rgba(255, 255, 255, 0.4); stroke-width: 0.8; }
.glass__ripple { fill: none; stroke: var(--wine, var(--accent)); stroke-width: 0.8; opacity: 0; }
.glass__shine { fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 1.6; stroke-linecap: round; }
.glass__edge { fill: none; stroke: rgba(26, 21, 23, 0.1); stroke-width: 0.6; }

.nose { min-width: 0; }
.nose__lab { font-size: 0.72em; font-weight: 560; letter-spacing: 0.1em; text-transform: uppercase; color: var(--soft); }
.nose__note {
  height: 1.25em;
  overflow: hidden;
  margin-top: 0.2em;
  font-size: 1.75em;
  font-weight: 660;
  font-stretch: 106%;
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: nowrap;
}
.nose__roll { display: block; }
.nose__fam { font-size: 0.82em; color: var(--soft); font-weight: 500; margin-top: 0.1em; }
.meters { display: grid; gap: 0.62em; margin-top: 1.1em; }
.meter { display: grid; grid-template-columns: 4.6em minmax(0, 1fr) 1.4em; align-items: center; gap: 0.55em; font-size: 0.78em; }
.meter__lab { color: var(--soft); font-weight: 520; }
.meter__track { position: relative; height: 0.32em; border-radius: 999px; background: var(--base); overflow: hidden; }
.meter__fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--wine, var(--accent)) 55%, #ffffff), var(--wine, var(--accent)));
  transform-origin: 0 50%;
}
.meter__val { text-align: right; font-weight: 620; font-variant-numeric: tabular-nums; }

/* the list: the GSAP element is .row, its light and colours live on the children */
.list { list-style: none; position: relative; display: grid; gap: 0.12em; }
.row { position: relative; border-radius: 1em; cursor: pointer; outline: none; }
.row__bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background:
    radial-gradient(9em 5em at var(--mx, 30%) var(--my, 50%), color-mix(in srgb, var(--wine, var(--accent)) 8%, transparent), transparent 70%),
    #ffffff;
  box-shadow:
    0 0 0 1px rgba(26, 21, 23, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 4px rgba(26, 21, 23, 0.04),
    0 10px 22px -12px rgba(110, 24, 52, 0.3);
}
.row__in {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.62em 0.75em;
}
.row__glass { flex: none; width: 1.6em; height: 1.6em; fill: none; stroke: var(--faint); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s; }
.row__glass .row__fill { fill: var(--faint); stroke: none; opacity: 0.5; transition: fill 0.3s, opacity 0.3s; }
.row.is-open .row__glass { stroke: var(--ink); }
.row.is-open .row__glass .row__fill { fill: var(--wine, var(--accent)); opacity: 1; }
.row__who { min-width: 0; flex: 1; }
.row__name { font-size: 0.95em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: font-stretch 0.4s; }
.row.is-open .row__name { font-stretch: 106%; }
.row__sub { font-size: 0.76em; color: var(--soft); margin-top: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__price { flex: none; display: inline-flex; align-items: center; gap: 0.45em; font-size: 0.86em; font-weight: 600; font-variant-numeric: tabular-nums; }
.row__ok { width: 1em; height: 1em; fill: none; stroke: var(--wine, var(--accent)); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em;
  padding: 0.75em 0.4em 0 0.75em;
}
.foot__note { font-size: 0.76em; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.add {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  height: 2.75em;
  padding: 0 0.42em 0 0.95em;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.84em;
  font-weight: 600;
  color: #ffffff;
  background: var(--ink);
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 6px 14px -6px rgba(26, 21, 23, 0.5);
  -webkit-tap-highlight-color: transparent;
}
.add__face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--wine, var(--accent)) 82%, #ffffff), var(--wine, var(--accent)));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset;
}
.add__ico { position: relative; width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.add__label { position: relative; display: grid; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.add__idle, .add__done { grid-area: 1 / 1; white-space: nowrap; }
.add__done { opacity: 0; }
.add__price {
  position: relative;
  display: inline-grid;
  place-items: center;
  height: 2.05em;
  min-width: 3em;
  padding: 0 0.6em;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  font-variant-numeric: tabular-nums;
}
.add__price span { display: block; }
@media (hover: hover) {
  .add:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 0 0 1px rgba(0, 0, 0, 0.4), 0 10px 20px -8px rgba(26, 21, 23, 0.55); }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #1a1517;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(26, 21, 23, 0.35));
  opacity: 0;
  z-index: 5;
}
.bracket { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; }
