/* =========================================================
   base.css — Reset, CSS custom properties, global styles
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background-color: var(--white);
  color: var(--slate-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --blue:       #2563EB;
  --blue-dark:  #1D4ED8;
  --blue-light: #EFF6FF;
  --slate-900:  #0F172A;
  --slate-800:  #1E293B;
  --slate-600:  #475569;
  --slate-400:  #94A3B8;
  --slate-200:  #E2E8F0;
  --slate-100:  #F1F5F9;
  --white:      #FFFFFF;

  /* Typography */
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-heading:  'Fraunces', Georgia, serif;

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

  /* Border radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14);
  --shadow-phone: 0 24px 64px rgba(15,23,42,.20);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;

  /* Layout */
  --max-width: 1160px;
  --nav-height: 68px;
}

/* ---------- Global Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
  box-sizing: border-box;
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  color: var(--slate-600);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ---------- Mobile typography ---------- */
@media (max-width: 768px) {
  h1 { font-size: clamp(2rem, 8vw, 2.5rem); }
  h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(1.75rem, 7vw, 2.25rem); }
  h2 { font-size: clamp(1.35rem, 5.5vw, 1.75rem); }
}

/* ---------- Focus styles ---------- */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
