/* ── Hayley Kharsa Hair Studio — main.css ─────────────────────────────────── */

/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #f7f4ef;
  --surface:     #fffdfb;
  --ink:         #1f1f23;
  --muted:       #66646f;
  --accent:      #8c5a56;
  --accent-dark: #5f3531;
  --line:        #e6ded4;
  --ok:          #2e7d32;
  --danger:      #c0392b;
  --radius-card: 14px;
  --radius-btn:  999px;
  --header-h:    76px;
}

/* ── Reset & base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Raleway", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Typography (fluid) ─────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: "Josefin Sans", "Segoe UI", sans-serif;
  letter-spacing: .02em;
  line-height: 1.2;
}
h1 { font-size: clamp(1.75rem, 4vw, 3rem); margin-bottom: .75rem; }
h2 { font-size: clamp(1.35rem, 3vw, 2.1rem); margin-bottom: .75rem; }
h3 { font-size: clamp(1rem, 2vw, 1.35rem); margin-bottom: .5rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.eyebrow {
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: .5rem;
}
.lead  { color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.container { width: min(1120px, 92vw); margin: 0 auto; }
section { padding: 3rem 0; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  border-radius: var(--radius-btn);
  padding: .65rem 1.4rem;
  border: 1px solid transparent;
  font-size: .95rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover,  .btn-primary:focus-visible  { background: var(--accent-dark); }
.btn-secondary { border-color: var(--accent); color: var(--accent-dark); background: transparent; }
.btn-secondary:hover, .btn-secondary:focus-visible { background: var(--accent); color: #fff; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.section-cta { margin-top: 1.5rem; display: inline-block; }

/* ── Site header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,244,239,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.brand {
  font-family: "Josefin Sans", sans-serif;
  font-size: 1.2rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-nav ul { display: flex; gap: 1.2rem; }
.nav-link {
  text-decoration: none;
  font-size: .92rem;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav-link:hover, .nav-link.is-active { border-color: var(--accent); color: var(--accent-dark); }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav-head { display: none; }

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero { padding: 4rem 0 3rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-image img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* ── Page hero (inner pages) ─────────────────────────────────────────────────── */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

/* ── Section head ────────────────────────────────────────────────────────────── */
.section-head { margin-bottom: 1.5rem; }

/* ── Metrics ─────────────────────────────────────────────────────────────────── */
.metrics { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.metrics.vertical { flex-direction: column; }
.metric-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: .6rem .9rem;
  display: inline-flex;
  gap: .5rem;
  align-items: baseline;
}
.metric-chip strong { font-size: 1.15rem; }
.metric-chip span   { color: var(--muted); font-size: .88rem; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
.service-card, .timeline-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.1rem;
}
.service-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: .9rem;
  object-fit: cover;
  aspect-ratio: 5/4;
}
.service-card .service-book-cta { margin-top: .85rem; display: inline-block; }
.timeline-card .timeline-period { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
.timeline-card .timeline-show   { color: var(--accent-dark); font-style: italic; margin-bottom: .2rem; }

/* ── Gallery ─────────────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.gallery-grid--full {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.gallery-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.gallery-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.gallery-card figcaption { padding: .4rem .7rem; font-size: .8rem; color: var(--muted); }

/* ── Testimonials ────────────────────────────────────────────────────────────── */
.quotes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.quotes-grid--full { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.1rem;
  margin: 0;
}
.quote-card p    { color: var(--muted); margin-bottom: .6rem; font-style: italic; }
.quote-card cite { font-style: normal; font-weight: 600; font-size: .9rem; }

/* ── Timeline ────────────────────────────────────────────────────────────────── */
.timeline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

/* ── About layout (full page) ───────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}
.prose { line-height: 1.8; }
.prose p  { margin-bottom: 1rem; }
.prose em { color: var(--accent-dark); }

/* ── Contact panel / page ────────────────────────────────────────────────────── */
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 1.75rem 1.5rem;
}
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
.contact-details-list { padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; }
.contact-details-list a { color: var(--accent-dark); text-decoration: none; }
.contact-details-list a:hover { text-decoration: underline; }
.map-embed { margin-top: 1.5rem; }

