/* =========================================================
   Hair by Melissa Walker — Canton, TX
   Warm editorial direction · light + dark mode
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Fonts */
  --font-display: 'Boska', Georgia, 'Times New Roman', serif;
  --font-body: 'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale (clamp, 12px floor) */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
  --text-base: clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
  --text-md: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  --text-lg: clamp(1.35rem, 1.2rem + 0.7vw, 1.6rem);
  --text-xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  --text-2xl: clamp(2.4rem, 1.9rem + 2.6vw, 3.8rem);
  --text-hero: clamp(2.9rem, 2rem + 4.4vw, 5rem);

  /* Spacing (4px system) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --space-32: 128px;

  --section-pad: clamp(var(--space-16), 8vw, var(--space-32));
  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Light palette — warm cream + terracotta/rose-gold */
  --bg: #fbf6ef;
  --surface: #ffffff;
  --surface-alt: #f3ebe0;
  --surface-3: #ece1d3;
  --ink: #2a221c;
  --ink-soft: #5c5048;
  --ink-mute: #8a7d72;
  --line: #e3d7c8;
  --accent: #a8643f;        /* terracotta / rose-gold */
  --accent-deep: #8a4f31;
  --accent-soft: #f0ddcf;
  --on-accent: #fdf7f0;
  --shadow-sm: 0 1px 2px rgba(58,40,28,.06), 0 2px 8px rgba(58,40,28,.05);
  --shadow-md: 0 10px 30px rgba(58,40,28,.10);
  --shadow-lg: 0 24px 60px rgba(58,40,28,.16);
}

[data-theme="dark"] {
  --bg: #1a1512;
  --surface: #221b16;
  --surface-alt: #201914;
  --surface-3: #2c231c;
  --ink: #f2e9df;
  --ink-soft: #c9bcae;
  --ink-mute: #9a8c7d;
  --line: #382d24;
  --accent: #d99368;
  --accent-deep: #c47b50;
  --accent-soft: #36281f;
  --on-accent: #1a1512;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent); padding: 10px 18px;
  border-radius: 0 0 10px 10px; z-index: 200; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---------- Layout helpers ---------- */
.section { padding-block: var(--section-pad); }
.section > * { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(var(--space-5), 5vw, var(--space-16)); }
.section--alt { background: var(--surface-alt); }

.eyebrow {
  font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .22em;
  font-weight: 600; color: var(--accent); margin-bottom: var(--space-4);
}
.section__head { text-align: center; margin-bottom: var(--space-12); }
.section__head h2 { font-size: var(--text-xl); }
.section__lede {
  max-width: 60ch; margin-inline: auto; margin-top: var(--space-4);
  color: var(--ink-soft); font-size: var(--text-md);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 13px 24px; border-radius: var(--radius-pill); font-weight: 600;
  font-size: var(--text-sm); letter-spacing: .01em; line-height: 1;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--sm { padding: 9px 16px; font-size: var(--text-xs); }
.btn--lg { padding: 16px 30px; font-size: var(--text-base); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: var(--space-3) clamp(var(--space-4), 5vw, var(--space-12));
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
}
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--accent); }
.brand__mark { flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.brand__tag { font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }

.nav { display: flex; gap: var(--space-6); }
.nav a {
  font-size: var(--text-sm); font-weight: 500; color: var(--ink-soft); position: relative; padding: 4px 0;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--accent); transition: width .25s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: var(--space-3); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-soft); border: 1px solid var(--line); transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
[data-theme-toggle]::before { content: "☾"; font-size: 18px; line-height: 1; }
[data-theme="dark"] [data-theme-toggle]::before { content: "☀"; }
.menu-toggle { display: none; }

/* ---------- Mobile nav ---------- */
.mobile-nav {
  display: none; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4) clamp(var(--space-4), 5vw, var(--space-12)) var(--space-6);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.mobile-nav.is-open { display: flex; animation: dropIn .3s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px);} to {opacity:1; transform:none;} }
