/* Base styles */
:root {
  --primary-color: #0052cc;
  --secondary-color: #0065ff;
  --dark-color: #111111;
  --text-color: #111827;
  --light-text: #666666;
  --white: #ffffff;
  --light-bg: #f8f8f8;
  --border-color: #e5e5e5;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  padding-top: 0; /* Remove any top padding */
  display: flex;
  flex-direction: column;
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  letter-spacing: -0.2px;
  color: var(--text-color);
  position: relative;
  overflow-y: scroll;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Main wrapper to handle sticky nav */
.main-wrapper {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* Navigation - complete overhaul */
.navbar {
  background: var(--white);
  padding: 0.85rem 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 9999;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); */
  transform: translateZ(0); /* Force GPU acceleration */
  backface-visibility: hidden;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo img {
  height: 54px;
  width: auto;
}

.logo-text {
  display: flex;
  gap: 0.25rem;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.logo-text .primary {
  color: var(--primary-color);
}

.logo-text .secondary {
  color: #111827;
}

.nav-links a {
  color: var(--dark-color);
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Hero Section */
.hero-section {
  min-height: calc(100vh);
  margin-top: 0;
  padding-top: 0;
  display: flex;
  align-items: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--white);
  background-image: url(../images/web-gray.png);
  background-position: center 20%;
  background-size: 720px;
  background-repeat: no-repeat;
}

.hero-content {
  max-width: 800px;
  color: var(--text-color);
  text-align: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding-bottom: 2rem;
}

.rotating-text {
  font-size: 3.75rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-color);
  font-weight: 700;
}

.rotating-text span {
  letter-spacing: -2px;
}

.paragraph {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--light-text);
  opacity: 0.8;
}

.rotating-words {
  display: inline-block;
  position: relative;
  height: 5.5rem;
  overflow: hidden;
  vertical-align: top;
  min-width: 800px;
  text-align: center;
}

.rotating-words span {
  display: block;
  position: absolute;
  top: 0;
  transform: translateY(20px);
  opacity: 0;
  animation: rotateWords 18s linear infinite;
  color: var(--primary-color);
  font-weight: 700;
  white-space: nowrap;
  width: auto;
  min-width: 100%;
  text-align: center;
}

.rotating-words span:nth-child(1) {
  animation-delay: 0s;
}
.rotating-words span:nth-child(2) {
  animation-delay: 3s;
}
.rotating-words span:nth-child(3) {
  animation-delay: 6s;
}
.rotating-words span:nth-child(4) {
  animation-delay: 9s;
}
.rotating-words span:nth-child(5) {
  animation-delay: 12s;
}
.rotating-words span:nth-child(6) {
  animation-delay: 15s;
}

@keyframes rotateWords {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  2% {
    opacity: 1;
    transform: translateY(0);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  17% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-color);
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-sm {
  padding: 0.6rem 0.9rem;
}

.btn-primary {
  background: var(--dark-color);
  color: var(--white) !important;
}

.btn-secondary {
  background: transparent;
  color: var(--dark-color);
  border: 2px solid var(--dark-color);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
}

.hero-image img {
  width: 100%;
  height: auto;
}

/* Solutions Section */
.solutions {
  padding: 4rem 0;
  background-color: var(--light-bg);
}

.solutions h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.solution-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.solution-card:hover {
  transform: translateY(-5px);
}

.solution-card h3 {
  font-size: 1.5rem;
  color: #111827;
  margin-bottom: 1rem;
  text-align: center;
}

.solution-icon {
  width: 4rem;
  height: 4rem;
  background: var(--dark-color);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.solution-icon i {
  font-size: 2rem;
  color: white;
}

.solution-card p {
  color: #4b5563;
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.6;
}

.solution-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.solution-features li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: #4b5563;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: var(--white);
  border: 1px solid var(--border-color);
}

.solution-features li i {
  color: var(--dark-color);
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 1.5rem;
  text-align: center;
}

@media (max-width: 768px) {
  .solutions-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .solution-card {
    margin-bottom: 1rem;
  }
}

/* Features Section */
.features {
  padding: 6rem 0;
  background-color: var(--light-bg);
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.feature-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--primary-color);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon i {
  font-size: 1.5rem;
  color: var(--white);
}

.feature-card h3 {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--light-text);
  line-height: 1.6;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }
}

/* Contact Section */
.contact {
  padding: 6rem 0;
  background: var(--light-bg);
}

.contact h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact p {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--light-text);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.contact-link a {
  font-size: 2.75rem;
  line-height: 1.2;
  color: var(--primary-color);
  font-weight: 700;
  transition: all 0.3s ease;
}

