/*
 * Color Theme
 * Edit these values to customize the color scheme for your app.
 */

:root {
  color-scheme: light dark;

  /* Primary brand color */
  --primary: #1746A6;

  /* Text colors */
  --text: #1d1d1f;
  --text-secondary: #6e6e73;

  /* Background colors */
  --bg: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-elevated: #ffffff;

  /* Border colors */
  --border: #d2d2d7;

  /* Success/accent colors (used for privacy checkmarks) */
  --success-bg: #e8f5e9;
  --success-text: #2e7d32;

  /* Modal backdrop */
  --modal-backdrop: rgba(0, 0, 0, 0.9);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Primary brand color - dark mode */
    --primary: #6F8FCD;

    /* Text colors - dark mode */
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;

    /* Background colors - dark mode */
    --bg: #000000;
    --bg-secondary: #1c1c1e;
    --bg-elevated: #2c2c2e;

    /* Border colors - dark mode */
    --border: #38383a;

    /* Success/accent colors - dark mode */
    --success-bg: #1b3d1f;
    --success-text: #81c784;
  }
}

/* ============================================
   Base
   ============================================ */

/* Local Font */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}

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

.btn-large {
  padding: 20px 40px;
  font-size: 18px;
}

.apple-icon {
  width: 20px;
  height: 20px;
}

/* ============================================
   Header & Navigation
   ============================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding-top: env(safe-area-inset-top, 0);
  background: var(--bg);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

header::before {
  content: '';
  position: absolute;
  top: -100vh;
  left: 0;
  right: 0;
  height: 100vh;
  background: inherit;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.logo .logo-icon img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.logo .logo-icon.logo-icon-light {
  display: flex;
}

.logo .logo-icon.logo-icon-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo .logo-icon.logo-icon-light {
    display: none;
  }

  .logo .logo-icon.logo-icon-dark {
    display: flex;
  }
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
}

.nav-cta {
  background: var(--primary);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  padding: 140px 0 80px;
  text-align: center;
}

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

.badge {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}

h1 {
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-cta {
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px;
  }
}

/* ============================================
   Screenshots Carousel
   ============================================ */

.screenshots {
  padding: 40px 0;
  overflow: hidden;
}

.screenshots h2 {
  text-align: center;
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 48px;
}

.carousel {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  padding: 10px 24px;
  scroll-padding: 0 24px;
}

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

.carousel:active {
  cursor: grabbing;
}

.carousel-track {
  display: flex;
  gap: 24px;
}

.carousel-track::after {
  content: '';
  flex-shrink: 0;
  width: 1px;
}

.carousel-slide {
  flex-shrink: 0;
  scroll-snap-align: start;
}

.carousel-slide img {
  height: 500px;
  width: auto;
  border-radius: 24px;
  cursor: pointer;
  transition: transform 0.2s;
}

.carousel-slide:hover img {
  transform: scale(1.02);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal img {
  max-height: 90vh;
  max-width: 90vw;
  border-radius: 24px;
  cursor: default;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal.active img {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active .modal-close {
  opacity: 0.8;
}

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

@media (max-width: 768px) {
  .screenshots h2 {
    font-size: 32px;
  }

  .carousel-track {
    gap: 16px;
  }

  .carousel-slide img {
    height: 400px;
    border-radius: 20px;
  }
}

/* ============================================
   Features Section
   ============================================ */

.features {
  padding: 50px 0;
  background: var(--bg-secondary);
}

.features h2 {
  text-align: center;
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 60px;
}

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

.feature-card {
  position: relative;
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.pro-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.features-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 40px;
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

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

@media (max-width: 768px) {
  .features h2 {
    font-size: 32px;
  }

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

/* ============================================
   Sections (Privacy, Sync, CTA, Sister App)
   ============================================ */

/* Privacy Section */
.privacy {
  padding: 50px 0;
}

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

.privacy h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 24px;
}

.privacy p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.privacy-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.privacy-list li {
  background: var(--success-bg);
  color: var(--success-text);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
}

.privacy-list li::before {
  content: '✓ ';
}

/* Sync Section */
.sync {
  padding: 50px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.sync h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.sync p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.device-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.device-badge {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
}

/* CTA Section */
.cta {
  padding: 50px 0;
  text-align: center;
}

.cta h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

/* Sister App Section */
.sister-app {
  padding: 50px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.sister-app-content {
  max-width: 600px;
  margin: 0 auto;
}

.sister-app-tagline {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.sister-app-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text-primary);
}

.sister-app-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.sister-app-icon img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
}

.sister-app-icon-light {
  display: block;
}

.sister-app-icon-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .sister-app-icon-light {
    display: none;
  }

  .sister-app-icon-dark {
    display: block;
  }
}

.sister-app-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.sister-app-name {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.sister-app-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.sister-app-arrow {
  font-size: 32px;
  transition: transform 0.2s ease;
}

.sister-app-link:hover .sister-app-arrow {
  transform: translateX(6px);
}

@media (max-width: 768px) {
  .privacy h2,
  .sync h2,
  .cta h2 {
    font-size: 32px;
  }

  .privacy-list {
    flex-direction: column;
    align-items: center;
  }

  .sister-app-tagline {
    font-size: 20px;
  }

  .sister-app-icon {
    width: 56px;
    height: 56px;
  }

  .sister-app-name {
    font-size: 26px;
  }

  .sister-app-subtitle {
    font-size: 14px;
  }

  .sister-app-arrow {
    font-size: 26px;
  }
}

/* ============================================
   Footer
   ============================================ */

footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

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

.footer-brand .logo-icon img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.footer-brand .logo-icon.logo-icon-light {
  display: flex;
}

.footer-brand .logo-icon.logo-icon-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .footer-brand .logo-icon.logo-icon-light {
    display: none;
  }

  .footer-brand .logo-icon.logo-icon-dark {
    display: flex;
  }
}

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

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

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

.footer-copy {
  color: var(--text-secondary);
  font-size: 12px;
}

/* ============================================
   Privacy Policy
   ============================================ */

.privacy-policy {
  padding: 120px 24px 60px;
  max-width: 748px;
  margin: 0 auto;
}

.privacy-policy h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
}

.privacy-policy h2 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
}

.privacy-policy p,
.privacy-policy ul {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.privacy-policy ul {
  padding-left: 24px;
}

.privacy-policy li {
  margin-bottom: 8px;
}

.privacy-policy a {
  color: var(--primary);
}

.privacy-policy strong {
  color: var(--text);
}
