/* Rostered waitlist. Night-shift navy, hi-vis orange (FIFO) and scrubs teal (health). */

:root {
  --bg: #070b14;
  --bg-2: #0c1322;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.1);
  --border-2: rgba(255, 255, 255, 0.2);
  --text: #f3f5f9;
  --muted: #a8b2c5;
  --faint: #8a95ab;
  --hivis: #ff8a1f;
  --hivis-2: #ffb066;
  --teal: #34d1c0;
  --ink: #0a0f1a;
  --danger: #ff8a8a;
  --radius: 22px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Two soft work-light glows and a faint calendar grid behind everything. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(42rem 32rem at 8% -6%, rgba(255, 138, 31, 0.17), transparent 62%),
    radial-gradient(46rem 36rem at 105% 38%, rgba(52, 209, 192, 0.11), transparent 62%),
    radial-gradient(40rem 30rem at 30% 110%, rgba(255, 138, 31, 0.07), transparent 60%);
}
body::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(70rem 40rem at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70rem 40rem at 50% 0%, #000 20%, transparent 75%);
}

a { color: var(--hivis-2); text-underline-offset: 3px; }
a:hover { color: #ffc690; }
:focus-visible { outline: 3px solid var(--hivis-2); outline-offset: 3px; border-radius: 6px; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--hivis);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; color: var(--ink); }

/* ---------- glass surface ---------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

/* ---------- buttons ---------- */
.btn {
  --glow: rgba(255, 138, 31, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9a3a, var(--hivis));
  color: var(--ink);
  font: 700 1.0625rem/1 var(--body);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px -10px var(--glow), 0 1px 0 rgba(255, 255, 255, 0.35) inset;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:hover { color: var(--ink); transform: translateY(-1px); box-shadow: 0 16px 36px -10px var(--glow), 0 1px 0 rgba(255, 255, 255, 0.35) inset; }
.btn:active { transform: translateY(0); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-2);
  color: var(--text);
  box-shadow: none;
}
.btn--ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); box-shadow: none; }
.btn--small { min-height: 42px; padding: 0.6rem 1.1rem; font-size: 0.95rem; }
.btn--block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 11, 20, 0.72);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font: 800 1.55rem/1 var(--display);
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--text); }
.brand__mark { width: 30px; height: 30px; color: var(--teal); }

/* ---------- hero ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 8vw, 6rem); }
.hero__grid { display: grid; gap: clamp(2.25rem, 5vw, 4rem); align-items: center; }
/* Grid items default to their content's minimum width; let the calendar shrink with the screen instead. */
.hero__grid > *, .join__grid > * { min-width: 0; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.02fr 0.98fr; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(52, 209, 192, 0.18); }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: beacon 2.4s var(--ease) infinite; }
}
@keyframes beacon { 50% { box-shadow: 0 0 0 8px rgba(52, 209, 192, 0); } }

h1 {
  font: 800 clamp(3rem, 8.4vw, 5.9rem)/0.92 var(--display);
  letter-spacing: -0.012em;
  margin-bottom: 1.4rem;
}
.lede { color: var(--muted); font-size: clamp(1.08rem, 1.6vw, 1.22rem); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 1rem; }
@media (max-width: 480px) { .hero__actions .btn { flex: 1 1 100%; } }
.fine { color: var(--faint); font-size: 0.92rem; }
.fine .hl { color: var(--hivis-2); font-weight: 700; }

