/* =========================================================================
   Infinity Hair, Beauty & Barber Studio — shared styles
   "Mirror lights": lavender-mist ground, violet ink/brand, hot-pink highlight.
   Headings Syne; body DM Sans.
   ========================================================================= */

/* ---------- Design tokens (light = default) ---------- */
:root {
  --ground: #F6F3FB;
  --surface: #FFFFFF;
  --ink: #1C1528;
  --muted: #5A4F6B;
  --brand: #5A36B0;
  --brand-text: #5A36B0;
  --pink: #FF8DBA;
  --ink-on-fill: #1C1528;   /* dark ink on pink fills — never white */
  --pink-text: #B3235F;
  --on-brand: #FFFFFF;       /* text on brand/always-dark bands — fixed white */
  --accent-on-dark: #FFB3D2; /* pink light text on always-dark bands — fixed */
  --band: #1A1030;           /* always-dark header/hero/footer/CTA/preview */
  --band-surface: #241838;   /* panels that sit INSIDE a dark band (never white) */
  --band-ink: #F1ECF8;       /* body text inside a dark band */
  --band-muted: #C3B7D8;     /* secondary text inside a dark band */
  --border: #E4DCF1;
  --band-border: #3A2C56;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(28, 21, 40, 0.08);
  --maxw: 1080px;

  --font-head: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

/* ---------- Dark theme overrides ---------- */
[data-theme="dark"] {
  --ground: #120E1A;
  --surface: #1D1728;        /* card fill in dark mode */
  --ink: #F1ECF8;
  --muted: #B3A8C4;
  --brand: #7A58D0;
  --brand-text: #CDB9FF;
  --pink: #FF8DBA;           /* fixed */
  --ink-on-fill: #1C1528;    /* fixed — dark ink on pink */
  --pink-text: #FFAECF;
  --on-brand: #FFFFFF;       /* fixed */
  --accent-on-dark: #FFB3D2; /* fixed */
  --band: #0C0814;
  --band-surface: #1D1728;
  --band-ink: #F1ECF8;
  --band-muted: #B3A8C4;
  --border: #2C2440;
  --band-border: #332651;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  overflow-x: hidden; /* guard against any stray horizontal overflow */
  transition: background-color .2s ease, color .2s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.4rem); }

p { margin: 0 0 1rem; }

a { color: var(--brand-text); }
a:hover { text-decoration: underline; }

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

ul { margin: 0 0 1rem; padding-left: 1.2rem; }

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.1rem;
}

.skip-link {
  position: absolute; left: .5rem; top: -4rem;
  background: var(--band); color: var(--on-brand);
  padding: .6rem 1rem; border-radius: var(--radius-sm);
  z-index: 100; transition: top .15s ease;
}
.skip-link:focus { top: .5rem; }

/* ---------- Buttons (explicit text colours — never let link rules win) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  padding: .8rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--brand); color: var(--on-brand) !important; border-color: var(--brand); }
.btn-primary:hover { background: #4A2B96; border-color: #4A2B96; }
[data-theme="dark"] .btn-primary:hover { background: #8A68E0; border-color: #8A68E0; }

.btn-pink { background: var(--pink); color: var(--ink-on-fill) !important; border-color: var(--pink); }
.btn-pink:hover { background: #FF77AC; border-color: #FF77AC; }

/* ghost button — readable on the page ground */
.btn-ghost {
  background: transparent;
  color: var(--brand-text) !important;
  border-color: var(--brand);
}
.btn-ghost:hover { background: rgba(90, 54, 176, .08); }

.btn-block { width: 100%; }

/* ---------- Chips ---------- */
.chip {
  display: inline-block;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.3;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(90, 54, 176, .1);
  color: var(--brand-text);
  border: 1px solid rgba(90, 54, 176, .25);
  overflow-wrap: anywhere;
}
.chip-pink { background: rgba(179, 35, 95, .1); color: var(--pink-text); border-color: rgba(179, 35, 95, .25); }
.chip-confirm::before { content: "⚠ "; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  min-width: 0;
}

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--band);
  color: var(--on-brand);
  border-bottom: 1px solid var(--band-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .7rem;
  padding-bottom: .7rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--on-brand) !important;
  min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--on-brand);
  white-space: nowrap;      /* don't break the name mid-word */
}
.brand-sub {
  font-size: .76rem;
  color: var(--accent-on-dark);
  font-weight: 500;
}
.header-right { display: flex; align-items: center; gap: .6rem; }

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  margin: 0; padding: 0;
}
.main-nav a {
  color: var(--on-brand) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  padding: .35rem .2rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav a:hover { border-bottom-color: var(--accent-on-dark); text-decoration: none; }
.main-nav a[aria-current="page"] { border-bottom-color: var(--pink); color: var(--accent-on-dark) !important; }

/* theme toggle */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--band-border);
  color: var(--on-brand) !important;
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; line-height: 1;
  flex: none;
}
.theme-toggle:hover { border-color: var(--accent-on-dark); }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: inline; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

.header-cta { white-space: nowrap; }

