/* ============================================
   MAFALDA - Soft Wellness Design
   Typography: Satoshi (display) + DM Sans (body)
   ============================================ */

:root {
  /* Brand Colors */
  --primary: #8B7EC8;
  --primary-light: #B8ADE0;
  --primary-lighter: #EDE9F7;
  --primary-dark: #6B5CA5;

  /* Semantic Colors */
  --success: #34D399;
  --warning: #F59E0B;
  --info: #60A5FA;
  --pink: #E8A5D7;
  --teal: #7EB8C8;

  /* Backgrounds */
  --bg: #FAFBFE;
  --bg-warm: #FBF9FC;
  --bg-alt: #F5F3F8;
  --card: #FFFFFF;

  /* Text */
  --text: #1A1720;
  --text-secondary: #5C5A66;
  --text-muted: #9794A1;

  /* Typography */
  --font-display: 'Satoshi', -apple-system, sans-serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(139, 126, 200, 0.06);
  --shadow-md: 0 4px 24px rgba(139, 126, 200, 0.1);
  --shadow-lg: 0 12px 48px rgba(139, 126, 200, 0.15);
  --shadow-xl: 0 24px 64px rgba(139, 126, 200, 0.2);

  /* Animation */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.4s;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) var(--space-lg);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  border: 1px solid rgba(139, 126, 200, 0.1);
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 32px;
  height: 20px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.nav-center {
  display: flex;
  gap: var(--space-xl);
}

.nav-center a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease);
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-availability {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-lighter);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.availability-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.nav-cta {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease-bounce);
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.lang-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  border: 1px solid rgba(139, 126, 200, 0.2);
  transition: all var(--duration) var(--ease);
}

.lang-toggle:hover {
  background: var(--primary-lighter);
  border-color: var(--primary-light);
  color: var(--primary);
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-sm);
}

.nav-mobile-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: calc(var(--nav-height) + var(--space-md));
  left: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-lg);
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 999;
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  padding: var(--space-md);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background var(--duration);
}

.mobile-menu a:hover {
  background: var(--bg-alt);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.3);
  top: -200px;
  right: -100px;
  animation: float1 20s ease-in-out infinite;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--pink);
  bottom: -100px;
  left: -100px;
  animation: float2 25s ease-in-out infinite;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: var(--teal);
  top: 40%;
  left: 30%;
  animation: float3 18s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -20px) scale(1.05); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -30px) scale(0.95); }
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  color: white;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.title-line {
  display: block;
}

.title-accent {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  max-width: 420px;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--duration) var(--ease-bounce);
}

.btn-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.btn-label {
  font-size: 0.6875rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.btn-title {
  font-size: 1rem;
  font-weight: 700;
}

.btn-primary {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-4px);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-stack {
  position: relative;
  width: 300px;
  height: 600px;
}

.phone {
  position: absolute;
  width: 260px;
  background: linear-gradient(145deg, #2A2730 0%, #1A1720 100%);
  border-radius: 40px;
  padding: 10px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 32px;
}

.phone-back {
  top: 40px;
  left: 60px;
  transform: rotate(8deg);
  opacity: 0.7;
  height: 520px;
}

.phone-front {
  top: 0;
  left: 0;
  z-index: 2;
  height: 560px;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features-section {
  background: var(--bg);
}

.features-block {
  padding: var(--space-4xl) var(--space-lg);
}

.features-block-alt {
  background: var(--bg-warm);
}

.features-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}

.features-badge {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(139, 126, 200, 0.15), rgba(139, 126, 200, 0.08));
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(139, 126, 200, 0.2);
}

.badge-alt {
  background: linear-gradient(135deg, rgba(126, 184, 200, 0.15), rgba(126, 184, 200, 0.08));
  color: var(--teal);
  border: 1px solid rgba(126, 184, 200, 0.2);
}

.features-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--text);
}

.features-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
}

/* Carousel */
.carousel {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-md);
  margin: calc(-1 * var(--space-md));
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 calc(100% - var(--space-lg));
  max-width: 900px;
  scroll-snap-align: center;
}

/* Feature Card */
.feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  background: var(--card);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(139, 126, 200, 0.08);
}

.feature-card-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--icon-color) 20%, transparent),
    color-mix(in srgb, var(--icon-color) 5%, transparent)
  );
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-color);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card .feature-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.feature-desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.feature-tags span {
  padding: 6px 12px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease);
}

.feature-tags span:hover {
  background: var(--primary);
  color: white;
}

/* Health Compatibility */
.health-compat {
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--bg-alt);
}

.compat-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.compat-apps {
  display: flex;
  gap: var(--space-md);
}

.compat-app {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-alt);
}

.compat-app svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.compat-app span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.google-fit-icon {
  border: 1px solid #E5E5E5;
  border-radius: 5px;
}

/* Feature Phone */
.feature-card-visual {
  display: flex;
  justify-content: center;
}

.feature-phone {
  width: 220px;
  background: linear-gradient(145deg, #2A2730 0%, #1A1720 100%);
  border-radius: 32px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--duration) var(--ease);
}