.mobile-nav a:not(.btn) { padding: 10px 4px; font-weight: 500; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: var(--space-3); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(var(--space-8), 5vw, var(--space-20));
  align-items: center; max-width: var(--maxw); margin-inline: auto;
  padding: clamp(var(--space-12), 7vw, var(--space-24)) clamp(var(--space-5), 5vw, var(--space-16));
}
.hero__content { order: 1; }
.hero__media { order: 2; }
.hero__media img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero h1 { font-size: var(--text-hero); margin-bottom: var(--space-5); }
.hero__sub { font-size: var(--text-md); color: var(--ink-soft); max-width: 48ch; margin-bottom: var(--space-8); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-10); }
.hero__trust { display: flex; gap: clamp(var(--space-5), 4vw, var(--space-10)); flex-wrap: wrap; }
.hero__trust li { display: flex; flex-direction: column; }
.hero__trust strong { font-family: var(--font-display); font-size: var(--text-lg); color: var(--accent); font-weight: 600; }
.hero__trust span { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: center; }
.about__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.about__text h2 { font-size: var(--text-xl); margin-bottom: var(--space-5); }
.about__text p { color: var(--ink-soft); margin-bottom: var(--space-4); max-width: 56ch; }
.about__text em { font-style: italic; color: var(--accent-deep); }
.about__sig { margin-top: var(--space-6); }
.about__signame { font-family: var(--font-display); font-size: var(--text-lg); color: var(--accent); font-style: italic; }

/* ---------- Services ---------- */
.svc-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6);
  background: var(--accent-soft); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--space-6) var(--space-8);
  margin-bottom: var(--space-10);
}
.svc-banner > div { display: flex; flex-direction: column; }
.svc-banner strong { font-size: var(--text-base); color: var(--ink); }
.svc-banner span { font-size: var(--text-sm); color: var(--ink-soft); }
.svc-banner .btn { margin-left: auto; }

