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

:root {
  --base: #1e1e2e;
  --text: #cdd6f4;
  --rosewater: #f5e0dc;
  --flamingo: #f2cdcd;
  --pink: #f5c2e7;
  --mauve: #cba6f7;
  --peach: #fab387;
  --yellow: #f9e2af;
  --green: #a6e3a1;
  --teal: #94e2d5;
  --sky: #89dceb;
  --sapphire: #74c7ec;
  --blue: #89b4fa;
  --lavender: #b4befe;
  --crust: #11111b;
  --mantle: #181825;
  --surface0: #313244;
  --surface1: #45475a;
  --surface2: #585b70;
  --overlay0: #6c7086;
  --subtext0: #a6adc8;
  --subtext1: #bac2de;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--base);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--rosewater);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* Header */
header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--surface0);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--rosewater);
}

nav a {
  margin-left: 2rem;
  color: var(--subtext1);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--rosewater);
  text-decoration: none;
}

/* Hero */
.hero {
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.hero h1 span {
  color: var(--rosewater);
}

.hero p {
  font-size: 1.25rem;
  color: var(--subtext0);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: var(--rosewater);
  color: var(--crust);
  font-weight: 600;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--flamingo);
  text-decoration: none;
}

.btn-secondary {
  background-color: var(--surface0);
  color: var(--text);
  margin-left: 1rem;
}

.btn-secondary:hover {
  background-color: var(--surface1);
}

/* Features - Scrolling Sections */
.features {
  padding: 4rem 0;
  background-color: var(--mantle);
}

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

.features-intro {
  text-align: center;
  color: var(--subtext0);
  max-width: 600px;
  margin: 0 auto 4rem;
}

.feature-section {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 4rem 0;
  border-bottom: 1px solid var(--surface0);
}

.feature-section:first-of-type {
  border-top: 1px solid var(--surface0);
}

.feature-section:last-child {
  border-bottom: none;
}

.feature-section:nth-child(even) {
  flex-direction: row-reverse;
}

.feature-content {
  flex: 1;
}

.feature-tag {
  display: inline-block;
  background-color: var(--surface0);
  color: var(--rosewater);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.feature-content h3 {
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.feature-content p {
  color: var(--subtext0);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  color: var(--subtext1);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: bold;
}

.feature-screenshot {
  flex: 1.2;
  background-color: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 12px;
  overflow: hidden;
}

.feature-screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

/* Image Comparison Slider */
.image-compare {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}

.image-compare img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.image-compare-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 50% 0 0);
  z-index: 2;
}

.image-compare-right {
  position: relative;
  width: 100%;
}

.image-compare-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 8px;
  background-color: var(--rosewater);
  transform: translateX(-50%);
  z-index: 10;
}

.image-compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: var(--rosewater);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-compare-handle::before,
.image-compare-handle::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.image-compare-handle::before {
  border-width: 6px 8px 6px 0;
  border-color: transparent var(--crust) transparent transparent;
  left: 8px;
}

.image-compare-handle::after {
  border-width: 6px 0 6px 8px;
  border-color: transparent transparent transparent var(--crust);
  right: 8px;
}

.screenshot-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--overlay0);
  font-size: 0.875rem;
  background-color: var(--surface0);
}

@media (max-width: 900px) {
  .feature-section,
  .feature-section:nth-child(even) {
    flex-direction: column;
    gap: 2rem;
    padding: 3rem 0;
  }

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

  .feature-screenshot {
    width: 100%;
  }
}

/* Tech Stack */
.tech-stack {
  padding: 5rem 0;
}

.tech-stack h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.tech-item {
  background-color: var(--surface0);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: var(--subtext1);
  font-weight: 500;
}

/* CTA */
.cta {
  padding: 5rem 0;
  background-color: var(--base);
  text-align: center;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta p {
  color: var(--subtext0);
  margin-bottom: 2rem;
}

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

  .hero p {
    font-size: 1rem;
  }

  .btn-secondary {
    display: block;
    margin: 1rem auto 0;
  }

  nav {
    display: none;
  }
}
