/* ===== CSS Variables ===== */
:root {
  /* Botanical / Organic palette */
  --color-bg: #faf8f5;
  --color-bg-secondary: #f4f1eb;
  --color-text: #2d3a2e;
  --color-text-muted: #5c6b5e;
  --color-border: #e0ddd5;
  --color-accent: #3d7a68;
  --color-accent-hover: #2d5f50;
  --color-card-bg: #fffefb;
  --color-card-shadow: rgba(45, 58, 46, 0.08);

  /* Spacing - generous whitespace */
  --spacing-xs: 0.75rem;
  --spacing-sm: 1.25rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4.5rem;
  --spacing-2xl: 7rem;

  /* Border radius - organic, rounded */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;

  /* Font sizes */
  --text-sm: 0.9rem;
  --text-base: 1.05rem;
  --text-lg: 1.2rem;
  --text-xl: 1.4rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 4rem;

  /* Transitions - graceful and slow */
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Paper grain texture overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ===== Layout ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ===== Header & Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(224, 221, 213, 0.5);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--spacing-sm) var(--spacing-md);
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  width: auto;
  transition: opacity var(--transition-base);
}

.logo:hover .logo-img {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition-base);
}

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


/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-family: 'Source Sans 3', sans-serif;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(61, 122, 104, 0.25);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--spacing-lg) var(--spacing-md);
  padding-top: calc(var(--spacing-xl) + 70px);
  padding-bottom: var(--spacing-2xl);
  gap: var(--spacing-lg);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
}

.hero-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 500;
  text-align: center;
  max-width: 900px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.hero-highlight {
  color: var(--color-accent);
  font-weight: 600;
  font-style: italic;
}

.hero-screenshot {
  max-width: 950px;
  width: 100%;
  padding: 0 var(--spacing-md);
  animation: fadeInUp 0.8s var(--transition-slow) both;
  animation-delay: 0.2s;
}

.hero-screenshot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow:
    0 25px 80px rgba(45, 58, 46, 0.12),
    0 10px 30px rgba(45, 58, 46, 0.08);
}

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

/* ===== Section Styles ===== */
section {
  padding: var(--spacing-2xl) var(--spacing-md);
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 500;
  text-align: center;
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--spacing-xl);
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 300;
}

/* ===== Features Section ===== */
.features {
  background-color: var(--color-bg);
}

.features-intro {
  max-width: 800px;
  margin: 0 auto var(--spacing-2xl);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.feature-video-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
}

.feature-video-item {
  max-width: 950px;
  margin: 0 auto;
  width: 100%;
}

.feature-video-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 500;
  text-align: center;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.feature-video-wrapper {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow:
    0 15px 50px rgba(45, 58, 46, 0.1),
    0 5px 20px rgba(45, 58, 46, 0.06);
}

.feature-video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Screenshots Section ===== */
.screenshots {
  background-color: var(--color-bg-secondary);
  padding-bottom: var(--spacing-2xl);
  overflow: hidden;
}

.theme-stack {
  position: relative;
  max-width: 650px;
  margin: 0 auto;
  margin-left: calc(50% - 450px);
  padding-bottom: 160px;
  padding-right: 250px;
}

.theme-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow:
    0 8px 30px var(--color-card-shadow),
    0 2px 8px rgba(45, 58, 46, 0.04);
  transition: all var(--transition-slow), z-index 0s;
}

.theme-card:hover {
  z-index: 20 !important;
  box-shadow:
    0 20px 50px rgba(45, 58, 46, 0.15),
    0 8px 20px rgba(45, 58, 46, 0.08);
}

.theme-card:nth-child(1) { transform: translate(0, 0); z-index: 5; }
.theme-card:nth-child(2) { transform: translate(50px, 32px); z-index: 4; }
.theme-card:nth-child(3) { transform: translate(100px, 64px); z-index: 3; }
.theme-card:nth-child(4) { transform: translate(150px, 96px); z-index: 2; }
.theme-card:nth-child(5) { transform: translate(200px, 128px); z-index: 1; }
.theme-card:nth-child(6) { transform: translate(250px, 160px); z-index: 0; }


.theme-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* Make the stack take up proper space */
.theme-stack::after {
  content: "";
  display: block;
  padding-bottom: 56.25%;
}

/* ===== Signup Section ===== */
.waitlist {
  background-color: var(--color-bg);
}

.waitlist .container {
  max-width: 1400px;
}

.waitlist .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kit-embed {
  width: 100%;
  max-width: 500px;
}


/* ===== Footer ===== */
.footer {
  padding: var(--spacing-xl) var(--spacing-md);
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
}

.footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.footer-logo:hover {
  opacity: 1;
}

.footer-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 300;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--spacing-lg) + 60px);
    padding-bottom: var(--spacing-lg);
  }

  .nav-links {
    gap: var(--spacing-sm);
  }


  .theme-stack {
    margin-left: auto;
    padding-bottom: 300px;
    padding-right: 0;
  }

  /* Scroll-triggered slide-in animation from bottom */
  .theme-stack.animate-enabled .theme-card {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .theme-stack.animate-enabled .theme-card:nth-child(1) { transform: translate(0, 80px); transition-delay: 0s; }
  .theme-stack.animate-enabled .theme-card:nth-child(2) { transform: translate(0, 140px); transition-delay: 0.35s; }
  .theme-stack.animate-enabled .theme-card:nth-child(3) { transform: translate(0, 200px); transition-delay: 0.7s; }
  .theme-stack.animate-enabled .theme-card:nth-child(4) { transform: translate(0, 260px); transition-delay: 1.05s; }
  .theme-stack.animate-enabled .theme-card:nth-child(5) { transform: translate(0, 320px); transition-delay: 1.4s; }

  .theme-stack.animate-enabled .theme-card.visible {
    opacity: 1;
  }

  .theme-stack.animate-enabled .theme-card.visible:nth-child(1) { transform: translate(0, 0); }
  .theme-stack.animate-enabled .theme-card.visible:nth-child(2) { transform: translate(0, 60px); }
  .theme-stack.animate-enabled .theme-card.visible:nth-child(3) { transform: translate(0, 120px); }
  .theme-stack.animate-enabled .theme-card.visible:nth-child(4) { transform: translate(0, 180px); }
  .theme-stack.animate-enabled .theme-card.visible:nth-child(5) { transform: translate(0, 240px); }
}
