/* ==========================================================================
   My Nail Lady (Ballito) — Sea-glass & coral
   Tokens from research/design-language.md
   ========================================================================== */

/* ---- Design tokens (light, default) ---- */
:root {
  --ground: #F2F8F6;
  --surface: #FFFFFF;
  --ink: #14283C;
  --muted: #4F6272;
  --brand: #14283C;
  --brand-text: #14283C;
  --coral: #EE7B63;
  --coral-text: #B1432D;
  --sea: #8FD1BE;

  /* Fixed-in-both-themes tokens for always-dark bands */
  --on-brand: #FFFFFF;        /* text on brand/dark bands — never remapped */
  --accent-on-dark: #FFB3A1;  /* coral text on always-dark bands — never remapped */
  --band: #102233;            /* always-dark header/hero/footer/CTA band */
  --band-surface: #1C3245;    /* a card surface that sits inside a dark band */

  --ink-on-coral: #14283C;    /* BUG 5: dark ink on coral fills, never white */

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --font-head: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;

  --shadow: 0 6px 24px rgba(20, 40, 60, 0.10);
  --shadow-sm: 0 2px 10px rgba(20, 40, 60, 0.08);
}

/* ---- Dark theme override ---- */
[data-theme="dark"] {
  --ground: #0F1A24;
  --surface: #1A2938;
  --ink: #EEF5F2;
  --muted: #A9BBC6;
  --brand: #2A4A66;
  --brand-text: #BFE3D8;
  --coral: #EE7B63;
  --coral-text: #FF9C86;
  --sea: #8FD1BE;
  /* --on-brand, --accent-on-dark, --band, --ink-on-coral stay fixed */
  --band-surface: #16283A;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); }
p { margin: 0 0 1rem; }
a { color: var(--coral-text); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.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;
}
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.75em 1.4em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .12s ease, filter .12s ease, background .12s ease, color .12s ease;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: translateY(0); }

/* Primary / brand button */
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { color: var(--on-brand); }

/* Accent (coral) button — BUG 5: dark ink on coral, NEVER white */
.btn-accent { background: var(--coral); color: var(--ink-on-coral); border-color: var(--coral); }
.btn-accent:hover { color: var(--ink-on-coral); }

