/* ============================================================
   Gold Nails Maui — styles.css
   Mobile-first. Theme switch B(cream, default) / A(charcoal)
   via ONE line: <html data-theme="A"> or "B".
   Palette per SKILL.md VISUAL DIRECTION.
   ============================================================ */

:root {
  --gold-1: #d4af37;
  --gold-2: #f5e6a8;
  --gold-grad: linear-gradient(135deg, #d4af37 0%, #f5e6a8 100%);
  --charcoal: #1a1a1a;
  --cream: #faf6ef;
  --text: #2a2a2a;
  --muted: #6b6b6b;

  /* --- Theme B (cream) = DEFAULT --- */
  --bg: var(--cream);
  --bg-alt: #ffffff;
  --fg: var(--text);
  --fg-muted: var(--muted);
  --card: #ffffff;
  --border: #ece3d0;
  --header-bg: rgba(250, 246, 239, 0.92);
  --shadow: 0 6px 24px rgba(26, 26, 26, 0.08);

  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --maxw: 1120px;
  --radius: 14px;
  --gap: clamp(1rem, 3vw, 2rem);
}

/* --- Theme A (dark charcoal + gold) — flip one attribute --- */
:root[data-theme="A"] {
  --bg: var(--charcoal);
  --bg-alt: #232323;
  --fg: #f3efe6;
  --fg-muted: #b6ad98;
  --card: #232323;
  --border: #3a3a3a;
  --header-bg: rgba(26, 26, 26, 0.92);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* space for mobile sticky bar */
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
p { margin: 0 0 1rem; }
a { color: inherit; }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.section { padding: clamp(2.5rem, 7vw, 5rem) 0; }
.section--alt { background: var(--bg-alt); }
.center { text-align: center; }
.muted { color: var(--fg-muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; color: var(--gold-1); font-weight: 600; margin-bottom: .6rem; }
.gold-line { width: 64px; height: 3px; background: var(--gold-grad); border: 0; border-radius: 3px; margin: 0 0 1.4rem; }
.center .gold-line { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold-grad); color: #1a1a1a; box-shadow: var(--shadow); }
.btn--primary:hover { box-shadow: 0 8px 28px rgba(212, 175, 55, .45); }
.btn--ghost { background: transparent; border-color: var(--gold-1); color: var(--fg); }
.btn--ghost:hover { background: var(--gold-1); color: #1a1a1a; }
.btn--sm { padding: .5rem 1rem; font-size: .85rem; }
.btn--block { display: flex; width: 100%; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand img { height: 40px; width: auto; border-radius: 6px; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--fg); }
.nav__links { display: none; gap: 1.4rem; align-items: center; }
.nav__links a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--fg); }
.nav__links a:hover { color: var(--gold-1); }
.nav__cta { display: none; }
.nav__toggle {
  display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--fg); border-radius: 2px; }
.nav__mobile { display: none; flex-direction: column; gap: .2rem; padding: .5rem 0 1rem; border-top: 1px solid var(--border); }
.nav__mobile.open { display: flex; }
.nav__mobile a { text-decoration: none; padding: .7rem .3rem; color: var(--fg); font-weight: 500; border-bottom: 1px solid var(--border); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(26,26,26,.55), rgba(26,26,26,.72)); }
.hero__inner { position: relative; z-index: 2; padding: clamp(3.5rem, 12vw, 7rem) 0; color: #fff; text-align: center; }
.hero__inner h1 { color: #fff; }
.hero__inner .tagline { font-size: clamp(1rem, 3vw, 1.25rem); color: #f3efe6; max-width: 40ch; margin: 0 auto 1.8rem; }
.hero__cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.hero__badge { display:inline-block; margin-bottom: 1rem; font-size:.78rem; letter-spacing:.2em; text-transform:uppercase; color:#f5e6a8; border:1px solid rgba(245,230,168,.5); padding:.35rem .9rem; border-radius:999px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card h3 { color: var(--gold-1); }

/* ---------- Services menu ---------- */
.menu-nav { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.menu-nav a { text-decoration: none; font-size: .85rem; padding: .4rem .9rem; border: 1px solid var(--border); border-radius: 999px; color: var(--fg); }
.menu-nav a:hover { background: var(--gold-1); color: #1a1a1a; border-color: var(--gold-1); }
.menu-cat { margin-bottom: 2.5rem; scroll-margin-top: 84px; }
.menu-cat > h2 { border-bottom: 2px solid var(--gold-1); padding-bottom: .4rem; display: inline-block; }
.menu-note { font-size: .88rem; color: var(--fg-muted); font-style: italic; margin: .3rem 0 1rem; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-row {
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
  padding: .8rem 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap;
}
.price-row__name { font-weight: 600; flex: 1 1 55%; }
.price-row__price { font-family: var(--font-head); color: var(--gold-1); font-weight: 700; white-space: nowrap; }
.price-row .btn { flex: 0 0 auto; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.gallery-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }

/* ---------- Info / NAP ---------- */
.nap { display: grid; gap: .4rem; }
.nap a { color: var(--gold-1); text-decoration: none; font-weight: 600; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table td { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.hours-table td:last-child { text-align: right; color: var(--fg-muted); }
.map-embed { width: 100%; border: 0; border-radius: var(--radius); aspect-ratio: 16/10; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .92rem; }
.field .req { color: #c0392b; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-alt); color: var(--fg); font: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold-1); border-color: var(--gold-1); }
.field small { color: var(--fg-muted); }
.field--error input, .field--error textarea { border-color: #c0392b; }
.field__err { color: #c0392b; font-size: .82rem; display: none; }
.field--error .field__err { display: block; }
.services-check { display: grid; grid-template-columns: 1fr; gap: .4rem; max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: .8rem; background: var(--bg-alt); }
.services-check label { display: flex; align-items: center; gap: .6rem; font-weight: 500; font-size: .92rem; cursor: pointer; }
.services-check input { width: auto; }
.form-status { padding: .9rem 1rem; border-radius: 10px; font-weight: 600; display: none; }
.form-status.show { display: block; }
.form-status--ok { background: rgba(39, 174, 96, .12); color: #1e824c; border: 1px solid rgba(39,174,96,.4); }
.form-status--err { background: rgba(192, 57, 43, .1); color: #c0392b; border: 1px solid rgba(192,57,43,.4); }
.thankyou { text-align: center; padding: 2rem 1rem; }
.thankyou .check { font-size: 3rem; }

/* ---------- Admin ---------- */
.admin-gate { max-width: 380px; margin: 3rem auto; }
.booking-card { border-left: 4px solid var(--gold-1); }
.booking-card[data-status="confirmed"] { border-left-color: #27ae60; }
.booking-card[data-status="cancelled"] { border-left-color: #c0392b; opacity: .7; }
.badge { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: .2rem .6rem; border-radius: 999px; font-weight: 700; }
.badge--new { background: var(--gold-grad); color: #1a1a1a; }
.badge--confirmed { background: #27ae60; color: #fff; }
.badge--cancelled { background: #c0392b; color: #fff; }
.booking-actions { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #d9d2c4; padding: 2.5rem 0; margin-top: 2rem; }
.site-footer a { color: var(--gold-2); text-decoration: none; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.site-footer h4 { color: #fff; }
.footer-bottom { border-top: 1px solid #333; margin-top: 1.5rem; padding-top: 1.2rem; font-size: .85rem; color: #9a927f; text-align: center; }

/* ---------- Sticky mobile bar ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; gap: .5rem; padding: .6rem .7rem calc(.6rem + env(safe-area-inset-bottom));
  background: var(--header-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
}
.sticky-bar .btn { flex: 1; }
body.has-sticky { padding-bottom: 72px; }

/* ---------- Skip link / a11y ---------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold-1); color: #1a1a1a; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 2px; }

/* ============================================================
   Responsive — desktop up
   ============================================================ */
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .services-check { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
  .nav__mobile { display: none !important; }
  /* Sticky bar is mobile-only */
  .sticky-bar { display: none; }
  body.has-sticky { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
