/* ============================================================
   HabitFlo Landing Page
   ============================================================ */

:root {
  --bg:           #0B2216;
  --bg-2:         #0E2A1C;
  --bg-3:         #122E20;
  --surface:      rgba(255, 255, 255, 0.04);
  --surface-2:    rgba(255, 255, 255, 0.07);
  --border:       rgba(255, 255, 255, 0.08);
  --border-2:     rgba(255, 255, 255, 0.12);
  --text:         #E8F0EC;
  --text-2:       rgba(232, 240, 236, 0.65);
  --text-3:       rgba(232, 240, 236, 0.38);
  --brand:        #2D9B62;
  --brand-light:  #3DBF78;
  --brand-glow:   rgba(45, 155, 98, 0.28);
  --teal:         #00C9B1;
  --amber:        #F59E0B;
  --green:        #22C55E;
  --red:          #EF4444;

  /* Glass */
  --glass:        rgba(14, 42, 28, 0.72);
  --glass-blur:   blur(20px) saturate(160%) brightness(1.02);
  --glass-border: rgba(255, 255, 255, 0.10);

  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --radius-pill:  100px;

  --shadow-sm:    0 2px 8px rgba(0,0,0,.20);
  --shadow-md:    0 8px 32px rgba(0,0,0,.32);
  --shadow-lg:    0 24px 64px rgba(0,0,0,.44);
  --shadow-brand: 0 8px 32px rgba(45,155,98,.30);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w:        1120px;
  --t:            200ms ease;
  --t-spring:     380ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-light); text-decoration: none; transition: var(--t); }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--t);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(45,155,98,.42);
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(255,255,255,.2);
}
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* ============================================================
   Nav
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: -.01em;
}
.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}
.nav-logo:hover { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  transition: var(--t);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-cta { display: flex; gap: 10px; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  background: var(--bg);
}

.hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(45,155,98,.35) 0%, rgba(45,155,98,.08) 55%, transparent 75%);
  top: -200px; right: -100px;
  animation: orb-float-1 18s ease-in-out infinite;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,201,177,.25) 0%, rgba(0,201,177,.05) 55%, transparent 75%);
  bottom: -100px; left: 5%;
  animation: orb-float-2 22s ease-in-out infinite;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,.18) 0%, rgba(245,158,11,.04) 55%, transparent 75%);
  top: 20%; left: 35%;
  animation: orb-float-3 16s ease-in-out infinite;
}