/* WhatsApp button */
.btn-wa { background: #25D366; color: #0B2E1A; }
.btn-wa:hover { color: #0B2E1A; }
.band .btn-wa, .band .btn-wa:hover, .site-header .btn-wa, .site-footer .btn-wa, .site-footer .btn-wa:hover, .bys-preview .btn-wa { color: #0B2E1A; }

/* Ghost / outline button */
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ground); }

.btn-lg { font-size: 1.1rem; padding: 0.85em 1.7em; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Cards & chips (default / on normal ground)
   ========================================================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(20,40,60,0.06);
  color: var(--ink); /* BUG 2 safeguard: cards declare their own ink */
}
[data-theme="dark"] .card { border-color: rgba(255,255,255,0.07); }
.card h3 { margin-top: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.35em 0.85em; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
  background: var(--sea); color: var(--ink);
}
/* "To confirm" chip — amber-ish, dark ink both themes */
.chip-confirm {
  background: #FCE8C8; color: #6B4A12; border: 1px solid #E8C98A;
}
[data-theme="dark"] .chip-confirm { background: #3A3016; color: #FBE3B4; border-color: #5C4A1E; }

.pill-coral { background: var(--coral); color: var(--ink-on-coral); } /* BUG 5 */

/* ==========================================================================
   ALWAYS-DARK BANDS (header / hero / footer / CTA band)
   BUG 1 + BUG 2: every text element, heading, button, link and chip inside a
   dark band must be given an explicit light colour so nothing goes
   dark-on-dark. Light cards placed inside set their own ink (handled by .card
   + the override below).
   ========================================================================== */
.band {
  background: var(--band);
  color: var(--on-brand);
}
.band h1, .band h2, .band h3, .band h4,
.band p, .band li, .band span, .band strong, .band small, .band label,
.band .lede, .band .muted {
  color: var(--on-brand);
}
.band .muted, .band .lede { color: rgba(255,255,255,0.78); }
.band a { color: var(--accent-on-dark); }
.band a:hover { color: #FFFFFF; }

/* Buttons inside a dark band */
.band .btn-ghost { color: var(--on-brand); border-color: var(--on-brand); }
.band .btn-ghost:hover { background: var(--on-brand); color: var(--band); }
.band .btn-accent { background: var(--coral); color: var(--ink-on-coral); border-color: var(--coral); } /* BUG 5 */
.band .btn-brand { background: var(--on-brand); color: var(--band); }
.band .btn-brand:hover { color: var(--band); }

/* Chips inside a dark band */
.band .chip { background: var(--sea); color: var(--ink); }     /* sea-glass keeps dark ink */
.band .chip-confirm { background: #3A3016; color: #FBE3B4; border-color: #5C4A1E; }
.band .pill-coral { background: var(--coral); color: var(--ink-on-coral); }

/* BUG 2: a LIGHT card dropped inside a dark band must reset its own ink,
   not inherit the band's white text. */
.band .card {
  background: var(--band-surface);
  color: var(--on-brand);
}
.band .card h1, .band .card h2, .band .card h3, .band .card h4,
.band .card p, .band .card li, .band .card span { color: var(--on-brand); }
.band .card .muted { color: rgba(255,255,255,0.72); }
/* a card explicitly meant to stay light inside a dark band */
.band .card-light {
  background: var(--surface);
  color: var(--ink);
}
.band .card-light h1, .band .card-light h2, .band .card-light h3,
.band .card-light h4, .band .card-light p, .band .card-light li,
.band .card-light span { color: var(--ink); }
.band .card-light .muted { color: var(--muted); }
.band .card-light a { color: var(--coral-text); }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--band); color: var(--on-brand);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav {
  display: flex; align-items: center; gap: 18px;
  min-height: 64px; padding: 10px 20px;
  max-width: var(--maxw); margin: 0 auto;
}
.brand-mark {
  display: flex; flex-direction: column; text-decoration: none;
  color: var(--on-brand); line-height: 1.05; margin-right: auto;
}
.brand-mark .brand-name {
  font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--on-brand);
}
.brand-mark .brand-sub {
  font-size: 0.72rem; color: var(--accent-on-dark); letter-spacing: 0.02em;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--on-brand); text-decoration: none; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; font-size: 0.95rem;
}
.nav-links a:hover { background: rgba(255,255,255,0.10); color: var(--on-brand); }
.nav-links a[aria-current="page"] { color: var(--accent-on-dark); }

.header-cta { white-space: nowrap; } /* BUG 3: CTA never wraps */

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px;
  background: rgba(255,255,255,0.10); color: var(--on-brand);
  border: 1px solid rgba(255,255,255,0.18); cursor: pointer; flex: none;
}
.icon-btn:hover { background: rgba(255,255,255,0.18); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: inline; }

/* Mobile nav toggle */
.nav-toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: var(--band); color: var(--on-brand);
  position: relative; overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  padding: 72px 0;
}
.hero h1 { color: var(--on-brand); }
.hero p { color: rgba(255,255,255,0.85); }
.hero .quote { color: var(--accent-on-dark); font-family: var(--font-head); font-style: italic; }
.hero-media img {
  border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%;
  object-fit: cover; max-height: 440px;
}
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 20px; }
.hero-stats .stat .n { font-family: var(--font-head); font-size: 1.8rem; color: var(--on-brand); }
.hero-stats .stat .l { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

/* ==========================================================================
   Sections / misc content
   ========================================================================== */
.section-head { max-width: 62ch; margin-bottom: 32px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem;
  font-weight: 700; color: var(--coral-text); margin-bottom: 8px;
}
.band .eyebrow { color: var(--accent-on-dark); }

.service-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.service-list li {
  padding: 12px 16px; background: var(--ground); border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 10px; color: var(--ink);
}
[data-theme="dark"] .service-list li { background: rgba(255,255,255,0.04); }
.band .card .service-list li { background: rgba(255,255,255,0.06); color: var(--on-brand); }

.feature-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.feature-split img { border-radius: var(--radius); box-shadow: var(--shadow); }

.needs-content {
  border: 2px dashed var(--muted); border-radius: var(--radius);
  padding: 24px; color: var(--muted); font-style: italic; text-align: center;
  background: transparent;
}
.band .needs-content { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.75); }

/* ==========================================================================
   Build Your Set
   ========================================================================== */
.bys-step { margin-bottom: 28px; }
.bys-step > .step-label {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px;
}
.bys-step .step-n {
  font-family: var(--font-head); color: var(--coral-text); font-weight: 700; font-size: 1.1rem;
}
.bys-step h3 { margin: 0; }
.chip-set { display: flex; flex-wrap: wrap; gap: 10px; }

