/*
 * bn-brand.css — Design tokens ONLY
 * Ricky Burd Babysitting
 *
 * Contains: CSS custom properties, base reset, typography utilities, button utilities.
 * Contains NO layout rules, NO component styles.
 *
 * DARK MODE RULE: Use [data-theme="dark"] selector ONLY.
 * NEVER use @media (prefers-color-scheme) here — it overrides the manual toggle.
 * OS preference is detected by the inline script in head.php, which sets data-theme
 * before CSS renders, preventing any flash.
 *
 * Google Fonts (@import removed): loaded as <link> tags in head.php for better performance.
 */

/* ── Light mode tokens (default) ────────────────────── */
:root {
  /* Surfaces */
  --bn-bg:         #fff5fb;
  --bn-surf:       #ffffff;
  --bn-surf-2:     #fce7f3;
  --bn-acc-subtle: #fdf2ff;

  /* Text */
  --bn-text:       #1f1235;
  --bn-text-muted: #6b5b73;
  --bn-text-faint: #8c6f9b;

  /* Accent */
  --bn-acc:        #db2777;
  --bn-acc-hover:  #be185d;
  --bn-acc-on:     #ffffff;

  /* Borders */
  --bn-bdr:        #f9d0e7;
  --bn-bdr-strong: #f472b6;

  /* Shared */
  --bn-radius-sm:  8px;
  --bn-radius-md:  14px;
  --bn-radius-lg:  22px;
  --bn-radius-full:9999px;
  --bn-transition: 0.2s ease;
  --bn-shadow:     0 4px 24px rgba(219,39,119,0.12);
  --bn-shadow-card:0 2px 12px rgba(0,0,0,0.07);
}

/* ── Dark mode tokens ────────────────────────────────── */
[data-theme="dark"] {
  --bn-bg:         #140a1a;
  --bn-surf:       #1f1130;
  --bn-surf-2:     #2a1940;
  --bn-acc-subtle: #2d1545;

  --bn-text:       #fdf2ff;
  --bn-text-muted: #c8a0d8;
  --bn-text-faint: #a78bba;

  --bn-acc:        #f472b6;
  --bn-acc-hover:  #fb7bc8;
  --bn-acc-on:     #1f1130;

  --bn-bdr:        #3d2050;
  --bn-bdr-strong: #7b3f8a;

  --bn-shadow:     0 4px 24px rgba(0,0,0,0.4);
  --bn-shadow-card:0 2px 12px rgba(0,0,0,0.3);
}

/* ── Base reset ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

/*
 * Smooth scrolling — wrapped in prefers-reduced-motion so users who have
 * requested reduced motion in their OS settings get instant scrolling instead.
 * This also satisfies WCAG 2.1 SC 2.3.3 (Animation from Interactions).
 */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bn-bg);
  color: var(--bn-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--bn-transition), color var(--bn-transition);
}

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

a {
  color: var(--bn-acc);
  text-decoration: none;
  transition: color var(--bn-transition);
}

a:hover {
  color: var(--bn-acc-hover);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ── Skip link (accessibility — required for keyboard navigation) ─────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--bn-acc);
  color: var(--bn-acc-on);
  padding: 10px 20px;
  border-radius: var(--bn-radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.1s;
}

.skip-link:focus {
  top: 16px;
}

/* ── Screen-reader only utility ─────────────────────── */
.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;
}

/* ── Typography utilities ────────────────────────────── */
.text-muted  { color: var(--bn-text-muted); }
.text-faint  { color: var(--bn-text-faint); }
.text-accent { color: var(--bn-acc); }
.text-center { text-align: center; }

/* ── Button utilities ────────────────────────────────── */

/* Primary — solid pink (use for all main CTAs) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bn-acc);
  color: var(--bn-acc-on);
  border: 2px solid var(--bn-acc);
  border-radius: var(--bn-radius-full);
  padding: 12px 28px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-decoration: none;
  transition: background var(--bn-transition), border-color var(--bn-transition), transform var(--bn-transition), box-shadow var(--bn-transition);
  box-shadow: 0 4px 14px rgba(219,39,119,0.3);
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--bn-acc-hover);
  border-color: var(--bn-acc-hover);
  color: var(--bn-acc-on);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(219,39,119,0.4);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(219,39,119,0.3);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--bn-acc);
  outline-offset: 3px;
}

/* Ghost — outline style */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--bn-acc);
  border: 2px solid var(--bn-bdr-strong);
  border-radius: var(--bn-radius-full);
  padding: 12px 28px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--bn-transition), color var(--bn-transition), border-color var(--bn-transition);
  cursor: pointer;
}

.btn-ghost:hover {
  background: var(--bn-acc-subtle);
  color: var(--bn-acc-hover);
  border-color: var(--bn-acc);
}

.btn-ghost:active {
  transform: translateY(1px);
}

.btn-ghost:focus-visible {
  outline: 2px solid var(--bn-acc);
  outline-offset: 3px;
}

/* ── Scroll reveal ───────────────────────────────────── */
/*
 * Wrapped in prefers-reduced-motion: no-preference.
 * Users with motion sensitivity get content shown immediately with no animation.
 */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback for reduced-motion: always show content, no transform */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
