/* Crunch amenity booking, member facing.
   Visual language: the Crunch join flow (crunch.com signup / the ABC payment
   page) — black topbar with the real logo, orange-to-red gradient accents,
   Barlow + Barlow Semi Condensed, square corners, grey form card on white,
   black uppercase CTAs. Mobile first; every class app.js renders is here. */

:root {
  --grad-start: #FF9E1B;          /* Crunch orange (from application.css) */
  --grad-end:   #E4002B;          /* Crunch red */
  --crunch-grad: linear-gradient(90deg, var(--grad-start), var(--grad-end));

  --ink:     #000000;
  --text:    #1A1A1A;
  --paper:   #FFFFFF;
  --form-bg: #EFEFEF;             /* grey form card */
  --line:    #DDDDDD;
  --muted:   #555555;
  --muted-2: #9A9A9A;
  --success: #14A44D;
  --error:   #DC2626;
  --red-wash: #FBE9EC;
  /* Red for TEXT on the red wash: #E4002B reads 4.15:1 there, under AA.
     #C00022 reads 5.50:1 and stays unmistakably Crunch red. */
  --red-text: #C00022;
  --ok-wash:  #E8F5EE;

  --head: 'Barlow Semi Condensed', 'Arial Narrow', Helvetica, sans-serif;
  --body: 'Barlow', -apple-system, Helvetica, Arial, sans-serif;
  --tap: 44px;                    /* minimum touch target */
}

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

html { -webkit-text-size-adjust: 100%; height: 100%; }

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- topbar + stripe ------------------------------------------ */

.topbar { background: var(--ink); color: var(--paper); }

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  position: relative;
}

