@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

html {
  scroll-behavior: smooth;
}

:root {
  /* Macaroon Palette */
  --rose-quartz: #F7CAC9;
  --creamy-peach: #F4E1D2;
  --off-white: #FFFDFB;
  --cream: #FFF9F5;

  /* Security / Accent */
  --tactical-green: #2D5A47;
  --tactical-green-light: #4A8B6F;
  --dusty-rose: #D4A5A5;
  --sage-green: #B2AC88;

  /* Text */
  --text-dark: #2D2D2D;
  --text-muted: #666666;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: 15px;

  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-dark);
}

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

body {
  background: linear-gradient(135deg, var(--rose-quartz) 0%, var(--creamy-peach) 50%, var(--cream) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

nav {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  z-index: 1000;
}

.breathing-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 20% 30%, var(--rose-quartz), transparent 50%),
    radial-gradient(circle at 80% 70%, var(--creamy-peach), transparent 50%);
  filter: blur(80px);
  animation: breathe 20s ease-in-out infinite alternate;
}

@keyframes breathe {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

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

/* Glossy Glass Components */
.glass-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  padding: 2.5rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.05),
    inset 0 0 32px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.glass-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg,
      transparent 0%,
      rgba(255, 255, 255, 0.1) 45%,
      rgba(255, 255, 255, 0.25) 50%,
      rgba(255, 255, 255, 0.1) 55%,
      transparent 100%);
  transform: rotate(30deg);
  pointer-events: none;
  animation: shine 10s infinite linear;
}

@keyframes shine {
  0% {
    transform: translateX(0%) rotate(30deg);
  }

  20% {
    transform: translateX(100%) rotate(30deg);
  }

  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

.reflective {
  position: relative;
  overflow: hidden;
}

.reflective::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transform: skewX(-25deg);
  transition: 0.75s;
}

.reflective:hover::before {
  left: 125%;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.2rem 3rem;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--tactical-green), var(--tactical-green-light));
  color: white;
  box-shadow: 0 10px 25px rgba(45, 90, 71, 0.25);
}

.btn-primary:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 35px rgba(45, 90, 71, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--tactical-green);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Section Spacing */
section {
  padding: 8rem 0;
}

/* Reveals */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.persona-bubble {
  transition: all 0.3s ease;
  cursor: pointer;
}

.persona-bubble:hover {
  transform: translateY(-10px);
}

.persona-bubble:hover div {
  border-color: var(--tactical-green);
  box-shadow: 0 15px 30px rgba(45, 90, 71, 0.2);
}

/* Typography */
h1 {
  font-size: 4.5rem;
  line-height: 1.05;
  margin-bottom: 2rem;
  color: var(--tactical-green);
  font-weight: 600;
  letter-spacing: -2px;
}

h2 {
  font-size: 3rem;
  margin-bottom: 2.5rem;
  color: var(--tactical-green);
  font-weight: 600;
  letter-spacing: -1px;
}

.subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.5;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  text-align: left;
  padding: 2.5rem;
  border-radius: 28px;
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 2rem;
  display: block;
}

.feature-section {
  padding: 6rem 5% 0;
  max-width: 1300px;
  margin: 0 auto;
}

#hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  gap: 4rem;
  padding-top: 11rem;
  /* Reduced from 15rem for better visual rhythm */
}

.feature-sketch {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto 2rem;
  display: block;
}

/* Worry Cards */
.worry-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3.5rem;
}

