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

/* === DESIGN TOKENS === */
:root {
  --bg: #F5F0E8;
  --bg-alt: #EDE8DF;
  --bg-dark: #1A1A1A;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-light: #8A8A8A;

  --primary: #D97757;
  --primary-soft: rgba(217, 119, 87, 0.1);
  --primary-dark: #C4613E;

  --green: #34c759;
  --green-soft: rgba(52, 199, 89, 0.1);
  --red: #ff3b30;

  --purple: #7C6AF7;

  --border: #D4CFC6;
  --border-light: #E0DBD2;

  /* Dark container tokens (hero, nav, dark cards) */
  --dark-bg: #1A1A1A;
  --dark-bg-alt: #222222;
  --dark-text: #F5F0E8;
  --dark-text-muted: #a1a1aa;
  --dark-border: #333333;
  --dark-border-light: #2a2a2a;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;

  --max-w: 1200px;
  --max-w-narrow: 680px;
  --section-pad: 120px;
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Background blob */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  width: 600px;
  height: 600px;
  background: var(--primary);
  opacity: 0.06;
  filter: blur(120px);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

/* === LAYOUT === */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 1;
}

section.alt {
  background: var(--bg-alt);
}

/* === TYPOGRAPHY === */
.section-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: var(--max-w-narrow);
}

.text-center {
  text-align: center;
}

.text-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

.hero-headline {
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-headline .accent {
  color: var(--primary);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 600px;
  margin: 0 auto 40px;
}

/* === FADE-IN === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  :root {
    --section-pad: 72px;
  }

  .hero-headline {
    font-size: 2.5rem;
  }

  .hero-sub {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 2rem;
  }

  body::before {
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
  }
}