/* ======================================================================
   Pit o Cuixa — Base Styles
   
   Reset, body, typography, and font loading.
   DS-004: Quicksand with fallback, no FOIT.
   DS-003: Mobile-first (360px minimum).
   ====================================================================== */

/* ── Quicksand Font Loading ─────────────────────────────────────────── */
/* Quicksand font — self-hosted woff2 files in public/fonts/ */
/* Download from: https://fonts.google.com/specimen/Quicksand */
/* For now, use system fallback until font files are added */

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

html {
  /* DS-003: Base styles target mobile (360px minimum) */
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-on-surface);
  background-color: var(--color-surface);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading, var(--font-family));
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  line-height: var(--line-height-tight);
  color: var(--color-on-surface);
}

h1 {
  font-size: var(--font-size-3xl);
}

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

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

h4 {
  font-size: var(--font-size-lg);
}

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

a {
  color: var(--color-on-surface);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ── Images ─────────────────────────────────────────────────────────── */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── Form Elements ──────────────────────────────────────────────────── */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

/* ── Lists ──────────────────────────────────────────────────────────── */
ul,
ol {
  list-style: none;
}

/* ── Tables ─────────────────────────────────────────────────────────── */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Media ──────────────────────────────────────────────────────────── */
/* DS-003: Mobile-first — base styles are for 360px+ */
/* Enhancements at larger breakpoints handled per component */

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* DS-003: Tablet */
@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

/* DS-003: Desktop */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-xl);
  }
}