@media (min-width: 768px) {
  .worry-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.worry-card {
  text-align: center;
  padding: 3.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.worry-image {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.worry-sketch {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

/* Transitions */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Persona Bubbles */
.persona-bubble {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.persona-bubble:hover {
  transform: translateY(-10px);
}

.persona-bubble div {
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.persona-bubble:hover div {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

/* Card Hover */
.glass-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#gathering .glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* Feature Scroller */
.feature-scroller-container {
  position: relative;
  padding-bottom: 3rem;
  overflow: hidden;
}

.feature-scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 2rem;
  padding: 2rem 0;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.feature-scroller::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.feature-scroller .feature-card {
  flex: 0 0 320px;
  scroll-snap-align: center;
}

@media (min-width: 1024px) {
  .feature-scroller .feature-card {
    flex: 1;
  }
}

/* Glossy Identity */
.glossy-highlight {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 20px 50px rgba(45, 90, 71, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.5);
  position: relative;
}

.glossy-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
  pointer-events: none;
}

.premium-bot-text {
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* App Carousel */
.app-carousel-container {
  perspective: 1000px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  position: relative;
  height: 722px;
  /* Precision calculated for 320px width based on 1376x3104 ratio */
}

.app-frame {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--text-dark);
  /* Darker background for the screen */
  border-radius: 46px;
  /* Slightly more rounded like modern phones */
  border: 12px solid #1a1a1a;
  /* Thicker bezel for more realistic phone body */
  box-shadow:
    0 50px 100px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.app-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Snug fit as ratio now matches frame */
  background: #0d1117;
  /* Matches app background */
}

.app-frame.behind-1 {
  transform: translateZ(-100px) translateY(20px) rotate(-5deg);
  opacity: 0.6;
  z-index: 1;
}

.app-frame.behind-2 {
  transform: translateZ(-200px) translateY(40px) rotate(5deg);
  opacity: 0.3;
  z-index: 0;
}

.app-frame.front {
  transform: translateZ(0) translateY(0) rotate(0);
  opacity: 1;
  z-index: 10;
  /* Increased to ensure clickability */
}

/* Privacy Section */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.privacy-card {
  padding: 2.5rem;
  border-left: 4px solid var(--tactical-green);
}

.tech-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(45, 90, 71, 0.1);
  color: var(--tactical-green);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

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

  h2 {
    font-size: 2rem !important;
  }

  section {
    padding: 4rem 0;
  }

  #hero {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }

  #hero .subtitle {
    margin: 0 auto 2rem;
  }

  #hero-visual {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* Early Access Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 90, 71, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: 500px;
  width: 90%;
  transform: scale(0.9) translateY(20px);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  padding: 3.5rem 2.5rem;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  color: var(--tactical-green);
  opacity: 0.5;
  transition: opacity 0.3s;
  line-height: 1;
}

.modal-close:hover {
  opacity: 1;
}

#beta-form input:focus,
#beta-form select:focus {
  outline: none;
  border-color: var(--tactical-green);
  box-shadow: 0 0 0 4px rgba(45, 90, 71, 0.1);
}

@media (max-width: 768px) {
  .modal-content {
    padding: 2.5rem 1.5rem;
  }
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2rem;
  width: 100%;
  position: relative;
  z-index: 10;
}

@media (min-width: 769px) {
  .carousel-dots {
    display: none;
  }
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  background: rgba(45, 90, 71, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dots .dot.active {
  width: 24px;
  background: var(--tactical-green);
  border-radius: 4px;
}

/* Redundant elements cleanup */
.mobile-drawer {
  display: none;
}

/* Base styles cleanup for new sections */
.footer-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 3rem;
}

.footer-branding-container {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-badges-row {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* === Mobile Optimization (768px and below) === */
@media (max-width: 768px) {
  nav {
    top: 1rem;
    padding: 0.6rem 1.5rem !important;
    width: 94%;
  }

  nav img {
    height: 35px !important;
  }

  nav div[style*="font-size: 1.8rem"] {
    font-size: 1.4rem !important;
  }

  .nav-links {
    display: none !important;
  }

  /* Hamburger Button */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
  }

  .hamburger span {
    width: 24px;
    height: 2px;
    background: var(--tactical-green);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
  }

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

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
  }

  /* Mobile Drawer */
  .mobile-drawer {
    display: none;
    /* Hidden by default on desktop */
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 253, 251, 0.98);
    backdrop-filter: blur(20px);
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 6rem 2rem;
  }

  .mobile-drawer.active {
    display: flex;
    right: 0;
  }

  .drawer-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .drawer-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
  }

  /* Hero Adjustments */
  #hero {
    padding-top: 10rem !important;
    text-align: center;
    gap: 2rem !important;
  }

  #hero h1 {
    font-size: 2.8rem !important;
    letter-spacing: -1px;
  }

  #hero .subtitle {
    font-size: 1.1rem !important;
    margin-bottom: 2rem !important;
  }

  #hero div[style*="display: flex; gap: 1.5rem"] {
    flex-direction: column;
    gap: 1rem !important;
  }

  .pill-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  /* Problems Section */
  .worry-cards {
    gap: 1.5rem !important;
  }

  .worry-card {
    padding: 2.5rem 1.5rem !important;
  }

  /* WhatsApp Section */
  #whatsapp div[style*="padding: 6rem"] {
    padding: 3rem 2rem !important;
    flex-direction: column;
    text-align: center;
    gap: 2.5rem !important;
  }

  #whatsapp h2 {
    font-size: 2.5rem !important;
  }

  /* Privacy Section */
  .privacy-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer Adjustments */
  footer {
    padding: 4rem 0 !important;
  }

  /* Footer Refinement (v3) */
  footer {
    padding: 3rem 0 !important;
  }

  .footer-main-row {
    flex-direction: column !important;
    gap: 0 !important;
    align-items: center !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  }

  .footer-branding {
    width: 100%;
    margin-bottom: 1rem !important;
  }

  .footer-branding-text {
    text-align: center !important;
    align-items: center !important;
  }

  .footer-branding-container {
    flex-direction: column !important;
    gap: 1rem !important;
    /* Visual gap between logo and tagline */
    align-items: center !important;
    justify-content: center !important;
  }

  .footer-badges-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 1.5rem !important;
    gap: 0 !important;
    /* Maximize spacing on edges */
  }

  .drive-badge,
  .aes-badge {
    width: auto !important;
  }

  .trust-text {
    display: inline !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
  }

  .footer-logo {
    height: 55px !important;
    margin-bottom: 0px !important;
  }
}

