/* The booking card of a barbershop, alone on black. GSAP moves only whole elements (the highlight, the pick, the
   lines that roll, the slots, the button); colours, edges and states live in CSS on classes. A GSAP element never
   has a transform in the CSS: the face inside it carries the look. */
:root {
  --page: #000000;          /* the page */
  --card: #0f0f11;          /* the card */
  --edge: rgba(255, 255, 255, 0.075); /* the card edge */
  --ink: #f3f1ed;           /* the main text */
  --muted: #8d8b93;         /* labels and notes */
  --faint: #34343a;         /* taken times, empty track */
  --copper: #e39a68;        /* the one accent: the chosen barber, the chosen time, the button */
  --copper-deep: #b8693c;   /* the copper in shadow */
  --steel: #c9ccd3;         /* the steel of the monograms */
}

* { 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;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

/* ---- the card ---- */
.book {
  position: relative;
  width: min(384px, 92vw);
  padding: clamp(13px, 3.2vh, 20px) clamp(13px, 3.8vw, 18px) clamp(13px, 3vh, 18px);
  border-radius: 24px;
  background: linear-gradient(180deg, #17171a 0%, var(--card) 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px var(--edge),
    0 1px 1px rgba(0, 0, 0, 0.6),
    0 24px 48px -18px rgba(0, 0, 0, 0.9),
    0 40px 90px -40px rgba(227, 154, 104, 0.16);
  isolation: isolate;
}
.book__glow {
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(260px 200px at var(--gx, 50%) var(--gy, 0%), rgba(227, 154, 104, 0.12), transparent 70%);
}
.book.is-booked .book__glow { opacity: 1; }

/* ---- header ---- */
.head { display: flex; align-items: center; gap: 11px; }
.mark {
  flex: none;
  width: 36px; height: 36px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #2a2a2f, #151518);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 10px -4px #000;
}
.mark svg { width: 18px; height: 18px; fill: none; stroke: var(--copper); stroke-width: 1.6; stroke-linecap: round; }
.head__txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.head__name { font-size: 14.5px; font-weight: 660; letter-spacing: -0.01em; font-variation-settings: "wdth" 104; white-space: nowrap; }
.head__sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head__price { display: grid; justify-items: end; gap: 2px; }
.head__price b { font-size: 16px; font-weight: 660; letter-spacing: -0.01em; }
.head__price span { font-size: 11.5px; color: var(--muted); }

.label {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: clamp(12px, 3vh, 18px) 2px clamp(7px, 1.6vh, 10px);
  font-size: 11.5px; font-weight: 560; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted);
}
.label__right { text-transform: none; letter-spacing: 0; font-weight: 500; }
.count { position: relative; display: inline-block; overflow: hidden; height: 15px; }
.count__roll { display: block; }
.count__line { display: block; height: 15px; line-height: 15px; color: var(--ink); white-space: nowrap; }

/* ---- the barbers ---- */
.barbers {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: #0a0a0c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.barbers__hilite { position: absolute; left: 0; top: 0; pointer-events: none; }
.barbers__hilite-face {
  position: absolute; inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #232327, #1a1a1d);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(227, 154, 104, 0.32),
    0 8px 18px -8px rgba(0, 0, 0, 0.9),
    0 6px 22px -10px rgba(227, 154, 104, 0.35);
}
.barber {
  position: relative;
  display: grid; justify-items: center; gap: 3px;
  padding: clamp(8px, 1.8vh, 11px) 4px clamp(7px, 1.6vh, 10px);
  border-radius: 14px;
  text-align: center;
  z-index: 1;
}
.barber__ava {
  position: relative;
  width: clamp(34px, 7.4vh, 42px); height: clamp(34px, 7.4vh, 42px);
  margin-bottom: 3px;
}
.barber__ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(from var(--r, 0deg), #3a3a40, #5a5a62, #3a3a40, #2a2a2f, #3a3a40);
  transition: filter 0.4s ease;
}
.barber.is-on .barber__ring {
  background: conic-gradient(from var(--r, 0deg), var(--copper-deep), #ffd4b4, var(--copper), var(--copper-deep) 60%, #f4b78c, var(--copper-deep));
}
.barber__disc {
  position: absolute; inset: 2px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 25%, #33333a, #141417 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -2px 4px rgba(0, 0, 0, 0.6);
  font-size: 13px; font-weight: 640; letter-spacing: 0.02em;
  color: var(--steel);
  font-variation-settings: "wdth" 96;
  transition: color 0.35s ease;
}
.barber.is-on .barber__disc { color: #ffe3cf; }
.barber__name { font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; color: var(--muted); transition: color 0.3s ease, font-variation-settings 0.4s ease; font-variation-settings: "wdth" 100; }
.barber.is-on .barber__name { color: var(--ink); font-variation-settings: "wdth" 106; }
.barber__meta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #6c6b72; white-space: nowrap; }
.barber__meta svg { width: 9px; height: 9px; fill: var(--copper); opacity: 0.85; }
.barber:focus-visible { outline: 1.5px solid var(--copper); outline-offset: 1px; }

/* ---- the free times ---- */
.slots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.slots__pick { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; z-index: 0; }
.slots__pick-face {
  position: absolute; inset: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #f1ae80, var(--copper) 55%, #cf8152);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 8px 18px -8px rgba(227, 154, 104, 0.75);
}
.slot {
  position: relative;
  z-index: 1;
  height: clamp(32px, 7.2vh, 38px);
  border-radius: 11px;
  display: grid; place-items: center;
}
.slot__face {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: #17171a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.slot__t {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 2px;
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.slot__t small { font-size: 9.5px; font-weight: 560; color: var(--muted); letter-spacing: 0.02em; transition: color 0.3s ease; }
.slot__strike {
  position: absolute; left: 22%; right: 22%; top: 50%;
  height: 1px;
  background: #3e3e45;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.38s cubic-bezier(.3, .7, .2, 1);
}
.slot.is-taken { cursor: default; }
.slot.is-taken .slot__face { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035); }
.slot.is-taken .slot__t, .slot.is-taken .slot__t small { color: #4a4a51; }
.slot.is-taken .slot__strike { transform: scaleX(1); }
.slot.is-on .slot__face { background: transparent; box-shadow: none; }
.slot.is-on .slot__t { color: #1b120c; }
.slot.is-on .slot__t small { color: rgba(27, 18, 12, 0.65); }
.slot:focus-visible { outline: 1.5px solid var(--copper); outline-offset: 1px; }

/* ---- the note: summary, then the reminder ---- */
.note {
  position: relative;
  height: clamp(36px, 7.6vh, 42px);
  margin: clamp(9px, 2.2vh, 13px) 0 clamp(8px, 1.8vh, 11px);
  overflow: hidden;
  border-radius: 12px;
}
.note__roll { position: absolute; inset: 0; display: grid; align-items: center; }
.note__line { padding: 0 4px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note__line b { color: var(--ink); font-weight: 600; }
.remind {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 9px;
  padding: 0 10px 0 11px;
  border-radius: 12px;
  background: #17171a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  visibility: hidden;
  opacity: 0;
  text-align: left;
}
.remind__bell { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; transition: stroke 0.3s ease; }
.remind__txt { flex: 1; font-size: 12.5px; font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.remind__track {
  flex: none;
  position: relative;
  width: 34px; height: 20px;
  border-radius: 99px;
  background: #2a2a2f;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: background 0.35s ease;
}
.remind__knob {
  position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #d9d8dc);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.remind.is-on .remind__track { background: var(--copper); }
.remind.is-on .remind__bell { stroke: var(--copper); }

/* ---- the button ---- */
.go {
  position: relative;
  width: 100%;
  height: clamp(42px, 9vh, 48px);
  border-radius: 14px;
  background: linear-gradient(180deg, #f1ae80, var(--copper) 55%, #cf8152);
  color: #1b120c;
  box-shadow: 0 10px 22px -12px rgba(227, 154, 104, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.go:disabled { cursor: default; background: #1c1c20; color: #5d5c63; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.go.is-busy { background: #1c1c20; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); cursor: default; }
.go.is-done { background: #f3efe9; color: #17120d; box-shadow: 0 10px 22px -12px rgba(255, 255, 255, 0.3), inset 0 1px 0 #fff; }
.go__beam {
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  opacity: 0;
  background: conic-gradient(from var(--a, 0deg), transparent 0deg, transparent 230deg, rgba(227, 154, 104, 0.5) 290deg, #ffd9bd 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.go__face { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; gap: 7px; }
.go__check { width: 0; margin-right: -7px; height: 16px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.go__check path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.go__roll { position: relative; display: block; height: 20px; overflow: hidden; }
.go__label { display: block; height: 20px; line-height: 20px; font-size: 14.5px; font-weight: 640; letter-spacing: -0.005em; white-space: nowrap; font-variation-settings: "wdth" 100; transition: font-variation-settings 0.35s ease; }

@media (hover: hover) {
  .barber:not(.is-on):hover .barber__name { color: #c9c7cf; }
  .slot:not(.is-taken):not(.is-on):hover .slot__face { background: #1f1f23; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(227, 154, 104, 0.3); }
  .go:not(:disabled):not(.is-busy):hover .go__label { font-variation-settings: "wdth" 112; }
  .go:not(:disabled):not(.is-busy):not(.is-done):hover { box-shadow: 0 14px 26px -12px rgba(227, 154, 104, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.2); }
}

/* ---- the drawn pointer of the autopilot ---- */
.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: #f2f1ee; stroke: #000; stroke-width: 1.4; stroke-linejoin: round; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 360px) {
  .barber__meta { font-size: 10px; }
  .slot__t { font-size: 12px; }
}

/* the phone box is low and wide (341 by 410): everything a little tighter */
@media (max-height: 560px) {
  .book { padding: 12px 13px 12px; border-radius: 20px; }
  .mark { width: 32px; height: 32px; border-radius: 10px; }
  .head__name { font-size: 14px; }
  .label { margin: 10px 2px 6px; font-size: 10.5px; }
  .barbers { padding: 4px; gap: 4px; border-radius: 16px; }
  .barber { padding: 6px 4px 6px; gap: 1px; }
  .barber__ava { width: 30px; height: 30px; margin-bottom: 2px; }
  .barber__disc { font-size: 11.5px; }
  .barber__name { font-size: 12px; }
  .slots { gap: 5px; }
  .slot { height: 30px; }
  .note { height: 32px; margin: 7px 0 7px; }
  .go { height: 40px; }
}
