/* ============================================================
   BASE.CSS — Design tokens, reset, typography
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Nunito:wght@300;400;500;600;700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Brand Colors */
  --teal-primary:    #4FA3AB;
  --teal-deep:       #2F7F88;
  --teal-light:      #D6EEF0;
  --green-leaf:      #7FB38A;
  --green-light:     #E2F0E5;
  --green-deep:      #5C9268;

  /* Neutrals */
  --bg-cream:        #F7F9FA;
  --bg-white:        #FFFFFF;
  --border-light:    #E8EDEF;
  --shadow-color:    rgba(47, 127, 136, 0.10);

  /* Text */
  --text-dark:       #1E3A3E;
  --text-body:       #3D5A5E;
  --text-muted:      #7A9599;
  --text-white:      #FFFFFF;

  /* Gradients */
  --grad-main:       linear-gradient(135deg, #4FA3AB 0%, #7FB38A 100%);
  --grad-hero:       linear-gradient(160deg, rgba(47,127,136,0.88) 0%, rgba(79,163,171,0.72) 50%, rgba(127,179,138,0.65) 100%);
  --grad-card:       linear-gradient(145deg, #FFFFFF 0%, #F0F8F9 100%);

  /* Spacing Scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;

  /* Typography */
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body:    'Nunito', system-ui, sans-serif;

  /* Borders */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(47,127,136,0.08);
  --shadow-md:  0 6px 24px rgba(47,127,136,0.12);
  --shadow-lg:  0 16px 48px rgba(47,127,136,0.16);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.2;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; }

p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-body);
}

.lead {
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--text-body);
  font-weight: 400;
}

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

/* ---------- Selection ---------- */
::selection {
  background: var(--teal-light);
  color: var(--text-dark);
}

/* ---------- Scroll-triggered fade-in ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
