/* =========================================================================
   Emiles House of Hair — styles.css
   Design language: "Dressing table" — orchid-white / plum / magenta-orchid.
   Marcellus (headings) + Nunito (body).
   ========================================================================= */

/* ---- Tokens ---- */
:root {
  --ground: #F8F3F8;
  --surface: #FFFFFF;
  --ink: #2A1730;
  --muted: #5D4864;
  --brand: #8E2A8B;
  --brand-text: #8E2A8B;   /* small accent text / ticks / links on normal surfaces */
  --accent-dark: #EBCBEA;  /* accent text on always-dark bands — fixed both themes */
  --lilac: #E4CBF0;        /* highlight fill — dark text on it, never white */
  --ink-fixed: #2A1730;    /* dark text on lilac — fixed */
  --on-brand: #FFFFFF;     /* text on brand fills — fixed */
  --cream: #F5ECF6;        /* text on always-dark bands — fixed */
  --band: #2A1730;         /* always-dark header/hero/footer/CTA/plan panel */

  --border: #E2D3E4;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1080px;
  --gap: 1.5rem;

  --font-head: "Marcellus", Georgia, serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

[data-theme="dark"] {
  --ground: #1A1220;
  --surface: #281B30;
  --ink: #F5ECF6;
  --muted: #D0BFD6;
  --brand: #8E2A8B;
  --brand-text: #E3A6E0;
  --accent-dark: #EBCBEA;
  --lilac: #E4CBF0;
  --ink-fixed: #2A1730;
  --on-brand: #FFFFFF;
  --cream: #F5ECF6;
  --band: #0F0914;

  --border: #3D2E46;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand-text); }
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.section { padding-block: 3.5rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--brand-text);
  margin: 0 0 .5rem;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.12rem; }

/* mirror-motif divider */
.divider {
  border: 0;
  height: 1px;
  background: var(--border);
  position: relative;
  margin: 2.5rem auto;
  max-width: 220px;
}
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--brand);
  border-radius: 50%;
  background: var(--ground);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: .85rem 1.3rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn--primary:hover { background: #7a2378; border-color: #7a2378; color: var(--on-brand); }
.btn--ghost { background: transparent; color: var(--brand-text); border-color: var(--brand-text); }
.btn--ghost:hover { background: rgba(142,42,139,.08); color: var(--brand-text); }
.btn--lilac { background: var(--lilac); color: var(--ink-fixed); border-color: var(--lilac); }
.btn--lilac:hover { background: #d7b6e8; color: var(--ink-fixed); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---- Chips ---- */
.chip {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--ink-fixed);        /* ≥4.5:1 on the tint */
  border: 1px solid #c9a7dc;
}

/* ---- Header (always-dark band) ---- */
.site-header {
  background: var(--band);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(235,203,234,.18);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: .9rem;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.15;
  min-width: 0;
}
.brand__name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--cream);
  overflow-wrap: anywhere;
}
.brand__sub {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-dark);     /* header sub-label uses accent-dark */
}
.site-header .muted { color: var(--accent-dark); }  /* .muted inside header */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent-dark); }

