/* =========================================================
   BLISS NAIL SPA — Base styles (shared by every page)
   =========================================================
   Reset, typography defaults, layout helpers, buttons, the
   navbar + logo lockup, and the footer shell.

   Page-specific sections live in coming-soon.css / site.css.
   Colors, fonts and spacing come from tokens.css (load first).

   Contents
     1. Reset & defaults
     2. Light / dark context helpers
     3. Layout helpers
     4. Buttons
     5. Navbar & logo
     6. Footer shell
     7. Reduced motion
   ========================================================= */


/* ----- 1. Reset & defaults ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

/* Italic gold word inside any heading: <h1>Luxury <em>Nails</em></h1> */
h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 400;
  color: var(--heading-accent, var(--color-gold-dark));
}

p       { margin: 0; }
a       { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease); }
ul      { margin: 0; padding: 0; list-style: none; }
button  { font-family: inherit; cursor: pointer; border: 0; background: none; }
address { font-style: normal; }
strong  { font-weight: 600; }

/* Visually hidden, still read by screen readers */
/* Keeps a short term such as "Gel-X" on one line: <span class="nowrap">Gel-X</span> */
.nowrap { white-space: nowrap; }

/* The hidden attribute always wins; menu-embed.js uses it on links with nothing to point at */
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* "Skip to main content" — first thing keyboard users reach (WCAG 2.4.1).
   Off-screen until focused. */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: 100;
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-ink);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); }

/* Keyboard focus ring (WCAG 2.4.7): one consistent style, readable on
   white (deep gold, 5:1) and on black (bright gold, 12:1). */
:focus-visible {
  outline: 3px solid var(--color-gold-dark);
  outline-offset: 3px;
}
.theme-dark :focus-visible { outline-color: var(--color-gold-light); }

/* Anchored sections (#services, #book, skip link…) scroll into view
   below the sticky navbar instead of underneath it. */
[id] { scroll-margin-top: calc(var(--nav-height) + 1rem); }


/* ----- 2. Light / dark context helpers -------------------
   Add .theme-dark to any black block (hero, footer, dark
   section) and the text, headings, eyebrows and buttons
   inside it switch to their on-dark colors automatically.
   .theme-light does the reverse for a white card inside a
   dark block (e.g. the sign-up form on the hero). */
.theme-dark {
  --heading-accent: var(--color-gold-light);
  --eyebrow-color:  var(--color-gold-light);
  color: var(--color-on-dark);
}
.theme-dark h1, .theme-dark h2, .theme-dark h3 { color: #fff; }

.theme-light {
  --heading-accent: var(--color-gold-dark);
  --eyebrow-color:  var(--color-gold-dark);
  color: var(--color-ink);
}
.theme-light h1, .theme-light h2, .theme-light h3 { color: var(--color-ink); }


/* ----- 3. Layout helpers --------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.section       { padding: var(--sp-10) 0; }
.section--alt  { background: var(--color-surface-alt); }
.section--dark { background: var(--color-dark); }

.section__header { max-width: 680px; margin-bottom: var(--sp-8); }
.section__header--center { margin-inline: auto; text-align: center; }
.section__header--between {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

.section__title { font-size: clamp(2rem, 4vw, var(--fs-2xl)); margin-bottom: var(--sp-4); }
.section__lead  { font-size: var(--fs-md); line-height: 1.7; color: var(--color-ink-soft); }
.theme-dark .section__lead { color: var(--color-on-dark); }

/* Small uppercase label above a heading */
.eyebrow {
  display: inline-block;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eyebrow-color, var(--color-gold-dark));
}

/* Short gold rule used under titles */
.rule {
  display: block;
  width: 36px;
  height: 2px;
  background: var(--gradient-gold);
}


