/* ==========================================================================
   Clear to Grow - Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables & Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --white: #ffffff;
  --off-white: #fafbfc;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Electric Blue Palette */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-primary: #0066ff;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  
  /* Semantic */
  --color-primary: var(--blue-primary);
  --color-primary-hover: var(--blue-700);
  --color-text: var(--gray-800);
  --color-text-muted: var(--gray-500);
  --color-background: var(--white);
  --color-surface: var(--gray-50);
  --color-border: var(--gray-200);
  
  /* Typography */
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  
  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --max-width-content: 680px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--gray-900);
}

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

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

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.text-display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, var(--text-6xl));
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, var(--text-5xl));
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.text-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, var(--text-3xl));
  font-weight: 600;
  line-height: 1.2;
}

.text-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.text-body-lg {
  font-size: var(--text-lg);
  line-height: 1.7;
}

.text-small {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.text-micro {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--color-text-muted);
}

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

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--content {
  max-width: var(--max-width-content);
}

.section {
  padding: var(--space-20) 0;
}

.section--lg {
  padding: var(--space-32) 0;
}

.section--surface {
  background-color: var(--color-surface);
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__logo-mark {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__logo-mark svg {
  width: 18px;
  height: 18px;
  color: white;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--gray-900);
}

.nav__cta {
  margin-left: var(--space-4);
}

/* Mobile Nav */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav__toggle svg {
  width: 24px;
  height: 24px;
  color: var(--gray-700);
}

@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }
  
  .nav__links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
  }
  
  .nav__links.active {
    display: flex;
  }
  
  .nav__cta {
    margin-left: 0;
    width: 100%;
  }
  
  .nav__cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

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

.btn--secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--gray-50);
  color: var(--gray-900);
  border-color: var(--gray-300);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
}

.btn--ghost:hover {
  background: var(--blue-50);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding-top: calc(72px + var(--space-20));
  padding-bottom: var(--space-20);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

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

.hero--centered .hero__content {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.hero__micro {
  display: inline-block;
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--blue-50);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
}

.hero__headline {
  margin-bottom: var(--space-6);
}

.hero__subhead {
  font-size: clamp(1.125rem, 2vw, var(--text-xl));
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 600px;
}

.hero--centered .hero__subhead {
  margin-left: auto;
  margin-right: auto;
}

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

.card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
}

.card--featured {
  border-color: var(--color-primary);
  position: relative;
}

.card--featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card__icon {
  width: 48px;
  height: 48px;
  background: var(--blue-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.card__icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.card__price {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.card__description {
  color: var(--gray-600);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

/* Card Grid */
.card-grid {
  display: grid;
  gap: var(--space-6);
}

.card-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .card-grid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .card-grid--2 {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */
.check-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.check-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.check-list__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  margin-top: 2px;
}

.check-list__icon--muted {
  color: var(--gray-400);
}

.problem-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.problem-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.problem-list__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--gray-400);
}

/* --------------------------------------------------------------------------
   Section Headers
   -------------------------------------------------------------------------- */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin-left: auto;
  margin-right: auto;
}

.section-header__title {
  margin-bottom: var(--space-4);
}

.section-header__description {
  color: var(--gray-600);
  font-size: var(--text-lg);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   FAQ / Accordion
   -------------------------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: var(--white);
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--gray-900);
  transition: background var(--transition-fast);
}

.faq-item__question:hover {
  background: var(--gray-50);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--gray-400);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  display: none;
  padding: 0 var(--space-6) var(--space-6);
  color: var(--gray-600);
  line-height: 1.6;
}

.faq-item.active .faq-item__answer {
  display: block;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-700);
}

.form-input,
.form-textarea,
.form-select {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--blue-100);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-inline {
  display: flex;
  gap: var(--space-3);
}

.form-inline .form-input {
  flex: 1;
}

@media (max-width: 480px) {
  .form-inline {
    flex-direction: column;
  }
  
  .form-inline .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: var(--space-16) 0;
  background: var(--gray-900);
  color: var(--gray-400);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-12);
}

.footer__brand {
  max-width: 280px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer__logo-mark {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer__logo-mark svg {
  width: 16px;
  height: 16px;
  color: white;
}

.footer__tagline {
  font-size: var(--text-sm);
  line-height: 1.6;
}

.footer__links {
  display: flex;
  gap: var(--space-16);
}

.footer__column h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer__column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__column a {
  font-size: var(--text-sm);
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

.footer__column a:hover {
  color: var(--white);
}

.footer__bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--gray-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
}

@media (max-width: 768px) {
  .footer__inner {
    flex-direction: column;
  }
  
  .footer__links {
    flex-direction: column;
    gap: var(--space-8);
  }
  
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   Page-Specific: Kit Detail
   -------------------------------------------------------------------------- */
.kit-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.kit-hero__visual {
  background: var(--gray-50);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.kit-hero__icon {
  width: 120px;
  height: 120px;
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .kit-hero {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .kit-hero__visual {
    min-height: 240px;
    order: -1;
  }
  
  .kit-hero__icon {
    width: 80px;
    height: 80px;
  }
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: relative;
  padding-left: var(--space-8);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) + 4px);
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
}

.timeline__day {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-1);
}

.timeline__content {
  color: var(--gray-600);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.hidden { display: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Body padding for fixed nav */
body {
  padding-top: 0;
}

/* Smooth scroll offset for anchors */
[id] {
  scroll-margin-top: 100px;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeIn 0.5s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .nav,
  .footer {
    display: none;
  }
  
  .hero {
    padding-top: var(--space-8);
    min-height: auto;
  }
}
