/* ============================================
   BASE — Reset, Custom Properties, Typography
   TradeBrain — exact match of HubSpot site
   ============================================ */

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

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

body {
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* --- Custom Properties --- */
:root {
  /* Colors — exact from HubSpot site */
  --color-bg: #FFFFFF;
  --color-bg-light: rgba(232, 246, 252, 1);
  --color-bg-lighter: rgba(214, 238, 250, 1);
  --color-bg-sky: rgba(135, 206, 235, 1);
  --color-surface: #FFFFFF;
  --color-primary: #415c76;        /* Solid CTA navy — buttons & header CTA */
  --color-primary-hover: #2f4860;  /* CTA hover (slightly darker navy) */
  --color-accent: #2c98d9;         /* Brand cyan — links, accent strokes */
  --color-dark-green: #1B4332;
  --color-text: #425b76;           /* Kept for legacy refs */
  --color-heading: #415c76;        /* Headings — brand dark blue */
  --color-body: #30343B;           /* Body / paragraph copy — dark gray */
  --color-text-light: #87909e;
  --color-dark-bg: #0e1b34;        /* Deep navy section background */
  --color-dark-bg-deep: #0a1429;   /* Even deeper at the bottom */
  --color-border: #D6EEFA;
  --color-border-dark: #666666;
  --color-card-shadow: rgba(102, 102, 102, 0.5);

  /* Gradients */
  --grad-light-to-white: linear-gradient(to bottom, var(--color-bg-light), var(--color-bg));
  --grad-white-to-light: linear-gradient(to bottom, var(--color-bg), var(--color-bg-light));
  --grad-light-to-white-up: linear-gradient(to top, var(--color-bg), var(--color-bg-light));
  --grad-card: linear-gradient(to bottom right, var(--color-bg-light), var(--color-bg-lighter), var(--color-bg-sky));

  /* Typography */
  --font-display: 'EB Garamond', Georgia, serif;
  --font-body: 'Carlito', sans-serif;

  --text-hero: clamp(1.9rem, 3.2vw + 0.5rem, 2.8rem);
  --text-h2: clamp(1.4rem, 1.8vw + 0.4rem, 1.85rem);
  --text-h3: clamp(1.1rem, 1vw + 0.3rem, 1.35rem);
  --text-h4: clamp(1.1rem, 1.2vw + 0.2rem, 1.3rem);
  --text-body: 16px;
  --text-body-lg: 18px;
  --text-small: 14px;

  /* Layout */
  --max-width: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.3s;

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
}

/* --- Typography --- */
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-body);
  background-color: var(--color-bg);
}

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

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

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

strong {
  font-weight: 700;
}

::selection {
  background: var(--color-accent);
  color: #FFFFFF;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-light); }
::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 3px; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Section Spacing — consistent vertical rhythm sitewide --- */
.section,
section {
  padding: 72px 0;
}
@media (min-width: 768px) {
  .section,
  section { padding: 96px 0; }
}
.hero {
  padding: 96px 0 64px;
}
@media (min-width: 768px) {
  .hero { padding: 140px 0 96px; }
}

/* --- Section: deep-navy spotlight --- */
.section-dark {
  position: relative;
  color: #e6edf5;
  background:
    radial-gradient(circle at 80% 20%, rgba(44, 152, 217, 0.18), transparent 55%),
    radial-gradient(circle at 15% 90%, rgba(44, 152, 217, 0.10), transparent 50%),
    linear-gradient(180deg, var(--color-dark-bg) 0%, var(--color-dark-bg-deep) 100%);
}
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
  color: #ffffff;
}
.section-dark p,
.section-dark li,
.section-dark blockquote {
  color: #c7d1de;
}
.section-dark .eyebrow,
.section-dark .stat-label {
  color: #87a3c7;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}
.section-dark .stat-number {
  color: var(--color-accent);
}
.section-dark .btn-primary {
  background: var(--color-accent);
}
.section-dark .btn-primary:hover {
  background: #5bb4e8;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-body);
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease-out);
  cursor: pointer;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(65, 92, 118, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #FFFFFF;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.btn-gradient:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-arrow::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  transition: transform var(--duration) var(--ease-out);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

.btn-white.btn-arrow::after,
.btn-primary.btn-arrow::after,
.btn-gradient.btn-arrow::after {
  filter: brightness(0) invert(1);
}

/* --- Grid --- */
.grid {
  display: grid;
  gap: var(--gutter);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

.grid-5-7 { grid-template-columns: 1fr; }
.grid-6-6 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-5-7 { grid-template-columns: 5fr 7fr; }
  .grid-6-6 { grid-template-columns: 1fr 1fr; }
}

.align-center { align-items: center; }
.align-start { align-items: start; }
.text-center { text-align: center; }

/* --- Cards --- */
.card {
  background: var(--grad-card);
  border: 1px solid var(--color-text);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--duration) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
