/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --bg: #FAFAFA;
  --bg-alt: #F1F5F9;
  --bg-white: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #64748B;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --border: #E2E8F0;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

section {
  padding-block: 60px;
}

@media (min-width: 768px) {
  section {
    padding-block: 90px;
  }
}

@media (min-width: 1024px) {
  section {
    padding-block: 110px;
  }
}

/* ============================================================
   Navigation
   ============================================================ */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

#site-nav.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  background-color: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav-logo:hover {
  text-decoration: none;
  color: var(--accent-hover);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.2s ease;
}

.nav-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  width: 100%;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    right: 0;
    width: 240px;
    height: calc(100vh - var(--nav-height));
    background-color: var(--bg-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1.5rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-link {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  text-decoration: none;
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================================
   Hero Section
   ============================================================ */
#hero {
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  padding-block: 100px;
}

@media (min-width: 768px) {
  #hero {
    padding-block: 130px;
  }
}

@media (min-width: 1024px) {
  #hero {
    padding-block: 160px;
  }
}

.hero-content {
  max-width: 720px;
}

.hero-content h1 {
  margin-bottom: 1.25rem;
  color: var(--text);
}

.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ============================================================
   Services Section
   ============================================================ */
#services {
  background-color: var(--bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.service-icon {
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-card h3 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.925rem;
  line-height: 1.65;
}

/* ============================================================
   About Section
   ============================================================ */
#about {
  background-color: var(--bg-white);
}

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

.about-inner h2 {
  text-align: center;
}

.about-text {
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: 3rem;
  text-align: left;
}

.about-text p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Stats row */
.stats-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 600px) {
  .stats-row {
    flex-direction: row;
    justify-content: center;
    gap: 3.5rem;
  }
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Tools pills */
.tools-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 700px;
  margin-inline: auto;
}

.tool-tag {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
}

/* ============================================================
   How It Works Section
   ============================================================ */
#how-it-works {
  background-color: var(--bg-alt);
}

#how-it-works h2 {
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 860px;
  margin-inline: auto;
  position: relative;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  /* Horizontal connecting line through step number circles */
  .steps::before {
    content: '';
    position: absolute;
    top: 22px; /* vertically centered on the 44px circles */
    left: calc(100% / 6);
    right: calc(100% / 6);
    height: 1px;
    background-color: var(--border);
    z-index: 0;
  }
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background-color: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.step-number span {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

.step h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ============================================================
   Contact Section
   ============================================================ */
#contact {
  background-color: var(--bg-white);
}

.contact-inner {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.contact-inner h2 {
  text-align: center;
}

.contact-intro {
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.contact-list {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.625rem;
  font-size: 0.975rem;
}

.contact-label {
  font-weight: 600;
  color: var(--text);
  min-width: 72px;
  text-align: right;
}

.contact-list a,
.contact-list span:not(.contact-label) {
  color: var(--text-secondary);
}

.contact-list a {
  color: var(--accent);
}

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

/* ============================================================
   Footer
   ============================================================ */
footer {
  background-color: var(--text);
  padding-block: 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copy {
  font-size: 0.875rem;
  color: #94a3b8;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

/* ============================================================
   Scroll Reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
