/* 
  The Growth Maker - Unified Design System Stylesheet
  Strict 6-Color Palette, 4-Tier Type Scale, 8px Spacing Grid
*/

:root {
  /* 6-Color Palette */
  --color-primary: #0B0C0E;      /* Deep Black - Headings, Primary UI, High-contrast dark sections */
  --color-secondary: #4A4E58;    /* Muted Ink - Subtitles, metadata, secondary body text */
  --color-background: #FAFAFA;   /* Clean Canvas - Main page background */
  --color-surface: #FFFFFF;      /* Surface - Cards, containers, modals */
  --color-text: #111318;         /* Text - Standard high-contrast body text */
  --color-border: #E2E4E8;       /* Border - Dividers, card outlines, input borders */
  --color-accent: #FF5500;       /* Accent - Electric Orange for CTAs, active links, highlights */

  /* Legacy variable mappings for backward compatibility */
  --ink: var(--color-primary);
  --ink-soft: var(--color-secondary);
  --canvas: var(--color-background);
  --white: var(--color-surface);
  --blue: var(--color-accent);
  --blue-dark: #D44600;
  --lime: var(--color-accent);
  --mist: #F0F2F5;
  --line: var(--color-border);
  --line-dark: var(--color-primary);

  /* Typography Scale (Max 4 Font Families & Size Tiers) */
  --font-display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-utility: "JetBrains Mono", monospace;

  /* Spacing Scale (8px Multiples) */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1.0rem;   /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2.0rem;   /* 32px */
  --space-2xl: 3.0rem;  /* 48px */
  --space-3xl: 4.0rem;  /* 64px */
  --space-4xl: 6.0rem;  /* 96px */

  --container-max: 1440px;
  --radius-sm: 0.25rem; /* 4px */
  --radius: 0.5rem;    /* 8px */
}

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

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

body {
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-background);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

button, a {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* Material Symbols Integration */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Typography Hierarchy Standards */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1, .text-display-xl {
  font-size: clamp(2.5rem, 6vw, 4.5rem); /* 40px - 72px */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2, h3, .text-headline-xl {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem); /* 24px - 36px */
  font-weight: 700;
  line-height: 1.2;
}

p, .text-body-md {
  font-size: 1rem; /* 16px */
  line-height: 1.6;
  color: var(--color-secondary);
}

.text-body-lg {
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
}

.text-caption, .font-label-bold {
  font-family: var(--font-utility);
  font-size: 0.75rem; /* 12px */
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Accessibility Utility */
.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;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  color: var(--color-surface);
  background: var(--color-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Containers & Section Spacing Scale */
.container {
  width: min(calc(100% - 2rem), var(--container-max));
  margin-inline: auto;
}

.section-padding {
  padding-top: clamp(3rem, 6vw, 6rem);    /* 48px - 96px */
  padding-bottom: clamp(3rem, 6vw, 6rem); /* 48px - 96px */
}

/* Interactive Component Animations */
@keyframes fadeUpStagger {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.word-anim {
  display: inline-block;
  opacity: 0;
  animation: fadeUpStagger 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-link-anim {
  position: relative;
}
.nav-link-anim::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--color-accent);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}
.nav-link-anim:hover::after,
.nav-link-anim.active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.magnetic-btn {
  position: relative;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s ease, color 0.2s ease;
}

/* Accordion / FAQ styling */
.faq-answer {
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  max-height: 0;
  opacity: 0;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* Responsive Overflows & Mobile Refinement */
@media (max-width: 640px) {
  h1, .text-display-xl {
    font-size: 2.25rem; /* 36px on small mobile to eliminate horizontal scrolling */
    line-height: 1.1;
  }
  
  .container {
    width: min(calc(100% - 1.5rem), var(--container-max));
  }
}
