/* ============================================
   BASE.CSS — Design Tokens & Reset
   Ascend Tax Savings
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400;1,9..40,500&display=swap');

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

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

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul, ol {
  list-style: none;
}

/* Skip to content */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-to-content:focus {
  top: 0;
}

/* ---- Design Tokens ---- */
:root {
  /* Colors — Light Mode */
  --color-bg: #FAFAF7;
  --color-surface: #FFFFFF;
  --color-dark: #1A3A2A;
  --color-primary: #2D7A4F;
  --color-primary-hover: #1F5C3A;
  --color-gold: #D4A853;
  --color-gold-soft: rgba(212, 168, 83, 0.12);
  --color-text: #1C1C1C;
  --color-text-muted: #5A5A5A;
  --color-light-tint: #E8F5E9;
  --color-border: rgba(28, 28, 28, 0.08);
  --color-border-strong: rgba(28, 28, 28, 0.15);

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2rem;      /* 32px */
  --text-4xl: 2.5rem;    /* 40px */
  --text-5xl: 3rem;      /* 48px */
  --text-hero: clamp(2.5rem, 5vw, 4rem); /* 40-64px */

  /* 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;
  --section-padding: clamp(3rem, 8vw, 6rem);
  --container-padding: clamp(1rem, 4vw, 2rem);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.04);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

/* ---- Dark Mode Tokens ---- */
[data-theme="dark"] {
  --color-bg: #0F1F16;
  --color-surface: #162B1E;
  --color-dark: #E8F5E9;
  --color-primary: #3DA366;
  --color-primary-hover: #4DBF78;
  --color-gold: #E0B96A;
  --color-gold-soft: rgba(224, 185, 106, 0.15);
  --color-text: #E8EDE9;
  --color-text-muted: #9BA89E;
  --color-light-tint: rgba(45, 122, 79, 0.15);
  --color-border: rgba(232, 237, 233, 0.08);
  --color-border-strong: rgba(232, 237, 233, 0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.12);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.3), 0 8px 20px rgba(0,0,0,0.12);
}

/* ---- Base Styles ---- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

p {
  line-height: 1.7;
  color: var(--color-text-muted);
}

strong {
  font-weight: 700;
}

/* ---- Utility Classes ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

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

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 122, 79, 0.25);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(45, 122, 79, 0.35);
  transform: translateY(-1px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn--secondary:hover {
  background: var(--color-light-tint);
}

.btn--large {
  padding: 18px 36px;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn--small {
  padding: 10px 20px;
  font-size: var(--text-xs);
}

/* Text link */
.text-link {
  color: var(--color-primary);
  font-weight: 500;
  transition: color var(--duration-fast);
  cursor: pointer;
}
.text-link:hover {
  color: var(--color-primary-hover);
}

/* ---- Scroll Animation ---- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.1s; }
.stagger-3 { transition-delay: 0.15s; }
.stagger-4 { transition-delay: 0.2s; }

/* Screen reader only */
.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;
}
