/*
 * Mabel's Chair (showcase site)
 * Copyright (c) 2026 Miloš Milinkov. All rights reserved.
 * Proprietary and confidential. Use, copying, modification or distribution
 * without written permission is prohibited. See the LICENSE file.
 */

/* ---------- Tokens ---------- */
:root {
  --blush: #f7e8e3;        /* page background: salon-chair pink, not cream */
  --blush-deep: #efd6cf;
  --paper: #fffaf8;
  --plum: #2c1824;         /* ink */
  --plum-soft: #5d4453;
  --mulberry: #7d2b4f;     /* primary */
  --mulberry-dark: #61203d;
  --mint: #cfe5dc;         /* barber corner tiles */
  --mint-deep: #9fc8b8;
  --brass: #d9a54a;        /* mirror bulbs, small accents */
  --brass-light: #f0c779;
  --bulb: #fbe6b0;
  --bulb-edge: #b07f2c;
  --error: #b3261e;
  --open: #2d7d55;

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.4vw, 4.6rem);

  --radius: 14px;
  --radius-panel: 22px;
  /* black-and-white barber floor tiles; size it with background-size */
  --tiles: conic-gradient(var(--plum) 25%, var(--paper) 0 50%, var(--plum) 0 75%, var(--paper) 0);
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --shadow: 0 18px 40px -22px rgba(61, 22, 44, 0.45);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--blush);
  color: var(--plum);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--mulberry); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--mulberry-dark); text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; }
h2 { font-size: var(--step-3); letter-spacing: -0.01em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--mulberry); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--plum); color: var(--paper); padding: 0.6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  border: 2px solid transparent; border-radius: 999px;
  font: 600 var(--step-0) / 1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--mulberry); color: var(--paper); }
.btn-primary:hover { background: var(--mulberry-dark); color: var(--paper); }
.btn-quiet { background: transparent; color: var(--plum); border-color: rgba(44, 24, 36, 0.25); }
.btn-quiet:hover { border-color: var(--plum); color: var(--plum); }
.btn-dark { background: var(--plum); color: var(--mint); }
.btn-dark:hover { background: #000; color: var(--mint); }
.btn-small { min-height: 2.6rem; padding: 0.5rem 1.1rem; font-size: var(--step--1); }

/* ---------- Demo bar ---------- */
.demo-bar { background: var(--plum); color: var(--blush); font-size: var(--step--1); text-align: center; padding: 0.55rem var(--gutter); }
.demo-bar p { margin: 0; }
.demo-bar a { font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 232, 227, 0.97);
  border-bottom: 1px solid rgba(125, 43, 79, 0.12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--plum); text-decoration: none; }
.brand:hover { color: var(--plum); }
.brand-mark { width: 2rem; height: 2.4rem; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { color: var(--plum); text-decoration: none; font-weight: 500; padding: 0.4rem 0; }
.site-nav ul a:hover { color: var(--mulberry); text-decoration: underline; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) clamp(3.5rem, 3rem + 4vw, 6rem);
}
.hero h1 { font-size: var(--step-4); letter-spacing: -0.02em; margin-bottom: 1.25rem; max-width: 13ch; }
.lede { font-size: var(--step-1); line-height: 1.55; color: var(--plum-soft); max-width: 34rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2.25rem; list-style: none; margin: 0; padding: 0; color: var(--plum-soft); font-size: var(--step--1); }
.hero-facts strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); color: var(--plum); line-height: 1.2; }

.status {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin-bottom: 1.5rem; padding: 0.35rem 0.9rem 0.35rem 0.7rem;
  border-radius: 999px; background: var(--paper);
  font-size: var(--step--1); font-weight: 600; color: var(--plum-soft);
}
.status-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #b9a3ad; flex: none; }
.status.is-open { color: var(--open); }
.status.is-open .status-dot { background: var(--open); box-shadow: 0 0 0 4px rgba(45, 125, 85, 0.18); }