/* theme toggle */
.theme-toggle {
  background: transparent;
  border: 1.5px solid var(--accent-dark);
  color: var(--accent-dark);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover { background: rgba(235,203,234,.12); }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* header CTA button (primary) — links in dark header must not lose button text colour */
.site-header a.btn--primary { color: var(--on-brand); }
.site-header a.btn--primary:hover { color: var(--on-brand); }
.site-header a.btn--ghost { color: var(--accent-dark); border-color: var(--accent-dark); }
.site-header a.btn--ghost:hover { color: var(--accent-dark); background: rgba(235,203,234,.12); }

/* ---- Hero (always-dark band) ---- */
.hero {
  background: var(--band);
  color: var(--cream);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding-block: 3.5rem;
}
.hero h1, .hero h2, .hero h3 { color: var(--cream); }
.hero p, .hero li { color: var(--cream); }
.hero .muted { color: var(--accent-dark); }
.hero .eyebrow { color: var(--accent-dark); }
.hero a:not(.btn) { color: var(--accent-dark); }
.hero .chip { background: var(--lilac); color: var(--ink-fixed); }
.hero-media { position: relative; }
.hero-media img {
  border-radius: var(--radius);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.img-note {
  font-size: .75rem;
  margin-top: .5rem;
}
.hero .img-note { color: var(--accent-dark); }

/* button-text exceptions inside dark bands */
.hero a.btn--primary, .band a.btn--primary, .site-footer a.btn--primary { color: var(--on-brand); }
.hero a.btn--primary:hover, .band a.btn--primary:hover, .site-footer a.btn--primary:hover { color: var(--on-brand); }
.hero a.btn--lilac, .band a.btn--lilac, .site-footer a.btn--lilac { color: var(--ink-fixed); }
.hero a.btn--lilac:hover, .band a.btn--lilac:hover, .site-footer a.btn--lilac:hover { color: var(--ink-fixed); }
/* ghost buttons inside always-dark bands use accent-dark (light AND dark) */
.hero a.btn--ghost, .band a.btn--ghost, .site-footer a.btn--ghost,
.hero button.btn--ghost, .band button.btn--ghost, .site-footer button.btn--ghost {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}
.hero a.btn--ghost:hover, .band a.btn--ghost:hover, .site-footer a.btn--ghost:hover,
.hero button.btn--ghost:hover, .band button.btn--ghost:hover, .site-footer button.btn--ghost:hover {
  color: var(--accent-dark);
  background: rgba(235,203,234,.12);
}

/* ---- Generic dark band ---- */
.band {
  background: var(--band);
  color: var(--cream);
}
.band h1, .band h2, .band h3, .band h4 { color: var(--cream); }
.band p, .band li { color: var(--cream); }
.band .muted { color: var(--accent-dark); }
.band .eyebrow { color: var(--accent-dark); }
.band a:not(.btn) { color: var(--accent-dark); }
.band .img-note { color: var(--accent-dark); }
.band .chip { background: var(--lilac); color: var(--ink-fixed); }

/* ---- Proof strip ---- */
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.proof li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.proof strong { font-family: var(--font-head); font-size: 1.4rem; color: var(--ink); }
.proof .proof-label { font-size: .8rem; color: var(--muted); }
.band .proof strong { color: var(--cream); }
.band .proof .proof-label { color: var(--accent-dark); }

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);   /* light mode relies on visible border */
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__body { padding: 1.25rem; }
.card h3 { margin-bottom: .35rem; }
.card .img-note { color: var(--muted); padding: 0 1.25rem 1rem; margin: 0; }

/* note chip (light-mode contrast safe) */
.note {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: #f2e6f4;
  color: #5d2b62;     /* ≥4.5:1 on the tint */
  border: 1px solid #d9bfe0;
}
[data-theme="dark"] .note { background: #3a2a44; color: var(--accent-dark); border-color: #543f61; }

/* needs-content marker */
.needs {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--lilac) 18%, transparent);
  color: var(--muted);
  font-size: .95rem;
}
.band .needs { color: var(--accent-dark); border-color: rgba(235,203,234,.4); }

/* ---- find-us / NAP ---- */
.findus {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.findus > * { min-width: 0; }
dl.nap { margin: 0; }
dl.nap dt {
  font-weight: 700;
  color: var(--brand-text);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 1rem;
}
dl.nap dd {
  margin: .15rem 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.band dl.nap dt { color: var(--accent-dark); }
.band dl.nap dd { color: var(--cream); }
.findus img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---- Pamper plan teaser ---- */
.teaser .btn-row { margin-top: 1.25rem; }

/* =========================================================================
   Pamper plan (signature feature)
   ========================================================================= */
.planner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2rem;
  align-items: start;
}
.planner > * { min-width: 0; }
.planner-form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 0 0 1.5rem;
  background: var(--surface);
}
.planner-form legend {
  font-family: var(--font-head);
  font-size: 1.15rem;
  padding: 0 .5rem;
  color: var(--ink);
}
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: .6rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  cursor: pointer;
  background: var(--ground);
  font-weight: 600;
}
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile .tick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: .8rem;
  color: transparent;
}
/* selected: outline + tick (not colour alone) */
.tile:has(input:checked) {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--lilac) 28%, transparent);
}
.tile:has(input:checked) .tick {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}
.tile:focus-within {
  outline: 2px solid var(--brand-text);
  outline-offset: 2px;
}

.radio-row { display: flex; flex-direction: column; gap: .6rem; margin: 0; padding: 0; border: 0; }
.radio-opt { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.radio-opt input { accent-color: var(--brand); width: 18px; height: 18px; }

.field-label { display: block; font-weight: 700; margin: 1rem 0 .4rem; }
input[type="text"], input[type="date"], textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .7rem .8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--brand-text); outline-offset: 1px; border-color: var(--brand); }
.dependent[hidden] { display: none; }

