:root {
  /* Colors */
  --bg-color: #ffffff;
  --bg-light: #f5f5f7; /* Apple style light gray */
  --text-primary: #1d1d1f; /* Apple style dark text */
  --text-secondary: #86868b;
  --accent-color: #0071e3; /* Apple classic blue */
  --accent-hover: #0077ed;
  --border-color: rgba(0, 0, 0, 0.08);
  
  --bg-glow-start: rgba(0, 113, 227, 0.08);
  --bg-glow-end: rgba(210, 210, 215, 0.1);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Layout */
  --max-width: 1000px;
  --radius-sm: 8px;
  --radius-md: 20px;
  --radius-lg: 32px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg-color);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.5;
  overflow-x: hidden;
}

/* Typography styles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.large-p {
  font-size: 1.35rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

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

.section {
  padding: 8rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 15px rgba(0,0,0,0.05);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 980px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  border: none;
}

.btn-nav {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background-color: var(--text-primary);
  color: #fff;
}
.btn-nav:hover {
  opacity: 0.85;
}

.btn-primary {
  background-color: var(--text-primary);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  background-color: #000;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background-color: var(--bg-light);
  border-color: rgba(0,0,0,0.2);
}

.btn-large {
  padding: 1.1rem 2.5rem;
  font-size: 1.1rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 60px;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle, var(--bg-glow-start) 0%, rgba(255,255,255,0) 70%);
  z-index: -1;
  border-radius: 50%;
  opacity: 0.8;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.9; }
}

.headline-hero {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.subheadline-hero {
  font-size: 1.5rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem auto;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Section Common */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.headline-section {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.subtitle-section {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* Services Grid (What we do) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  padding: 3rem 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border: 1px solid rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
}

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

.card-icon {
  width: 52px;
  height: 52px;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.card p {
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Timeline (How We Work) */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.timeline-connector {
  position: absolute;
  top: 24px;
  left: 48px;
  right: calc(100% / 8 * 7);
  width: calc(100% - 96px);
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
}

.step-marker {
  width: 48px;
  height: 48px;
  background-color: var(--text-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 0 8px var(--bg-color);
}

.step-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.step-content p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Results */
.results-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.result-item {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(0,0,0,0.02);
}

.result-icon {
  background: var(--bg-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-weight: bold;
}

.result-item h4 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

/* About */
.about-container {
  max-width: 800px;
  text-align: center;
}

.about-text {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 400;
}

/* CTA */
.cta-section {
  position: relative;
  text-align: center;
  overflow: hidden;
  padding: 8rem 0;
}

.cta-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vw;
  max-width: 1000px;
  max-height: 1000px;
  background: radial-gradient(circle, var(--bg-glow-start) 0%, rgba(255,255,255,0) 60%);
  z-index: -1;
  border-radius: 50%;
}

.cta-container h2 {
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
}

.footer-text {
  font-size: 0.875rem;
}

/* Reveal Animations */
.target-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.target-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.cascade-1 { transition-delay: 0.1s; }
.cascade-2 { transition-delay: 0.2s; }
.cascade-3 { transition-delay: 0.3s; }
.cascade-4 { transition-delay: 0.4s; }

/* Responsive Media Queries */
@media (max-width: 900px) {
  .headline-hero { font-size: 3.5rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .timeline-connector { display: none; }
  .step-marker { margin-bottom: 1rem; }
  .timeline-step { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1rem; }
  .step-marker { box-shadow: none; flex-shrink: 0; }
  .step-content { padding-top: 0.5rem; }
  .results-layout { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .headline-hero { font-size: 2.5rem; }
  .subheadline-hero { font-size: 1.15rem; margin-bottom: 2rem; }
  .results-grid { grid-template-columns: 1fr; }
  .button-group { flex-direction: column; width: 100%; align-items: stretch; }
  .btn { width: 100%; display: flex; text-align: center; } /* Make buttons full width on small mobile for touch targets */
  .about-text { font-size: 1.25rem; }
  .footer-container { flex-direction: column; gap: 1rem; text-align: center; }
  .section { padding: 5rem 0; } /* Reduce padding on mobile */
  
  /* Faster mobile scroll reveals (no staggered delays on mobile columns) */
  .cascade-1, .cascade-2, .cascade-3, .cascade-4 {
    transition-delay: 0s !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1c; /* Warmer dark gray */
    --bg-light: #242426; /* Softer contrast background */
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent-color: #2997ff;
    --accent-hover: #147ce5;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --bg-glow-start: rgba(41, 151, 255, 0.12);
    --bg-glow-end: rgba(26, 26, 28, 0.1);
  }

  .navbar {
    background: rgba(26, 26, 28, 0.8);
  }

  .navbar.scrolled {
    background: rgba(26, 26, 28, 0.95);
    box-shadow: 0 1px 15px rgba(0,0,0,0.5);
  }

  .card {
    background-color: var(--bg-light);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  }

  .card-icon {
    background-color: #2e2e30;
  }

  .result-item {
    background-color: var(--bg-light);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
  }

  .result-icon {
    background-color: #2e2e30;
  }

  .btn-primary {
    background-color: #f5f5f7;
    color: #000;
  }

  .btn-primary:hover {
    background-color: #fff;
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
  }

  .btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

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

  .btn-nav {
    background-color: #f5f5f7;
    color: #000;
  }

  .step-marker {
    background-color: var(--text-primary);
    color: #000;
    box-shadow: 0 0 0 8px var(--bg-color);
  }
  
  .timeline-connector {
    background: rgba(255, 255, 255, 0.15);
  }
}

/* Modal Overlay & Container */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--bg-color);
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-md);
  padding: 3rem 2.5rem;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
  transform: translateY(20px) scale(0.96);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.5rem;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Modal Progress */
.modal-progress {
  width: 100%;
  height: 4px;
  background: var(--bg-light);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 25%;
  background: var(--accent-color);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Steps */
.modal-content-wrapper {
  position: relative;
  min-height: 340px;
}

.modal-step {
  display: none;
  opacity: 0;
  animation: slideFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-step.active {
  display: block;
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.modal-step h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Modal Options */
.modal-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.option-btn h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0;
}

.option-btn p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.option-btn:hover {
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background: var(--bg-light);
}

/* Forms */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: transparent;
  color: var(--text-primary);
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.modal-submit-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem;
  font-size: 1.05rem;
}

#step-4 {
  text-align: center;
  padding-top: 2rem;
}

.success-icon {
  color: #34c759;
  margin-bottom: 1.5rem;
  animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Contact Badges */
.contact-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-size: 1rem;
}

/* Dark mode overwrites for Modal */
@media (prefers-color-scheme: dark) {
  .modal-container {
    background: #1c1c1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .modal-progress {
    background: #3a3a3c;
  }
  .option-btn {
    border-color: rgba(255, 255, 255, 0.15);
  }
  .option-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: #2c2c2e;
  }
  .form-group input {
    background: #2c2c2e;
    border-color: rgba(255, 255, 255, 0.1);
  }
  .form-group input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.2);
  }
}