/* The mirror */
.mirror { position: relative; margin: 0; justify-self: center; width: min(100%, 440px); }
.mirror-svg { display: block; width: 100%; height: auto; }
.mirror-frame { fill: var(--mulberry); }
.mirror-sheen { fill: none; stroke: rgba(255, 255, 255, 0.4); stroke-width: 6; stroke-linecap: round; }
.mirror-shelf { fill: var(--plum); }
.bulb { fill: var(--bulb); stroke: var(--bulb-edge); stroke-width: 1.5; }
.glow { fill: url(#bulb-glow); opacity: 0.85; }

@media (prefers-reduced-motion: no-preference) {
  .bulbs .bulb { animation: bulb-on 0.45s ease-out both; }
  .bulbs .glow { animation: glow-on 0.6s ease-out both; }
  .bulbs circle { animation-delay: calc(var(--i) * 65ms + 250ms); }
}
@keyframes bulb-on { from { fill: #8a6f6a; } to { fill: var(--bulb); } }
@keyframes glow-on { from { opacity: 0; } 60% { opacity: 1; } to { opacity: 0.85; } }

.mirror-tag {
  position: absolute; left: -8%; bottom: 14%;
  max-width: 13.5rem; padding: 0.9rem 1.1rem;
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: var(--step--1); line-height: 1.45; color: var(--plum);
  transform: rotate(-3deg);
}

/* ---------- Section heads ---------- */
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head p { margin: 0; color: var(--plum-soft); max-width: 30rem; justify-self: end; }
.section-title-center { text-align: center; margin-bottom: clamp(2rem, 4vw, 3rem); }

/* ---------- Prices ---------- */
.prices { background: var(--paper); padding-block: var(--section); }
.price-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
.price-group h3 { padding-bottom: 0.9rem; margin-bottom: 0.5rem; border-bottom: 2px solid var(--plum); }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li {
  display: grid; grid-template-columns: auto minmax(1.25rem, 1fr) auto;
  column-gap: 0.4rem; padding-block: 0.8rem;
  border-bottom: 1px solid rgba(44, 24, 36, 0.1);
}
.price-list li::after {
  content: ""; grid-column: 2; grid-row: 1; align-self: end; margin-bottom: 0.4em;
  border-bottom: 2px dotted rgba(44, 24, 36, 0.3);
}
.price-list .item { grid-column: 1; grid-row: 1; font-weight: 600; }
.price-list .price { grid-column: 3; grid-row: 1; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--mulberry); white-space: nowrap; }
.price-list .note { grid-column: 1 / -1; grid-row: 2; font-size: var(--step--1); color: var(--plum-soft); }

.price-group-barber {
  background: var(--mint); border-radius: var(--radius);
  padding: 0 1.4rem 1rem; overflow: hidden;
}
.price-group-barber::before {
  content: ""; display: block; height: 18px; margin: 0 -1.4rem 1.25rem;
  background: var(--tiles) 0 0 / 18px 18px;
}
.price-group-barber .price { color: var(--plum); }
.price-group-barber .price-list li:last-child { border-bottom: 0; }

/* ---------- Gallery ---------- */
.work { padding-block: var(--section); }
.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(110px, 12vw, 150px);
  grid-template-areas:
    "waves waves waves waves fade fade"
    "waves waves waves waves fade fade"
    "curls curls lilac lilac fade fade"
    "curls curls lilac lilac crop crop"
    "blow  blow  lilac lilac crop crop"
    "blow  blow  lilac lilac crop crop";
}
.gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--blush-deep); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption {
  position: absolute; left: 10px; bottom: 10px; right: 10px; width: fit-content;
  padding: 0.4rem 0.75rem; border-radius: 10px;
  background: rgba(255, 250, 248, 0.94); color: var(--plum);
  font-size: var(--step--1); font-weight: 600; line-height: 1.35;
}
.gallery figcaption span { font-weight: 400; color: var(--plum-soft); }
.g-waves { grid-area: waves; }
.g-waves img { object-position: 50% 40%; }
.g-fade { grid-area: fade; }
.g-curls { grid-area: curls; }
.g-curls img { object-position: 50% 30%; }
.g-lilac { grid-area: lilac; }
.g-lilac img { object-position: 50% 20%; }
.g-crop { grid-area: crop; }
.g-crop img { object-position: 45% 50%; }
.g-blowout { grid-area: blow; }

/* ---------- Team ---------- */
.team { background: var(--plum); color: var(--blush); padding-block: var(--section); }
.team-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.team-photo { margin: 0; }
.team-photo img, .barber-photo { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; }
.team-photo figcaption { margin-top: 0.8rem; font-size: var(--step--1); color: rgba(247, 232, 227, 0.72); }
.team-copy h2 { margin-bottom: 1.25rem; }
.team-copy > p { color: rgba(247, 232, 227, 0.82); max-width: 32rem; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; margin: 2rem 0 0; }
.people dt { font-family: var(--font-display); font-size: var(--step-1); color: var(--brass); margin-bottom: 0.2rem; }
.people dd { margin: 0; font-size: var(--step--1); line-height: 1.5; color: rgba(247, 232, 227, 0.85); }

/* ---------- Barber corner ---------- */
.barber { background: var(--mint); padding-block: var(--section); position: relative; }
.barber::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 22px;
  background: var(--tiles) 0 0 / 22px 22px;
}
.barber-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.barber-copy h2 { margin-bottom: 1.25rem; }
.barber-copy p { max-width: 30rem; color: #2f3b36; }
.barber-copy .btn { margin-top: 0.75rem; }
.barber-photo { box-shadow: var(--shadow); }

/* ---------- What a visit feels like ---------- */
.visit-feel {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
  padding-block: var(--section);
}
.feel-photo {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  /* arched top, the same shape as the hero mirror */
  border-radius: 50% 50% var(--radius) var(--radius) / 40% 40% var(--radius) var(--radius);
  border: 10px solid var(--mulberry);
}
.feel-copy h2 { margin-bottom: 1rem; }
.feel-copy > p { color: var(--plum-soft); max-width: 32rem; }
.small-things { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.25rem; }
.small-things li {
  position: relative; padding: 0.85rem 0 0.85rem 2.4rem;
  border-bottom: 1px solid rgba(125, 43, 79, 0.15);
  font-size: var(--step-1); font-family: var(--font-display); line-height: 1.3;
}
.small-things li::before {
  /* a little lit bulb, like the ones on the mirror */
  content: ""; position: absolute; left: 0.3rem; top: 50%; translate: 0 -50%;
  width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: var(--bulb); border: 1.5px solid var(--bulb-edge);
  box-shadow: 0 0 0 5px rgba(217, 165, 74, 0.22);
}

/* ---------- Reviews ---------- */
.reviews { background: var(--blush-deep); padding-block: var(--section); }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); }
.quotes blockquote { margin: 0; padding-top: 1.25rem; border-top: 3px solid var(--mulberry); }
.quotes blockquote::before {
  content: "\201C"; display: block; height: 2.2rem;
  font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--mulberry);
}
.quotes p { font-family: var(--font-display); font-size: var(--step-1); line-height: 1.45; }
.quotes footer { font-size: var(--step--1); font-weight: 600; color: var(--plum-soft); }

