/* ============================================================
   Ahmad Al Shami — Barber, Beirut
   Design tokens from the Claude Design handoff (dark + light).
   ============================================================ */

:root {
  /* Surfaces */
  --surface-100: #1c1712;   /* page background */
  --surface-200: #29211a;   /* raised panels: cards, header, fields */
  --surface-300: #0b0908;   /* signature deep band — near-black leather */

  /* Ink */
  --ink: #f4ede2;
  --ink-secondary: #b7a992;
  --ink-on-300: #f4ede2;

  /* Lines */
  --border: #3c3226;
  --border-strong: #80684c;

  /* Accents */
  --brass: #cf9d4e;
  --brass-hover: #e3b871;
  --walnut: #b67f44;
  --on-accent: #241705;
  --stone: #a88b70;
  --on-stone: #241705;

  /* State */
  --success: #7fb583;
  --danger: #e08a63;

  /* Elevation */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.55);

  /* Type */
  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-sans: "Archivo", system-ui, sans-serif;

  /* Radius */
  --radius-sm: 2px;
  --radius-md: 6px;
  --radius-lg: 14px;
  --radius-full: 999px;

  /* Rhythm */
  --maxw: 1120px;
  --gutter: 24px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

:root[data-theme="light"] {
  --surface-100: #f6f0e6;
  --surface-200: #ece1cf;
  --surface-300: #0b0908;   /* kept near-black leather, on purpose */
  --ink: #221a12;
  --ink-secondary: #5c4e3d;
  --ink-on-300: #f4ede2;
  --border: #d8c9ae;
  --border-strong: #987c58;
  --brass: #805d26;
  --brass-hover: #6b4a29;
  --walnut: #6b4a29;
  --on-accent: #fbf3e4;
  --shadow-sm: 0 2px 6px rgba(36, 23, 5, 0.14);
  --shadow-md: 0 12px 28px rgba(36, 23, 5, 0.20);
  --success: #336339;
  --danger: #a8451f;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface-100);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* contain the off-canvas mobile nav without breaking sticky header */
  transition: background 300ms var(--ease), color 300ms var(--ease);
}

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

a {
  color: var(--brass);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
a:hover { color: var(--brass-hover); }

::selection { background: var(--brass); color: var(--on-accent); }

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

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.visually-hidden {
  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%);
  z-index: 100; background: var(--brass); color: var(--on-accent);
  padding: 10px 18px; border-radius: var(--radius-md); font-weight: 600;
  transition: top 200ms var(--ease);
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

/* ---------- Type scale ---------- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; margin: 0; }
.display-lg { font-size: clamp(56px, 8vw, 88px); line-height: 0.95; max-width: 16ch; }
.display-md { font-size: clamp(40px, 6vw, 56px); line-height: 1; }
.heading { font-size: 22px; line-height: 1.36; font-weight: 700; margin: 0 0 8px; }
.heading-sm { font-size: 18px; line-height: 1.44; font-weight: 600; margin: 0; }
.body { font-size: 16px; line-height: 1.625; margin: 0; }
.body-lg { font-size: 18px; line-height: 1.56; margin: 0; }
.fine-print { font-size: 14px; line-height: 1.43; color: var(--ink-secondary); }
.eyebrow {
  font-size: 12px; line-height: 1.33; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass);
  margin: 0 0 8px;
}
.muted { color: var(--ink-secondary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 150ms var(--ease), box-shadow 200ms var(--ease),
              background 200ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}
.btn-primary { background: var(--brass); color: var(--on-accent); }
.btn-primary:hover { color: var(--on-accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-secondary { background: var(--walnut); color: var(--on-accent); }
.btn-secondary:hover { color: var(--on-accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-ghost {
  border-color: var(--border-strong); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-link { padding: 12px 8px; color: var(--brass); }
.btn-link span { transition: transform 200ms var(--ease); }
.btn-link:hover span { transform: translateX(4px); }
.btn:active { transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface-200) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 250ms var(--ease), background 300ms var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-block: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { display: inline-flex; border-radius: var(--radius-md); overflow: hidden; }
.brand-mark svg text { fill: var(--brass); }
.brand-name {
  font-family: var(--font-display); font-size: 30px; line-height: 30px;
  letter-spacing: 0.01em;
}
.nav { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; position: relative; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--brass); transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease);
}
.nav-link:hover { color: var(--brass); }
.nav-link:hover::after { transform: scaleX(1); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 1px solid var(--border-strong); background: transparent; color: var(--ink);
  cursor: pointer; transition: color 150ms var(--ease), border-color 150ms var(--ease), background 150ms var(--ease);
}
.theme-toggle:hover { color: var(--brass); border-color: var(--brass); }
.theme-toggle:focus-visible { color: var(--brass); border-color: var(--brass); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Hamburger */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center; background: transparent;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); cursor: pointer;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  transition: transform 250ms var(--ease), opacity 200ms var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { background: var(--surface-300); color: var(--ink-on-300); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 48px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: clamp(56px, 10vw, 96px); }
.lede { max-width: 44ch; color: var(--ink-on-300); }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-media { position: relative; align-self: stretch; min-height: 420px; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
@media (max-width: 719px) {
  .hero-media { min-height: 300px; }
  .hero-media img { position: static; height: auto; }
}

/* status pill */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.status--open { color: var(--success); }
.status--closed { color: var(--danger); }
.status-dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: currentColor; position: relative; }
.status--open .status-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: var(--radius-full);
  border: 1px solid currentColor; opacity: 0.6; animation: ping 2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 80%,100% { transform: scale(2.4); opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(48px, 8vw, 64px); }