.feature-phone:hover {
  transform: translateY(-8px) rotate(2deg);
}

.feature-phone img {
  width: 100%;
  height: auto;
  border-radius: 26px;
}

/* Carousel Nav */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.carousel-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid rgba(139, 126, 200, 0.2);
  border-radius: var(--radius-full);
  color: var(--primary);
  transition: all var(--duration) var(--ease);
  box-shadow: 0 2px 12px rgba(139, 126, 200, 0.1);
}

.carousel-btn:hover {
  background: var(--primary-lighter);
  border-color: var(--primary-light);
  color: var(--primary-dark);
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(139, 126, 200, 0.2);
}

.carousel-btn svg {
  width: 18px;
  height: 18px;
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  background: rgba(139, 126, 200, 0.2);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.carousel-dot:hover {
  background: rgba(139, 126, 200, 0.4);
}

.carousel-dot.active {
  width: 20px;
  border-radius: var(--radius-full);
  background: var(--primary);
}

/* Caregiver Feature */
.caregiver-feature {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.caregiver-content {
  max-width: 480px;
}

.caregiver-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.highlight-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(139, 126, 200, 0.05);
  transition: all var(--duration) var(--ease);
}

.highlight-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.highlight-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(126, 184, 200, 0.15), rgba(126, 184, 200, 0.05));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
}

.highlight-icon svg {
  width: 24px;
  height: 24px;
}

.highlight-text h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.highlight-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.caregiver-visual {
  display: flex;
  justify-content: center;
}

.caregiver-phone-carousel {
  position: relative;
}

.caregiver-phone {
  width: 280px;
  height: 560px;
  background: linear-gradient(145deg, #2A2730 0%, #1A1720 100%);
  border-radius: 40px;
  padding: 10px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.caregiver-phone img.caregiver-img {
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  object-position: top;
  border-radius: 32px;
  position: absolute;
  top: 10px;
  left: 10px;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.caregiver-phone img.caregiver-img.active {
  opacity: 1;
  z-index: 1;
}

.caregiver-indicators {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: var(--space-md);
}

.caregiver-indicators .indicator {
  width: 6px;
  height: 6px;
  background: rgba(126, 184, 200, 0.3);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.caregiver-indicators .indicator:hover {
  background: rgba(126, 184, 200, 0.5);
}

.caregiver-indicators .indicator.active {
  width: 20px;
  border-radius: var(--radius-full);
  background: var(--teal);
}

/* ============================================
   SECURITY SECTION
   ============================================ */

.security-section {
  padding: var(--space-4xl) var(--space-lg);
  background: var(--bg-alt);
}

.security-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.security-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary-lighter);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.security-card {
  background: var(--card);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(139, 126, 200, 0.05);
  transition: all var(--duration) var(--ease);
}

.security-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.security-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--card-color) 15%, transparent),
    color-mix(in srgb, var(--card-color) 5%, transparent)
  );
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-color);
}

.security-icon svg {
  width: 28px;
  height: 28px;
}

.security-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.security-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */

.download-section {
  padding: var(--space-4xl) var(--space-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.download-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dshape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
}

.dshape-1 {
  width: 400px;
  height: 400px;
  background: white;
  top: -100px;
  right: -100px;
}

.dshape-2 {
  width: 300px;
  height: 300px;
  background: var(--pink);
  bottom: -100px;
  left: -50px;
}

.download-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  color: white;
}

.download-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: var(--space-md);
}

.download-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.download-cta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.btn-white {
  background: white;
  color: var(--text);
}

.btn-white:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-4px);
}

.download-note {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-top: var(--space-2xl);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--text);
  color: white;
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: var(--space-xl);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
}

.footer-logo .logo-text {
  color: white;
}