@media (max-width: 768px) {
  section {
    padding-top: 4rem !important;
  }

  #hero {
    padding-top: 8.5rem !important;
    overflow: hidden !important;
    /* Safety clip for rotated background */
    position: relative !important;
  }

  .app-carousel-container {
    height: 620px;
    /* Scaled for mobile */
  }

  /* 0. Fix Invisible Overflow (The "Ghost Page" fix) */
  .hero-bg-accent {
    width: 60% !important;
    right: -5% !important;
    top: 5% !important;
    transform: rotate(8deg) !important;
    opacity: 0.2 !important;
  }

  /* 1. Fix Top Nav Bar: Absolute Safety Centering */
  nav.glass-card {
    padding: 0.8rem 1.2rem !important;
    width: 90% !important;
    top: 1rem !important;
    left: 5% !important;
    /* Safety: bypass 50% alignment issues */
    transform: none !important;
    margin: 0 !important;
    right: auto !important;
    max-width: none !important;
  }

  nav .nav-links {
    display: none !important;
  }

  /* 2. Fix Footer & Spacing */
  .footer-badges-row {
    gap: 1.5rem !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .footer-links-row {
    gap: 1.2rem !important;
    /* Reduce 4rem gap for mobile */
    width: 100% !important;
    padding: 0 0.5rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    display: flex !important;
  }

  footer a {
    white-space: nowrap !important;
    font-size: 0.9rem !important;
  }

  /* 3. Fix Beta Modal Centered Alignment */
  .modal-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 10000 !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-overlay.active {
    display: flex !important;
  }

  .modal-content {
    width: 90% !important;
    max-width: 400px !important;
    padding: 2.5rem 1.5rem !important;
    margin: auto !important;
    transform: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
  }

  #beta-form input,
  #beta-form select {
    width: 100% !important;
    box-sizing: border-box !important;
    max-width: 100%;
    font-size: 16px !important;
  }

  #beta-form {
    width: 100% !important;
  }
}