/* ---------- Always-dark band rules ----------
   Any .band / header / footer has a dark ground. Everything inside must be
   legible on dark: headings, paragraphs, muted text, links, chips, dl.nap,
   notes, and buttons. No white surface cards inside. */
.band { background: var(--band); color: var(--band-ink); }
.band,
.site-header,
.site-footer { }

.band h1, .band h2, .band h3, .band h4,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4 {
  color: var(--on-brand);
}
.band p, .band li,
.site-footer p, .site-footer li { color: var(--band-ink); }
.band .muted, .band small, .band .note,
.site-footer .muted, .site-footer small, .site-footer .note { color: var(--band-muted); }

/* generic links inside dark bands/footer (buttons excluded below) */
.band a:not(.btn),
.site-footer a:not(.btn) { color: var(--accent-on-dark) !important; }
.band a:not(.btn):hover,
.site-footer a:not(.btn):hover { color: #ffffff !important; }

/* buttons keep their own text colour even inside bands/footer */
.band a.btn,
.site-footer a.btn,
.band button.btn,
.site-footer button.btn { /* colour set by the .btn-* rule's !important */ }

/* chips inside dark bands need a dark-friendly treatment */
.band .chip,
.site-footer .chip {
  background: rgba(255, 179, 210, .14);
  color: var(--accent-on-dark);
  border-color: rgba(255, 179, 210, .35);
}
.band .chip-pink,
.site-footer .chip-pink {
  background: rgba(255, 179, 210, .14);
  color: var(--accent-on-dark);
  border-color: rgba(255, 179, 210, .35);
}

/* NAP definition list inside bands */
.band dl.nap, .site-footer dl.nap { color: var(--band-ink); }
.band dl.nap dt, .site-footer dl.nap dt { color: var(--accent-on-dark); }

/* panels that genuinely sit inside a dark band — stay dark, never white */
.band .panel-on-dark {
  background: var(--band-surface);
  border: 1px solid var(--band-border);
  border-radius: var(--radius);
  padding: 1.3rem;
  color: var(--band-ink);
  min-width: 0;
}
.band .panel-on-dark h1, .band .panel-on-dark h2,
.band .panel-on-dark h3, .band .panel-on-dark h4 { color: var(--on-brand); }

/* ---------- Hero (always-dark band) ---------- */
.hero { background: var(--band); color: var(--band-ink); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding-top: 3rem; padding-bottom: 3rem;
}
.hero-grid > * { min-width: 0; }
.hero h1 { color: var(--on-brand); }
.hero .lede { font-size: 1.1rem; color: var(--band-ink); }
.hero .hero-media img {
  border-radius: var(--radius);
  border: 1px solid var(--band-border);
  width: 100%;
  object-fit: cover;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.hero-proof {
  display: flex; flex-wrap: wrap; gap: .5rem .9rem;
  margin-top: 1.3rem; font-size: .85rem; color: var(--band-muted);
}
.hero-proof .chip { }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-tight { padding: 2rem 0; }
.section-head { max-width: 640px; margin-bottom: 1.6rem; }
.section-head .muted { color: var(--muted); }

.muted { color: var(--muted); }
.note { font-size: .85rem; color: var(--muted); }
.center { text-align: center; }

.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid > * { min-width: 0; }

/* price teaser */
.price-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.price-split > * { min-width: 0; }
.price-tag {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2rem;
  color: var(--brand-text);
  line-height: 1;
}
.price-tag .cur { font-size: 1.1rem; vertical-align: super; }
.save-badge {
  display: inline-block; margin-top: .4rem;
  background: var(--pink); color: var(--ink-on-fill);
  font-weight: 700; font-size: .8rem;
  padding: .2rem .6rem; border-radius: 999px;
}

/* ---------- NAP / definition lists (on light ground) ---------- */
dl.nap { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; }
dl.nap dt { font-weight: 700; color: var(--brand-text); }
dl.nap dd { margin: 0; overflow-wrap: anywhere; }

/* hours table */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td {
  text-align: left; padding: .5rem .4rem;
  border-bottom: 1px solid var(--border);
}
.hours-table th { font-family: var(--font-head); }
.hours-table .today { font-weight: 700; color: var(--brand-text); }

/* ---------- Pick Your Day (signature feature) ---------- */
.pyd-step { margin-bottom: 2rem; }
.pyd-step-label {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pink-text);
  margin-bottom: .6rem;
}

.option-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.option-btn {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .95rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  min-width: 0;
  transition: background-color .15s, border-color .15s, color .15s;
}
.option-btn:hover { border-color: var(--brand); }
.option-btn[aria-pressed="true"] {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

/* day strip */
.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .5rem;
}
.day-strip > * { min-width: 0; }
.day-btn {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .7rem .4rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  font-family: var(--font-body);
  min-width: 0;
}
.day-btn:hover { border-color: var(--brand); }
.day-btn[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.day-btn .dow { font-weight: 700; font-size: .85rem; }
.day-btn .date { font-size: .75rem; opacity: .85; }
.day-btn .price { font-family: var(--font-head); font-weight: 800; font-size: .95rem; }
.day-btn .hrs { font-size: .66rem; opacity: .8; line-height: 1.2; }
.day-btn .save { font-size: .62rem; font-weight: 700; color: var(--pink-text); }
.day-btn[aria-pressed="true"] .save { color: var(--accent-on-dark); }
.day-btn .today-flag {
  font-size: .62rem; font-weight: 700;
  color: var(--pink-text);
}
.day-btn[aria-pressed="true"] .today-flag { color: var(--accent-on-dark); }

/* pick card — always-dark preview panel */
.pick-card {
  background: var(--band);
  color: var(--band-ink);
  border-radius: var(--radius);
  border: 1px solid var(--band-border);
  padding: 1.5rem;
  min-width: 0;
}
.pick-card h3 { color: var(--on-brand); }
.pick-card .pick-summary {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--on-brand);
  overflow-wrap: anywhere;
}
.pick-card .pick-tip { color: var(--band-ink); }
/* selected-option helper text: white on brand fill, both themes */
.pick-card .helper-on-brand {
  display: block;
  background: var(--brand);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: .6rem .8rem;
  font-size: .9rem;
  margin: .8rem 0;
  overflow-wrap: anywhere;
}
.pick-card .muted, .pick-card .note { color: var(--band-muted); }
.pick-card a:not(.btn) { color: var(--accent-on-dark) !important; }

.pick-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.pick-actions .btn { min-width: 0; }

.time-chips { display: flex; flex-wrap: wrap; gap: .5rem; }

.copy-feedback {
  font-size: .85rem;
  color: var(--accent-on-dark);
  margin-top: .5rem;
  min-height: 1.2em;
}

/* ---------- Map ---------- */
.map-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Image placeholder for studio's real photos ---------- */
.needs-content {
  border: 2px dashed var(--brand);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  background: rgba(90, 54, 176, .05);
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}
.band .needs-content {
  border-color: var(--band-border);
  background: var(--band-surface);
  color: var(--band-muted);
}

.img-note { font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.band .img-note { color: var(--band-muted); }

/* ---------- Footer (always-dark band) ---------- */
.site-footer {
  background: var(--band);
  color: var(--band-ink);
  padding: 2.4rem 0 1.4rem;
  border-top: 1px solid var(--band-border);
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.footer-grid > * { min-width: 0; }
.footer-grid h4 { color: var(--on-brand); font-size: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-bottom {
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--band-border);
  font-size: .82rem;
  color: var(--band-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.2rem;
  justify-content: space-between;
}
.social-row { display: flex; gap: .9rem; flex-wrap: wrap; }

/* demo disclosure line */
.demo-note {
  background: rgba(255, 141, 186, .12);
  border-top: 1px solid var(--band-border);
  color: var(--band-muted);
  font-size: .8rem;
  text-align: center;
  padding: .5rem 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .hero-media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  /* nav on its own row so the brand name never shares a cramped row */
  .header-inner { flex-direction: column; align-items: stretch; }
  .header-top-row {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  }
  .main-nav { width: 100%; }
  .main-nav ul { justify-content: flex-start; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .day-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .price-split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .day-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pick-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  /* hide the header CTA and the brand subtitle on the smallest screens */
  .header-cta { display: none; }
  .brand-sub { display: none; }
  .section { padding: 2.2rem 0; }
  .hero-grid { padding-top: 2.2rem; padding-bottom: 2.2rem; }
  .day-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { width: 100%; }           /* big buttons wrap to full width */
  .hero-ctas .btn, .pick-actions .btn { width: 100%; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 360px) {
  .brand-name { font-size: 1rem; }
  .container { padding: 0 .85rem; }
}

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

/* QA: the dark hero and pick card get the same treatment as .band / footer */
.hero .muted, .hero small, .hero .note, .hero .img-note, .pick-card .img-note { color: var(--band-muted); }
.hero a:not(.btn) { color: var(--accent-on-dark) !important; }
.hero .chip, .pick-card .chip {
  background: rgba(255, 179, 210, .14);
  color: var(--accent-on-dark);
  border-color: rgba(255, 179, 210, .35);
}
.hero .btn-ghost, .band .btn-ghost, .site-footer .btn-ghost, .pick-card .btn-ghost {
  color: var(--on-brand) !important;
  border-color: var(--on-brand);
  background: transparent;
}
.hero .btn-ghost:hover, .band .btn-ghost:hover, .site-footer .btn-ghost:hover, .pick-card .btn-ghost:hover {
  background: rgba(255, 255, 255, .14);
}
/* demo note sits on its own dark strip */
.demo-note { background: var(--band); color: var(--band-muted); }
/* header: brand name may wrap at spaces on narrow phones */
@media (max-width: 480px) {
  .brand-name { white-space: normal; }
  .header-inner { gap: .5rem; }
}
.day-btn[aria-pressed="true"] .today-flag, .day-btn[aria-pressed="true"] .save { color: #FFFFFF; }
