/* ==========================================================================
   BLACKLINE BARBER — reusable components
   buttons · links · header · mobile menu · booking sheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--gold);
  --btn-fg: var(--ink);
  --btn-hover-bg: var(--bone);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9em;
  min-height: 52px;
  padding: 0.95em 1.7em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}

/* Fill slides up from below on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--btn-hover-bg);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  z-index: -1;
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateY(0);
}

.btn:hover,
.btn:focus-visible {
  color: var(--ink);
  border-color: var(--btn-hover-bg);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.4s var(--ease);
}

.btn:hover svg,
.btn:focus-visible svg {
  transform: translateX(4px);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--bone);
  --btn-hover-bg: var(--bone);
  border-color: var(--line-strong);
}

.btn--sm {
  min-height: 44px;
  padding: 0.85em 1.35em;
  font-size: 0.7rem;
}

.btn--lg {
  min-height: 64px;
  padding-inline: 2.4em;
  font-size: 0.82rem;
}

/* Quiet text link with a travelling arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--bone);
  padding-block: 0.5em;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform 0.4s var(--ease);
}

.link-arrow:hover,
.link-arrow:focus-visible {
  color: var(--gold-hi);
  border-color: var(--gold);
}

.link-arrow:hover svg,
.link-arrow:focus-visible svg {
  transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  padding-block: 26px;
  border-bottom: 1px solid transparent;
  transition: padding 0.45s var(--ease), background-color 0.45s var(--ease),
    border-color 0.45s var(--ease);
}

.site-header.is-scrolled {
  padding-block: 14px;
  background: rgba(10, 10, 11, 0.94);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: inline-grid;
  gap: 0.42em;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.logo__name {
  font-weight: 800;
  font-stretch: 78%;
  font-size: 1.3rem;
  letter-spacing: 0.17em;
  margin-right: -0.17em;
}

.logo__sub {
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.62em;
  color: var(--gold);
}

.logo__sub::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--gold);
  opacity: 0.55;
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.logo:hover .logo__sub::after {
  transform: scaleX(0.55);
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 2.6vw, 2.8rem);
}

.nav__link {
  position: relative;
  display: inline-block;
  padding-block: 0.6em;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color 0.3s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15em;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible,
.nav__link.is-active {
  color: var(--bone);
}

.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header__cta {
  display: none;
}

/* Menu toggle */
.menu-toggle {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  display: grid;
  place-items: center;
}

.menu-toggle__bars {
  position: relative;
  width: 26px;
  height: 10px;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--bone);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}

.menu-toggle__bars::before {
  top: 0;
}

.menu-toggle__bars::after {
  top: 9px;
  left: 6px;
}

.menu-open .menu-toggle__bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.menu-open .menu-toggle__bars::after {
  top: 4px;
  left: 0;
  transform: rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 28px) var(--gutter) 32px;
  background: var(--ink);
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s linear 0.7s;
  overflow-y: auto;
}

.menu-open .mobile-menu {
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.7s var(--ease-in-out), visibility 0s;
}

.mobile-menu__list {
  display: grid;
  margin-block: auto;
}

.mobile-menu__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.28em;
  font-weight: 800;
  font-stretch: 74%;
  font-size: clamp(2.6rem, 12vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--bone);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.3s;
}

.mobile-menu__link span {
  font-size: 0.72rem;
  font-stretch: 100%;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.mobile-menu__link:hover,
.mobile-menu__link.is-active {
  color: var(--gold-hi);
}

.menu-open .mobile-menu__link {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), color 0.3s;
  transition-delay: calc(0.25s + var(--i) * 60ms);
}

.mobile-menu__foot {
  display: grid;
  gap: 1.5rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  color: var(--bone-dim);
  font-size: 0.9rem;
}

.mobile-menu__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
}

.mobile-menu__meta a:hover {
  color: var(--gold-hi);
}

