/* Dark Mane design system (SPEC §6). Dark, quiet, editorial. One idea per screen. */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/poppins-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-latin-500-normal.woff2") format("woff2");
}

:root {
  --bg: #0d0d0d;
  --surface: #151517;
  --line: #3a3b3f; /* decorative 1px dividers only */
  --field-line: #636569; /* form borders need >= 3:1 */
  --text: #efefef;
  --text-2: #cccccc;
  --muted: #a3a6ab;
  --faint: #7d8084;
  --accent: #efefef;
  --danger: #e5484d;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 24px;
  --measure: 640px;
  --ease: 180ms ease-out;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--text);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Type scale ─────────────────────────────────────────────────────────── */

.display {
  font-weight: 300;
  font-size: 36px;
  line-height: 44px;
  color: var(--text);
}

.h2 {
  font-weight: 400;
  font-size: 28px;
  line-height: 36px;
  color: var(--text);
}

.body {
  color: var(--text-2);
}

.body-2 {
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

.label,
.eyebrow {
  font-weight: 500;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Eyebrow with the deck's short 1px rule underneath. */
.eyebrow {
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--line);
}
.eyebrow__num {
  color: var(--faint);
  margin-bottom: -6px;
}

@media (min-width: 768px) {
  .display {
    font-size: 56px;
    line-height: 64px;
  }
  .h2 {
    font-size: 32px;
    line-height: 40px;
  }
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font: 500 13px / 16px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  border-color: var(--field-line);
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn--primary:hover {
  opacity: 0.88;
}

/* ── Landing ────────────────────────────────────────────────────────────── */

.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 64px var(--gutter) 48px;
  text-align: center;
}
.landing .eyebrow {
  align-items: center;
}
.landing__logo {
  width: 80vw;
  max-width: 560px;
}
.landing__logo img {
  width: 100%;
}
.landing__subline {
  color: var(--text-2);
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin-top: 8px;
}
@media (min-width: 768px) {
  .actions {
    flex-direction: row;
    max-width: 640px;
  }
  .actions .btn {
    flex: 1;
  }
}

/* ── Sheets (inner pages) ───────────────────────────────────────────────── */

.sheet {
  flex: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font: 500 13px / 16px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.back:hover {
  color: var(--text);
}
.prose p {
  color: var(--text-2);
}

.alert {
  padding: 12px 16px;
  border: 1px solid var(--danger);
  border-radius: 2px;
  color: var(--text);
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font: 500 13px / 16px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.field__optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 300;
  color: var(--faint);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 2px;
  color: var(--text);
  font: 300 18px / 28px var(--font);
}
.field textarea {
  resize: vertical;
}
.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--text);
}
.field--error input,
.field--error textarea {
  border-color: var(--danger);
}
.field__hint {
  font-size: 14px;
  line-height: 20px;
  color: var(--faint);
}
.field__error {
  font-size: 14px;
  line-height: 20px;
  color: var(--danger);
}

/* ── Booking flow ───────────────────────────────────────────────────────── */

.notice {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
}

.step-counter {
  align-self: flex-end;
  margin-top: auto;
  padding-top: 16px;
  color: var(--faint);
  font: 500 13px / 16px var(--font);
  letter-spacing: 0.08em;
}

/* Lists of choices: thin full-width divider above each item (deck motif). */
.choice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.choice {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: 64px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.choice__title {
  font-weight: 400;
}
.choice__meta {
  color: var(--muted);
  font-size: 16px;
}
.choice:hover .choice__title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Calendar strip: scrolls sideways on phones. */
.date-strip {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
}
.date-strip ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 2px 2px 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  flex: 1;
  min-width: 0; /* let the strip scroll instead of widening the page */
}
.date-chip {
  position: relative; /* contains its visually-hidden label inside the scrolling strip */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
}
.date-chip__wd,
.date-chip__mo {
  font: 500 11px / 14px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.date-chip__day {
  font-size: 20px;
  line-height: 28px;
}
.date-chip--selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.date-chip--selected .date-chip__wd,
.date-chip--selected .date-chip__mo {
  color: var(--bg);
}
.date-chip--off {
  color: var(--faint);
  border-style: dashed;
}
.date-chip--off .date-chip__wd,
.date-chip--off .date-chip__mo {
  color: var(--faint);
}
.date-strip__more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 8px;
}

.slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--field-line);
  border-radius: 2px;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
}
.slot:hover {
  border-color: var(--text);
}

