/*
 * heritage.css — shared editorial design system for The Loxley public pages
 * Loaded by: index.html, about.html, solutions.html, how-it-works.html,
 *            legal.html, login.html, signup.html, booking.html, 404.html
 */

/* ── Google Fonts import ── */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design tokens ── */
:root {
  --ink:        #09090b;
  --ink-2:      #27272a;
  --paper:      #fafafa;
  --paper-2:    #f4f4f5;
  --paper-3:    #ffffff;
  --accent:     #6366f1;
  --line:       #e4e4e7;
  --muted:      #52525b;
  --muted-2:    #71717a;

  --font-display: 'Geist', 'Inter', -apple-system, sans-serif;
  --font-body:    'Geist', 'Inter', -apple-system, sans-serif;
  --font-mono:    'Geist', 'Inter', -apple-system, sans-serif;
}

/* ── Dark Mode ── */
html.dark {
  --ink:        #ffffff;
  --ink-2:      #e4e4e7;
  --paper:      #09090b;
  --paper-2:    #18181b;
  --paper-3:    #27272a;
  --accent:     #6366f1;
  --line:       #27272a;
  --muted:      #a1a1aa;
  --muted-2:    #71717a;
}

/* ── Dark Mode: Inverted-section locks ──
   Sections that are "always dark" (modern black background) must stay
   dark in both light and dark mode to preserve their contrast. */
html.dark #how-it-works,
html.dark footer,
html.dark #final-cta,
html.dark #marquee-bar,
html.dark .salon-grid-section,
html.dark .feature-primary,
html.dark .steps-band,
html.dark .manifesto-band,
html.dark .h-footer {
  background: #09090b; color: #ffffff;
}
html.dark .price-card-dark {
  background: #18181b !important; color: #ffffff !important;
  border-color: #27272a !important;
}


/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; padding: 0; scroll-behavior: smooth; }
body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--ink); color: var(--paper); }

/* Film grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.065;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
html.dark body::before { mix-blend-mode: soft-light; opacity: 0.04; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* ── Typography ── */
.h-display, .h-display * {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.h-display em { font-style: normal; font-weight: 600; }
.h-mono { font-family: var(--font-mono); }

/* ── Chapter mark ── */
.h-chapter {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.h-chapter-no { color: var(--accent); }
.h-chapter-rule { width: 28px; height: 1px; background: var(--line); display: inline-block; }

/* ── Nav ── */
.h-nav {
  position: sticky; top: 0; z-index: 50;
  height: 64px; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .35s, border-color .35s;
  border-bottom: 0.5px solid transparent;
}
.h-nav.scrolled {
  background: rgba(250,250,250,0.84);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
html.dark .h-nav.scrolled {
  background: rgba(12,26,20,0.88);
}
.h-nav-left { display: flex; align-items: center; gap: 40px; }
.h-nav-logo {
  font-weight: 600; font-size: 18px; letter-spacing: -0.025em;
  color: var(--ink); text-decoration: none;
}
.h-nav-links { display: flex; gap: 28px; }
.h-nav-link {
  font-size: 13.5px; color: var(--ink-2); font-weight: 500;
  padding: 6px 2px; transition: color 0.25s;
  background: none; border: 0; white-space: nowrap; text-decoration: none;
}
.h-nav-link:hover { color: var(--ink); }
.h-nav-right { display: flex; gap: 10px; align-items: center; }
.h-nav-signin {
  background: none; border: 0; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); padding: 8px 12px; border-radius: 8px;
  text-decoration: none; transition: background .2s;
}
.h-nav-signin:hover { background: var(--paper-2); }
.h-nav-cta {
  background: var(--ink); color: var(--paper);
  border: 0; font-size: 13.5px; font-weight: 500;
  padding: 9px 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.h-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,0.18); }

/* ── Buttons ── */
.h-btn {
  border: 0; border-radius: 999px;
  font-family: var(--font-body); font-size: 14px; letter-spacing: 0.03em;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .2s, box-shadow .25s;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.h-btn-primary { background: var(--ink); color: var(--paper); padding: 15px 28px; }
.h-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,0.22); }
.h-btn-primary.sm { padding: 12px 22px; font-size: 13px; }
.h-btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); padding: 14px 28px;
}
.h-btn-ghost:hover { background: rgba(0,0,0,0.04); border-color: var(--ink); }
.h-btn-ghost.sm { padding: 11px 22px; font-size: 13px; }

/* ── Reveal animations ── */
.h-reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 1.05s cubic-bezier(.2,.7,.2,1), transform 1.05s cubic-bezier(.2,.7,.2,1);
}
.h-reveal.in { opacity: 1; transform: none; }
.h-split { display: block; overflow: hidden; }
.h-split > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s cubic-bezier(.2,.7,.2,1); }
.h-split.in > span { transform: translateY(0); }
.h-split:nth-child(2).in > span { transition-delay: 0.08s; }

/* ── Photo wrapper ── */
.h-photo { position: relative; overflow: hidden; background: var(--paper-2); }
.h-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.02) saturate(0.9); }
.h-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.04), rgba(0,0,0,0.2));
  pointer-events: none;
}

/* ── Page transition curtain ── */
.h-curtain {
  position: fixed; inset: 0;
  background: var(--ink); z-index: 9000;
  transform: translateY(100%); pointer-events: none;
}
.h-curtain.up { transform: translateY(0); transition: transform .45s cubic-bezier(.7,0,.2,1); }
.h-curtain.out { transform: translateY(-100%); transition: transform .55s cubic-bezier(.2,1,.3,1); }