.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.svc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-8); box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.svc-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-4); }
.svc-card__sub { margin-top: var(--space-6); font-size: var(--text-md); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.svc-card ul { display: flex; flex-direction: column; gap: var(--space-5); }
.svc-card li {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding-bottom: var(--space-5); border-bottom: 1px dashed var(--line);
}
.svc-card li:last-child { border-bottom: none; padding-bottom: 0; }
.svc-item__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.svc-item__name { font-weight: 600; color: var(--ink); font-size: var(--text-base); }
.svc-item__meta { text-align: right; white-space: nowrap; flex-shrink: 0; }
.svc-price { color: var(--accent-deep); font-weight: 700; font-size: var(--text-base); }
.svc-dur { display: block; font-size: var(--text-xs); color: var(--ink-mute); letter-spacing: .04em; }
.svc-item__desc { font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.55; }
.svc-item__desc em { color: var(--accent-deep); font-style: normal; font-weight: 600; }
.svc-card__cta { margin-top: var(--space-6); color: var(--accent); font-weight: 600; font-size: var(--text-sm); transition: gap .2s, color .2s; }
.svc-card__cta:hover { color: var(--accent-deep); }
.svc-note { text-align: center; max-width: 70ch; margin: var(--space-10) auto 0; font-size: var(--text-sm); color: var(--ink-mute); }

/* ---------- Portfolio gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px; gap: var(--space-4);
}
.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius); margin: 0; box-shadow: var(--shadow-sm); }
.gallery__item--tall { grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--space-8) var(--space-4) var(--space-4);
  font-size: var(--text-sm); font-weight: 600; color: #fff; letter-spacing: .01em;
  background: linear-gradient(to top, rgba(20,12,6,.78), transparent);
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s;
}
.gallery__item:hover figcaption { opacity: 1; transform: none; }
.portfolio__cta { text-align: center; margin-top: var(--space-10); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.portfolio__cta p { color: var(--ink-soft); font-size: var(--text-sm); }

/* ---------- Reviews ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.review {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-8); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: var(--space-4);
}
.stars { color: var(--accent); letter-spacing: .12em; font-size: var(--text-md); }
.review p { font-family: var(--font-display); font-size: var(--text-md); font-style: italic; color: var(--ink); line-height: 1.5; flex: 1; }
.review cite { font-style: normal; font-size: var(--text-sm); color: var(--ink-mute); font-weight: 600; }
.reviews__note { text-align: center; margin-top: var(--space-10); color: var(--ink-soft); font-size: var(--text-sm); }
.reviews__note a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Booking ---------- */
.booking__inner {
  position: relative; max-width: var(--maxw); margin-inline: auto;
  border-radius: var(--radius-lg); overflow: hidden; min-height: 460px;
  display: flex; align-items: center; box-shadow: var(--shadow-md);
}
.booking__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.booking__inner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(20,12,6,.82) 0%, rgba(20,12,6,.55) 55%, rgba(20,12,6,.2) 100%); }
.booking__card { position: relative; z-index: 1; color: #fff; padding: clamp(var(--space-8), 5vw, var(--space-16)); max-width: 560px; }
.booking__card .eyebrow { color: var(--accent-soft); }
.booking__card h2 { font-size: var(--text-xl); color: #fff; margin-bottom: var(--space-4); }
.booking__card p { color: rgba(255,255,255,.85); margin-bottom: var(--space-6); max-width: 46ch; }
.booking__tip {
  font-size: var(--text-sm); margin-top: var(--space-4); margin-bottom: 0;
  color: rgba(255,255,255,.92); display: inline-flex; align-items: center; gap: var(--space-2);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  padding: 8px 14px; border-radius: var(--radius-pill);
}
.booking__tip strong { color: var(--accent-soft); }
.booking__fine { font-size: var(--text-sm); margin-top: var(--space-5); margin-bottom: 0; }
.booking__fine a { color: var(--accent-soft); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-10), 6vw, var(--space-20)); align-items: start; }
.contact__intro h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.contact__intro > p { color: var(--ink-soft); margin-bottom: var(--space-8); max-width: 44ch; }
.contact__list { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-8); }
.contact__list li { display: flex; align-items: center; gap: var(--space-4); color: var(--ink-soft); font-size: var(--text-sm); }
.contact__list svg { color: var(--accent); flex-shrink: 0; }
.contact__list a:hover { color: var(--accent); }
.contact__social { display: flex; gap: var(--space-3); }
.contact__social a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-soft); transition: color .2s, border-color .2s, transform .2s;
}
.contact__social a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.contact__form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10)); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field label { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-size: var(--text-sm); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { font-size: var(--text-sm); font-weight: 500; min-height: 1.2em; margin: 0; }
.form-status.is-success { color: #2f7d4f; }
.form-status.is-error { color: #b3402f; }
[data-theme="dark"] .form-status.is-success { color: #6fcf97; }
[data-theme="dark"] .form-status.is-error { color: #e88573; }

/* ---------- Footer ---------- */
.footer { background: var(--surface-3); border-top: 1px solid var(--line); padding-top: var(--space-16); }
.footer__inner {
  max-width: var(--maxw); margin-inline: auto; padding: 0 clamp(var(--space-5), 5vw, var(--space-16)) var(--space-12);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-10);
}
.footer__brand .brand__name { font-size: var(--text-md); display: block; margin-bottom: var(--space-3); }
.footer__brand p { color: var(--ink-soft); font-size: var(--text-sm); line-height: 1.7; }
.footer__links, .footer__contact { display: flex; flex-direction: column; gap: var(--space-3); font-size: var(--text-sm); color: var(--ink-soft); }
.footer__links a:hover, .footer__contact a:hover { color: var(--accent); }
.footer__bottom {
  border-top: 1px solid var(--line); padding: var(--space-6) clamp(var(--space-5), 5vw, var(--space-16));
  max-width: var(--maxw); margin-inline: auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3);
  font-size: var(--text-xs); color: var(--ink-mute);
}

/* ---------- Floating Book Now (FAB) ---------- */
.fab {
  position: fixed; right: clamp(16px, 4vw, 28px); bottom: clamp(16px, 4vw, 28px); z-index: 90;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: var(--text-sm);
  padding: 14px 22px; border-radius: var(--radius-pill); box-shadow: var(--shadow-lg);
  display: none; transition: transform .25s, background .25s;
}
.fab:hover { background: var(--accent-deep); transform: translateY(-3px); }
.fab.is-visible { display: inline-flex; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .svc-grid, .review-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .header__actions .btn--sm { display: none; }
  .menu-toggle { display: grid; }
  .hero { grid-template-columns: 1fr; }
  .hero__content { order: 2; }
  .hero__media { order: 1; }
  .hero__media img { aspect-ratio: 16/13; }
  .about__grid { grid-template-columns: 1fr; }
  .about__media img { aspect-ratio: 4/3; }
  .svc-grid, .review-grid { grid-template-columns: 1fr; }
  .svc-banner { flex-direction: column; align-items: flex-start; }
  .svc-banner .btn { margin-left: 0; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .fab.is-visible { display: inline-flex; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .gallery__item--tall { grid-row: span 1; }
  .field-row { grid-template-columns: 1fr; }
  .brand__tag { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