/* Sticky booking bar — mobile only, appears after the hero */
.book-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 11, 0.96);
  border-top: 1px solid var(--line);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}

.book-bar.is-visible {
  transform: none;
}

.book-bar .btn {
  width: 100%;
}

.menu-open .book-bar {
  transform: translateY(101%);
}

@media (min-width: 980px) {
  .nav {
    display: block;
  }

  .site-header__cta {
    display: inline-flex;
  }

  .menu-toggle,
  .mobile-menu,
  .book-bar {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Booking sheet (native <dialog>)
   -------------------------------------------------------------------------- */

.sheet {
  width: min(680px, 100%);
  max-height: 100dvh;
  margin: auto;
  padding: 0;
  color: var(--bone);
  background: var(--coal);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}

.sheet[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-in 0.55s var(--ease) both;
}

.sheet::backdrop {
  background: rgba(4, 4, 4, 0.78);
  animation: fade-in 0.4s ease both;
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 28px clamp(20px, 4vw, 40px) 22px;
  border-bottom: 1px solid var(--line);
}

.sheet__title {
  margin-top: 0.9rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.sheet__close {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -8px -10px 0 0;
  display: grid;
  place-items: center;
  color: var(--bone-dim);
  transition: color 0.3s, transform 0.5s var(--ease);
}

.sheet__close:hover {
  color: var(--bone);
  transform: rotate(90deg);
}

.sheet__close svg {
  width: 22px;
  height: 22px;
}

.sheet__body {
  overflow-y: auto;
  padding: 26px clamp(20px, 4vw, 40px) 30px;
  display: grid;
  gap: 28px;
}

.field {
  display: grid;
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field__label {
  padding: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.field__row {
  display: grid;
  gap: 16px;
}

@media (min-width: 560px) {
  .field__row {
    grid-template-columns: 1fr 1fr;
  }
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 0.9em 1em;
  background: var(--ink);
  color: var(--bone);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  font: inherit;
  font-size: 1rem;
  color-scheme: dark;
  transition: border-color 0.3s;
}

.input::placeholder {
  color: var(--mute);
}

.input:hover {
  border-color: var(--mute);
}

.input:focus-visible {
  outline: none;
  border-color: var(--gold-hi);
  box-shadow: 0 0 0 1px var(--gold-hi);
}

/* Radio rows (service) */
.choice-list {
  display: grid;
  gap: 8px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.choice__face {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95em 1.1em;
  border: 1px solid var(--line);
  background: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.3s, background-color 0.3s;
}

.choice__face b {
  font-weight: 600;
}

.choice__face span {
  color: var(--bone-dim);
  font-variant-numeric: tabular-nums;
}

.choice input:hover + .choice__face {
  border-color: var(--line-strong);
}

.choice input:checked + .choice__face {
  border-color: var(--gold);
  background: var(--graphite);
}

.choice input:checked + .choice__face span {
  color: var(--gold-hi);
}

.choice input:focus-visible + .choice__face {
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

/* Time slots */
.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}

.slot .choice__face {
  justify-content: center;
  padding: 0.75em 0.4em;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.slot input:disabled + .choice__face {
  color: var(--mute);
  opacity: 0.45;
  text-decoration: line-through;
  border-style: dashed;
  cursor: not-allowed;
}

.slot input:disabled {
  cursor: not-allowed;
}

.slots__note {
  font-size: 0.9rem;
  color: var(--mute);
  padding: 0.9em 0;
}

.sheet__foot {
  display: grid;
  gap: 14px;
}

.form-error {
  min-height: 1.4em;
  font-size: 0.9rem;
  color: #e8a49a;
}

.sheet__fine {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--mute);
}

@media (min-width: 641px) {
  .sheet {
    max-height: calc(100dvh - 48px);
  }
}

@media (max-width: 640px) {
  .sheet {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    max-height: 94dvh;
    border-inline: 0;
    border-bottom: 0;
  }
}
