/* ========================================
   DAVN Website — Design System CSS
   Based on .stitch/DESIGN.md
   ======================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Backgrounds */
  --deep-slate: #0F172A;
  --midnight-slate: #1E293B;
  --soft-cloud: #F8FAFC;
  --pure-white: #FFFFFF;

  /* Accents */
  --electric-indigo: #6366F1;
  --soft-indigo: #818CF8;
  --warm-amber: #F59E0B;
  --light-amber: #FBBF24;
  --twilight-violet: #8B5CF6;

  /* Text */
  --text-primary: #0F172A;
  --text-inverse: #E2E8F0;
  --text-muted: #94A3B8;

  /* Borders */
  --border-light: #E2E8F0;
  --border-dark: #334155;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding-desktop: 96px;
  --section-padding-mobile: 64px;
  --content-max-width: 1280px;
  --card-padding: 24px;
}

/* --- 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: 17px;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--soft-cloud);
}

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

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

a:hover {
  color: var(--soft-indigo);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}

.body-small {
  font-size: 15px;
  line-height: 1.6;
}

.caption {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.text-muted {
  color: var(--text-muted);
}

/* --- Layout --- */
.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-dark {
  background: var(--deep-slate);
  color: var(--text-inverse);
  padding: var(--section-padding-desktop) 0;
}

.section-light {
  background: var(--soft-cloud);
  color: var(--text-primary);
  padding: var(--section-padding-desktop) 0;
}

.section-white {
  background: var(--pure-white);
  color: var(--text-primary);
  padding: var(--section-padding-desktop) 0;
}

.gradient-divider {
  height: 2px;
  background: linear-gradient(to right, var(--electric-indigo), var(--twilight-violet));
}

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

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  color: var(--text-inverse);
  text-decoration: none;
}

.navbar-logo .logo-a {
  background: linear-gradient(135deg, var(--electric-indigo), var(--twilight-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  color: var(--text-inverse);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.navbar-links a:hover {
  color: var(--soft-indigo);
}

.navbar-links a.active {
  color: var(--electric-indigo);
}

.navbar-cta {
  display: inline-block;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-inverse);
  transition: all 0.3s ease;
}

/* Mobile Nav Panel */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  right: -100%;
  width: 280px;
  height: calc(100vh - 64px);
  background: var(--deep-slate);
  z-index: 999;
  transition: right 0.3s ease;
  padding: 32px 24px;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

.mobile-nav-overlay.open {
  display: block;
}

.mobile-nav a {
  display: block;
  color: var(--text-inverse);
  font-size: 17px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-dark);
}

.mobile-nav a:hover {
  color: var(--soft-indigo);
}

.mobile-nav .btn {
  margin-top: 24px;
  width: 100%;
  text-align: center;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  padding: 12px 24px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--electric-indigo);
  color: var(--pure-white);
  border-color: var(--electric-indigo);
}

.btn-primary:hover {
  background: var(--soft-indigo);
  border-color: var(--soft-indigo);
  color: var(--pure-white);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--electric-indigo);
  border-color: var(--electric-indigo);
}

.btn-secondary:hover {
  background: var(--electric-indigo);
  color: var(--pure-white);
}

.btn-secondary-light {
  background: transparent;
  color: var(--text-inverse);
  border-color: var(--text-inverse);
}

.btn-secondary-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--pure-white);
}

.btn-warm {
  background: var(--warm-amber);
  color: var(--deep-slate);
  border-color: var(--warm-amber);
}

.btn-warm:hover {
  background: var(--light-amber);
  border-color: var(--light-amber);
  color: var(--deep-slate);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* --- Cards --- */
.card-light {
  background: var(--pure-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: var(--card-padding);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: var(--card-padding);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.card-highlighted {
  border: 2px solid var(--electric-indigo);
  position: relative;
}

/* --- Badges --- */
.badge {
  display: inline-block;
  background: var(--warm-amber);
  color: var(--deep-slate);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.badge-muted {
  background: var(--border-light);
  color: var(--text-muted);
}

/* --- Hero Sections --- */
.hero {
  padding-top: calc(var(--section-padding-desktop) + 64px);
  padding-bottom: var(--section-padding-desktop);
  position: relative;
  overflow: hidden;
}

.hero-compact {
  padding-top: calc(64px + 64px);
  padding-bottom: 64px;
}

.hero .dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero .glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15), transparent 70%);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero h1 {
  position: relative;
  z-index: 1;
}

.hero p {
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Stats --- */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--electric-indigo);
}

.stat-label {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Pricing Cards --- */
.pricing-card {
  display: flex;
  flex-direction: column;
}

.pricing-card .price {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  margin: 16px 0 4px;
}

.pricing-card .price-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pricing-card ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
}

.pricing-card li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pricing-card li::before {
  content: "\2713";
  color: var(--electric-indigo);
  font-weight: 600;
  flex-shrink: 0;
}

.card-highlighted .pricing-card li::before {
  color: var(--warm-amber);
}

/* --- Testimonials --- */
.testimonial-card {
  position: relative;
  padding-top: 32px;
}

.testimonial-card .quote-mark {
  font-size: 48px;
  color: var(--electric-indigo);
  font-family: Georgia, serif;
  line-height: 1;
  margin-bottom: 8px;
}

.testimonial-card .quote-text {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial-card .author {
  font-weight: 600;
}

.testimonial-card .role {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--deep-slate), var(--midnight-slate));
  text-align: center;
  padding: var(--section-padding-desktop) 0;
  color: var(--text-inverse);
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  margin-bottom: 32px;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  margin-top: 0;
}