/* Selectable chip buttons (aria-pressed) */
.opt {
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 0.6em 1.1em; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 2px solid rgba(20,40,60,0.18);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
  display: inline-flex; align-items: center; gap: 0.45em;
}
[data-theme="dark"] .opt { border-color: rgba(255,255,255,0.18); }
.opt:hover { border-color: var(--coral); }
.opt[aria-pressed="true"] {
  background: var(--coral); color: var(--ink-on-coral); border-color: var(--coral); /* BUG 5 */
}
.opt[disabled] { opacity: 0.45; cursor: not-allowed; }
.opt .tc {
  font-size: 0.68rem; background: #FCE8C8; color: #6B4A12;
  padding: 0.1em 0.5em; border-radius: 999px; font-weight: 700;
}
.opt[aria-pressed="true"] .tc { background: rgba(255,255,255,0.65); color: #6B4A12; }

.bys-group-title {
  font-weight: 700; color: var(--muted); font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin: 14px 0 8px;
}

.bys-preview {
  background: var(--band); color: var(--on-brand);
  border-radius: var(--radius); padding: 24px; position: sticky; top: 84px;
}
.bys-preview h3 { color: var(--on-brand); }
.bys-preview .btn-ghost { color: var(--on-brand); border-color: var(--on-brand); }
.bys-preview .btn-ghost:hover { background: var(--on-brand); color: var(--band); }
.bys-preview .msg {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm); padding: 16px; margin: 14px 0;
  font-size: 0.98rem; color: var(--on-brand); white-space: pre-wrap; min-height: 90px;
}
.bys-preview .note { font-size: 0.82rem; color: rgba(255,255,255,0.72); }
.bys-layout { display: grid; grid-template-columns: 1.3fr 0.95fr; gap: 36px; align-items: start; }
.copied-flag { font-size: 0.85rem; color: var(--sea); min-height: 1.2em; margin-top: 6px; }

/* ==========================================================================
   Reviews
   ========================================================================== */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.stat-row .big { font-family: var(--font-head); font-size: 2.4rem; color: var(--coral-text); }
.band .stat-row .big { color: var(--accent-on-dark); }

/* ==========================================================================
   Contact / map / forms
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.contact-grid > * { min-width: 0; }
.nap a, .nap span { overflow-wrap: anywhere; }
.btn-lg { white-space: normal; text-align: center; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid rgba(20,40,60,0.2);
  background: var(--surface); color: var(--ink);
}
[data-theme="dark"] .field input, [data-theme="dark"] .field textarea {
  border-color: rgba(255,255,255,0.2);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--muted); }

.map-embed {
  border: 0; width: 100%; height: 320px; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.nap { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.nap li { display: flex; gap: 12px; align-items: flex-start; }
.nap .label { font-weight: 700; min-width: 86px; color: var(--muted); }

/* ==========================================================================
   Footer (always-dark band)
   ========================================================================== */
.site-footer { background: var(--band); color: var(--on-brand); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
  padding: 48px 0 24px;
}
.site-footer h4 { color: var(--on-brand); font-family: var(--font-head); }
.site-footer a { color: var(--accent-on-dark); text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; }
.site-footer .footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer p, .site-footer li, .site-footer span { color: rgba(255,255,255,0.80); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0;
  font-size: 0.85rem; color: rgba(255,255,255,0.65);
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
}
.footer-bottom span { color: rgba(255,255,255,0.65); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  /* BUG 3: hide header CTA when things get tight */
  .header-cta { display: none; }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding: 48px 0; }
  .hero-media { order: -1; }
  .feature-split { grid-template-columns: 1fr; }
  .bys-layout { grid-template-columns: 1fr; }
  .bys-preview { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Mobile nav */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 999px; order: 3;
    background: rgba(255,255,255,0.10); color: var(--on-brand);
    border: 1px solid rgba(255,255,255,0.18); cursor: pointer;
  }
  .nav-toggle svg { width: 22px; height: 22px; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--band); padding: 10px 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .nav { position: relative; flex-wrap: nowrap; }
}
@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}
@media (max-width: 480px) {
  /* BUG 3: hide CTA + brand subtitle so 320px has no horizontal overflow */
  .header-cta { display: none; }
  .brand-mark .brand-sub { display: none; }
  .container { padding: 0 16px; }
  .nav { padding: 10px 16px; gap: 12px; }
  h1 { font-size: 1.9rem; }
  .btn { font-size: 0.95rem; padding: 0.7em 1.1em; }
  .hero-stats { gap: 18px; }
}

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