/**
 * SoSheets Landing Page Styles
 * Modular BEM-based CSS with Excel Green branding
 */

/* ==================== Color Tokens ==================== */
:root {
  --excel-green: #217346;
  --excel-green-light: #28a06d;
  --excel-green-dark: #1a5c38;
  --dark-bg: #0d1117;
  --dark-bg-light: #161b22;
  --light-text: #ffffff;
  --muted-text: #cccccc;
  --border-color: #30363d;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  background-color: var(--dark-bg);
  color: var(--light-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==================== Hero Section ==================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-light) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--excel-green) 0%, transparent 70%);
  opacity: 0.1;
  animation: pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.1; }
  50% { transform: scale(1.1); opacity: 0.15; }
}

.hero__content {
  max-width: 1100px;
  text-align: center;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__headline {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
  max-width: 100%;
}

.hero__headline--highlight {
  color: var(--excel-green-light);
}

.hero__tagline {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

.hero__subtext {
  font-size: 1.25rem;
  color: var(--muted-text);
  margin-bottom: 3rem;
  line-height: 1.8;
}

.hero__cta {
  background: var(--excel-green);
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1.25rem 3rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(33, 115, 70, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 10;
}

.hero__cta-icon {
  width: 24px;
  height: 24px;
}

.hero__cta:hover {
  background: var(--excel-green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(33, 115, 70, 0.5);
}

.hero__cta:active {
  transform: translateY(0);
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

.hero__visual-spreadsheet,
.hero__visual-database {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--dark-bg-light);
  border-radius: 12px;
  border: 2px solid var(--border-color);
  transition: all 0.5s ease;
}

.hero__visual-database {
  border-color: var(--excel-green);
  box-shadow: 0 0 30px rgba(33, 115, 70, 0.3);
}

.spreadsheet-icon,
.database-icon {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

.spreadsheet-icon img,
.database-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.database-icon {
  animation-delay: 0.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero__visual-arrow {
  font-size: 3rem;
  color: var(--excel-green);
  animation: slideRight 2s ease-in-out infinite;
}

@keyframes slideRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

/* ==================== Transform Section ==================== */
.transform {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--dark-bg-light);
}

.transform__block {
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.transform__block.animate {
  opacity: 1;
  transform: translateY(0);
}

.transform__icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  background: var(--dark-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--excel-green);
  transition: all 0.3s ease;
}

.transform__icon img {
  width: 50px;
  height: 50px;
  filter: brightness(0) invert(1);
}

.transform__block:hover .transform__icon {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(33, 115, 70, 0.5);
}

.transform__text {
  font-size: 1.25rem;
  color: var(--muted-text);
  font-weight: 500;
}

/* ==================== Search Demo Section ==================== */
.search-demo {
  padding: 6rem 2rem;
  background: var(--dark-bg);
  min-height: 700px;
}

.search-demo__container {
  max-width: 800px;
  margin: 0 auto;
  height: 550px;
}

.search-demo__title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--excel-green-light);
}

.search-demo__bar {
  background: var(--dark-bg-light);
  border: 2px solid var(--excel-green);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  font-size: 1.5rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(33, 115, 70, 0.3);
  margin-bottom: 2rem;
}

.search-demo__typing {
  color: var(--light-text);
  font-weight: 500;
}

.search-demo__cursor {
  color: var(--excel-green);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.search-demo__results {
  opacity: 0;
  transition: opacity 0.6s ease;
  visibility: hidden;
  height: 400px;
  overflow: hidden;
}

.search-demo__results.show {
  opacity: 1;
  visibility: visible;
}

.search-result {
  background: var(--dark-bg-light);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--excel-green);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  min-height: 280px;
}

.search-result__icon {
  width: 40px;
  height: 40px;
  background: var(--excel-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.search-result__content {
  flex: 1;
}

.search-result__content strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  color: var(--light-text);
}

.search-result__content p {
  margin: 0.5rem 0;
  color: var(--muted-text);
  font-size: 1rem;
  line-height: 1.6;
}

/* ==================== Automation Section ==================== */
.automation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background: var(--dark-bg-light);
}

.automation__list-title {
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--excel-green-light);
}

.automation__timeline {
  position: relative;
  padding-left: 3rem;
}

.automation__timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--excel-green);
}

.automation__item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease;
}

.automation__item.animate {
  opacity: 1;
  transform: translateX(0);
}

.automation__item-dot {
  position: absolute;
  left: -3.6rem;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--excel-green);
  border: 4px solid var(--dark-bg-light);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(33, 115, 70, 0.5);
}

.automation__item-content strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--light-text);
}

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

.automation__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.automation__text-headline {
  font-size: 2.5rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--excel-green-light);
}

.automation__text-subtext {
  font-size: 1.5rem;
  color: var(--muted-text);
  line-height: 1.6;
}

/* ==================== Final CTA Section ==================== */
.cta-final {
  padding: 6rem 2rem 3rem;
  text-align: center;
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--excel-green-dark) 100%);
}

.cta-final__text {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  line-height: 1.4;
}

.cta-final__button {
  background: var(--excel-green);
  color: var(--light-text);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 1.25rem 3rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(33, 115, 70, 0.3);
}

.cta-final__button:hover {
  background: var(--excel-green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(33, 115, 70, 0.5);
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
  .hero__headline {
    font-size: 2.5rem;
  }

  .hero__subtext {
    font-size: 1.1rem;
  }

  .hero__visual {
    flex-direction: column;
    gap: 2rem;
  }

  .hero__visual-arrow {
    transform: rotate(90deg);
  }

  .transform {
    grid-template-columns: 1fr;
    padding: 4rem 1rem;
  }

  .automation {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .automation__text-headline {
    font-size: 2rem;
  }

  .search-demo {
    min-height: 800px;
  }

  .search-demo__container {
    height: 650px;
  }

  .search-demo__title {
    font-size: 2rem;
  }

  .search-demo__bar {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    min-height: 100px;
  }

  .search-demo__results {
    height: 420px;
  }

  .cta-final__text {
    font-size: 2rem;
  }
}

/* ==================== CTA Legal Links ==================== */
.cta-final__legal {
  text-align: center;
  margin-top: 12rem;
  padding-bottom: 2rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.cta-final__legal a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cta-final__legal a:hover {
  color: #fff;
}

