/* ============================================================
   Rock Steady — design tokens & base reset
   Palette: limestone surfaces, charcoal text, terracotta accent
   ============================================================ */

:root {
  /* Type — fluid scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.2vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem);
  --text-hero: clamp(2.75rem, 1.5rem + 5vw, 6rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Color — Limestone & Clay */
  --color-bg: #f4efe7;          /* warm limestone */
  --color-surface: #fbf7f0;     /* cream surface */
  --color-surface-2: #ece5d8;   /* deeper limestone */
  --color-surface-3: #ddd2bf;   /* sandstone */

  --color-text: #1f1c17;        /* deep charcoal */
  --color-text-muted: #5e574c;  /* warm stone gray */
  --color-text-faint: #8d8576;  /* faint stone */
  --color-text-inverse: #fbf7f0;

  --color-border: #d8cebc;
  --color-border-strong: #b9ac93;
  --color-divider: #e6dfd1;

  /* Brand accent — Terracotta / Clay */
  --color-primary: #a04a2a;     /* clay */
  --color-primary-hover: #8a3b1f;
  --color-primary-active: #6f2e15;
  --color-primary-soft: #e9d5c5;

  /* Deep accent — used for dark sections */
  --color-deep: #1f1c17;
  --color-deep-2: #2a2620;
  --color-deep-3: #3a342b;

  /* Secondary accent — Slate green (subtle, used sparingly) */
  --color-secondary: #4a5949;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  /* Shadows — warm-toned */
  --shadow-sm: 0 1px 2px rgba(50, 38, 25, 0.06);
  --shadow-md: 0 8px 24px rgba(50, 38, 25, 0.09);
  --shadow-lg: 0 24px 60px rgba(50, 38, 25, 0.16);

  /* Transitions */
  --t-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-base: 260ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container: 1240px;
  --container-narrow: 880px;

  /* Fonts */
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  /* very subtle paper texture via repeating gradient */
  background-image:
    radial-gradient(at 12% 18%, rgba(160, 74, 42, 0.04) 0, transparent 40%),
    radial-gradient(at 88% 82%, rgba(74, 89, 73, 0.05) 0, transparent 45%);
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }

ul[role="list"], ol[role="list"] { list-style: none; }

input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  line-height: 1.1;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

button { cursor: pointer; background: none; border: none; }

::selection {
  background: rgba(160, 74, 42, 0.22);
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utility */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--color-deep); color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); z-index: 100; }

.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;
}
