/* =====================================================
   ROSIE'S BEAUTY SPA — BASE STYLESHEET
   Reset, typography, layout helpers, utilities
   ===================================================== */

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

body,
h1, h2, h3, h4, h5, h6,
p,
ul, ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

/* ─── HTML / Body ───────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Main (pushes footer to bottom) ───────────────── */
main {
  flex: 1;
}

/* ─── Headings ──────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: var(--text-large-title); }
h2 { font-size: var(--text-title1); }
h3 { font-size: var(--text-title2); }
h4 { font-size: var(--text-title3); font-weight: 500; }
h5 { font-size: var(--text-headline); font-weight: 500; }
h6 { font-size: var(--text-body); font-weight: 500; }

/* ─── Links ─────────────────────────────────────────── */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ─── Images ────────────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Container ─────────────────────────────────────── */
.container {
  max-width: 1200px;
  padding: 0 20px;
  margin: 0 auto;
}

/* ─── Section ───────────────────────────────────────── */
.section {
  padding: var(--space-16) 0;
}

/* ─── Section Title ─────────────────────────────────── */
.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-title1);
  margin-bottom: var(--space-6);
}

/* ─── Section Subtitle ──────────────────────────────── */
.section-subtitle {
  font-size: var(--text-body);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}

/* ─── Screen-Reader Only ────────────────────────────── */
.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;
}

/* ─── Scroll Reveal ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── Fade-In Animation ─────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fadeIn var(--transition-slow) ease both;
}

/* ─── Text Selection ────────────────────────────────── */
::selection {
  background: var(--accent);
  color: #ffffff;
}

/* ─── Focus Visible ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Breadcrumbs ───────────────────────────────────── */
.breadcrumbs {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: var(--text-caption1);
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumbs li + li::before {
  content: '›';
  margin-right: 8px;
}

/* ─── Responsive Helpers ────────────────────────────── */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }
}

/* ─── Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