/* ── Contact form ────────────────────────────────────────────────────────────── */
.contact-form-wrap h2 { margin-bottom: 1.25rem; }
.contact-form { display: flex; flex-direction: column; gap: .9rem; }
.form-field { display: flex; flex-direction: column; gap: .3rem; }
.form-field label { font-size: .83rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .8rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px; /* prevents iOS zoom */
  transition: border-color .15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert--ok  { background: #e8f5e9; color: var(--ok);     border: 1px solid #a5d6a7; }
.alert--err { background: #fdecea; color: var(--danger); border: 1px solid #f5c6cb; }

/* ── Social links ────────────────────────────────────────────────────────────── */
.social-links { display: flex; flex-wrap: wrap; gap: .6rem; margin: .9rem 0; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .42rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  transition: background .15s, border-color .15s;
}
.social-link:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.social-link svg   { width: 17px; height: 17px; flex-shrink: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer { padding: 3rem 0 1.5rem; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand .brand { font-size: 1.1rem; margin-bottom: .4rem; display: block; }
.footer-hours { font-size: .85rem; margin-top: .35rem; }
.footer-nav ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-nav a  { text-decoration: none; font-size: .88rem; color: var(--muted); transition: color .15s; }
.footer-nav a:hover { color: var(--accent-dark); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; }
.footer-privacy-link { font-size: .82rem; text-decoration: none; }
.footer-privacy-link:hover { text-decoration: underline; }
.footer-social .social-links { margin-top: 0; }

/* ── Lightbox ────────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox-figure  { max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-img     { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.lightbox-caption { color: rgba(255,255,255,.75); font-size: .85rem; margin-top: .5rem; }
.lightbox-close   { position: fixed; top: 1.25rem; right: 1.5rem; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; z-index: 1; opacity: .8; }
.lightbox-close:hover { opacity: 1; }
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: .5rem .75rem;
  border-radius: 8px;
  transition: background .15s;
  z-index: 1;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.3); }
body.lightbox-open { overflow: hidden; }

/* ── Mobile sticky booking bar ───────────────────────────────────────────────── */
.mobile-booking-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: .6rem 1rem;
  gap: .6rem;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.mobile-booking-bar.is-offset-for-cookie { bottom: 112px; }
.mbb-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.mbb-call { background: var(--accent-dark); color: #fff; }
.mbb-call:hover { background: var(--accent); }
.mbb-book { background: var(--accent); color: #fff; }
.mbb-book:hover { background: var(--accent-dark); }
.mbb-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.mbb-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: .25rem .4rem;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Cookie banner ────────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: -100px;
  left: 1rem;
  right: 1rem;
  z-index: 300;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  transition: bottom .35s cubic-bezier(.34,1.56,.64,1);
}
.cookie-banner.is-visible { bottom: 1rem; }
.cookie-banner p  { margin: 0; font-size: .88rem; }
.cookie-banner a  { color: var(--line); text-decoration: underline; }
.cookie-actions   { display: flex; gap: .5rem; flex-shrink: 0; }

/* ── Empty states ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  border: 2px dashed var(--line);
  border-radius: var(--radius-card);
}

/* ── Prose (about full, privacy) ─────────────────────────────────────────────── */
.prose h2 { margin: 2rem 0 .75rem; }
.prose h3 { margin: 1.5rem 0 .5rem; }
.prose a  { color: var(--accent-dark); text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero-grid         { grid-template-columns: 1fr; }
  .hero-image        { order: -1; }
  .hero-image img    { aspect-ratio: 16/9; }
  .card-grid         { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid      { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quotes-grid       { grid-template-columns: 1fr; }
  .timeline-grid     { grid-template-columns: 1fr; }
  .about-layout      { grid-template-columns: 1fr; }
  .contact-layout    { grid-template-columns: 1fr; }
  .footer-inner      { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-wrap { flex-wrap: nowrap; row-gap: 0; }
  .site-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 400;
    background: var(--surface);
    padding: 1.25rem 1.15rem 2rem;
    overflow-y: auto;
    min-height: 100vh;
  }
  .site-nav.is-open { display: block; }
  .site-nav.is-open ul { display: flex !important; }
  .site-nav.is-open .nav-item { display: block !important; }
  .site-nav.is-open .nav-link { display: block !important; }
  .mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: .8rem;
  }
  .mobile-nav-brand {
    font-family: "Josefin Sans", sans-serif;
    font-size: 1.15rem;
    text-decoration: none;
  }
  .mobile-nav-close {
    background: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
  }
  .site-nav ul {
    flex-direction: column;
    gap: .25rem;
    overflow: visible;
    padding: 0;
  }
  .nav-link {
    display: block;
    padding: .9rem .25rem;
    font-size: 1.05rem;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  body.nav-open { overflow: hidden; }

  /* Show mobile booking bar */
  .mobile-booking-bar { display: flex; }
  /* Pad content so bar doesn't overlap */
  body.has-mobile-booking-bar main,
  body.has-mobile-booking-bar footer { padding-bottom: 80px; }

  .card-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid--full { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cookie-banner { flex-direction: column; align-items: flex-start; bottom: .5rem; left: .5rem; right: .5rem; }
  .mobile-booking-bar.is-offset-for-cookie { bottom: 132px; }
  .lightbox-prev { left: .25rem; font-size: 2rem; }
  .lightbox-next { right: .25rem; font-size: 2rem; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
