:root {
  color-scheme: light;
  --ink: #151617;
  --muted: #6d6a63;
  --paper: #f4efe6;
  --panel: #fffaf1;
  --line: rgba(21, 22, 23, 0.12);
  --dark: #111614;
  --dark-soft: #1d2621;
  --cream: #fff7e7;
  --brass: #d8b25b;
  --moss: #2f6a55;
  --brick: #b2493d;
  --blue: #607d92;
  --shadow: 0 22px 50px rgba(17, 22, 20, 0.14);
  --hero-height: clamp(720px, calc(100vh - 118px), 860px);
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid rgba(216, 178, 91, 0.45);
  outline-offset: 3px;
}

.barber-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 44px);
  color: var(--cream);
  background: rgba(17, 22, 20, 0.94);
  border-bottom: 1px solid rgba(255, 247, 231, 0.12);
  backdrop-filter: blur(18px);
}

.barber-brand,
.barber-nav,
.header-cta,
.header-admin,
.barber-footer a {
  text-decoration: none;
}

.barber-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.barber-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--dark);
  background: var(--brass);
  font-weight: 950;
}

.barber-brand strong {
  font-size: 17px;
}

.barber-nav {
  display: flex;
  gap: 24px;
  color: rgba(255, 247, 231, 0.72);
  font-size: 15px;
  font-weight: 850;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.header-cta,
.header-admin,
.submit-booking {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: var(--dark);
  background: var(--brass);
  font-weight: 950;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-cta,
.header-admin {
  padding: 0 18px;
}

.header-admin {
  border: 1px solid rgba(255, 247, 231, 0.22);
  color: var(--cream);
  background: rgba(255, 247, 231, 0.08);
}

.header-cta:hover,
.header-admin:hover,
.submit-booking:hover,
.header-cta:focus-visible,
.header-admin:focus-visible,
.submit-booking:focus-visible {
  transform: translateY(-2px);
  background: #eccb79;
  box-shadow: 0 14px 30px rgba(216, 178, 91, 0.22);
}

.header-admin:hover,
.header-admin:focus-visible {
  color: var(--dark);
}

.barber-page {
  position: relative;
  overflow-x: hidden;
}

.hero-grid {
  position: relative;
  min-height: var(--hero-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(34px, 6vw, 78px) clamp(18px, 5vw, 74px);
  color: var(--cream);
  background: #111614;
  overflow: visible;
}

.hero-grid::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 22, 20, 0.96) 0%, rgba(17, 22, 20, 0.78) 42%, rgba(17, 22, 20, 0.28) 100%),
    linear-gradient(180deg, rgba(17, 22, 20, 0.08), rgba(17, 22, 20, 0.62)),
    url("/assets/industry/hair-salon-hero-20260709.png") center / cover no-repeat;
  background-attachment: scroll, scroll, fixed;
}

.hero-copy,
.booking-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero-copy {
  max-width: 780px;
  min-width: 0;
}

.eyebrow {
  margin: 0;
  color: var(--brick);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.backoffice-panel .eyebrow {
  color: var(--brass);
}

.hero-copy h1 {
  max-width: 660px;
  margin: 16px 0 0;
  font-size: clamp(42px, 5.3vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy p:not(.eyebrow) {
  max-width: min(590px, 34em);
  margin: 24px 0 0;
  color: rgba(255, 247, 231, 0.76);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-stats span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 247, 231, 0.16);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 850;
}

.hero-photo {
  display: none;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-photo figcaption {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--dark);
  background: var(--brass);
  font-weight: 950;
}

.booking-panel {
  align-self: center;
  padding: 20px;
  border: 1px solid rgba(255, 247, 231, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 250, 241, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.booking-panel h2,
.section-head h2,
.backoffice-head h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

.booking-form {
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.booking-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.booking-form legend,
.guest-grid label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.option-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-grid button,
.slot-list button,
.barber-list button,
.reset-booking {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf7;
  font-weight: 900;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.option-grid button:hover,
.slot-list button:hover,
.barber-list button:hover,
.reset-booking:hover,
.option-grid button:focus-visible,
.slot-list button:focus-visible,
.barber-list button:focus-visible,
.reset-booking:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(47, 106, 85, 0.42);
}

.option-grid button.is-active,
.slot-list button.is-active {
  color: var(--cream);
  background: var(--moss);
  border-color: var(--moss);
}

.slot-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.slot-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 7px 12px;
  text-align: left;
}

.slot-list span {
  color: currentColor;
  opacity: 0.72;
  font-size: 13px;
}

.slot-list button[disabled] {
  color: #9c9589;
  background: #eee7db;
  cursor: not-allowed;
  transform: none;
}

.guest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.guest-grid label {
  display: grid;
  gap: 7px;
}

.wide-field {
  grid-column: 1 / -1;
}

.guest-grid input,
.guest-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fffdf7;
}

.guest-grid input {
  min-height: 40px;
  padding: 0 12px;
}

.guest-grid textarea {
  min-height: 68px;
  resize: vertical;
  padding: 12px;
}

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

.booking-summary span,
.booking-summary strong {
  min-height: 44px;
  display: grid;
  align-content: center;
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--ink);
  background: #e8eee7;
  font-size: 14px;
  font-weight: 950;
}

.booking-summary strong {
  background: #f2dda1;
}

.booking-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
}

.submit-booking,
.reset-booking {
  width: 100%;
  min-height: 44px;
  scroll-margin-top: 96px;
}

.reset-booking {
  color: var(--moss);
  background: #f8fbf7;
}

.form-note {
  min-height: 38px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: #f1ebdf;
  font-size: 14px;
  line-height: 1.45;
}

.service-band,
.barber-band,
.backoffice-band {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 78px 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.section-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.service-cards,
.barber-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.service-cards article,
.barber-list article {
  min-height: 214px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.78);
}

.service-cards article span {
  color: var(--brick);
  font-size: 13px;
  font-weight: 950;
}

.service-cards h3 {
  margin: 12px 0 0;
  font-size: 24px;
}

.service-cards p,
.barber-list span {
  color: var(--muted);
  line-height: 1.72;
}

.service-cards strong {
  display: inline-flex;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f2dda1;
}

.barber-list article {
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.barber-list strong {
  display: block;
  font-size: 30px;
}

.barber-list button {
  width: max-content;
  min-width: 92px;
  padding: 0 14px;
}

.barber-list article.is-active {
  border-color: rgba(47, 106, 85, 0.55);
  box-shadow: 0 18px 46px rgba(47, 106, 85, 0.14);
}

.backoffice-band {
  width: min(1560px, calc(100% - 40px));
  padding-top: 34px;
}

.backoffice-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.58fr) minmax(0, 1.42fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  border-radius: 8px;
  color: var(--cream);
  background: var(--dark);
}

.backoffice-head,
.backoffice-metrics,
.shop-section {
  grid-column: 1;
}

.schedule-section {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.backoffice-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.backoffice-head time {
  min-width: max-content;
  height: max-content;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--dark);
  background: var(--brass);
  font-size: 13px;
  font-weight: 900;
}

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

.backoffice-metrics div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(255, 247, 231, 0.1);
  border-radius: 8px;
  background: rgba(255, 247, 231, 0.08);
}

