/* ============================================
   SBLT App - Main Stylesheet
   ============================================ */

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  --brand-primary: #B10F2E;
  --brand-secondary: #4DA3FF;

  --bg-light: #FAFAFA;
  --bg-alt: #F0F0F0;
  --text-main: #1d1d1f;
  --text-secondary: #555;
  --text-muted: #86868b;

  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.05);
  --card-radius: 24px;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --border-color: #e5e5e5;

  --transition-speed: 0.45s;
}

/* DARK MODE */
body.dark-mode {
  --bg-light: #000000;
  --bg-alt: #111111;
  --text-main: #f5f5f7;
  --text-secondary: #ccc;
  --text-muted: #8e8e93;
  --glass: rgba(28, 28, 30, 0.75);
  --glass-border: rgba(255,255,255,0.08);
  --card-shadow: rgba(0, 0, 0, 0.3);
  --border-color: #333;
}

/* ============================================
   BASE STYLES
============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg-light);
  color: var(--text-main);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  transition: background var(--transition-speed), color var(--transition-speed);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--brand-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Fade Theme Transition */
body.theme-fade {
  transition: background 0.6s ease, color 0.6s ease;
}

/* ============================================
   NAVIGATION
============================================ */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.01);
  transition: box-shadow 0.3s ease;
}

body.dark-mode #main-nav {
  background: rgba(0,0,0,0.01);
}

.nav-logo {
  opacity: 0;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-main);
  transform: translateY(-8px);
  transition: opacity .4s, transform .4s, color .2s;
  text-decoration: none;
}

.nav-logo:hover {
  color: #87CEFA;
}

body.dark-mode .nav-logo:hover {
  color: #FFD700;
}

.nav-logo.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-main);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-secondary);
}

.nav-cta {
  background: var(--text-main);
  color: var(--bg-light) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--brand-secondary);
  color: #fff !important;
}

#theme-toggle {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(128,128,128,0.2);
  color: var(--text-main);
  border: none;
  cursor: pointer;
  transition: transform .25s;
  margin-left: 1rem;
}

#theme-toggle:hover {
  transform: scale(1.1);
}

#mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg-light);
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  z-index: 1999;
  flex-direction: column;
  gap: 0.5rem;
}

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

.mobile-menu a {
  color: var(--text-main);
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

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

/* ============================================
   HERO (PRESERVED SCROLL EFFECTS)
============================================ */
.hero-container {
  height: 180vh;
  position: relative;
}

.sticky-wrapper {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#welcome-pill {
  position: absolute;
  top: 15%;
  background: rgba(77,163,255,0.15);
  color: var(--brand-secondary);
  border: 1px solid var(--brand-secondary);
  padding: 0.5rem 1.25rem;
  border-radius: 40px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 5;
  transition: opacity .3s;
}

.building-icon {
  color: var(--brand-secondary);
}

#main-logo {
  width: 360px;
  max-width: 80%;
  z-index: 10;
  transition: transform .35s, opacity .35s;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

#hero-text {
  position: absolute;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .45s, transform .45s;
  text-align: center;
  padding: 0 1rem;
}

#hero-text h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-main), var(--brand-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 1rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
============================================ */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.cta-button.primary {
  background: var(--text-main);
  color: var(--bg-light);
}

.cta-button.primary:hover {
  background: var(--brand-secondary);
  color: #fff;
  transform: translateY(-2px);
}

.cta-button.secondary {
  background: transparent;
  color: var(--text-main);
  border: 2px solid var(--border-color);
}

.cta-button.secondary:hover {
  border-color: var(--brand-secondary);
  color: var(--brand-secondary);
}

/* Apple-style CTA (legacy support) */
.apple-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text-main);
  color: var(--bg-light);
  padding: 18px 42px;
  border-radius: 50px;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25),
              0 6px 16px rgba(0,0,0,0.25);
  transition: transform .25s, box-shadow .25s, background .25s, color .25s;
  overflow: hidden;
  isolation: isolate;
}

.apple-cta .cta-gloss {
  position: absolute;
  top: 0;
  left: 0;
  height: 50%;
  width: 100%;
  background: rgba(255,255,255,0.18);
  border-radius: 50px 50px 0 0;
  pointer-events: none;
  z-index: -1;
}

.apple-cta i { font-size: 1.3rem; }

.apple-cta:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25),
              0 12px 28px rgba(0,0,0,0.28);
}

.apple-cta:active { transform: scale(.97); }

body.dark-mode .apple-cta {
  background: #f5f5f7;
  color: #000;
}

/* ============================================
   CONTENT SECTIONS
============================================ */
.content-section {
  padding: 5rem 1.5rem;
}

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

.container {
  max-width: 980px;
  margin: auto;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 3rem;
  font-weight: 700;
}

/* ============================================
   BENTO GRID & CARDS
============================================ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 40px 30px;
  backdrop-filter: blur(18px);
  transition: transform .35s;
}

.card:hover {
  transform: scale(1.03);
}

.card i {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   STEPS GRID (How It Works)
============================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem;
}

.step-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--brand-secondary);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.step-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.step-card p {
  color: var(--text-secondary);
}

/* ============================================
   PRIVACY GRID
============================================ */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.privacy-item {
  text-align: center;
  padding: 1.5rem;
}

