/* HabitView Website - Funn Media Family */
:root {
  --primary: #2A94DB;
  --primary-hover: #1A7FD0;
  --primary-light: #4DC4E6;
  --accent: #34C759;
  --accent-hover: #2DB84E;
  --dark: #1a1a2e;
  --text: #333;
  --text-light: #666;
  --bg: #f4f9fd;
  --white: #fff;
  --card-shadow: 0 8px 30px rgba(0,0,0,0.06);
  --card-radius: 20px;
  --gradient-hero: linear-gradient(135deg, #e8f4fd 0%, #fff 50%, #edf9f0 100%);
  --gradient-blue: linear-gradient(135deg, #2A94DB, #4DC4E6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Montserrat', sans-serif; color: var(--dark); }

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

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--dark);
}
.header-logo img { border-radius: 10px; }
.menu-toggle-checkbox { display: none; }
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; z-index: 101; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.menu-toggle-checkbox:checked ~ .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle-checkbox:checked ~ .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-toggle-checkbox:checked ~ .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-nav { display: flex; gap: 28px; }
.header-nav a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--primary); }

/* HERO */
.hero {
  padding: 140px 24px 80px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(42,148,219,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
}
.hero-text { flex: 1; }
.hero-text h1 {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.15;
  margin-bottom: 20px;
  font-weight: 800;
}
.hero-text h1 span {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 480px;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 36px;
}
.stat { text-align: center; }
.stat-value {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--primary);
}
.stat-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.hero-screenshots { flex: 0 0 300px; display: flex; justify-content: center; }
.hero-screenshots img { width: 100%; height: auto; border-radius: 24px; }
.hero-phone { width: 100%; }

/* BUTTONS */
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(42,148,219,0.3); }
.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border: 2px solid rgba(0,0,0,0.1);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(52,199,89,0.3); }

/* HABIT CATEGORIES */
.habits {
  padding: 100px 24px;
  background: var(--bg);
}
.habits h2, .features h2, .how-it-works h2, .science h2, .social-proof h2, .final-cta h2, .streaks h2 {
  text-align: center;
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  font-size: 17px;
  color: var(--text-light);
  margin: 0 auto 48px auto;
  max-width: 550px;
}
.habits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.habit-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform 0.2s;
}
.habit-card:hover { transform: translateY(-4px); }
.habit-icon { font-size: 36px; margin-bottom: 12px; }
.habit-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 700;
}
.habit-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}
.habit-tag {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* STREAKS SECTION */
.streaks {
  padding: 100px 24px;
  background: var(--white);
}
.streak-visual {
  max-width: 700px;
  margin: 0 auto;
}
.streak-calendar {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.streak-day-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
}
.streak-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}
.streak-dot.completed {
  background: var(--accent);
  color: white;
}
.streak-dot.missed {
  background: #f0f0f0;
  color: #ccc;
}
.streak-dot.today {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 3px rgba(42,148,219,0.3);
}
.streak-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
}
.streak-stat {
  text-align: center;
  padding: 20px 28px;
  background: var(--bg);
  border-radius: 16px;
}
.streak-stat-value {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 32px;
  color: var(--primary);
}
.streak-stat-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}

