/* Satoshi Variable Font */
@font-face {
  font-family: 'Satoshi';
  src: url('assets/fonts/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.woff2') format('woff2'),
       url('assets/fonts/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.woff') format('woff'),
       url('assets/fonts/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-Variable.ttf') format('truetype');
  font-weight: 300 900;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: 'Satoshi';
  src: url('assets/fonts/Satoshi_Complete/Fonts/WEB/fonts/Satoshi-VariableItalic.woff2') format('woff2'),
       url('assets/fonts/Satoshi-VariableItalic.woff') format('woff'),
       url('assets/fonts/Satoshi-VariableItalic.ttf') format('truetype');
  font-weight: 300 900;
  font-display: swap;
  font-style: italic;
}

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

html,
body {
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  
  /* Global Typography */
  font-family: 'Satoshi', sans-serif;
  color: rgba(51, 51, 51, 0.70);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px; /* 125% */
  letter-spacing: 0.02em; /* 2% letter spacing */

  /* Fallback for browsers that don't support dvh */
  height: 100vh;
  /* Use dvh for dynamic viewport height */
  height: 100dvh;
}

/* Hero container fills viewport */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  background: #000;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -------- Hide native iOS play overlay so we only show custom button -------- */
.hero-video::-webkit-media-controls-start-playback-button,
.hero-video::-webkit-media-controls-enclosure,
.hero-video::-webkit-media-controls-panel,
.hero-video::-webkit-media-controls-play-button {
  display: none !important;
  -webkit-appearance: none;
}
.hero-video::-webkit-media-controls {
  display: none !important;
}

/* ---------- Top overlay ---------- */
.top-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 36px 0 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 100%);
  z-index: 5;
}

.top-overlay .logo {
  height: 40px;
  filter: brightness(0) invert(1);
}

/* ---------- Play button ---------- */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 6;
}
.play-overlay svg {
  transition: transform 0.2s ease;
}
.play-overlay:hover svg {
  transform: scale(1.05);
}

/* ---------- Reddit banner (mobile default) ---------- */
.bottom-banner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  /* Older iOS fallback */
  padding-bottom: calc(16px + constant(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.9) 90%);
  z-index: 10;
  transition: padding 0.3s ease;
  box-sizing: border-box;
}

/* Social Media Section */
.social-section {
  position: relative;
  text-align: center;
  padding: 14px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.social-content {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  max-width: 100%;
  padding: 0 15px;
}

.social-text {
  color: white;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  width: 100%;
  text-align: center;
  letter-spacing: 0.5px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.social-icons a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.social-icons svg {
  width: 20px;
  height: 20px;
}

/* Legal links in footer */
.legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}

.legal-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-links a:hover {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
}

.legal-links .separator {
  color: rgba(255, 255, 255, 0.6);
}

/* Banner styles */
.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 19px;
  color: #fff;
  line-height: 1.3;
}

/* Desktop styles */
@media (min-width: 768px) {
  /* Full-width hero for desktop */
  .hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100%;
    overflow: hidden;
  }

  /* Position banner for desktop */
  .bottom-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 20px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.9) 90%);
  }
  
  body {
    background: #000000;
  }
  
  .card {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
  }

  /* Desktop top overlay shrink */
  .top-overlay {
    padding: 28px 0 14px;
  }
  .top-overlay .logo {
    height: 34px;
    padding-left: 4px;
  }
  .hero,
  .hero-video {
    height: 100%;
  }

  /* Social Media Section - Desktop */
  .social-section {
    padding: 16px 0;
    background: rgba(0, 0, 0, 0.8);
  }

  .social-content {
    padding: 0 20px;
  }

  .social-text {
    font-size: 14px;
    margin-bottom: 10px;
    letter-spacing: 0px;
  }

  .social-icons {
    max-width: 100%;
    gap: 20px;
  }

  .social-icons a {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
  }

  .social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  .social-icons svg {
    width: 16px;
    height: 16px;
  }

  /* Desktop banner shrink */
  .bottom-banner {
    position: absolute;
    padding: 8px 16px;
  }

  .banner-content {
    gap: 8px;
  }

  .bottom-banner-logo {
    width: 32px;
    height: 32px;
  }
}

/* ========== Legal Pages (Privacy & Terms) ========== */
.legal-page {
  background: #ffffff;
  /* Inherits font and color from body */
  min-height: 100vh;
  height: auto !important; /* Override global fixed height */
  padding-top: 160px; /* Desktop Header Height + Buffer */
  overflow-y: auto; /* Ensure scrolling works */
}

.legal-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, #FFF 0%, rgba(255, 255, 255, 0.70) 100%);
  backdrop-filter: blur(10px); /* Adds a nice blur effect for the transparent part */
  -webkit-backdrop-filter: blur(10px); /* Safari support */
  z-index: 1000;
  padding: 30px 0;
}

.legal-header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 66px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.legal-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 66px 60px 66px;
  position: relative;
}

.legal-logo {
  width: 75px;
  height: 75px;
  display: block;
  margin-right: 16px;
  object-fit: contain;
}

.legal-title {
  font-family: 'Satoshi', sans-serif;
  font-weight: 800;
  font-size: 34px;
  line-height: 41px; /* 120.588% */
  letter-spacing: 0.4px;
  color: #333333;
  font-style: normal;
  font-feature-settings: 'liga' off, 'clig' off;
  margin: 0;
}

.legal-date {
  font-weight: 400;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.34px;
  color: rgba(0, 0, 0, 0.6);
  margin: 0 0 30px 0;
}

.legal-text {
  max-width: 1148px;
  /* Inherits font properties from body */
}