@keyframes orb-float-1 {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(-60px, 40px) scale(1.1); }
  66%      { transform: translate(40px, -30px) scale(0.92); }
}
@keyframes orb-float-2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(70px, -55px) scale(1.15); }
}
@keyframes orb-float-3 {
  0%,100% { transform: translate(0,0) scale(1); }
  40%      { transform: translate(-40px, 40px) scale(1.2); }
  70%      { transform: translate(25px, -20px) scale(0.88); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(200, 240, 220, 0.80);
  background: rgba(45,155,98,.14);
  border: 1px solid rgba(45,155,98,.28);
  backdrop-filter: blur(10px);
  padding: 6px 14px 6px 8px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.eyebrow-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.5vw, 68px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(135deg, #4DD98A 0%, #00C9B1 50%, #3DBF78 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.badge-link img {
  height: 44px;
  width: auto;
  transition: var(--t);
}
.badge-link:hover img { opacity: 0.85; transform: translateY(-1px); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-icon { font-size: 20px; }
.stat-number {
  display: block;
  font-size: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.02em;
}
.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  position: relative;
  width: 280px;
  filter: drop-shadow(0 32px 80px rgba(0,0,0,.55));
  border-radius: 44px;
  overflow: hidden;
  border: 1.5px solid rgba(255,255,255,.10);
}
.phone-frame img {
  width: 100%;
  display: block;
  border-radius: 42px;
}

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(14, 42, 28, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: badge-float 6s ease-in-out infinite;
}
.badge-streak { bottom: 18%; right: -10%; animation-delay: 0s; }
.badge-done   { top: 22%; left: -12%; animation-delay: -3s; }

@keyframes badge-float {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}

.fb-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.fb-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.fb-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

/* ============================================================
   Marquee Strip
   ============================================================ */
.marquee-strip {
  background: rgba(45,155,98,.08);
  border-top: 1px solid rgba(45,155,98,.15);
  border-bottom: 1px solid rgba(45,155,98,.15);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  animation: marquee-scroll 28s linear infinite;
  padding-right: 28px;
}
.marquee-track span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.marquee-track .divider {
  color: rgba(45,155,98,.5);
  font-size: 10px;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 60px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 14px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
}

/* ============================================================
   Features Grid
   ============================================================ */
.features-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.feature-card {
  padding: 32px 28px;
  background: var(--surface);
  transition: background var(--t);
  position: relative;
}
.feature-card:hover { background: var(--surface-2); }

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
  line-height: 1;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ============================================================
   Showcase Section
   ============================================================ */
.showcase-section {
  padding: 96px 0;
}

.showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.showcase-copy .eyebrow { display: block; margin-bottom: 14px; }
.showcase-copy h2 { text-align: left; }

.showcase-copy p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 28px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-list li {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  padding-left: 4px;
}
.feature-list li::first-letter {
  color: var(--green);
}

.showcase-visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.showcase-phone {
  width: 280px;
  border-radius: 44px;
  border: 1.5px solid rgba(255,255,255,.08);
  box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.2);
}

/* ============================================================
   Watch Section
   ============================================================ */
.watch-section {
  padding: 96px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.watch-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.watch-copy .eyebrow { display: block; margin-bottom: 14px; }
.watch-copy h2 { text-align: left; }

.watch-copy p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 28px;
}

.watch-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  position: relative;
}

.watch-img {
  border-radius: 48px;
  border: 1.5px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
  transition: var(--t);
}
.watch-img-1 {
  width: 180px;
  transform: rotate(-4deg) translateY(10px);
}
.watch-img-2 {
  width: 180px;
  transform: rotate(4deg) translateY(-10px);
}
.watch-visual:hover .watch-img-1 { transform: rotate(-2deg) translateY(4px) scale(1.02); }
.watch-visual:hover .watch-img-2 { transform: rotate(2deg) translateY(-4px) scale(1.02); }

/* ============================================================
   CTA Section
   ============================================================ */
.cta-section {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
  text-align: center;
}

.cta-orb {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,155,98,.28) 0%, transparent 65%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  filter: blur(80px);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,.40), 0 0 0 1px rgba(255,255,255,.08);
}

.cta-inner h2 {
  font-size: clamp(36px, 4.5vw, 52px);
  max-width: 520px;
  text-align: center;
}

.cta-inner p {
  font-size: 17px;
  color: var(--text-2);
  margin-bottom: 8px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-3);
  flex: 1;
}
.footer-logo img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  opacity: .7;
}

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 13px;
  color: var(--text-3);
}
.footer-links a:hover { color: var(--text-2); }

.footer-copy {
  font-size: 12px;
  color: var(--text-3);
  width: 100%;
  margin-top: 4px;
}

/* ============================================================
   Scroll Reveal
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-delay="100"] { transition-delay: 0.10s; }
[data-reveal][data-delay="200"] { transition-delay: 0.20s; }
[data-reveal][data-delay="300"] { transition-delay: 0.30s; }
[data-reveal][data-delay="400"] { transition-delay: 0.40s; }
[data-reveal][data-delay="500"] { transition-delay: 0.50s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner,
  .showcase-inner,
  .watch-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual { order: -1; }
  .showcase-visual { order: -1; }

  .phone-frame { width: 240px; }
  .showcase-phone { width: 240px; }

  .floating-badge { display: none; }

  .hero-sub { max-width: 100%; }

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

  .watch-visual { gap: 16px; }
  .watch-img-1, .watch-img-2 { width: 150px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .showcase-section,
  .watch-section,
  .cta-section { padding: 64px 0; }
  .hero h1 { font-size: 38px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .stat-number { font-size: 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cta-inner h2 { font-size: 32px; }
}