.privacy-item i {
  font-size: 2.5rem;
  color: var(--brand-secondary);
  margin-bottom: 1rem;
}

.privacy-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.privacy-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   CTA CONTAINER
============================================ */
.cta-container {
  padding: 4rem;
  border-radius: 30px;
  text-align: center;
  background: linear-gradient(180deg, rgba(77,163,255,0.12), transparent);
}

.cta-container h2 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.cta-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.download-options {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--text-main);
  color: var(--bg-light);
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.store-button i {
  font-size: 2rem;
}

.store-button div {
  text-align: left;
}

.store-label {
  font-size: 0.75rem;
  display: block;
  opacity: 0.8;
}

.store-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.store-button.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.beta-note {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ============================================
   FOOTER
============================================ */
footer {
  background: var(--bg-alt);
  padding: 4rem 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.footer-brand h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.footer-brand p {
  color: var(--text-muted);
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-column a {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--brand-secondary);
}

.footer-bottom {
  max-width: 980px;
  margin: 0 auto;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-bottom i {
  color: var(--brand-primary);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--brand-secondary);
}

/* ============================================
   ANIMATIONS
============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .7s, transform .7s;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PAGE HEADER (for subpages)
============================================ */
.page-header {
  padding: calc(80px + 4rem) 1.5rem 3rem;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg-light) 100%);
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

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

/* ============================================
   LEGAL PAGES (Privacy, Terms)
============================================ */
.legal-content {
  padding-bottom: 4rem;
}

.legal-intro {
  font-size: 1.1rem;
  padding: 1.5rem;
  background: var(--bg-alt);
  border-radius: 12px;
  margin-bottom: 3rem;
}

.legal-intro p {
  margin-bottom: 0.75rem;
}

.legal-intro p:last-child {
  margin-bottom: 0;
}

.legal-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  color: var(--text-main);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section h3 {
  color: var(--text-main);
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-section p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.legal-section ul {
  margin: 0.75rem 0 1rem 1.5rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ============================================
   ABOUT PAGE
============================================ */
.story-content {
  max-width: 700px;
  margin: 0 auto;
}

.story-content p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.story-content em {
  color: var(--brand-secondary);
  font-style: italic;
}

/* Highlighted quote text */
.highlight-quote {
  background: linear-gradient(135deg, rgba(135, 206, 250, 0.2), rgba(255, 215, 0, 0.2));
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  color: var(--text-main);
}

body.dark-mode .highlight-quote {
  background: linear-gradient(135deg, rgba(135, 206, 250, 0.25), rgba(255, 215, 0, 0.25));
}

/* Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.value-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.value-icon.trust {
  background: rgba(77, 163, 255, 0.15);
  color: var(--brand-secondary);
}

.value-icon.safety {
  background: rgba(177, 15, 46, 0.15);
  color: var(--brand-primary);
}

.value-icon.community {
  background: rgba(77, 163, 255, 0.15);
  color: var(--brand-secondary);
}

.value-icon.simplicity {
  background: rgba(255, 215, 0, 0.2);
  color: #D4A800;
}

.value-card h3 {
  margin-bottom: 0.5rem;
}

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

/* Comparison Table */
.comparison-table {
  margin-top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--card-shadow);
}

.comparison-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  background: var(--glass);
}

.comparison-row.header {
  background: var(--bg-alt);
  font-weight: 600;
}

.comparison-cell {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-cell.label {
  font-weight: 500;
}

.comparison-cell.sblt {
  color: var(--brand-secondary);
}

.comparison-cell.others {
  color: var(--text-muted);
}

.comparison-cell i.fa-check {
  color: var(--brand-secondary);
}

.comparison-cell i.fa-times {
  color: var(--brand-primary);
}

/* Team Section */
.team-section {
  max-width: 500px;
  margin: 0 auto;
}

.team-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: 1rem;
}

.team-section p {
  margin-bottom: 1.5rem;
}

/* CTA Section (gradient) */
.cta-section {
  background: linear-gradient(135deg, #87CEFA 0%, #FFD700 100%);
  color: #1d1d1f;
}

.cta-section h2,
.cta-section p {
  color: #1d1d1f;
}

.cta-section .cta-button.primary {
  background: #1d1d1f;
  color: #FFD700;
}

.cta-section .cta-button.primary:hover {
  background: #000;
  transform: translateY(-2px);
}

/* ============================================
   MOBILE RESPONSIVENESS
============================================ */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  #mobile-menu-toggle {
    display: block;
  }
  
  #theme-toggle {
    margin-left: 0.5rem;
  }
  
  .content-section {
    padding: 3rem 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .cta-container {
    padding: 2.5rem 1.5rem;
  }
  
  .cta-container h2 {
    font-size: 1.75rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .comparison-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .comparison-row.header {
    display: none;
  }
  
  .comparison-cell.label {
    grid-column: 1 / -1;
    background: var(--bg-alt);
    justify-content: center;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: none;
  }
  
  .comparison-cell.sblt,
  .comparison-cell.others {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 4px;
    padding: 1rem;
  }
  
  .comparison-cell.sblt::before {
    content: "SBLT";
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
  }
  
  .comparison-cell.others::before {
    content: "Others";
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
  }
}

@media (max-width: 480px) {
  #main-logo {
    width: 280px;
  }
  
  #hero-text h1 {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .legal-section h2 {
    font-size: 1.25rem;
  }
}