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

:root {
  --bg: #fafafb;
  --text-dark: #1a1a1a;
  --text-gray: #888;
  --text-light: #ededed;
  --accent: #1a1a1a;
  --white: #fff;
  --card-shadow: 0 2px 40px rgba(0, 0, 0, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}


/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 2rem;
  background: var(--bg);
  z-index: 100;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-icon {
  opacity: 0.8;
}

.nav-link {
  font-size: 0.9375rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.6;
}

.nav-cta {
  font-size: 0.9375rem;
  color: var(--white);
  background: var(--accent);
  text-decoration: none;
  padding: 0.625rem 1.25rem;
  border-radius: 2rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
  z-index: 99;
  border-bottom: 1px solid var(--text-light);
  transform: translateY(-100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
}

.mobile-link {
  font-size: 1rem;
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.5rem 0;
}

.mobile-cta {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--white);
  background: var(--accent);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 3rem 6rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Pendulum Wave Canvas - Distant & Grand */
#fractal-canvas {
  position: absolute;
  right: -150px;
  top: 40%;
  transform: translateY(-50%) scale(1.1);
  width: 900px;
  height: 900px;
  pointer-events: none;
  opacity: 0.85;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 45%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 45%, black 0%, transparent 70%);
}

.hero-text {
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 900px;
}

.hero-text span {
  display: inline;
}

.text-dark {
  color: var(--text-dark);
}

.text-gray {
  color: var(--text-gray);
}

/* Flip words animation */
.flip-words {
  display: inline-block;
  position: relative;
  height: 1.2em;
  min-width: 180px;
  overflow: hidden;
  vertical-align: bottom;
}

.flip-word {
  display: block;
  color: var(--text-dark);
  animation: flipWords 12.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
}

.flip-word:nth-child(1) { animation-delay: 0s; }
.flip-word:nth-child(2) { animation-delay: 2.5s; }
.flip-word:nth-child(3) { animation-delay: 5s; }
.flip-word:nth-child(4) { animation-delay: 7.5s; }
.flip-word:nth-child(5) { animation-delay: 10s; }

@keyframes flipWords {
  0% {
    opacity: 0;
    transform: translateY(80%);
  }
  3%, 17% {
    opacity: 1;
    transform: translateY(0);
  }
  20%, 100% {
    opacity: 0;
    transform: translateY(-80%);
  }
}

/* Showcase */
.showcase {
  padding: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.showcase-card {
  overflow: hidden;
}

.card-preview {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  border-radius: 0;
  transition: opacity 0.3s ease;
}

.card-preview:hover {
  opacity: 0.9;
}

.card-preview.light {
  background: var(--white);
  position: relative;
  justify-content: center;
  align-items: center;
}

.card-preview.dark {
  background: #141414;
  color: var(--white);
  position: relative;
  justify-content: center;
  align-items: center;
}

/* Card visuals */
.card-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.abstract-viz {
  width: 60%;
  max-width: 280px;
  height: auto;
  opacity: 0.9;
}

.dark-visual .abstract-viz {
  opacity: 0.7;
}

/* Card labels */
.card-label {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  opacity: 0.7;
}

.card-label.light-label {
  color: var(--white);
  opacity: 0.6;
}

.card-label svg {
  opacity: 0.7;
}

/* Features */
.features {
  padding: 8rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.features-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4rem;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  padding: 3rem 0;
  border-top: 1px solid var(--text-light);
  align-items: start;
}

.feature:last-child {
  border-bottom: 1px solid var(--text-light);
}

.feature-left {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.feature-icon {
  flex-shrink: 0;
  opacity: 0.4;
  margin-top: 0.25rem;
}

.feature-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-number {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-gray);
}

.feature h3 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.feature p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-gray);
}

/* CTA Section */
.cta-section {
  padding: 8rem 3rem;
  text-align: center;
}

.cta-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.cta-content p {
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
}

.cta-button {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  background: var(--accent);
  text-decoration: none;
  padding: 1rem 2.5rem;
  border-radius: 3rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cta-button:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* Footer */
.footer {
  padding: 2rem 3rem;
  border-top: 1px solid var(--text-light);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-gray);
}

/* Animations */
.animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive */
@media (max-width: 900px) {
  #fractal-canvas {
    width: 500px;
    height: 500px;
    right: -100px;
    opacity: 0.4;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .card-preview {
    aspect-ratio: 16/9;
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
    justify-content: space-between;
  }

  .nav-center {
    gap: 0;
  }

  .nav-center .nav-link,
  .nav-center .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  #fractal-canvas {
    width: 100vw;
    height: 400px;
    right: auto;
    left: 0;
    top: 15%;
    opacity: 0.6;
    transform: none;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 70%);
  }

  .hero {
    padding: 7rem 1.5rem 4rem;
    min-height: 70vh;
    padding-top: 20vh;
    padding-bottom: 8vh;
  }

  .hero-text {
    font-size: 2rem;
    line-height: 1.3;
  }

  .flip-words {
    min-width: 120px;
  }

  .features,
  .cta-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .showcase-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .card-preview {
    aspect-ratio: 2/1;
    padding: 2rem;
  }

  .abstract-viz {
    width: 40%;
    max-width: 160px;
  }

  .card-label {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.75rem;
  }

  .features {
    padding: 4rem 1.5rem;
  }

  .features-title {
    margin-bottom: 2rem;
  }

  .feature {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 0;
  }

  .feature h3 {
    font-size: 1.25rem;
  }

  .feature p {
    font-size: 0.9375rem;
  }

  .footer {
    padding: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 1rem;
  }

  .nav-icon {
    width: 22px;
    height: 12px;
  }

  #fractal-canvas {
    width: 100vw;
    height: 350px;
    right: auto;
    left: 0;
    top: 12%;
    opacity: 0.5;
    transform: none;
  }

  .hero {
    padding: 6rem 1.5rem 4rem;
    min-height: 60vh;
  }

  .hero-text {
    font-size: 1.625rem;
    line-height: 1.35;
  }

  .flip-words {
    min-width: 90px;
    height: 1.35em;
  }

  .card-preview {
    padding: 1.5rem;
    aspect-ratio: 16/9;
  }

  .abstract-viz {
    width: 35%;
    max-width: 120px;
  }

  .feature-content h3 {
    font-size: 1.25rem;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }
}