.services .card-grid { margin-top: 32px; }

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px;
}

.card {
  background: var(--surface-200); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease);
}
.services .card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--border-strong); }
.card--popular { border-color: color-mix(in srgb, var(--brass) 45%, var(--border)); }
.tag-text { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-secondary); }
.price { margin: 12px 0 0; font-size: 16px; font-weight: 700; color: var(--brass); text-align: right; }

.badge {
  display: inline-flex; align-items: center; margin-bottom: 8px;
  padding: 4px 12px; border-radius: var(--radius-full);
  background: var(--brass); color: var(--on-accent);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

.fine-print { margin-top: 24px; }

/* Hours / find us */
.hours { padding-top: 0; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px; }
.panel { display: flex; flex-direction: column; gap: 16px; }
.hours-list { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hours-row { display: flex; justify-content: space-between; gap: 16px; }
.hours-row dt, .hours-row dd { margin: 0; }
.divider { height: 1px; background: var(--border); }
.contact-lines { display: flex; flex-direction: column; gap: 4px; }
.media-frame {
  position: relative; min-height: 240px; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.media-frame img,
.media-frame iframe { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; border: 0; }
.btn-directions { align-self: flex-start; }
@media (max-width: 719px) {
  .media-frame { min-height: 300px; }
  .media-frame img { position: static; height: auto; }
  .media-frame iframe { position: static; height: 300px; }
}

/* Contact */
.contact { background: var(--surface-300); color: var(--ink-on-300); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 48px; }
.contact-copy { display: flex; flex-direction: column; gap: 16px; }
.contact-copy .body-lg { max-width: 42ch; color: var(--ink-on-300); }
.contact-details { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.detail { display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 14px; color: var(--ink-secondary); }
.contact-copy .detail span:not(.detail-label) { color: var(--ink-on-300); }

/* Form */
.booking-form { display: flex; flex-direction: column; gap: 16px; padding: 24px; box-shadow: var(--shadow-md); }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: 16px; line-height: 1.625; font-weight: 400; letter-spacing: 0;
  padding: 12px; border-radius: var(--radius-md); border: 1px solid var(--border-strong);
  background: var(--surface-100); color: var(--ink);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brass);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 28%, transparent);
}
.booking-form .btn-secondary { width: 100%; }
.form-note { margin: 0; font-size: 14px; color: var(--ink-secondary); transition: color 200ms var(--ease); }
.form-note.is-success { color: var(--success); }
.form-note.is-error { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-300); border-top: 1px solid var(--border); color: var(--ink-on-300); }
.footer-inner {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 24px; font-size: 14px; color: var(--ink-secondary);
}
.footer-credit {
  padding-bottom: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px; text-align: center;
}
.footer-credit-line {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.04em; color: var(--ink-secondary);
}
.footer-credit .credit-mark { fill: none; stroke: var(--brass); stroke-width: 1.8; stroke-linecap: round; opacity: 0.9; }
.footer-credit a {
  color: var(--brass); font-weight: 700; letter-spacing: 0.02em; position: relative;
}
.footer-credit a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--brass); transform: scaleX(0); transform-origin: left;
  transition: transform 220ms var(--ease);
}
.footer-credit a:hover::after { transform: scaleX(1); }
.hp-field { display: none !important; }

/* ---------- Scroll reveal ---------- */
/* Hidden only once JS has armed it (html.reveal-active); without JS all content shows. */
.reveal-active .reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status--open .status-dot::after { animation: none; }
  .btn:hover, .card:hover, .theme-toggle:hover { transform: none; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  /* Drop the blur here: backdrop-filter would make the header the containing
     block for the fixed nav, trapping the panel inside the header's box. */
  .site-header {
    background: var(--surface-200);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .nav {
    position: fixed; inset: 0 0 0 auto; height: 100dvh; width: min(320px, 82vw);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 12px; padding: 88px 24px 24px;
    background: var(--surface-200); border-left: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateX(100%); transition: transform 300ms var(--ease);
    z-index: 40; visibility: hidden;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }
  .nav-link { font-size: 18px; padding: 8px 0; }
  .nav-link::after { display: none; }
  .nav .btn-ghost { justify-content: flex-start; }
  .theme-toggle { align-self: flex-start; }
  body.nav-open { overflow: hidden; }
  .nav-scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease); z-index: 30;
  }
  .nav-scrim.is-open { opacity: 1; visibility: visible; }
}
