/* Sunset Fitness kiosk. Built for a wall-mounted iPad in bright outdoor light:
   very large type, high contrast, and a full-screen colour wash as the result signal
   so staff can read the outcome from across the terrasse. */

:root {
  --olive: #494432;
  --sand: #d8cfbd;
  --ink: #14130f;
  --grant: #1f7a4d;
  --deny: #a32c22;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family:
    ui-sans-serif,
    -apple-system,
    'Segoe UI',
    system-ui,
    sans-serif;
  background: var(--ink);
  color: var(--sand);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.stage {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(rgba(20, 19, 15, 0.82), rgba(20, 19, 15, 0.94)),
    url('/assets/backdrop.jpg') center / cover no-repeat;
  transition: background-color 220ms ease;
}

.stage[data-state='granted'] {
  background: linear-gradient(160deg, var(--grant), #0d3d27);
}

.stage[data-state='denied'] {
  background: linear-gradient(160deg, var(--deny), #4a120d);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 28px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wordmark {
  height: 30px;
  width: auto;
}

.foot {
  opacity: 0.65;
  font-size: 13px;
}

.spot-switch {
  display: flex;
  border: 1px solid rgba(216, 207, 189, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

.spot-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 9px 18px;
  cursor: pointer;
}

.spot-switch button.on {
  background: var(--sand);
  color: var(--olive);
}

.panel {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

h1 {
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  margin: 0 0 12px;
  font-weight: 700;
}

.sub {
  font-size: clamp(17px, 2.2vw, 24px);
  margin: 0;
  opacity: 0.85;
  max-width: 24ch;
  margin-inline: auto;
}

.palm {
  height: 84px;
  width: auto;
  margin-bottom: 22px;
  opacity: 0.9;
}

.inputs {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ghost {
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  border: 1px solid rgba(216, 207, 189, 0.5);
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
}

.ghost:hover {
  background: rgba(216, 207, 189, 0.12);
}

#manual {
  width: min(420px, 80vw);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(216, 207, 189, 0.28);
  border-radius: 12px;
  padding: 13px 16px;
  color: inherit;
  font: inherit;
  text-align: center;
}

.reader {
  margin-top: 22px;
  width: min(360px, 82vw);
  border-radius: var(--radius);
  overflow: hidden;
}

.mark {
  width: 108px;
  height: 108px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 5px solid currentColor;
  position: relative;
}

.mark::before,
.mark::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 3px;
}

/* Check mark */
.result[data-granted='true'] .mark::before {
  width: 5px;
  height: 30px;
  transform: rotate(-45deg);
  left: 34px;
  top: 48px;
}

.result[data-granted='true'] .mark::after {
  width: 5px;
  height: 56px;
  transform: rotate(38deg);
  left: 58px;
  top: 22px;
}

/* Cross */
.result[data-granted='false'] .mark::before,
.result[data-granted='false'] .mark::after {
  width: 5px;
  height: 54px;
  left: 47px;
  top: 22px;
}

.result[data-granted='false'] .mark::before {
  transform: rotate(45deg);
}

.result[data-granted='false'] .mark::after {
  transform: rotate(-45deg);
}

.meta {
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 22px;
  font-size: 15px;
  opacity: 0.8;
  width: fit-content;
  text-align: left;
}

.meta dt {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  opacity: 0.75;
}

.meta dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

[hidden] {
  display: none !important;
}

/* Member pass page. Same palette as the kiosk, but read on a phone in sunlight,
   so the code itself gets a white card and as much width as it can take. */
.pass-card {
  max-width: 30rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pass-qr {
  width: min(340px, 78vw);
  height: auto;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
}

.note {
  font-size: 13px;
  opacity: 0.6;
  margin: 6px 0 0;
  max-width: 30ch;
}
