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

:root {
  --color-bg: #f6fafc;
  --color-bg-alt: #f1f5f7;
  --color-primary: #037db3;
  --color-dark: #023e5c;
  --color-text-secondary: #727b7f;
  --font-display: "Playfair Display", serif;
  --font-body: "Rubik", sans-serif;
  --max-width: 1280px;
}

html {
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-weight: 350;
  background-color: var(--color-bg);
  color: var(--color-dark);
  overflow-x: clip;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 48px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 180px;
  height: 40px;
}

.header-cta {
  position: absolute;
  right: 48px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.header-cta:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  position: relative;
  height: 250vh;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fixed background */
.bg-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 475px;
  z-index: 50;
  pointer-events: none;
}

#sky-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-gradient-fade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 475px;
  background: linear-gradient(
    to bottom,
    var(--color-bg),
    rgba(246, 250, 252, 0)
  );
}

.hero-gradient-color {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 283px;
  background: linear-gradient(
    to bottom,
    #0092d2,
    #fec069 57.7%,
    rgba(254, 192, 105, 0)
  );
  opacity: 0.08;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-lines {
  margin-top: 16px;
}

.hero-line {
  font-family: var(--font-body);
  font-size: 24px;
  color: var(--color-dark);
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 400;
  color: var(--color-dark);
  line-height: 1.3;
  margin-bottom: 16px;
  white-space: nowrap;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
}

.hero-title-break {
  display: none;
}

/* Features */
.features-scroll {
  position: relative;
  z-index: 55;
  height: 350vh;
  background: linear-gradient(to bottom, rgba(246, 250, 252, 0) 0px, #f6fafc 100px);
  overflow-x: clip;
}

.features-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: clip;
}

.features-stage {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 48px;
}

.features-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1100px;
  aspect-ratio: 957 / 558;
}

.step-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.step-img.active {
  opacity: 1;
}

.feature-card {
  position: absolute;
  width: 380px;
  height: 380px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.feature-card.active {
  opacity: 1;
  transform: translateY(0);
}

.feature-card[data-step="2"] {
  top: 20%;
  right: 10%;
}

.feature-card[data-step="3"] {
  top: 35%;
  left: 15%;
}

.feature-card[data-step="4"] {
  bottom: 20%;
  right: 10%;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--color-dark);
  line-height: 1.3;
  margin-bottom: 7px;
}

.feature-desc {
  font-family: var(--font-body);
  font-size: 19px;
  color: var(--color-dark);
  line-height: 1.3;
}

/* CTA */
.cta {
  position: relative;
  z-index: 1;
  background-color: var(--color-bg-alt);
  padding: 50px 0 100px;
}

.cta-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

.cta-title {
  width: 50%;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 400;
  color: var(--color-dark);
  line-height: 1.3;
}

.cta-title em {
  font-style: italic;
}

.cta-link {
  width: 50%;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s;
  padding-bottom: 18px;
}

.cta-link:hover {
  opacity: 0.7;
}

/* Footer */
.footer-wrap {
  position: relative;
  z-index: 1;
  background-color: var(--color-bg-alt);
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 48px;
}

.footer p {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-secondary);
}

.footer-link {
  color: var(--color-text-secondary);
}

.footer-link:hover {
  color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 8px;
    padding: 16px 24px;
  }

  .header-cta {
    position: static;
    font-size: 14px;
  }

  .hero {
    padding-top: 0;
  }

  .hero-sticky {
    min-height: 0;
    padding-top: 60px;
  }

  .hero-title {
    font-size: 40px;
    white-space: normal;
  }

  .hero-title-break {
    display: block;
  }

  .hero-subtitle {
    font-size: 18px;
    padding: 0 24px;
  }

  .bg-gradient-overlay {
    height: 280px;
  }

  .hero-gradient-fade {
    height: 280px;
  }

  .hero-gradient-color {
    height: 180px;
  }

  .features-stage {
    padding: 0 24px;
  }

  .features-image {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    max-width: none;
  }

  .feature-card,
  .feature-card[data-step="2"],
  .feature-card[data-step="3"],
  .feature-card[data-step="4"] {
    top: auto;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 15%;
    width: 280px;
    height: 280px;
    padding: 24px;
  }

  .feature-card.active {
    transform: translateX(-50%);
  }

  .feature-title {
    font-size: 24px;
  }

  .feature-desc {
    font-size: 17px;
  }

  .cta {
    padding: 50px 0;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 24px;
    gap: 32px;
  }

  .cta-title {
    width: 100%;
    font-size: 40px;
  }

  .cta-link {
    width: 100%;
    font-size: 18px;
  }

  .footer {
    padding: 32px 24px;
  }

  .footer p {
    font-size: 16px;
  }
}
