/* ============================================================
   GLOBAL STYLES — Lumè Nail Spa & Beauty Bar
   Base element styles, layout utilities, and scroll animations.
   ============================================================ */

/* ── Base ─────────────────────────────────────────────────────── */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  color: var(--color-text);
  background-color: var(--color-cream);
  overflow-x: hidden;
}

/* Body scroll-lock when mobile nav is open */
body.nav-open {
  overflow: hidden;
}

/* ── Headings ─────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  color: var(--color-secondary);
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

/* Responsive heading scale */
@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
}

/* ── Paragraphs & body text ───────────────────────────────────── */

p {
  line-height: var(--leading-normal);
  max-width: 65ch; /* Optimal reading width */
}

p + p {
  margin-top: var(--space-md);
}

/* ── Links ────────────────────────────────────────────────────── */

a {
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

/* ── Lists ────────────────────────────────────────────────────── */

ul, ol {
  padding-left: var(--space-lg);
}

li + li {
  margin-top: var(--space-xs);
}

/* ── Layout utilities ─────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* Standard section vertical rhythm */
.section {
  padding-block: var(--space-3xl);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-4xl);
  }
}

@media (min-width: 1024px) {
  .section {
    padding-block: var(--space-5xl);
  }
}

/* Alternating section backgrounds */
.section--blush {
  background-color: var(--color-blush);
}

.section--dark {
  background-color: var(--color-secondary);
  color: var(--color-cream);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

/* ── Section header (label + heading + description) ──────────── */

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: var(--space-3xl);
  }
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  max-width: 55ch;
  margin-inline: auto;
}

/* ── Gold accent divider ──────────────────────────────────────── */

.divider {
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-accent-gold),
    transparent
  );
  margin: var(--space-lg) auto;
  border: none;
}

.divider--left {
  margin-left: 0;
}

/* ── 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;
}

/* ── Skip link ────────────────────────────────────────────────── */

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-md);
  z-index: var(--z-toast);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-secondary);
  color: var(--color-white);
  font-weight: var(--weight-semibold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

/* ── Scroll-reveal animation ──────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity var(--transition-slower),
    transform var(--transition-slower);
}

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

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 500ms; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 600ms; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 700ms; }

/* ── Flex / Grid helpers ──────────────────────────────────────── */

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid {
  display: grid;
}

/* ── Text utilities ───────────────────────────────────────────── */

.text-center { text-align: center; }
.text-left   { text-align: left; }

.text-muted {
  color: var(--color-text-muted);
}

.text-primary {
  color: var(--color-primary);
}

.text-gold {
  color: var(--color-accent-gold);
}

/* ── Image utilities ──────────────────────────────────────────── */

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Selection color ──────────────────────────────────────────── */

::selection {
  background-color: var(--color-blush);
  color: var(--color-secondary);
}