.logo-slot {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.slogan {
  font-family: var(--head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.stripe { height: 4px; background: var(--crunch-grad); }

/* ---------- page column ---------------------------------------------- */

.shell {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 0 48px;
}

.brand__eyebrow {
  font-family: var(--head);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding: 0 20px 14px;
}

/* kept for compatibility; the logo now lives in the topbar */
.brand { display: none; }
.brand__logo { display: none; }
.brand__logo span { display: none; }
.brand__rule { display: none; }

.form-card {
  background: var(--form-bg);
  padding: 24px 18px 30px;
}

.screen { max-width: 560px; margin: 0 auto; }

@media (min-width: 640px) {
  .shell { padding: 30px 24px 56px; }
  .form-card { padding: 34px 40px 40px; }
}

/* ---------- type ------------------------------------------------------ */

h1 {
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(27px, 5.5vw, 34px);
  letter-spacing: .5px;
  line-height: 1.12;
  color: var(--ink);
}

h1 .accent {
  /* Text gets its own gradient: the brand orange #FF9E1B is 1.80:1 on the
     grey card -- unreadable as the first word of the greeting. #C7420B keeps
     the orange-to-red sweep and clears 3:1 for large text at both ends. */
  background: linear-gradient(90deg, #C7420B, var(--grad-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Screen changes move focus to the heading so screen readers announce it.
   That focus must never PAINT: a ring around "Hi Gokul" reads as broken. */
h1:focus, h1[tabindex="-1"]:focus-visible { outline: none; }

.lede {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.lede b { color: var(--text); font-weight: 700; }

.sect {
  font-family: var(--head);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 24px 0 10px;
}
.sect:first-child { margin-top: 0; }

.note {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.note b { color: var(--text); font-weight: 700; }

.hint {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
}

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

/* ---------- progress steps ------------------------------------------- */

.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.steps span {
  flex: 1;
  height: 4px;
  background: var(--line);
}
.steps span.on { background: var(--crunch-grad); }

/* ---------- notice banner -------------------------------------------- */

.notice {
  background: var(--red-wash);
  color: var(--red-text);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-left: 3px solid var(--grad-end);
}

/* ---------- buttons --------------------------------------------------- */

button { font-family: var(--body); cursor: pointer; color: inherit; }

button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--grad-end);
  outline-offset: 2px;
}

.btn {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  padding: 16px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: opacity .15s ease;
}
.btn:hover:not(:disabled) { opacity: .85; }
.btn:disabled {
  /* #9A9A9A put the instruction text ("Pick a time to continue") at 2.81:1.
     #767676 is the darkest grey that still reads as disabled, at 4.54:1. */
  background: #767676;
  cursor: not-allowed;
}

.btn--ghost {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin-top: 10px;
  padding: 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-family: var(--head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.btn--ghost.is-warn {
  border-color: var(--error);
  color: var(--error);
}

.btn--quiet {
  display: block;
  margin: 16px auto 0;
  padding: 10px 14px;
  min-height: var(--tap);
  background: none;
  border: 0;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- offer cards ----------------------------------------------- */

.offers { display: grid; gap: 10px; }

.offer {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px 14px;
  min-height: var(--tap);
}
.offer:hover:not(:disabled) { border-color: var(--muted-2); }
.offer.is-on {
  border: 2px solid var(--grad-end);
  padding: 13px 13px;
}

.offer__ic {
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--form-bg);
  color: var(--ink);
}
.offer__ic svg { width: 24px; height: 24px; }
.offer.is-on .offer__ic {
  background: var(--crunch-grad);
  color: var(--paper);
}

/* the classless span between icon and tick is the text column */
.offer > span:not([class]) { flex: 1; min-width: 0; }

.offer__t {
  display: block;
  font-family: var(--head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .3px;
  color: var(--ink);
}
.offer__d {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

.offer__tick {
  flex: 0 0 26px;
  height: 26px;
  margin-left: auto;
  border: 2px solid var(--line);
  border-radius: 50%;
  position: relative;
}
.offer.is-on .offer__tick {
  border-color: var(--grad-end);
  background: var(--grad-end);
}
.offer.is-on .offer__tick::after {
  content: "";
  position: absolute;
  left: 7px; top: 3px;
  width: 6px; height: 11px;
  border: solid var(--paper);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.offer:disabled {
  cursor: not-allowed;
  background: var(--form-bg);
  border-style: dashed;
}
.offer:disabled .offer__ic { background: var(--line); color: var(--muted-2); }
.offer:disabled .offer__d { color: var(--muted-2); }
.offer:disabled .offer__tick { border-color: var(--line); background: none; }

.offer__why {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: var(--red-wash);
  color: var(--red-text);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- day strip -------------------------------------------------- */

.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.days::-webkit-scrollbar { display: none; }

.day {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: var(--tap);
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: center;
}
.day.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.day:disabled { opacity: .4; cursor: not-allowed; }

.day__w {
  display: block;
  font-family: var(--head);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.day.is-on .day__w { color: rgba(255, 255, 255, .75); }
.day__n {
  display: block;
  font-family: var(--head);
  font-weight: 800;
  font-size: 20px;
}

/* ---------- time slots ------------------------------------------------- */

.times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.slot {
  min-height: var(--tap);
  padding: 12px 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-family: var(--head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .5px;
}
.slot.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.empty {
  padding: 22px 14px;
  background: var(--paper);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* ---------- summary rows ---------------------------------------------- */

.summary {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 16px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  background: var(--paper);
  padding: 11px 14px;
}
.row__k {
  font-family: var(--head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.row__v { font-weight: 700; font-size: 15.5px; }

/* ---------- confirmed / booked ----------------------------------------- */

.ok { text-align: center; }
.ok h1 { color: var(--ink); }
.ok h1 .accent {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--success);
}
.ok .summary { text-align: left; }
.ok .row { text-align: left; }

.ok__ring {
  width: 62px;
  height: 62px;
  margin: 6px auto 16px;
  border-radius: 50%;
  background: var(--ok-wash);
  color: var(--success);
  position: relative;
}
.ok__ring::after {
  content: "";
  position: absolute;
  left: 22px; top: 14px;
  width: 14px; height: 26px;
  border: solid var(--success);
  border-width: 0 3.5px 3.5px 0;
  transform: rotate(45deg);
}

/* ---------- dead ends -------------------------------------------------- */

.deadend { text-align: center; padding: 26px 6px 10px; }
.deadend h1 { font-size: clamp(24px, 5vw, 30px); }
.deadend p {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  max-width: 34ch;
  margin: 10px auto 0;
}
.deadend .call {
  margin-top: 18px;
  font-weight: 700;
  color: var(--text);
}

/* ---------- loading ---------------------------------------------------- */

.loading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
}

.spin {
  width: 18px; height: 18px;
  border: 3px solid var(--line);
  border-top-color: var(--grad-end);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sk { background: #E4E4E4; }
.sk--title { height: 30px; width: 75%; margin-bottom: 12px; }
.sk--lede  { height: 15px; width: 90%; margin-bottom: 8px; }
.sk--label { height: 12px; width: 34%; margin: 20px 0 10px; }
.sk--card  { height: 74px; margin-bottom: 10px; }

.sk-pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

@media (prefers-reduced-motion: reduce) {
  .spin { animation: none; }
  .sk-pulse { animation: none; }
  .btn { transition: none; }
}

/* ---------- footer ----------------------------------------------------- */

.foot {
  background: var(--ink);
  color: #BBBBBB;
  font-size: 12px;
  line-height: 1.6;
}
.foot-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 20px;
  text-align: center;
}