/* Barber choice on the reschedule page. */
.barber-pick {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.barber-pick ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 2px;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
}
.pill--selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Booking summary: label / value rows with thin dividers. */
.summary {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.summary__row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.summary dt {
  font: 500 13px / 24px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.summary dd {
  margin: 0;
  color: var(--text);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.confirm-box {
  padding: 16px;
  border: 1px solid var(--field-line);
  border-radius: 2px;
}
.btn--danger {
  border-color: var(--danger);
  color: var(--text);
}
.btn--danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

/* ── Staff app ──────────────────────────────────────────────────────────── */

.staff-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.staff-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  min-width: 0;
}
.staff-nav a,
.link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  color: var(--muted);
  font: 500 13px / 16px var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
}
.staff-nav a[aria-current="page"] {
  color: var(--text);
  box-shadow: inset 0 -1px 0 var(--text);
}
.link-btn:hover,
.staff-nav a:hover {
  color: var(--text);
}
.sheet--staff {
  padding-top: 20px;
  gap: 20px;
}
.staff-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.day-head__title {
  text-align: center;
  flex: 1;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
}

.quick-actions,
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.row-2 .field,
.row-2 form {
  min-width: 0;
}
.row-3 {
  display: grid;
  grid-template-columns: 44px 1fr 1fr;
  gap: 8px;
  align-items: center;
}
.row-3__label {
  color: var(--text-2);
  font-size: 16px;
}
.row-3 input {
  min-width: 0;
  padding-left: 8px;
  padding-right: 6px;
}

/* Timeline: a time column and the item. */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tl-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  grid-template-areas: "time title" "time meta";
  column-gap: 12px;
  align-items: baseline;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
}
.tl-time {
  grid-area: time;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}
.tl-title {
  grid-area: title;
  font-weight: 400;
}
.tl-meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}
a.tl-item:hover {
  border-color: var(--field-line);
}
.tl-item--confirmed,
.tl-item--held {
  border-left-color: var(--text);
}
.tl-item--completed {
  border-left-color: var(--faint);
}
.tl-item--no_show {
  border-left-color: var(--danger);
}
.tl-item--off {
  border-style: dashed;
  border-left-style: solid;
  border-left-color: var(--faint);
  color: var(--muted);
}
.tl-item--free {
  border-color: transparent;
  border-left-color: var(--line);
  min-height: 44px;
  color: var(--faint);
}

/* Form controls used in the staff app. */
.select,
.field input[type="date"],
.field input[type="time"],
.field input[type="number"],
.row-3 input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--field-line);
  border-radius: 2px;
  color: var(--text);
  font: 300 16px / 24px var(--font);
  color-scheme: dark;
}
.inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-height: 44px;
}
.check input {
  width: 22px;
  height: 22px;
  accent-color: var(--text);
}
.check .field__hint {
  flex-basis: 100%;
}
.hours-day {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px 0 4px;
  border: 0;
  border-top: 1px solid var(--line);
}
.hours-day[disabled] {
  opacity: 0.6;
}

/* Buttons that look like list choices / time slots. */
.choice--button {
  width: 100%;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.slot {
  background: none;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

/* Checkout. */
.summary__row--money {
  grid-template-columns: 1fr auto;
}
.summary__row--money dt {
  font: 300 16px / 24px var(--font);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
}
.summary__row--money dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.summary__row--total dt,
.summary__row--total dd {
  color: var(--text);
  font-weight: 500;
}
form.inline {
  display: inline;
  margin-left: 8px;
}
.tip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tip-grid .pill {
  justify-content: center;
  background: none;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.tip-grid .pill--selected {
  background: var(--accent);
  color: var(--bg);
}
.choice--stack {
  flex-direction: column;
  align-items: stretch;
}
.payment-element {
  min-height: 120px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
}
.site-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: grid;
  gap: 24px;
}
.site-footer__address {
  font-style: normal;
}
.site-footer ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.site-footer .label {
  color: var(--faint);
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}
@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr auto;
    align-items: start;
  }
}

/* ── Motion ─────────────────────────────────────────────────────────────── */
/* 150–200 ms fades only, and only when the user hasn't asked for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  @keyframes fade-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  .landing,
  .sheet {
    animation: fade-in 200ms ease-out both;
  }
  .btn {
    transition:
      background-color var(--ease),
      border-color var(--ease),
      opacity var(--ease);
  }
}
