/* ==========================================================================
   Tiny Little Notes - Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */

:root {
  /* Brand Colors - Indigo to Pink gradient */
  --color-primary: #6366F1;
  --color-primary-dark: #4F46E5;
  --color-secondary: #EC4899;
  --color-secondary-dark: #DB2777;

  /* Gradient */
  --gradient-brand: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
  --gradient-brand-reverse: linear-gradient(135deg, #EC4899 0%, #6366F1 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);

  /* Neutral Colors */
  --color-white: #FFFFFF;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Semantic Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;

  /* Light Mode Surfaces */
  --surface-primary: var(--color-white);
  --surface-secondary: var(--color-gray-50);
  --surface-tertiary: var(--color-gray-100);

  /* Light Mode Text */
  --text-primary: var(--color-gray-900);
  --text-secondary: var(--color-gray-600);
  --text-tertiary: var(--color-gray-400);
  --text-inverse: var(--color-white);

  /* Light Mode Borders */
  --border-color: var(--color-gray-200);
  --border-color-hover: var(--color-gray-300);

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-sans);

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-tooltip: 500;

  /* Container */
  --container-max: 1200px;
  --container-padding: var(--space-6);
}

/* --------------------------------------------------------------------------
   Dark Mode
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --surface-primary: var(--color-gray-900);
    --surface-secondary: var(--color-gray-800);
    --surface-tertiary: var(--color-gray-700);

    --text-primary: var(--color-gray-50);
    --text-secondary: var(--color-gray-300);
    --text-tertiary: var(--color-gray-500);

    --border-color: var(--color-gray-700);
    --border-color-hover: var(--color-gray-600);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  }
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--surface-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

a:hover {
  color: var(--color-primary-dark);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }
}

p {
  margin-bottom: var(--space-4);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: var(--leading-normal);
  text-decoration: none;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--surface-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.card-description {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .header {
    background: rgba(17, 24, 39, 0.9);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.logo:hover {
  color: var(--text-primary);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
}

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

.nav-link {
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  transition: color var(--transition-fast);
}

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

@media (max-width: 640px) {
  .logo span {
    display: none;
  }

  .logo-img {
    width: 36px;
    height: 36px;
  }

  .nav {
    gap: var(--space-3);
  }

  .nav-link {
    font-size: var(--text-sm);
  }

  .btn-primary {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(72px + var(--space-20));
  padding-bottom: var(--space-20);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-subtle);
  z-index: -1;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}

.feature-bubbles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.feature-bubble {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--gradient-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--primary);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .feature-bubbles {
    gap: var(--space-1);
  }
  .feature-bubble {
    font-size: 11px;
    padding: 4px 10px;
  }
}

.hero-title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: var(--text-4xl);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: var(--text-3xl);
  }
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-10);
  line-height: var(--leading-relaxed);
}

@media (max-width: 768px) {
  .hero-subtitle {
    font-size: var(--text-lg);
  }
}

.hero-image {
  margin-top: var(--space-16);
  position: relative;
}

.hero-screenshot {
  max-width: 320px;
  margin: 0 auto;
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-2xl);
}

/* --------------------------------------------------------------------------
   Download Section
   -------------------------------------------------------------------------- */

.download-section {
  display: flex;
  gap: var(--space-12);
  justify-content: center;
  flex-wrap: wrap;
}

.store-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--surface-primary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

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

.store-badge {
  display: block;
  transition: opacity var(--transition-fast);
}

.store-badge:hover {
  opacity: 0.9;
}

.store-badge img {
  height: 50px;
  width: auto;
}

.qr-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.qr-code img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
}

.qr-code span {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.coming-soon-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--gradient-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--color-primary);
  margin-top: var(--space-2);
}

@media (max-width: 768px) {
  .qr-code {
    display: none;
  }

  .download-section {
    gap: var(--space-4);
  }

  .store-card {
    padding: var(--space-4);
  }
}

/* --------------------------------------------------------------------------
   Features Section
   -------------------------------------------------------------------------- */

.features {
  background: var(--surface-secondary);
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Screenshot Gallery - Modern Carousel with Device Frames
   -------------------------------------------------------------------------- */

.gallery {
  overflow: hidden;
  background: var(--surface-secondary);
}

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

.gallery-header p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin-bottom: 0;
}

/* Carousel Wrapper */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* Carousel Viewport */
.carousel-viewport {
  overflow: hidden;
  flex: 1;
  padding: var(--space-4) 0;
}

.carousel-track {
  display: flex;
  gap: var(--space-6);
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Screenshot Card */
.screenshot-card {
  flex: 0 0 calc(25% - 18px);
  min-width: calc(25% - 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.screenshot-card:hover {
  transform: translateY(-8px);
}

.screenshot-card:hover .phone-frame {
  box-shadow:
    0 25px 50px -12px rgba(99, 102, 241, 0.25),
    0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Phone Frame - Modern iPhone Style */
.phone-frame {
  position: relative;
  background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 20px 40px -12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s ease;
}

.phone-frame-dark {
  background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
}

/* Phone Notch */
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #000;
  border-radius: 0 0 14px 14px;
  z-index: 10;
}

.phone-notch::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #1a1a1a 40%, #0d0d0d 100%);
  border-radius: 50%;
}

/* Phone Screen */
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
}

.phone-screen img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
}

