/* Import local fonts */
/* ========== Local Font Declarations ========== */
/* Variable fonts for optimal performance - single file handles all weights 400-700 */
/* Newsreader - Display Font */
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/Newsreader-VariableFont_opsz,wght.woff2') format('woff2'),
       url('/fonts/Newsreader-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Newsreader Italic */
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/Newsreader-Italic-VariableFont_opsz,wght.woff2') format('woff2'),
       url('/fonts/Newsreader-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter - Body Font */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-VariableFont_opsz,wght.woff2') format('woff2'),
       url('/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter Italic */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2'),
       url('/fonts/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 16px;
}
body {
  font-family: 'Inter', sans-serif;
  font-synthesis: none;
}
code {
  background-color: #F5F5F7;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}
@media (max-width: 1024px) {
  html {
    font-size: 14px;
  }
}

/* ========== Design System Variables ========== */
:root {
  /* Colors */
  --primary: #695AF2;
  --primary-dark: #503DD8;
  --white: #FFFFFF;
  --charcoal: #1A1C1D;
  --light-gray: #F5F5F7;
  --gray: #E2E2E2;
  --dark-gray: #474555;
  --surface: #F9F9FB;
  
  /* Typography */
  --font-display: 'Newsreader', serif;
  --font-body: 'Inter', sans-serif;
  
  /* Spacing (8px base unit) */
  --xs: 4px;
  --sm: 16px;
  --md: 32px;
  --lg: 60px;
  --xl: 128px;
  
  /* Sizes */
  --container-max: 1440px;
  --gutter: 24px;
  --margin-desktop: 80px;
  --margin-mobile: 20px;

  /* CTAs (.cta) */
  --cta-radius: 4px;
  --cta-pad-y: 12px;
  --cta-pad-x: 22px;
  --cta-font-size: 14px;
  --cta-font-size-lg: 15px;
  --cta-pad-y-lg: 14px;
  --cta-pad-x-lg: 32px;

  /* UI polish  text selection */
  --selection-bg: rgba(26, 28, 29, 0.1);
  --selection-color: var(--charcoal);
  --selection-bg-on-dark: rgba(255, 255, 255, 0.9);
  --selection-color-on-dark: var(--charcoal);
  --scrollbar-track: var(--white);
  --scrollbar-thumb: #c6c6c9;
  --scrollbar-thumb-hover: #9a9aa0;
}

/* ========== Route Loading State ========== */
.route-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  font-size: 16px;
  color: var(--dark-gray);
  font-family: var(--font-body);
}

.route-loading::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* ========== Global UI polish ========== */
html {
  color-scheme: light;
  accent-color: var(--primary);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-color);
}

::-moz-selection {
  background-color: var(--selection-bg);
  color: var(--selection-color);
}

/*
 * Light text on charcoal  add .surface-dark to any block (CTAs, quotes, panels).
 * Legacy BEM suffixes below are covered until markup uses the utility consistently.
 */
.surface-dark ::selection,
.section-dark ::selection,
[class*='-final-cta'] ::selection,
[class$='-closing'] ::selection,
.home-philosophy ::selection,
.book-call-quote ::selection,
.results-spotlight__panel ::selection,
.specialty-proof__case ::selection,
.client-portal-soon ::selection {
  background-color: var(--selection-bg-on-dark);
  color: var(--selection-color-on-dark);
}

.surface-dark ::-moz-selection,
.section-dark ::-moz-selection,
[class*='-final-cta'] ::-moz-selection,
[class$='-closing'] ::-moz-selection,
.home-philosophy ::-moz-selection,
.book-call-quote ::-moz-selection,
.results-spotlight__panel ::-moz-selection,
.specialty-proof__case ::-moz-selection,
.client-portal-soon ::-moz-selection {
  background-color: var(--selection-bg-on-dark);
  color: var(--selection-color-on-dark);
}

::placeholder {
  color: var(--dark-gray);
  opacity: 0.85;
}

input,
textarea,
select,
[contenteditable='true'] {
  caret-color: var(--primary);
}

a,
button,
input,
textarea,
select,
summary,
[tabindex]:not([tabindex='-1']) {
  -webkit-tap-highlight-color: rgba(26, 28, 29, 0.08);
}

:where(a, button, input, textarea, select, summary, [tabindex]:not([tabindex='-1'])):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

:where(a, button, input, textarea, select, summary, [tabindex]:not([tabindex='-1'])):focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ========== Global Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height, 61px);
}

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--charcoal);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
}

h1 {
  font-size: 72px;
  line-height: 80px;
  letter-spacing: -0.02em;
  margin-bottom: var(--md);
}

h2 {
  font-size: 48px;
  line-height: 56px;
  letter-spacing: -0.01em;
  margin-bottom: var(--lg);
  font-weight: 400;
}

h3 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
  margin-bottom: var(--md);
}