/* stepper */
.stepper { display: flex; align-items: center; gap: .75rem; }
.stepper button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--brand-text);
  background: transparent;
  color: var(--brand-text);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
.stepper button:hover { background: rgba(142,42,139,.08); }
.stepper output { font-family: var(--font-head); font-size: 1.6rem; min-width: 2ch; text-align: center; }
.stepper .headcount-word { font-size: .9rem; color: var(--muted); }

/* live plan card */
.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: 90px;
}
.plan-card h3 { margin-top: 0; }
.plan-rows { list-style: none; margin: 0 0 1rem; padding: 0; }
.plan-rows li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  margin-bottom: .4rem;
  border: 1px solid var(--border);
}
.plan-rows li.on {
  background: color-mix(in srgb, var(--lilac) 30%, transparent);
  border-color: var(--brand);
}
.plan-rows .cat { font-weight: 700; }
.plan-rows .state { font-size: .9rem; font-weight: 700; }
.plan-rows li.on .state { color: var(--brand-text); }
.plan-rows li.off { opacity: .55; }
.plan-rows li.off .state { color: var(--muted); }
.plan-rows .state .tickmark { color: var(--brand-text); margin-right: .3rem; }
.plan-detail { font-size: .95rem; margin: .2rem 0; }
.plan-detail dt { font-weight: 700; color: var(--brand-text); display: inline; }
.plan-empty { color: var(--muted); font-style: italic; }

/* message panel — ALWAYS DARK */
.message-panel {
  background: var(--band);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
}
.message-panel h3, .message-panel h4 { color: var(--cream); }
.message-panel p, .message-panel li { color: var(--cream); }
.message-panel .muted { color: var(--accent-dark); }
.message-panel .eyebrow { color: var(--accent-dark); }
.message-panel a:not(.btn) { color: var(--accent-dark); }
.message-text {
  background: rgba(235,203,234,.08);
  border: 1px solid rgba(235,203,234,.25);
  border-radius: var(--radius-sm);
  padding: 1rem;
  white-space: pre-wrap;
  color: var(--cream);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 3rem;
}
.message-text.empty { color: var(--accent-dark); font-style: italic; }
/* ghost buttons inside the always-dark message panel use accent-dark (both themes) */
.message-panel a.btn--ghost, .message-panel button.btn--ghost {
  color: var(--accent-dark);
  border-color: var(--accent-dark);
}
.message-panel a.btn--ghost:hover, .message-panel button.btn--ghost:hover {
  color: var(--accent-dark);
  background: rgba(235,203,234,.12);
}
.message-panel a.btn--primary { color: var(--on-brand); }
.message-panel a.btn--primary:hover { color: var(--on-brand); }
.copy-status { font-size: .85rem; margin-top: .6rem; min-height: 1.2em; color: var(--accent-dark); }

/* ---- Footer (always-dark band) ---- */
.site-footer {
  background: var(--band);
  color: var(--cream);
  padding-block: 3rem 0;
}
.site-footer h3, .site-footer h4 { color: var(--cream); }
.site-footer p, .site-footer li { color: var(--cream); }
.site-footer a:not(.btn) { color: var(--accent-dark); text-decoration: none; }
.site-footer a:not(.btn):hover { text-decoration: underline; }
.site-footer .muted { color: var(--accent-dark); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.footer-grid > * { min-width: 0; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-brand { font-family: var(--font-head); font-size: 1.3rem; color: var(--cream); }
.site-footer dl.nap dt { color: var(--accent-dark); }
.site-footer dl.nap dd { color: var(--cream); }
.footer-bottom {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(235,203,234,.18);
  padding-block: 1.25rem;
  font-size: .85rem;
  color: var(--accent-dark);
}
.footer-bottom .demo-note {
  background: #0b0610;
  border: 1px solid rgba(235,203,234,.2);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  color: var(--cream);
  margin-bottom: 1rem;
}
.footer-bottom .demo-note strong { color: var(--accent-dark); }

/* ---- Utility ---- */
.stack > * + * { margin-top: 1rem; }
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--brand);
  color: var(--on-brand);
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .planner { grid-template-columns: 1fr; }
  .plan-card { position: static; }
  .findus { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .site-header .container { flex-wrap: wrap; }
  .site-nav { margin-left: 0; width: 100%; order: 3; }  /* nav on its own row */
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .header-cta { display: none; }   /* hide header CTA on small screens */
  .section { padding-block: 2.5rem; }
}