/* --- Footer --- */
.footer {
  background: var(--deep-slate);
  color: var(--text-inverse);
  padding: 64px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  color: var(--text-inverse);
  text-decoration: none;
  margin-bottom: 12px;
  display: block;
}

.footer-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-inverse);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-inverse);
}

.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--text-inverse);
}

.footer-legal {
  display: flex;
  gap: 24px;
}

/* LinkedIn Icon */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--midnight-slate);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.social-link:hover {
  background: var(--electric-indigo);
  color: var(--pure-white);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* --- Accordion --- */
.accordion-item {
  border-bottom: 1px solid var(--border-light);
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  color: inherit;
}

.accordion-header .chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.accordion-item.open .accordion-header .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content-inner {
  padding: 0 0 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Form Inputs --- */
.form-input {
  width: 100%;
  background: var(--pure-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--electric-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-input::placeholder {
  color: var(--text-muted);
}

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

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

/* Dark form inputs */
.section-dark .form-input {
  background: var(--midnight-slate);
  border-color: var(--border-dark);
  color: var(--text-inverse);
}

.section-dark .form-input:focus {
  border-color: var(--electric-indigo);
}

/* Inline form (e.g. newsletter) */
.inline-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
}

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

/* --- Process Steps --- */
.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--electric-indigo);
  color: var(--pure-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.step-text {
  font-weight: 500;
}

.step-arrow {
  color: var(--text-muted);
  font-size: 24px;
}

/* --- Icon placeholder --- */
.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--electric-indigo);
}

.section-dark .icon-circle {
  background: rgba(99, 102, 241, 0.2);
  color: var(--soft-indigo);
}

/* --- Quote Block --- */
.quote-block {
  border-left: 3px solid;
  border-image: linear-gradient(to bottom, var(--electric-indigo), var(--twilight-violet)) 1;
  padding: 24px 32px;
  font-size: 20px;
  font-style: italic;
  line-height: 1.6;
  max-width: 720px;
}

/* --- Location Tags --- */
.location-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.location-tag {
  background: rgba(99, 102, 241, 0.1);
  color: var(--electric-indigo);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 15px;
}

/* --- Blog Cards --- */
.blog-card-image {
  width: 100%;
  height: 200px;
  background: var(--border-light);
  border-radius: 12px 12px 0 0;
}

.blog-card .card-light {
  padding: 0;
  overflow: hidden;
}

.blog-card-body {
  padding: var(--card-padding);
}

.blog-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.blog-card h3 a {
  color: var(--text-primary);
}

.blog-card h3 a:hover {
  color: var(--electric-indigo);
}

.blog-card .excerpt {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-tab {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  color: var(--electric-indigo);
  border-bottom-color: var(--electric-indigo);
}

/* Featured Article */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.featured-image {
  width: 100%;
  height: 320px;
  background: var(--border-light);
  border-radius: 12px;
}

/* --- Scroll Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Spacer Utilities --- */
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }

/* --- Responsive --- */
@media (max-width: 1023px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 24px; }
  h4 { font-size: 20px; }

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

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

@media (max-width: 767px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
  h4 { font-size: 18px; }
  body { font-size: 16px; }

  .section-dark, .section-light, .section-white {
    padding: var(--section-padding-mobile) 0;
  }

  .hero {
    padding-top: calc(var(--section-padding-mobile) + 64px);
    padding-bottom: var(--section-padding-mobile);
  }

  .hero-compact {
    padding-top: calc(64px + 48px);
    padding-bottom: 48px;
  }

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

  .navbar-links {
    display: none;
  }

  .navbar-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav {
    display: block;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .stats-row {
    gap: 32px;
  }

  .featured-article {
    grid-template-columns: 1fr;
  }

  .process-steps {
    flex-direction: column;
    align-items: flex-start;
  }

  .step-arrow {
    display: none;
  }

  .inline-form {
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-block {
    padding: 16px 24px;
    font-size: 18px;
  }
}
