/* ==========================================================================
   Base & Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-hero); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--text-3xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p {
  margin: 0 0 var(--space-4);
  max-width: 65ch;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-in-out);
}

a:hover {
  color: var(--brand-accent-wavy);
}

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

ul, ol {
  padding-left: var(--space-6);
  margin: 0 0 var(--space-4);
}

li {
  margin-bottom: var(--space-2);
}

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Layout containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 768px) {
  .container, .container-narrow, .container-wide {
    padding: 0 var(--space-8);
  }
}

/* Section spacing */
.section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) 0;
}

.section-sm {
  padding: clamp(var(--space-12), 6vw, var(--space-20)) 0;
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-primary);
  margin-bottom: var(--space-3);
}

.hero-tagline {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 62ch;
  line-height: 1.55;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.9rem 1.6rem;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease-in-out);
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--brand-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-deep);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-secondary:hover {
  background: var(--brand-primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  padding-left: 0;
  padding-right: 0;
}

.btn-ghost:hover {
  color: var(--brand-primary);
}

.btn-lg {
  padding: 1.1rem 2rem;
  font-size: var(--text-base);
}

/* Cards */
.card {
  background: var(--background-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--dur-base) var(--ease-out-quart);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* Divider */
hr, .divider {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-16) 0;
}

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