/* ============================================================
   Stimulus Consulting Group — Main Stylesheet
   Anthropic-inspired warm, minimal, professional design
   ============================================================ */

/* --- CSS Variables (Anthropic-inspired palette) --- */
:root {
  --bg-primary: #FAF8F5;
  --bg-secondary: #F3F0EB;
  --bg-surface: #FFFFFF;
  --bg-warm: #FBF7F2;
  
  --text-primary: #1A1817;
  --text-secondary: #6B6560;
  --text-tertiary: #948E88;
  
  --accent: #D4A574;
  --accent-hover: #C19360;
  --accent-light: #F0E4D4;
  --accent-subtle: #F8F0E6;
  
  --border: #E8E4DF;
  --border-light: #F0EDE8;
  
  --success: #3B7A57;
  --success-light: #E8F2EC;
  
  --font-heading: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  
  --max-width: 1200px;
  --header-height: 72px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
}

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

a {
  color: var(--accent-hover);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.text-muted { color: var(--text-tertiary); }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

.section-sm { padding: 3rem 0; }
.section-lg { padding: 7rem 0; }

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

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

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

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

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

/* --- Hero --- */
.hero {
  padding: 6rem 0;
  background: var(--bg-warm);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 1.25rem;
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.hero-stats .stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-hover);
  line-height: 1;
}

.hero-stats .stat-label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  position: relative;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-tertiary);
  font-size: 0.95rem;
  margin: 0;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-hover);
}

.service-link:hover {
  gap: 0.6rem;
}

/* --- Stats Banner --- */
.stats-banner {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 3.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item .stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-hover);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item .stat-desc {
  font-size: 0.95rem;
  color: var(--text-tertiary);
}

/* --- About Section --- */
.about-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-xl);
  transform: translate(12px, 12px);
  z-index: -1;
}

.about-content h2 {
  margin-bottom: 1.5rem;
}

/* --- Testimonials --- */
.testimonials {
  background: var(--bg-warm);
}

.testimonial-slider {
  max-width: 700px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.testimonial-text {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-role {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.slider-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* --- FAQ --- */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem 0;
  cursor: pointer;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-top: 0.75rem;
}

.faq-icon {
  transition: transform 0.3s ease;
  color: var(--text-tertiary);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255,255,255,0.85);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.cta-section .btn-primary {
  background: #fff;
  color: var(--accent-hover);
}

.cta-section .btn-primary:hover {
  background: var(--bg-primary);
  color: var(--accent-hover);
}

/* --- Blog Cards --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  height: 200px;
  background: var(--bg-secondary);
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.blog-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: rgba(255,255,255,0.4);
  font-size: 1.25rem;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--accent);
}

/* --- Page Header (for subpages) --- */
.page-header {
  background: var(--bg-warm);
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-tertiary);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.contact-form {
  background: var(--bg-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.breadcrumb a {
  color: var(--text-tertiary);
}

.breadcrumb a:hover {
  color: var(--accent-hover);
}

/* --- Mobile Navigation --- */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.5rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content p {
    max-width: 100%;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .services-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .about-section .container {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  
  .main-nav.open {
    display: flex;
  }
  
  .services-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .hero {
    padding: 4rem 0;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
}

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

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