/* Screenshot Caption */
.screenshot-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-5);
  text-align: center;
  padding: 0 var(--space-2);
}

.caption-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
}

.caption-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

/* Navigation Buttons */
.carousel-nav {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.carousel-nav:hover:not(:disabled) {
  background: var(--gradient-brand);
  color: var(--color-white);
  border-color: transparent;
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.carousel-nav:active:not(:disabled) {
  transform: scale(0.98);
}

.carousel-nav:disabled,
.carousel-nav-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.carousel-nav:disabled:hover,
.carousel-nav-disabled:hover {
  background: var(--surface-primary);
  color: var(--text-primary);
  border-color: var(--border-color);
  transform: none;
  box-shadow: var(--shadow-md);
}

.carousel-nav svg {
  transition: transform 0.2s ease;
}

.carousel-nav:hover:not(:disabled) svg {
  transform: scale(1.1);
}

/* Pagination Area */
.carousel-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* Carousel Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot:hover {
  background: var(--color-gray-400);
  transform: scale(1.1);
}

.carousel-dot.active {
  background: var(--gradient-brand);
  width: 32px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Counter */
.carousel-counter {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: var(--font-medium);
}

.counter-current {
  color: var(--color-primary);
  font-weight: var(--font-semibold);
}

.counter-separator {
  color: var(--text-tertiary);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .carousel-wrapper {
    gap: var(--space-4);
  }

  .carousel-track {
    gap: var(--space-5);
  }

  .screenshot-card {
    flex: 0 0 calc(50% - 10px);
    min-width: calc(50% - 10px);
  }

  .phone-frame {
    border-radius: 32px;
    padding: 10px;
  }

  .phone-notch {
    width: 70px;
    height: 20px;
    top: 10px;
    border-radius: 0 0 12px 12px;
  }

  .phone-notch::before {
    width: 6px;
    height: 6px;
    top: 6px;
  }

  .phone-screen {
    border-radius: 22px;
  }

  .phone-screen img {
    border-radius: 22px;
  }

  .carousel-nav {
    width: 48px;
    height: 48px;
  }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  .gallery {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }

  .gallery-header {
    margin-bottom: var(--space-8);
  }

  .gallery-header p {
    font-size: var(--text-base);
  }

  .carousel-wrapper {
    gap: var(--space-2);
    padding: 0;
  }

  .carousel-viewport {
    padding: var(--space-2) 0;
  }

  .carousel-track {
    gap: var(--space-4);
  }

  .screenshot-card {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 0 var(--space-4);
  }

  .screenshot-card:hover {
    transform: none;
  }

  .phone-frame {
    border-radius: 28px;
    padding: 8px;
    max-width: 280px;
    margin: 0 auto;
  }

  .phone-notch {
    width: 60px;
    height: 18px;
    top: 8px;
    border-radius: 0 0 10px 10px;
  }

  .phone-notch::before {
    width: 5px;
    height: 5px;
    top: 5px;
  }

  .phone-screen {
    border-radius: 20px;
  }

  .phone-screen img {
    border-radius: 20px;
  }

  .screenshot-caption {
    margin-top: var(--space-4);
  }

  .caption-title {
    font-size: var(--text-sm);
  }

  .caption-desc {
    font-size: var(--text-xs);
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
    border-width: 1px;
  }

  .carousel-nav svg {
    width: 16px;
    height: 16px;
  }

  .carousel-pagination {
    margin-top: var(--space-6);
    gap: var(--space-3);
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  .carousel-dot.active {
    width: 28px;
  }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
  .gallery {
    background: var(--surface-primary);
  }

  .phone-frame {
    background: linear-gradient(145deg, #3d3d3d 0%, #2a2a2a 100%);
    box-shadow:
      0 20px 40px -12px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.05),
      inset 0 1px 1px rgba(255, 255, 255, 0.05);
  }

  .phone-frame-dark {
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
  }

  .screenshot-card:hover .phone-frame {
    box-shadow:
      0 25px 50px -12px rgba(99, 102, 241, 0.3),
      0 0 0 1px rgba(99, 102, 241, 0.2);
  }

  .carousel-dot.active {
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
  }
}

/* --------------------------------------------------------------------------
   Categories Section
   -------------------------------------------------------------------------- */

.categories {
  background: var(--gradient-brand);
  color: var(--color-white);
}

.categories h2,
.categories p {
  color: var(--color-white);
}

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

.categories-header p {
  opacity: 0.9;
}

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

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

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

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.category-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.category-icon {
  font-size: var(--text-3xl);
}

.category-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  opacity: 0.95;
}

/* --------------------------------------------------------------------------
   Trust/Privacy Section
   -------------------------------------------------------------------------- */

.trust {
  background: var(--surface-primary);
}

.trust-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.trust-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

.trust-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
}

.trust-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  text-align: left;
}

@media (max-width: 640px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.trust-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface-secondary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
}

.trust-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
  color: var(--text-primary);
}