p {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: var(--sm);
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
  border: 1px solid var(--charcoal);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.btn-secondary:hover {
  background-color: var(--light-gray);
}

/* ========== Global CTAs (use on <a> or <button>) ========== */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  padding: var(--cta-pad-y) var(--cta-pad-x);
  font-family: var(--font-body);
  font-size: var(--cta-font-size);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  border-radius: var(--cta-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  width: fit-content;
  box-sizing: border-box;
}

.cta:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.cta--lg {
  padding: var(--cta-pad-y-lg) var(--cta-pad-x-lg);
  font-size: var(--cta-font-size-lg);
}

/* Full-width CTA within a column (centered, capped width) */
.cta--block {
  width: 100%;
  max-width: 22rem;
  justify-content: center;
}

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

.cta--primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(105, 90, 242, 0.2);
}

.cta--secondary {
  background-color: var(--white);
  color: var(--charcoal);
  border-color: var(--charcoal);
}

.cta--secondary:hover {
  background-color: var(--light-gray);
  border-color: var(--primary);
  color: var(--primary);
}

/* Solid light CTA on dark backgrounds (e.g. testimonial panels) */
.cta--inverse {
  background-color: var(--white);
  color: var(--charcoal);
  border-color: var(--white);
}

.cta--inverse:hover {
  background-color: var(--light-gray);
  border-color: var(--light-gray);
  color: var(--charcoal);
}

button.cta {
  appearance: none;
  margin: 0;
  font: inherit;
}

/* Navigation styles live in src/components/Navbar.css */

/* ========== Hero Section ========== */
.hero {
  padding: var(--margin-desktop) var(--gutter);
  background-color: var(--white);
  border-bottom: 1px solid var(--gray);
}

.hero-content {
  text-align: left;
}

.hero-title {
  font-size: 72px;
  line-height: 80px;
  letter-spacing: -0.02em;
  margin-bottom: var(--md);
  color: var(--charcoal);
  font-weight: 400;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 28px;
  max-width: 800px;
  margin: 0 auto var(--lg);
  color: var(--dark-gray);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--lg);
  margin-top: var(--lg);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--xs);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--dark-gray);
  text-transform: uppercase;
}

/* ========== Color Architecture Section ========== */
.color-architecture {
  padding: var(--margin-desktop) var(--gutter);
  background-color: var(--surface);
  border-bottom: 1px solid var(--gray);
}

.color-architecture h2 {
  text-align: center;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--lg);
  margin-top: var(--lg);
}

.color-item {
  background-color: var(--white);
  border: 1px solid var(--gray);
  padding: var(--md);
}

.color-swatch {
  width: 100%;
  height: 120px;
  margin-bottom: var(--md);
  border: 1px solid var(--gray);
}

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

.color-swatch.white {
  background-color: var(--white);
  border: 1px solid var(--charcoal);
}

.color-swatch.charcoal {
  background-color: var(--charcoal);
}

.color-item h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--xs);
  font-family: var(--font-body);
}

.color-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dark-gray);
  margin-bottom: var(--md);
}

.color-description {
  font-size: 14px;
  line-height: 22px;
  color: var(--dark-gray);
}

/* ========== Typography Section ========== */
.typography {
  padding: var(--margin-desktop) var(--gutter);
  background-color: var(--white);
  border-bottom: 1px solid var(--gray);
}

.typography h2 {
  text-align: center;
}

.typography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--lg);
  margin-top: var(--lg);
}

.typography-item {
  background-color: var(--surface);
  border: 1px solid var(--gray);
  padding: var(--md);
}

.type-display {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 400;
  line-height: 80px;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin-bottom: var(--md);
}

.type-headline {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 56px;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin-bottom: var(--md);
}

.type-body {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: var(--charcoal);
  margin-bottom: var(--md);
}

.type-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: var(--md);
}

.type-spec {
  font-size: 12px;
  color: var(--dark-gray);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: var(--sm);
}

.type-description {
  font-size: 14px;
  line-height: 22px;
  color: var(--dark-gray);
}

/* ========== Services Section ========== */
.services {
  padding: var(--margin-desktop) var(--gutter);
  background-color: var(--surface);
  border-bottom: 1px solid var(--gray);
}

.services h2 {
  text-align: center;
}

.section-subtitle {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--lg);
  font-size: 18px;
  color: var(--dark-gray);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--md);
  margin-top: var(--lg);
}

.service-card {
  background-color: var(--white);
  border: 1px solid var(--gray);
  padding: var(--md);
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
}

.service-number {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: var(--md);
}

.service-card h3 {
  font-size: 24px;
  line-height: 32px;
  margin-bottom: var(--md);
  color: var(--charcoal);
}

.service-card p {
  font-size: 16px;
  line-height: 24px;
  color: var(--dark-gray);
}

/* Footer styles live in src/components/Footer.css */

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
    line-height: 44px;
  }

  h1 {
    font-size: 36px;
    line-height: 44px;
  }

  h2 {
    font-size: 32px;
    line-height: 40px;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--md);
  }

  .hero {
    padding: var(--margin-mobile) var(--gutter);
  }

  .color-architecture,
  .typography,
  .services {
    padding: var(--margin-mobile) var(--gutter);
  }

  .type-display {
    font-size: 48px;
  }

  .type-headline {
    font-size: 32px;
  }
}
