/* ========== DESIGN TOKENS ========== */
:root, [data-theme="light"] {
  /* Type 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.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.5rem + 3.5vw, 4rem);

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

  /* Surfaces — warm off-white, cantiere neutral */
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-surface-2: #F4F1EC;
  --color-surface-offset: #EDE9E2;
  --color-border: #DDD8CF;
  --color-divider: #E8E4DC;

  /* Text */
  --color-text: #1F1D1A;
  --color-text-muted: #5C5851;
  --color-text-faint: #95918A;
  --color-text-inverse: #FAF8F5;

  /* Primary — orange cantiere */
  --color-primary: #E8742C;
  --color-primary-hover: #C95E1B;
  --color-primary-active: #A24A11;
  --color-primary-highlight: #FBE8D5;

  /* Dark accent — for header/cta-final */
  --color-dark: #1F1D1A;
  --color-dark-2: #2A2723;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(31, 29, 26, 0.05);
  --shadow-md: 0 6px 16px rgba(31, 29, 26, 0.08);
  --shadow-lg: 0 20px 40px rgba(31, 29, 26, 0.12);

  /* Container widths */
  --content-narrow: 720px;
  --content-default: 1080px;
  --content-wide: 1280px;

  /* Fonts */
  --font-body: 'Manrope', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

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

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

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
}

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.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p, li, figcaption { text-wrap: pretty; }
p { max-width: 65ch; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }

::selection {
  background: var(--color-primary-highlight);
  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;
  }
}

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

a, button, [role="button"], input, textarea, select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* container */
.container {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-8));
}