.contact-link a:hover {
  color: var(--secondary-color);
  transform: translateY(-2px);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: inherit;
}

.contact-form textarea {
  height: 150px;
  resize: vertical;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: var(--white);
  padding: 4rem 0 2rem;
}

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

.footer-section h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section a {
  color: var(--light-text);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-text);
}

/* Ensure content is above waves */
.hero-section,
.solutions,
.features,
.contact,
.footer {
  position: relative;
  z-index: 1;
}

/* Voice Engine Intro Section */
.voice-engine-intro {
  padding: 6rem 0;
  background: var(--white);
}

.voice-engine-intro h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.voice-engine-content {
  max-width: 1000px;
  margin: 0 auto;
}

.voice-engine-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.voice-engine-description p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-color);
  opacity: 0.9;
}

.voice-engine-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.example-card {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 1rem;
  transition: transform 0.3s ease;
}

.example-card:hover {
  transform: translateY(-5px);
}

.example-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--light-bg);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.example-icon i {
  font-size: 1.5rem;
  color: var(--text-color);
  opacity: 0.8;
}

.example-card h3 {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.example-card ul {
  list-style: none;
  padding: 0;
}

.example-card ul li {
  color: var(--light-text);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.example-card ul li:before {
  content: "•";
  color: var(--text-color);
  opacity: 0.8;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.voice-engine-cta {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.voice-engine-cta p {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 2rem;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .voice-engine-intro {
    padding: 4rem 0;
  }

  .voice-engine-description p,
  .voice-engine-cta p {
    font-size: 1.1rem;
  }

  .example-card {
    padding: 1.5rem;
  }
}

/* All sections */
section {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Adjust other sections' padding */
#solutions,
#learn-more,
#contact {
  padding-top: 80px;
  margin-top: -80px; /* Offset for anchor links */
}

.back-to-top {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  z-index: 20;
}

.back-to-top:hover {
  transform: translateY(-2px);
  color: var(--secondary-color);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .nav-links a:not(:last-child) {
    display: none;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .nav-links a {
    margin-left: 0;
  }

  .logo {
    gap: 0.5rem;
  }

  .logo-text {
    gap: 0.15rem;
    font-size: 1.2rem;
  }

  .solutions {
    padding: 4rem 0;
  }

  #learn-more {
    margin-top: 0 !important;
  }

  .solutions-grid {
    padding: 0;
  }

  .features-grid {
    padding: 0;
  }

  .back-to-top {
    bottom: 8rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .rotating-text {
    font-size: 2.4rem;
  }
  .rotating-words {
    font-size: 2rem;
    height: 3rem;
    min-width: 345px;
  }

  .paragraph {
    font-size: 1.2rem;
  }

  .solutions-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .solution-card {
    flex-direction: column;
  }

  .solution-content,
  .solution-graphic {
    flex: 1;
    width: 100%;
  }

  .solution-graphic {
    order: -1;
    padding: 1rem;
  }

  .voice-engine {
    max-height: 200px;
  }

  body {
    line-height: 1.2;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .contact-link a {
    font-size: 1.75rem;
  }

  .hero-section {
    background-position: center 44%;
    background-size: 460px;
  }
}

/* Hero Metrics Bar */
.hero-metrics {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  margin: 2.5rem 0 2rem 0;
  padding: 1.5rem 0;
}

.metric-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(0, 82, 204, 0.1);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  text-align: center;
  flex: 1;
  max-width: 240px;
  min-height: 160px;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.metric-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(0, 82, 204, 0.15),
    0 4px 6px -2px rgba(0, 82, 204, 0.05);
  border-color: rgba(0, 82, 204, 0.2);
}

.metric-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 0 0 2px 2px;
}

.metric-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.75rem;
  letter-spacing: -2px;
  text-align: center;
}

.metric-label {
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

.metric-description {
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.metric-source {
  font-size: 0.9rem;
  color: var(--light-text);
  font-weight: 500;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.metric-source a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(0, 82, 204, 0.05);
}

.metric-source a:hover {
  color: var(--white);
  background: var(--primary-color);
  transform: translateY(-1px);
}

/* Mobile Responsive for Metrics */
@media (max-width: 768px) {
  .hero-metrics {
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
  }

  .metric-item {
    max-width: none;
    min-height: 140px;
    padding: 1.25rem 1rem;
    margin: 0 1rem;
  }

  .metric-number {
    font-size: 2.5rem;
  }

  .metric-label {
    gap: 0.4rem;
  }

  .metric-description {
    font-size: 0.95rem;
  }
}