/* ---------- Booking + info ---------- */
.book { padding-block: var(--section); }
.book-inner { display: grid; grid-template-columns: 1.35fr 0.85fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.book-form-wrap { background: var(--paper); border-radius: var(--radius-panel); padding: clamp(1.5rem, 4vw, 3rem); box-shadow: var(--shadow); }
.book-form-wrap > h2 { margin-bottom: 0.75rem; }
.book-form-wrap > p { color: var(--plum-soft); margin-bottom: 2rem; }
.book-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.field { display: grid; gap: 0.35rem; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: var(--step--1); }
.optional { font-weight: 400; color: var(--plum-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem;
  border: 1.5px solid rgba(44, 24, 36, 0.22); border-radius: 12px;
  background: #fff; color: var(--plum); font: inherit;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--mulberry); box-shadow: 0 0 0 4px rgba(125, 43, 79, 0.18); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 0; font-size: var(--step--1); color: var(--error); font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 0.5rem; }
.form-hint { margin: 0; font-size: var(--step--1); color: var(--plum-soft); }

.book-done h3 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.book-done:focus { outline: none; }
.demo-note { padding: 0.9rem 1rem; border-radius: 12px; background: var(--blush); font-size: var(--step--1); color: var(--plum-soft); }

.info { background: var(--mulberry); color: var(--blush); border-radius: var(--radius-panel); padding: clamp(1.5rem, 4vw, 2.5rem); }
.info-title { font-size: var(--step-2); margin-bottom: 1rem; }
.info address { font-style: normal; }
.info address p { color: rgba(247, 232, 227, 0.86); }
.info .info-street { font-family: var(--font-display); font-size: var(--step-1); color: var(--paper); margin-bottom: 0.4rem; }
.info a { color: var(--paper); font-weight: 600; }
.info a:hover { color: #fff; }
.status-small { margin: 0.25rem 0 1.25rem; }
.hours { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.hours th, .hours td { padding: 0.7rem 0; border-top: 1px solid rgba(247, 232, 227, 0.22); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--paper); font-weight: 700; }
.hours tr.is-today th::after { content: " (today)"; font-weight: 400; color: var(--brass); }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum); color: rgba(247, 232, 227, 0.75); padding-block: 3rem; font-size: var(--step--1); }
.footer-inner p { margin: 0 0 0.5rem; }
.footer-brand { font-family: var(--font-display); font-size: var(--step-2); color: var(--blush); }
.site-footer .credit { margin-top: 1.5rem; max-width: 46rem; }
.demo-bar a, .site-footer a { color: var(--brass); }
.demo-bar a:hover, .site-footer a:hover { color: var(--brass-light); }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; justify-items: center; padding-block: 4rem; }
.notfound h1 { font-size: var(--step-4); margin-bottom: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .mirror { width: min(100%, 380px); }
  .price-board { grid-template-columns: 1fr 1fr; }
  .price-group-barber { grid-column: 1 / -1; }
  .team-inner, .barber-inner, .book-inner { grid-template-columns: 1fr; }
  .visit-feel { grid-template-columns: 0.9fr 1.1fr; }
  .quotes { grid-template-columns: 1fr; max-width: 40rem; margin-inline: auto; }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
    border: 0; border-radius: 50%; background: var(--paper); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 1.15rem; height: 2px; border-radius: 2px; background: var(--plum); position: relative;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; rotate: 45deg; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; rotate: -45deg; }

  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1rem var(--gutter) 1.5rem; background: var(--blush);
    border-bottom: 1px solid rgba(125, 43, 79, 0.15); box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 0.75rem 0; font-size: var(--step-1); border-bottom: 1px solid rgba(125, 43, 79, 0.1); }
  .site-nav .btn { align-self: flex-start; }

  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .visit-feel { grid-template-columns: 1fr; }
  .feel-photo { max-width: 340px; justify-self: center; }
}

@media (max-width: 640px) {
  .mirror-tag { position: relative; left: auto; bottom: auto; margin: -1.5rem auto 0; transform: rotate(-2deg); }
  .price-board { grid-template-columns: 1fr; }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 170px;
    grid-template-areas:
      "waves waves"
      "fade  curls"
      "fade  lilac"
      "crop  lilac"
      "blow  blow";
  }
  .people { grid-template-columns: 1fr; }
  .book-form { grid-template-columns: 1fr; }
}