/* FEATURES */
.features {
  padding: 100px 24px;
}
.feature-row {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 80px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.feature-row.reverse { flex-direction: row-reverse; }
.feature-text { flex: 1; }
.feature-text h3 {
  font-size: 26px;
  margin-bottom: 14px;
  font-weight: 700;
}
.feature-text p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 12px;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}
.feature-list li {
  font-size: 15px;
  color: var(--text);
  padding: 6px 0 6px 28px;
  position: relative;
  line-height: 1.5;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.feature-image { flex: 0 0 240px; }
.feature-image img { width: 100%; border-radius: 24px; }
.feature-image .placeholder-screen {
  width: 100%;
  aspect-ratio: 9/19.5;
  background: linear-gradient(135deg, #e8f4fd, #edf9f0);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  border: 2px solid rgba(42,148,219,0.1);
}

/* HOW IT WORKS */
.how-it-works {
  padding: 100px 24px;
  background: var(--bg);
}
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.step {
  text-align: center;
  flex: 1;
}
.step-number {
  width: 56px;
  height: 56px;
  background: var(--gradient-blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin: 0 auto 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-light); line-height: 1.5; }
.step-arrow {
  font-size: 28px;
  color: var(--primary);
  padding-top: 16px;
  font-weight: 300;
}

/* SCIENCE */
.science {
  padding: 100px 24px;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}
.benefit {
  background: var(--bg);
  border-radius: var(--card-radius);
  padding: 28px;
  transition: transform 0.2s;
}
.benefit:hover { transform: translateY(-2px); }
.benefit-icon { font-size: 32px; margin-bottom: 12px; }
.benefit h3 { font-size: 18px; margin-bottom: 8px; }
.benefit p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* SCREENSHOT GALLERY */
.gallery { padding: 80px 0 40px; background: var(--bg); overflow: visible; }
.gallery h2 { text-align: center; font-family: 'Montserrat', sans-serif; font-size: clamp(28px, 4vw, 38px); margin-bottom: 10px; }
.gallery .section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; }
.gallery-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 20px 0 40px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-scroll::-webkit-scrollbar { display: none; }
.gallery-spacer {
  flex: 0 0 20px;
  min-width: 20px;
}
.gallery-scroll img {
  flex: 0 0 auto;
  height: 500px;
  width: auto;
  border-radius: 16px;
}

/* INLINE CTA BOXES */
.inline-cta { padding: 20px 0; }
.cta-card { background: var(--bg); border: 2px solid rgba(42,148,219,0.15); border-radius: 20px; padding: 40px; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta-card-icon { font-size: 48px; flex: 0 0 auto; }
.cta-card-text { flex: 1; min-width: 200px; }
.cta-card-text h3 { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.cta-card-text p { color: var(--text-light); font-size: 15px; margin: 0; }
.cta-card .btn { flex: 0 0 auto; white-space: nowrap; }
.cta-card.gradient { background: linear-gradient(135deg, #2A94DB, #34C759); border: none; }
.cta-card.gradient h3 { color: #fff; }
.cta-card.gradient p { color: rgba(255,255,255,0.9); }
.btn-white { display: inline-block; background: #fff; color: var(--primary); padding: 14px 28px; border-radius: 30px; text-decoration: none; font-weight: 700; font-size: 15px; }
.btn-white:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.15); transform: translateY(-1px); }

@media (max-width: 768px) {
  .cta-card { flex-direction: column; text-align: center; padding: 30px 24px; }
  .cta-card .btn, .cta-card .btn-white { width: 100%; text-align: center; }
}

/* WHY HABITVIEW */
.why-us {
  padding: 100px 24px;
}
.why-us h2 { text-align: center; font-size: clamp(28px, 4vw, 38px); margin-bottom: 12px; }
.why-us .section-subtitle { text-align: center; }
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}
.compare-card {
  border-radius: var(--card-radius);
  padding: 32px 28px;
}
.compare-card h3 {
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
}
.compare-card ul {
  list-style: none;
  padding: 0;
}
.compare-card li {
  font-size: 14px;
  padding: 10px 0 10px 32px;
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  line-height: 1.4;
}
.compare-card li:last-child { border-bottom: none; }
.compare-card li::before {
  position: absolute;
  left: 0;
  font-size: 16px;
}
.compare-card.ours {
  background: #edf9f0;
  border: 2px solid var(--accent);
}
.compare-card.ours h3 { color: #2E7D32; }
.compare-card.ours li.yes::before { content: "✓"; color: var(--accent); font-weight: 700; }
.compare-card.ours li { color: var(--text); }
.compare-card.others {
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.08);
}
.compare-card.others h3 { color: var(--text-light); }
.compare-card.others li.no::before { content: "✗"; color: #e53935; font-weight: 700; }
.compare-card.others li { color: var(--text-light); }

/* INTEGRATIONS */
.integrations {
  padding: 60px 24px;
  background: var(--bg);
}
.integrations h2 { text-align: center; font-size: 24px; margin-bottom: 32px; }
.integration-badges {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 700px;
  margin: 0 auto;
}
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  min-width: 90px;
}
.badge-icon { font-size: 28px; }
.badge-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* SOCIAL PROOF */
.social-proof {
  padding: 100px 24px;
  background: var(--bg);
}
.results-highlight {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.result-stat { text-align: center; }
.result-number {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 36px;
  color: var(--primary);
}
.result-desc {
  font-size: 13px;
  color: var(--text-light);
  max-width: 180px;
  display: block;
  margin-top: 4px;
}
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 48px;
}
.review {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 28px;
  box-shadow: var(--card-shadow);
}
.review-stars {
  color: #FFB800;
  font-size: 18px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.review p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
  font-style: italic;
}
.review-author {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}
.ecosystem {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.ecosystem-label {
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  margin-bottom: 16px;
}
.ecosystem-apps { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.eco-app {
  text-decoration: none;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  padding: 8px 16px;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
  transition: all 0.2s;
}
.eco-app:hover { border-color: var(--primary); color: var(--primary); }

/* FAQ */
.faq {
  padding: 100px 24px;
}
.faq h2 { text-align: center; font-size: clamp(28px, 4vw, 38px); margin-bottom: 48px; }
.faq-list {
  max-width: 700px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 0;
}
.faq-item summary {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--dark);
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--primary);
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  padding-bottom: 20px;
}

/* FINAL CTA */
.final-cta {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(135deg, #e8f4fd 0%, #edf9f0 100%);
}
.cta-icon {
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.final-cta p {
  font-size: 17px;
  color: var(--text-light);
  margin: 12px auto 32px;
  max-width: 440px;
}
.final-cta .hero-buttons { justify-content: center; }

/* FOOTER */
footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.footer-nav {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-nav a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--primary); }
footer p { font-size: 13px; color: var(--text-light); margin-bottom: 4px; }
.disclaimer { font-size: 12px; color: #999; margin-top: 8px; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    gap: 0;
  }
  .header-nav a {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
  }
  .header-nav a:last-child { border-bottom: none; }
  .menu-toggle-checkbox:checked ~ .header-nav { display: flex; }
  .hero { padding: 100px 20px 60px; }
  .hero-content { flex-direction: column; gap: 40px; text-align: center; align-items: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-screenshots { flex: none !important; width: 280px; margin: 0 auto; display: flex; justify-content: center; align-self: center; }
  .hero-buttons { justify-content: center; }
  .habits-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-row, .feature-row.reverse { flex-direction: column; gap: 30px; text-align: center; }
  .feature-image { flex: none; width: 200px; margin: 0 auto; }
  .steps { flex-direction: column; gap: 24px; align-items: stretch; }
  .step { width: 100%; }
  .step-arrow { transform: none; text-align: center; width: 100%; margin: -8px 0; font-size: 24px; }
  .step-arrow::after { content: "↓"; }
  .step-arrow { font-size: 0; }
  .step-arrow::after { font-size: 24px; }
  .benefits-grid { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .ecosystem-apps { flex-direction: column; align-items: center; }
  .compare-grid { grid-template-columns: 1fr; }
  .results-highlight { flex-direction: column; align-items: center; gap: 24px; }
  .streak-calendar { gap: 10px; }
  .streak-dot { width: 36px; height: 36px; font-size: 16px; }
  .streak-stats { flex-direction: column; align-items: center; gap: 12px; }
  .gallery-scroll { gap: 12px; }
  .gallery-scroll img { height: 380px; }
}

@media (max-width: 480px) {
  .habits-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 16px; }
  .hero-buttons { flex-direction: column; }
  .btn { text-align: center; }
  .streak-calendar { gap: 6px; }
  .streak-dot { width: 32px; height: 32px; font-size: 14px; }
  .streak-day-label { font-size: 10px; }
}