/* ── Footer ── */
.h-footer {
  background: var(--ink); color: var(--paper);
  padding: 88px 56px 36px;
}
.h-footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px; max-width: 1400px; margin: 0 auto 64px;
}
.h-footer-tagline {
  font-family: var(--font-display); font-style: normal;
  font-size: 22px; line-height: 1.35;
  color: rgba(250,250,250,0.7); max-width: 360px; margin: 0;
}
.h-footer-col-title {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(161,161,170,0.4); margin-bottom: 22px;
}
.h-footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.h-footer-link {
  background: transparent; border: 0; padding: 0;
  color: rgba(250,250,250,0.75); font: inherit;
  font-family: var(--font-body); font-size: 14px;
  transition: color .2s; text-align: left; text-decoration: none; cursor: pointer;
}
.h-footer-link:hover { color: var(--paper); }
.h-footer-bottom {
  border-top: 0.5px solid rgba(250,250,250,0.14);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(161,161,170,0.4);
  max-width: 1400px; margin: 0 auto;
}

/* ── Shared arrow SVG helper ── */
.h-arrow { display: inline-block; flex-shrink: 0; vertical-align: middle; }

/* ── Page hero padding (below sticky nav) ── */
.h-page-hero { padding-top: 80px; }
.h-section { padding: 120px 56px; }
.h-section-sm { padding: 80px 56px; }

/* ── Theme Toggle — Sun / Moon Pill ── */
.h-theme-toggle {
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent;
  padding: 0; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center;
}
.h-toggle-track {
  position: relative;
  width: 48px; height: 26px;
  border-radius: 999px;
  border: 0.5px solid var(--line);
  background: var(--paper-2);
  transition: background .35s, border-color .35s;
}
html.dark .h-toggle-track {
  background: rgba(240,233,212,0.08);
  border-color: rgba(240,233,212,0.2);
}
.h-toggle-thumb {
  position: absolute;
  left: 2px; top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform .4s cubic-bezier(.4,0,.2,1), background .35s;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
  z-index: 2;
}
html.dark .h-toggle-thumb {
  transform: translateX(22px);
}
.h-icon-sun, .h-icon-moon {
  font-size: 11px; line-height: 1;
  position: absolute;
  transition: opacity .25s;
  color: var(--paper);
  pointer-events: none;
  user-select: none;
}
.h-icon-sun  { opacity: 1; }
html.dark .h-icon-sun  { opacity: 0; }
.h-icon-moon { opacity: 0; }
html.dark .h-icon-moon { opacity: 1; }
.h-theme-toggle:hover .h-toggle-track { border-color: var(--accent); }
.h-theme-toggle:focus-visible .h-toggle-track {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .h-nav { padding: 0 24px; }
  .h-nav-links { display: none; }
  .h-footer { padding: 60px 24px 28px; }
  .h-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .h-section { padding: 80px 24px; }
  .h-section-sm { padding: 56px 24px; }
}

/* ── Studio Themes ──
   Each salon owner picks a theme from Settings → Booking Page.
   The booking.html page applies the matching class to <body>.
   All colors flow through CSS custom properties so existing
   Tailwind / inline styles keep working.
───────────────────────────────────────────────────────────────── */

/* Greenwich — editorial heritage (default, matches existing) */
body.studio-greenwich {
  --studio-paper:  #f4ecd8;
  --studio-paper2: #ebe2c8;
  --studio-paper3: #fbf6e6;
  --studio-ink:    #0e2a1d;
  --studio-accent: #b5854a;
  --studio-line:   rgba(0,0,0,0.18);
  --studio-muted:  rgba(0,0,0,0.6);
  --studio-font-display: 'Fraunces', serif;
  --studio-font-body:    'Space Grotesk', sans-serif;
}

/* Maison Pommery — Parisian patisserie */
body.studio-maison {
  --studio-paper:  #f5ebe2;
  --studio-paper2: #efe1d4;
  --studio-paper3: #fff7ee;
  --studio-ink:    #3a1f1f;
  --studio-accent: #7d2c3a;
  --studio-line:   rgba(58,31,31,0.18);
  --studio-muted:  rgba(58,31,31,0.6);
  --studio-font-display: 'Italiana', serif;
  --studio-font-body:    'Cormorant Garamond', serif;
}

/* Ivy & Iron — East London brutalist (dark) */
body.studio-ivy {
  --studio-paper:  #0f0f0f;
  --studio-paper2: #161616;
  --studio-paper3: #1d1d1d;
  --studio-ink:    #f3f3ee;
  --studio-accent: #d6f24a;
  --studio-line:   rgba(243,243,238,0.14);
  --studio-muted:  rgba(243,243,238,0.55);
  --studio-font-display: 'Anton', sans-serif;
  --studio-font-body:    'Archivo', sans-serif;
}

/* Goldsmith & Co. — Mayfair luxury */
body.studio-goldsmith {
  --studio-paper:  #fbfaf6;
  --studio-paper2: #f5f2e9;
  --studio-paper3: #ffffff;
  --studio-ink:    #0a0a0a;
  --studio-accent: #a07d3b;
  --studio-line:   rgba(10,10,10,0.16);
  --studio-muted:  rgba(10,10,10,0.55);
  --studio-font-display: 'Cormorant Garamond', serif;
  --studio-font-body:    'Cormorant Garamond', serif;
}