.trust-item p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */

.cta {
  background: var(--surface-secondary);
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  margin-bottom: var(--space-4);
}

.cta-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--surface-primary);
  border-top: 1px solid var(--border-color);
  padding: var(--space-12) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.footer-link:hover {
  color: var(--color-primary);
}

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

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none;
  }
}

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

/* --------------------------------------------------------------------------
   Page-specific: Content Pages (Privacy, Delete Account, etc.)
   -------------------------------------------------------------------------- */

.page-header {
  background: var(--gradient-brand);
  padding: calc(72px + var(--space-8)) 0 var(--space-8);
}

.page-header .logo {
  color: var(--color-white);
}

.page-header .logo:hover {
  color: var(--color-white);
  opacity: 0.9;
}

.page-content {
  background: var(--surface-primary);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  margin-top: calc(-1 * var(--space-6));
  padding: var(--space-10) var(--space-6);
  min-height: 60vh;
}

.page-content-inner {
  max-width: 800px;
  margin: 0 auto;
}

.page-title {
  margin-bottom: var(--space-2);
}

.page-meta {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}

.page-content h2 {
  color: var(--color-primary);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-color);
}

.page-content h3 {
  color: var(--color-secondary);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.page-content p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.page-content ul,
.page-content ol {
  margin: var(--space-4) 0;
  padding-left: var(--space-6);
}

.page-content li {
  margin: var(--space-2) 0;
  line-height: var(--leading-relaxed);
}

.page-content a {
  color: var(--color-primary);
}

.page-content a:hover {
  color: var(--color-primary-dark);
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
}

.page-content th,
.page-content td {
  border: 1px solid var(--border-color);
  padding: var(--space-3);
  text-align: left;
}

.page-content th {
  background: var(--surface-secondary);
  color: var(--color-primary);
  font-weight: var(--font-semibold);
}

.page-content tr:nth-child(even) {
  background: var(--surface-secondary);
}

/* Alert boxes */
.alert {
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
}

.alert-warning {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
}

.alert-warning strong {
  color: #92400E;
}

.alert-info {
  background: var(--gradient-subtle);
  border: 1px solid var(--color-primary);
}

.alert-info strong {
  color: var(--color-primary);
}

.alert-error {
  background: #FEE2E2;
  border: 1px solid #EF4444;
  color: #B91C1C;
}

.alert-success {
  background: #D1FAE5;
  border: 1px solid #10B981;
  color: #065F46;
}

/* Steps component */
.steps {
  background: var(--surface-secondary);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--space-5);
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  background: var(--gradient-brand);
  color: var(--color-white);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  flex-shrink: 0;
  margin-right: var(--space-4);
  font-size: var(--text-sm);
}

.step-content {
  flex: 1;
}

.step-title {
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.step-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Data list */
.data-list {
  background: var(--surface-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
}

.data-list ul {
  margin: 0;
  padding-left: var(--space-5);
}

/* Contact box */
.contact-box {
  background: var(--gradient-brand);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin: var(--space-8) 0;
  color: var(--color-white);
  text-align: center;
}

.contact-box p {
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.contact-box a {
  color: var(--color-white);
  font-weight: var(--font-semibold);
}

/* --------------------------------------------------------------------------
   Page-specific: Centered Card Pages (Reset Password, Confirm Email, etc.)
   -------------------------------------------------------------------------- */

.card-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--gradient-brand);
}

.card-page-container {
  background: var(--surface-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-2xl);
}

.card-page-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  border-radius: var(--radius-xl);
}

.card-page-container h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

.card-page-container p {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

/* Form elements */
.form-group {
  margin-bottom: var(--space-4);
  text-align: left;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
}

.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--surface-primary);
  color: var(--text-primary);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-2);
}

.form-error {
  color: var(--color-error);
  font-size: var(--text-sm);
  margin-top: var(--space-2);
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-6);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Checkmark success icon */
.checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: var(--color-success);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark svg {
  width: 40px;
  height: 40px;
  fill: var(--color-white);
}

/* Error icon */
.error-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  background: #FEE2E2;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon svg {
  width: 40px;
  height: 40px;
  fill: var(--color-error);
}

/* Profile card (for share page) */
.profile-card {
  background: var(--gradient-subtle);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xl);
  color: var(--color-white);
  font-weight: var(--font-bold);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.profile-relationship {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: var(--font-medium);
}

.profile-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* App store links section */
.app-links {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-color);
}

.app-links p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.store-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-gray-900);
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  transition: background var(--transition-fast);
}

.store-button:hover {
  background: var(--color-gray-700);
  color: var(--color-white);
}

.store-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Note text */
.note-text {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* Responsive adjustments for card pages */
@media (max-width: 480px) {
  .card-page-container {
    padding: var(--space-6);
  }

  .card-page-container h1 {
    font-size: var(--text-xl);
  }
}

@media (max-width: 640px) {
  .step {
    flex-direction: column;
  }

  .step-number {
    margin-bottom: var(--space-2);
    margin-right: 0;
  }

  .page-content {
    padding: var(--space-6) var(--space-4);
  }
}