/* ---------- roster demo ---------- */
.demo { margin: 0; padding: clamp(1rem, 3vw, 1.6rem); }
.demo__kicker { color: var(--faint); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.demo__title { font: 700 1.6rem/1.1 var(--display); margin-top: 0.25rem; }
.demo__controls { margin: 1.1rem 0 1rem; }
.demo__label { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }

.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 5px; border-radius: 16px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); }
@media (min-width: 440px) { .seg { grid-template-columns: repeat(4, 1fr); } }
.seg button {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font: 600 0.92rem/1 var(--body);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.seg button[aria-checked="true"] { background: var(--hivis); color: var(--ink); box-shadow: 0 6px 18px -8px rgba(255, 138, 31, 0.7); }

.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal__dow { margin-bottom: 6px; }
.cal__dow span { text-align: center; color: var(--faint); font-size: 0.75rem; font-weight: 600; }

.day {
  --d: 0ms;
  position: relative;
  min-width: 0;
  aspect-ratio: 1 / 1.08;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.45s var(--ease) var(--d), border-color 0.45s var(--ease) var(--d), box-shadow 0.45s var(--ease) var(--d);
}
.day.wknd { background: rgba(255, 255, 255, 0.05); }
.day__n { font-size: 0.78rem; font-weight: 600; color: var(--faint); line-height: 1; transition: color 0.45s var(--ease) var(--d); }
.day__n small { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-left: 2px; }
/* On narrow phones the month tag sits under the date instead of pushing the cell wider. */
@media (max-width: 420px) {
  .day { padding: 5px; border-radius: 9px; }
  .day__n small { display: block; margin: 2px 0 0; font-size: 0.55rem; }
  .cal__dow, .cal__grid { gap: 5px; }
}
.day__bars { display: grid; gap: 3px; }
.bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); transition: background 0.45s var(--ease) var(--d), box-shadow 0.45s var(--ease) var(--d); }
.day.you .bar--you { background: var(--hivis); box-shadow: 0 0 10px rgba(255, 138, 31, 0.55); }
.day.them .bar--them { background: var(--teal); box-shadow: 0 0 10px rgba(52, 209, 192, 0.5); }
.day.both {
  background: linear-gradient(140deg, rgba(255, 138, 31, 0.32), rgba(52, 209, 192, 0.3));
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 10px 26px -12px rgba(255, 138, 31, 0.75);
}
.day.both .day__n { color: var(--text); }
.day.pick::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  border: 2px solid var(--text);
  opacity: 0.9;
}
@media (prefers-reduced-motion: no-preference) {
  .day.pick::after { animation: ring 2.2s var(--ease) infinite; }
  .cal.is-entering .day { animation: rise 0.6s var(--ease) both; animation-delay: var(--d); }
}
@keyframes ring { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.06); opacity: 0.35; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(0.96); } }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-top: 1rem; color: var(--muted); font-size: 0.85rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sw--you { background: var(--hivis); }
.sw--them { background: var(--teal); }
.sw--both { background: linear-gradient(140deg, var(--hivis), var(--teal)); }

.demo__result {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font: 600 1.3rem/1.25 var(--display);
  color: var(--muted);
  min-height: 2.6em;
}
.demo__result strong { color: var(--text); font-weight: 800; }
.demo__caption { margin-top: 0.6rem; color: var(--faint); font-size: 0.78rem; }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.h2 { font: 800 clamp(2.2rem, 5.2vw, 3.6rem)/0.98 var(--display); letter-spacing: -0.005em; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); max-width: 20ch; }

.cards { display: grid; gap: 1rem; }
@media (min-width: 820px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 1.6rem; }
.card__num { display: block; color: var(--hivis); font: 700 1rem/1 var(--display); letter-spacing: 0.08em; margin-bottom: 1.1rem; }
.card h3 { font: 700 1.6rem/1.08 var(--display); margin-bottom: 0.6rem; }
.card p { color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step__n {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--hivis);
  color: var(--hivis);
  font: 700 1.25rem/1 var(--display);
  box-shadow: 0 0 24px -6px rgba(255, 138, 31, 0.6);
}
.step h3 { font: 700 1.5rem/1.1 var(--display); margin: 0.35rem 0 0.45rem; }
.step p { color: var(--muted); }