.backoffice-metrics strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.backoffice-metrics span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 247, 231, 0.66);
  font-size: 13px;
  font-weight: 850;
}

.schedule-section,
.shop-section {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 247, 231, 0.12);
}

.schedule-section {
  padding-top: 0;
  border-top: 0;
}

.schedule-section h3,
.shop-section h3 {
  margin: 0;
  font-size: 18px;
}

.appointment-list {
  display: grid;
  gap: 10px;
}

.appointment-card {
  display: grid;
  grid-template-columns: 82px minmax(220px, 1fr) 88px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 247, 231, 0.12);
  border-radius: 8px;
  background: rgba(255, 247, 231, 0.08);
}

.appointment-card time {
  color: var(--brass);
  font-weight: 950;
}

.appointment-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-card span {
  color: rgba(255, 247, 231, 0.66);
  font-size: 13px;
  font-weight: 750;
}

.appointment-card em {
  min-width: 58px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--cream);
  background: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.appointment-card em.is-confirmed {
  background: #4d8b6a;
}

.appointment-card em.is-waiting {
  background: #7a6aa6;
}

.appointment-card em.is-new {
  background: var(--brick);
}

.shop-list {
  display: grid;
  gap: 12px;
}

.shop-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.shop-list span {
  color: rgba(255, 247, 231, 0.66);
  font-weight: 750;
}

.shop-list strong {
  font-size: 13px;
}

.shop-list i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--brass) var(--value), rgba(255, 247, 231, 0.16) var(--value));
}

.barber-footer {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 58px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    display: none;
  }

  .booking-panel {
    max-width: 560px;
  }
}

@media (max-width: 980px) {
  .barber-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .barber-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .section-head,
  .service-cards,
  .barber-list,
  .backoffice-panel {
    grid-template-columns: 1fr;
  }

  .backoffice-head,
  .backoffice-metrics,
  .schedule-section,
  .shop-section {
    grid-column: auto;
    grid-row: auto;
  }

  .schedule-section {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 247, 231, 0.12);
  }
}

@media (max-width: 680px) {
  .barber-header {
    position: static;
    padding: 12px 14px;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .header-cta,
  .header-admin {
    width: 100%;
    padding: 0 14px;
  }

  .hero-grid,
  .service-band,
  .barber-band,
  .backoffice-band,
  .barber-footer {
    width: 100%;
  }

  .hero-grid {
    min-height: auto;
    padding: 34px 14px 48px;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    max-width: none;
  }

  .hero-copy h1 {
    font-size: clamp(32px, 9vw, 38px);
    line-height: 1.08;
    max-width: 10em;
    word-break: keep-all;
  }

  .hero-copy p:not(.eyebrow) {
    max-width: 21em;
    font-size: 16px;
    line-height: 1.65;
  }

  .booking-panel,
  .backoffice-panel {
    padding: 18px;
  }

  .service-band,
  .barber-band,
  .backoffice-band,
  .barber-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .booking-panel h2,
  .section-head h2,
  .backoffice-head h2 {
    font-size: 30px;
  }

  .option-grid,
  .option-grid.compact,
  .slot-list,
  .guest-grid,
  .booking-summary,
  .booking-actions,
  .backoffice-metrics {
    grid-template-columns: 1fr;
  }

  .appointment-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .appointment-card em {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .service-band,
  .barber-band,
  .backoffice-band {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .barber-footer {
    flex-direction: column;
  }
}
