@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@700;800&display=swap');

@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

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

  body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }

  input, button, textarea, select {
    font: inherit;
  }
}

@layer base {
  :root {
    /* Color Palette - OKLCH */
    --pine-900: oklch(25% 0.04 160);
    --pine-800: oklch(35% 0.06 160);
    --pine-700: oklch(45% 0.08 160);
    --emerald-500: oklch(65% 0.15 160);
    --emerald-400: oklch(75% 0.12 160);
    --sand-200: oklch(92% 0.02 80);
    --sand-100: oklch(97% 0.01 80);
    --charcoal: oklch(20% 0.02 250);
    --white: oklch(100% 0 0);
    
    /* Semantic Colors */
    --primary: var(--pine-800);
    --accent: var(--emerald-500);
    --bg-main: var(--sand-100);
    --text-main: var(--charcoal);
    --text-muted: oklch(45% 0.02 250);

    /* Typography */
    --font-heading: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    /* Shadows & Effects */
    --shadow-sm: 0 2px 4px oklch(0% 0 0 / 0.05);
    --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.1);
    --shadow-lg: 0 10px 30px oklch(0% 0 0 / 0.15);
    --glass-bg: oklch(100% 0 0 / 0.7);
    --glass-border: oklch(100% 0 0 / 0.3);
  }

  body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    position: relative;
    overflow-x: hidden;
  }

  /* Noise Texture Layer */
  body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  }

  h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.1;
    color: var(--primary);
  }

  h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; }
  h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; margin-bottom: var(--space-md); }
  h3 { font-size: 1.5rem; font-weight: 700; }

  section {
    padding: var(--space-xl) var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
  }
}

@layer components {
  .btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
  }

  .btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px oklch(25% 0.04 160 / 0.4);
  }

  .btn-primary:hover {
    background: var(--pine-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px oklch(25% 0.04 160 / 0.5);
  }

  .btn-accent {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 14px oklch(65% 0.15 160 / 0.4);
  }

  .btn-accent:hover {
    background: var(--emerald-400);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px oklch(65% 0.15 160 / 0.5);
  }

  .card {
    background: var(--white);
    border-radius: 20px;
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid oklch(0% 0 0 / 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }

  .glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
  }

  .step-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: var(--space-sm);
  }
}

@layer utilities {
  .text-center { text-align: center; }
  .mt-lg { margin-top: var(--space-lg); }
  .mb-xl { margin-bottom: var(--space-xl); }
  .grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
  }
  .flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