.chips { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips li { padding: 0.55rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 0.98rem; }
.chips li:nth-child(1) { border-color: rgba(255, 138, 31, 0.55); color: var(--hivis-2); }
.chips li:nth-child(2) { border-color: rgba(52, 209, 192, 0.55); color: #7fe6da; }

/* ---------- join ---------- */
.join__grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 980px) { .join__grid { grid-template-columns: 0.85fr 1.15fr; gap: 4rem; } .join__intro { position: sticky; top: 110px; } }
.join .h2 { margin-bottom: 1rem; }
.ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.7rem; }
.ticks li { display: flex; gap: 0.7rem; align-items: center; color: var(--text); font-weight: 500; }
.ticks li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(52, 209, 192, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l3.8 3.8L18 8' fill='none' stroke='%2334d1c0' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}

.form-card { padding: clamp(1.25rem, 3.5vw, 2.1rem); }
.field { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.field > label, legend { display: block; padding: 0; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.98rem; }
.opt { color: var(--faint); font-weight: 500; font-size: 0.85rem; margin-left: 0.35rem; }
.row { display: grid; gap: 0 1rem; }
@media (min-width: 540px) { .row { grid-template-columns: 0.7fr 1.3fr; } }

input, select { font: inherit; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .share input {
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.field input:not([type="radio"]):not([type="checkbox"]):focus, .field select:focus {
  outline: none;
  border-color: var(--hivis);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.2);
}
.field .is-invalid, .field.is-invalid .pills span, .field.is-invalid .check input { border-color: var(--danger) !important; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer; }
.select select:invalid { color: var(--faint); }
.select option { background: var(--bg-2); color: var(--text); }
.select::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pills label { position: relative; }
.pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pills span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pills span:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.35); }
.pills input:checked + span { background: var(--hivis); border-color: var(--hivis); color: var(--ink); }
.pills input:focus-visible + span { outline: 3px solid var(--hivis-2); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .pills input:checked + span { transform: scale(1.03); } }

.check { display: flex; gap: 0.8rem; align-items: flex-start; font-weight: 500; color: var(--muted); cursor: pointer; }
.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border: 1.5px solid var(--border-2);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.check input:checked {
  background: var(--hivis) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 12.5l4 4L18.5 7.5' fill='none' stroke='%230a0f1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  border-color: var(--hivis);
}

.err { color: var(--danger); font-size: 0.88rem; font-weight: 500; margin-top: 0.4rem; }
.err:empty { display: none; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(10, 15, 26, 0.3); border-top-color: var(--ink); }
.is-loading .spinner { display: inline-block; animation: spin 0.8s linear infinite; }
.is-loading { pointer-events: none; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { margin-top: 0.9rem; color: var(--danger); font-weight: 500; text-align: center; }
.form-status:empty { display: none; }

.done { text-align: center; padding: 1rem 0 0.5rem; }
.done:focus { outline: none; }
.done__badge { width: 64px; height: 64px; margin: 0 auto 1.1rem; display: grid; place-items: center; border-radius: 50%; background: var(--hivis); color: var(--ink); box-shadow: 0 0 0 10px rgba(255, 138, 31, 0.14), 0 16px 40px -12px rgba(255, 138, 31, 0.8); }
.done__badge svg { width: 30px; height: 30px; }
@media (prefers-reduced-motion: no-preference) { .done:not([hidden]) .done__badge { animation: pop 0.6s var(--ease) both; } }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.done__title { font: 800 2.3rem/1 var(--display); margin-bottom: 0.6rem; }
.done__text { color: var(--muted); max-width: 32ch; margin: 0 auto 1.6rem; }
.share { text-align: left; display: grid; gap: 0.75rem; }
.share__label { font-weight: 600; font-size: 0.95rem; }
.share__row { display: flex; gap: 0.5rem; }
.share__row input { flex: 1; min-width: 0; font-size: 0.95rem; }
.share__row .btn { flex: none; min-height: 52px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.12rem;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--hivis), var(--hivis)) center/14px 2px no-repeat,
    linear-gradient(var(--hivis), var(--hivis)) center/2px 14px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 1.35rem; max-width: 62ch; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2rem 0 calc(2rem + env(safe-area-inset-bottom)); color: var(--faint); font-size: 0.92rem; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; }
.footer a { color: var(--muted); }

/* ---------- scroll reveal (only when JS runs) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- privacy page ---------- */
.doc { padding: clamp(2rem, 6vw, 4rem) 0 5rem; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2.6rem, 7vw, 4rem); }
.doc h2 { font: 700 1.6rem/1.1 var(--display); margin: 2.4rem 0 0.7rem; }
.doc p, .doc li { color: var(--muted); }
.doc p + p { margin-top: 0.9rem; }
.doc ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.doc strong { color: var(--text); }