.legal-text h2 {
  font-family: 'Satoshi', sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 30px;
  letter-spacing: 0.2px;
  color: #333333;
  font-feature-settings: 'liga' off, 'clig' off;
  margin: 40px 0 20px 0;
}

.legal-text h3 {
  font-family: 'Satoshi', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: #333333;
  font-feature-settings: 'liga' off, 'clig' off;
  margin: 30px 0 16px 0;
}

.legal-text p {
  margin: 0 0 20px 0;
}

.legal-text a {
  color: #007AFF;
  text-decoration: underline;
}

.legal-text a:hover {
  color: #0051D5;
}

.legal-text ul {
  margin: 0 0 20px 0;
  padding-left: 24px;
  list-style-type: disc;
}

.legal-text li {
  margin: 0 0 12px 0;
  line-height: 20px;
}

.legal-text li:last-child {
  margin-bottom: 0;
}

.legal-text strong {
  font-weight: 700;
}

/* Mobile styles for legal pages */
@media (max-width: 767px) {
  .legal-page {
    padding-top: 120px; /* Mobile Header Height + Buffer */
  }

  .legal-header {
    padding: 20px 0;
  }

  .legal-header-content {
    padding: 0 16px;
  }

  .legal-container {
    padding: 0 16px 40px 16px;
  }

  .legal-logo {
    width: 50px;
    height: 50px;
    margin-right: 12px;
  }

  .legal-title {
    font-size: 24px;
    line-height: 30px;
  }

  .legal-date {
    margin: 0 0 24px 0;
  }
}

/* ========== Site-wide Footer Styles ========== */
.footer-row-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100vw;
    margin-top: 60px;
    margin-bottom: 30px;
    box-sizing: border-box;
    gap: 20px;
    position: relative;
    z-index: 1;
    /* iOS safe area support */
    padding: 0 20px 20px;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
}

.kids-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.kids-image {
    width: 90vw;
    max-width: 800px;
    height: auto;
    display: block;
    margin-left: 0;
}

.site-footer,
.letter-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    padding-bottom: 30px;
    padding-bottom: 30px;
    flex-shrink: 0;
}

.site-footer .app-store-link,
.letter-footer .app-store-link {
    display: inline-block;
    margin-top: 0px;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.site-footer .app-store-link:hover,
.letter-footer .app-store-link:hover {
    transform: scale(1.05);
}

.site-footer .store-badges,
.letter-footer .store-badges {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer .app-store-badge,
.letter-footer .app-store-badge {
    width: 140px;
    height: auto;
    display: block;
}

.site-footer .social-icons,
.letter-footer .social-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
    justify-content: center;
}

.site-footer .social-icon,
.letter-footer .social-icon {
    width: 17px;
    height: 17px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.site-footer .social-icon:hover,
.letter-footer .social-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.site-footer .icon-white,
.letter-footer .icon-white {
    filter: invert(1);
}

.site-footer .footer-links,
.letter-footer .footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.site-footer .footer-link,
.letter-footer .footer-link {
    font-size: 13px;
    color: rgba(51, 51, 51, 0.5);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    display: inline-block;
}

.site-footer .footer-link:hover,
.letter-footer .footer-link:hover {
    color: #333333;
    transform: scale(1.05);
}

.site-footer .copyright,
.letter-footer .copyright {
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: rgba(30, 30, 30, 0.6);
    text-align: center;
    margin-bottom: 4px;
}

/* Footer Responsive Styles */
@media (max-width: 1200px) {
    .footer-row-container {
        flex-direction: column !important;
        align-items: center;
        margin-top: 60px !important;
        margin-bottom: 30px !important;
        gap: 20px !important;
        padding: 0 max(20px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-right, 0px)) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .kids-image-container {
        justify-content: center !important;
        width: 100%;
    }
    
    .kids-image {
        width: 90vw !important;
        max-width: 600px !important;
        margin-left: 0 !important;
    }
    
    .site-footer,
    .letter-footer {
        align-items: center !important;
        width: 100%;
        padding: 20px !important;
    }
    
    .site-footer .social-icons,
    .letter-footer .social-icons {
        justify-content: center !important;
        gap: 12px !important;
    }
    
    .site-footer .social-icon,
    .letter-footer .social-icon {
        width: 21px !important;
        height: 21px !important;
    }
    
    .site-footer .copyright,
    .letter-footer .copyright {
        text-align: center !important;
        font-size: 13px !important;
    }
    
    .site-footer .footer-links,
    .letter-footer .footer-links {
        justify-content: center !important;
        gap: 20px !important;
    }
    
    .site-footer .footer-link,
    .letter-footer .footer-link {
        font-size: 14px !important;
    }
    
    .site-footer .app-store-badge,
    .letter-footer .app-store-badge {
        width: 140px !important;
    }
}

@media (max-width: 768px) {
    .footer-row-container {
        margin-top: 20px !important;
        margin-bottom: 30px !important;
        gap: 15px !important;
        padding: 0 env(safe-area-inset-left, 10px) calc(30px + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-right, 10px) !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .kids-image {
        width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) !important;
        max-width: none !important;
        margin-left: 0 !important;
    }

    .site-footer,
    .letter-footer {
        align-items: center !important;
        padding: 16px !important;
    }
    
    .site-footer .social-icon,
    .letter-footer .social-icon {
        width: 21px !important;
        height: 21px !important;
    }
    
    .site-footer .copyright,
    .letter-footer .copyright {
        text-align: center !important;
        font-size: 12px !important;
    }
    
    .site-footer .footer-links,
    .letter-footer .footer-links {
        gap: 20px !important;
    }
    
    .site-footer .footer-link,
    .letter-footer .footer-link {
        font-size: 13px !important;
    }
}
