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

:root {
  --bg-deep: #0B1021;
  --bg-surface: #131A30;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #F4F5F9;
  --text-secondary: rgba(244, 245, 249, 0.65);
  --text-tertiary: rgba(244, 245, 249, 0.4);
  
  /* Calming Sleep Accents */
  --accent-lavender: #A18CD1;
  --accent-blue: #8CA5D1;
  --accent-mint: #9AD3C8;
  --accent-blush: #E5B2CA;
  
  --font-serif: 'Nunito', sans-serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-xl: 40px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

em {
  font-style: italic;
  color: var(--accent-lavender);
  font-weight: 400;
}

/* ===== Ambient Background ===== */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.2;
  animation: float 25s ease-in-out infinite;
}

.orb-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-blue), transparent 70%);
  top: -250px;
  right: -150px;
  animation-delay: 0s;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-lavender), transparent 70%);
  bottom: 0;
  left: -200px;
  animation-delay: -8s;
  opacity: 0.15;
}

.orb-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-mint), transparent 70%);
  top: 40%;
  right: 15%;
  animation-delay: -16s;
  opacity: 0.1;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -50px) scale(1.05); }
  66% { transform: translate(-30px, 40px) scale(0.95); }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(11, 16, 33, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-glass);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 26px;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s ease;
}

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

.nav-cta {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 10px 24px !important;
  border-radius: 100px;
  color: var(--text-primary) !important;
  font-weight: 500 !important;
  transition: background 0.2s ease, border-color 0.2s ease !important;
}

.nav-cta:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--border-glass-hover) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 6px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  max-width: 580px;
}

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-lavender);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent-lavender);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-lavender), var(--accent-blue));
  color: var(--bg-deep);
  box-shadow: 0 4px 20px rgba(161, 140, 209, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(161, 140, 209, 0.4);
  filter: brightness(1.05);
}

.apple-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ===== Phone Frame ===== */
.hero-phone {
  flex-shrink: 0;
  position: relative;
}

.hero-phone::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 60px;
  background: radial-gradient(ellipse, rgba(161,140,209,0.15), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.phone-frame {
  width: 290px;
  height: 590px;
  border-radius: 46px;
  overflow: hidden;
  position: relative;
  background: #020306;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.08),
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(161, 140, 209, 0.15);
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Placeholder Styling for Screens */
.placeholder-img {
  background: linear-gradient(180deg, #161D3B 0%, #0A0D18 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.placeholder-img::after {
  content: "App Screenshot Here";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
}

.phone-frame-sm {
  width: 250px;
  height: 520px;
  border-radius: 38px;
}

/* ===== Social Proof ===== */
.social-proof {
  position: relative;
  z-index: 1;
  padding: 80px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.proof-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.proof-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proof-value {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(to right, var(--text-primary), var(--accent-lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.proof-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.proof-divider {
  width: 1px;
  height: 50px;
  background: var(--border-glass);
}

/* ===== Sections ===== */
.section-eyebrow {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-lavender);
  margin-bottom: 16px;
  text-align: center;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 24px;
}

.section-subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
  line-height: 1.6;
}

/* ===== Features ===== */
.features {
  position: relative;
  z-index: 1;
  padding: 140px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.feature-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(161, 140, 209, 0.15), rgba(140, 165, 209, 0.05));
  border: 1px solid rgba(161, 140, 209, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent-lavender);
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon-wrap {
  transform: scale(1.05);
  background: linear-gradient(135deg, rgba(161, 140, 209, 0.25), rgba(140, 165, 209, 0.1));
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ===== Gallery ===== */
.gallery {
  position: relative;
  z-index: 1;
  padding: 140px 0;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015), transparent);
}

.gallery-phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
}

.gallery-phone {
  text-align: center;
}

.gallery-phone-center {
  transform: translateY(-20px);
}

.gallery-label {
  margin-top: 24px;
  font-size: 15px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== Philosophy ===== */
.philosophy-section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}

.philosophy-card {
  background: linear-gradient(135deg, var(--bg-card), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 80px 60px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.philosophy-eyebrow {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-lavender);
  margin-bottom: 32px;
  display: inline-block;
}

.philosophy-card blockquote p {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.philosophy-card blockquote p:last-child {
  margin-bottom: 0;
}

/* ===== Download CTA ===== */
.download {
  position: relative;
  z-index: 1;
  padding: 160px 0;
  text-align: center;
  background: radial-gradient(circle at center, rgba(161, 140, 209, 0.08), transparent 60%);
}

.download-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.download-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.app-store-badge {
  display: inline-block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.app-store-badge:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
}

.download-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-glass);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-tagline {
  width: 100%;
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-copy {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
    gap: 70px;
  }

  .hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-eyebrow::before {
    display: none;
  }

  .hero-subtitle {
    max-width: 500px;
  }

  .hero-ctas {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-phones {
    gap: 24px;
  }

  .phone-frame {
    width: 240px;
    height: 490px;
    border-radius: 38px;
  }

  .phone-frame-sm {
    width: 200px;
    height: 410px;
    border-radius: 32px;
  }
}

@media (max-width: 768px) {
  .proof-items {
    gap: 32px;
  }
  
  .proof-divider {
    display: none;
  }

  .proof-item {
    width: 40%;
  }

  .gallery-phones {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .gallery-phone-center {
    transform: none;
    order: -1;
  }

  .phone-frame, .phone-frame-sm {
    width: 280px;
    height: 560px;
    border-radius: 42px;
  }

  .philosophy-card {
    padding: 60px 32px;
  }

  .philosophy-card blockquote p {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 16, 33, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 22px !important;
    color: var(--text-primary) !important;
  }

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

  .proof-item {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }
}