/* ----- 4. Buttons ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.85rem 1.6rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  transition: all var(--dur) var(--ease);
}
.btn--lg { padding: 1.05rem 2rem; }
.btn:active { transform: translateY(0); }

/* Black button — the default on white backgrounds */
.btn--primary {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Gold button — the main call-to-action on black backgrounds */
.btn--gold {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-ink);
}
.btn--gold:hover {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Outlined button — adapts to light or dark context */
.btn--ghost {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}
.btn--ghost:hover { background: var(--color-ink); color: #fff; }

.theme-dark .btn--ghost { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.theme-dark .btn--ghost:hover { background: #fff; border-color: #fff; color: var(--color-ink); }


/* ----- 4b. Announcement bars ------------------------------
   Optional bars above the navbar (home and coming-soon pages).
   Text and on/off switches: src/_data/banners.json. The navbar
   is sticky, so the bars scroll away and the navbar stays. */
.banner { font-size: var(--fs-sm); line-height: 1.5; }
.banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding-top: var(--sp-2);
  padding-bottom: var(--sp-2);
  text-align: center;
}
.banner__text { margin: 0; }
.banner a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.banner__icon {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 1.25rem; height: 1.25rem;
  border: 1.5px solid currentColor;
  border-radius: var(--r-full);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.banner__icon--star { border: 0; font-style: normal; font-size: 0.95rem; }
.banner--news    { background: var(--color-ink); color: #fff; }
.banner--special { background: var(--color-gold); color: var(--color-ink); }


/* ----- 5. Navbar & logo ---------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
  transition: box-shadow var(--dur) var(--ease);
}
.navbar.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06); } /* added by js/site.js */

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  height: var(--nav-height);
}

/* Logo lockup: round mark + "BLISS / NAIL SPA" text, like the badge */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--color-ink);
}
.logo__mark { width: 44px; height: 44px; flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.logo__tag {
  margin-top: 5px;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
}
.theme-dark .logo      { color: #fff; }
.theme-dark .logo__tag { color: var(--color-gold-light); }

/* Desktop links */
.nav__list { display: flex; gap: var(--sp-6); }
.nav__link {
  position: relative;
  padding: var(--sp-2) 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-ink-soft);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--color-gold);
  transition: width var(--dur) var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--color-ink); }       /* .is-active set by js/site.js */
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

/* Tap-to-call in the navbar (desktop only) */
.nav__phone {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--color-ink-soft);
}
.nav__phone:hover { color: var(--color-gold-dark); }
.nav__phone span  { margin-right: 4px; color: var(--color-gold-dark); }

/* Hamburger (mobile only) */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
}
.nav__toggle span {
  width: 24px; height: 2px;
  background: var(--color-ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown panel */
.nav__mobile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
}
.nav__mobile[hidden] { display: none; }
.nav__mobile-link {
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--color-line);
  font-size: var(--fs-md);
  color: var(--color-ink);
}
.nav__mobile-cta { margin-top: var(--sp-3); }

@media (max-width: 900px) {
  .nav__phone { display: none; }
}
@media (max-width: 768px) {
  .nav, .nav__cta, .nav__phone { display: none; }
  .nav__toggle { display: flex; }
}
@media (min-width: 769px) {
  .nav__toggle, .nav__mobile { display: none !important; }
}


/* ----- 6. Footer shell ----------------------------------- */
.footer {
  background: var(--color-dark);
  color: var(--color-on-dark-muted);
  font-size: var(--fs-sm);
}
.footer a:hover { color: var(--color-gold-light); }

.footer__bottom { padding: var(--sp-5) 0; border-top: 1px solid var(--color-line-on-dark); }
.footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* ----- 7. Prose (text pages such as privacy.html) -------- */
.prose { padding: var(--sp-9) 0 var(--sp-10); }
.prose__inner { max-width: 720px; }
.prose h1 { margin-bottom: var(--sp-2); font-size: clamp(2.25rem, 5vw, var(--fs-3xl)); }
.prose h2 { margin: var(--sp-7) 0 var(--sp-3); font-size: var(--fs-xl); }
.prose p, .prose li, .prose address { margin-bottom: var(--sp-4); line-height: 1.75; color: var(--color-ink-soft); }
.prose ul { padding-left: 1.25rem; list-style: disc; }
.prose li { margin-bottom: var(--sp-2); }
.prose a { color: var(--color-gold-dark); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--color-ink); }
.prose__meta { font-size: var(--fs-sm); color: var(--color-muted); }


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