.footer-tagline {
  font-size: 0.875rem;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  gap: var(--space-3xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.4;
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  font-size: 0.9375rem;
  opacity: 0.7;
  padding: 4px 0;
  transition: opacity var(--duration);
}

.footer-col a:hover {
  opacity: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  opacity: 0.5;
}

.footer-hds {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.hds-icon {
  width: 16px;
  height: 16px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-2xl);
  }

  .hero-text {
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .hero-subtitle {
    margin: 0 auto var(--space-xl);
  }

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

  .phone-stack {
    width: 260px;
    height: 520px;
  }

  .phone-back {
    left: 40px;
    height: 460px;
  }

  .phone-front {
    height: 500px;
  }

  .feature-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .feature-card-content {
    align-items: center;
  }

  .feature-tags {
    justify-content: center;
  }

  .health-compat {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .caregiver-feature {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .caregiver-content {
    max-width: none;
  }

  .highlight-item {
    text-align: left;
  }

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

@media (max-width: 768px) {
  .nav-center,
  .nav-availability {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .carousel-slide {
    flex: 0 0 100%;
  }

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

  .download-cta {
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --space-lg: 20px;
    --space-xl: 28px;
    --space-2xl: 40px;
    --space-3xl: 56px;
    --space-4xl: 80px;
  }

  .phone-stack {
    width: 220px;
    height: 460px;
  }

  .phone {
    width: 200px;
    border-radius: 32px;
    padding: 8px;
  }

  .phone img {
    border-radius: 26px;
  }

  .phone-back {
    left: 30px;
    height: 400px;
  }

  .phone-front {
    height: 440px;
  }

  .feature-phone {
    width: 180px;
    border-radius: 28px;
    padding: 6px;
  }

  .feature-phone img {
    border-radius: 24px;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.animate-in {
  animation: fadeInUp 0.6s var(--ease) forwards;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Ensure visibility before GSAP loads */
.hero-cta .btn,
.download-cta .btn,
.security-card {
  opacity: 1 !important;
}

/* ============================================
   STORE BUTTONS ANIMATIONS
   ============================================ */

@keyframes pulse-border {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.2);
  }
}

@keyframes shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.store-btn {
  position: relative;
  overflow: hidden;
}

.store-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shine 4s ease-in-out infinite;
  pointer-events: none;
}

.store-btn:hover::before {
  animation: none;
}

.store-btn:hover {
  transform: translateY(-4px);
}

/* Hero store buttons - ghost style */
.btn-hero {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  animation: pulse-border 3s ease-in-out infinite;
}

.btn-hero:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.8);
  animation: none;
}

.hero-cta .store-btn:first-child {
  animation-delay: 0s;
}

.hero-cta .store-btn:last-child {
  animation-delay: 0.5s;
}

/* Download section buttons */
.download-cta .btn-ghost {
  animation: pulse-border 3s ease-in-out infinite;
}

.download-cta .store-btn:first-child {
  animation-delay: 0s;
}

.download-cta .store-btn:last-child {
  animation-delay: 0.5s;
}

.download-cta .store-btn:hover {
  animation-play-state: paused;
  transform: translateY(-4px);
}

/* ============================================
   SECURITY SECTION ENHANCED ANIMATIONS
   ============================================ */

@keyframes float-card {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes icon-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes border-glow {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(139, 126, 200, 0.06);
  }
  50% {
    box-shadow: 0 8px 32px rgba(139, 126, 200, 0.2);
  }
}

.security-card {
  animation: float-card 5s ease-in-out infinite, border-glow 4s ease-in-out infinite;
}

.security-card:nth-child(1) { animation-delay: 0s; }
.security-card:nth-child(2) { animation-delay: 0.5s; }
.security-card:nth-child(3) { animation-delay: 1s; }
.security-card:nth-child(4) { animation-delay: 1.5s; }

.security-card:hover {
  animation-play-state: paused;
}

/* Pause security animations when hovering over the section */
.security-grid:hover .security-card {
  animation-play-state: paused;
}

.security-icon {
  transition: all 0.4s var(--ease-bounce);
}

.security-card:hover .security-icon {
  transform: scale(1.15) rotate(5deg);
  animation: icon-pulse 0.6s ease-in-out;
}

/* Caregiver section animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.highlight-item {
  animation: slideInLeft 0.6s var(--ease) forwards;
}

.highlight-item:nth-child(1) { animation-delay: 0.1s; }
.highlight-item:nth-child(2) { animation-delay: 0.2s; }
.highlight-item:nth-child(3) { animation-delay: 0.3s; }

.caregiver-phone {
  animation: float 4s ease-in-out infinite;
}

.caregiver-phone:hover {
  animation-play-state: paused;
}

/* Pause all carousel animations on hover */
.carousel:hover .carousel-slide {
  animation-play-state: paused;
}

/* Pause store button animations on hover */
.store-btn:hover {
  animation-play-state: paused;
}

/* Pause hero shape animations on hover */
.hero:hover .shape {
  animation-play-state: paused;
}

/* Pause highlight animations on hover */
.caregiver-highlights:hover .highlight-item {
  animation-play-state: paused;
}

/* ============================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
  /* Disable ALL heavy animations on mobile */
  .shape,
  .caregiver-phone,
  .highlight-item,
  .feature-card,
  .security-card {
    animation: none !important;
    transition: none !important;
  }

  /* Make all content visible immediately (no GSAP delays) */
  .hero-title,
  .hero-subtitle,
  .hero-cta,
  .phone-stack,
  .features-header,
  .feature-card,
  .security-card,
  .caregiver-content,
  .caregiver-visual,
  .highlight-item,
  .download-section,
  .footer,
  .nav-availability {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* Optimize scroll performance */
  .carousel-track {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto; /* Disable smooth scroll on mobile */
  }

  /* Disable parallax effects completely */
  .phone-stack,
  .shape {
    transform: none !important;
    will-change: auto !important;
  }

  /* Make carousel slides easier to swipe */
  .carousel-slide {
    scroll-snap-stop: always;
  }

  /* Hint for swipeable carousels */
  .caregiver-phone-carousel {
    cursor: grab;
    touch-action: pan-x;
  }

  .caregiver-phone-carousel:active {
    cursor: grabbing;
  }

  /* Visual swipe hint for caregiver carousel */
  .caregiver-phone::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }

  /* Disable hover effects that can cause jank on mobile */
  .feature-card:hover,
  .security-card:hover,
  .highlight-item:hover {
    transform: none !important;
    box-shadow: var(--shadow-md) !important;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
