/* HabitLoop — growth aurora marketing site */
:root {
  --ink-950: #040a08;
  --ink-900: #071510;
  --ink-800: #0e2a1c;
  --mint: #22c55e;
  --cyan: #2dd4bf;
  --amber: #fbbf24;
  --white: #f3faf6;
  --muted: #8aa899;
  --border: rgba(243, 250, 246, 0.08);
  --panel: rgba(14, 42, 28, 0.72);
  --gradient: linear-gradient(135deg, var(--mint), var(--cyan));
  --gradient-soft: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.2),
    rgba(45, 212, 191, 0.12),
    rgba(251, 191, 36, 0.14)
  );
  --font: "Outfit", system-ui, sans-serif;
  --font-display: "Space Grotesk", var(--font);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1100px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--white);
  background: var(--ink-950);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 12% -5%, rgba(34, 197, 94, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 8%, rgba(45, 212, 191, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 55% 100%, rgba(251, 191, 36, 0.08), transparent 55%);
  pointer-events: none;
  z-index: -2;
}

.aurora-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(243, 250, 246, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 250, 246, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  pointer-events: none;
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--mint);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--white);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(4, 10, 8, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.brand:hover {
  color: var(--white);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.35);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--white);
}

.menu-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--white);
  padding: 0.35rem;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--ink-950);
  background: var(--gradient);
  box-shadow: 0 10px 36px rgba(34, 197, 94, 0.28);
}

.btn-primary:hover {
  color: var(--ink-950);
  box-shadow: 0 14px 44px rgba(45, 212, 191, 0.28);
}

.btn-ghost {
  color: var(--white);
  background: rgba(243, 250, 246, 0.04);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--white);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.nav-cta {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  color: var(--ink-950) !important;
  background: var(--gradient);
  font-weight: 600;
  font-size: 0.875rem;
}

.nav-cta:hover {
  opacity: 0.92;
  color: var(--ink-950) !important;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.1);
  color: var(--mint);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  background: rgba(14, 42, 28, 0.85);
  border: 1px solid var(--border);
  color: var(--white);
  min-width: 168px;
}

.store-badge:hover {
  color: var(--white);
  border-color: rgba(34, 197, 94, 0.4);
}

.store-badge small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
}

.store-badge strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.streak-strip {
  display: flex;
  gap: 0.55rem;
  margin-top: 2rem;
}

.streak-chip {
  flex: 1;
  max-width: 120px;
  height: 6px;
  border-radius: 999px;
  opacity: 0.9;
}

.streak-chip--mint { background: var(--mint); box-shadow: 0 0 16px rgba(34, 197, 94, 0.45); }
.streak-chip--cyan { background: var(--cyan); box-shadow: 0 0 16px rgba(45, 212, 191, 0.4); }
.streak-chip--amber { background: var(--amber); box-shadow: 0 0 16px rgba(251, 191, 36, 0.4); }

/* Hero mockup fan */
.hero-mockup {
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.mock-card {
  position: absolute;
  width: min(280px, 72vw);
  padding: 1.15rem;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(14, 42, 28, 0.95), rgba(7, 21, 16, 0.98)),
    radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.18), transparent 55%);
  border: 1px solid rgba(243, 250, 246, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.mock-card--left {
  transform: translate(-120px, 36px) rotate(-8deg) scale(0.88);
  z-index: 1;
  opacity: 0.88;
}

.mock-card--center {
  z-index: 3;
  animation: float-card 6.5s ease-in-out infinite;
  box-shadow:
    0 32px 70px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(34, 197, 94, 0.16),
    0 0 50px rgba(45, 212, 191, 0.08);
}

.mock-card--right {
  transform: translate(120px, 36px) rotate(8deg) scale(0.88);
  z-index: 2;
  opacity: 0.88;
}

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

.mock-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.mock-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.mock-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.mock-pill {
  font-size: 0.7rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.12);
  color: var(--mint);
  white-space: nowrap;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.mock-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34, 197, 94, 0.12);
  font-size: 1rem;
  flex-shrink: 0;
}

.mock-row-body {
  flex: 1;
  min-width: 0;
}

.mock-row-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.mock-row-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.mock-streak {
  font-size: 0.68rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  white-space: nowrap;
}

.mock-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(4, 10, 8, 0.9);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.mock-progress > span {
  display: block;
  height: 100%;
  width: 76%;
  border-radius: inherit;
  background: var(--gradient);
}

.mock-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}

.mock-xp {
  color: var(--amber);
  font-weight: 600;
}

/* —— Sections —— */
section {
  padding: 5.5rem 0;
}

.section-label {
  margin: 0 0 0.65rem;
  color: var(--mint);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-desc {
  margin: 0 0 2.5rem;
  color: var(--muted);
  max-width: 36rem;
  font-size: 1.05rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(14, 42, 28, 0.85), rgba(7, 21, 16, 0.6));
  border: 1px solid var(--border);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: 0.04em;
}

.step:nth-child(2)::before { color: var(--cyan); }
.step:nth-child(3)::before { color: var(--amber); }
.step:nth-child(4)::before { color: var(--mint); }

.step h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.feature {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.feature:hover {
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--mint);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.feature:nth-child(2) .feature-icon,
.feature:nth-child(5) .feature-icon {
  background: rgba(45, 212, 191, 0.12);
  color: var(--cyan);
}

.feature:nth-child(3) .feature-icon,
.feature:nth-child(6) .feature-icon {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.privacy-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}

.privacy-card,
.contact-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.privacy-card p,
.contact-card p {
  color: var(--muted);
  margin: 0 0 1rem;
}

.privacy-card ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.privacy-card li {
  margin-bottom: 0.4rem;
}

.cta-band {
  text-align: center;
  padding: 3.5rem 2rem;
  border-radius: 28px;
  background:
    var(--gradient-soft),
    linear-gradient(135deg, rgba(14, 42, 28, 0.95), rgba(7, 21, 16, 0.98));
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.cta-band p {
  margin: 0 auto 1.75rem;
  color: var(--muted);
  max-width: 32rem;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* —— Legal page —— */
.legal-page {
  padding: calc(var(--header-h) + 2.5rem) 0 4rem;
}

.legal-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
}

.legal-card h1 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.legal-card .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.legal-card h2 {
  margin: 1.75rem 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--mint);
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-card ul {
  padding-left: 1.2rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* —— Download page —— */
.download-hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  text-align: center;
}

.download-hero .container {
  max-width: 520px;
}

.download-hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.download-hero .lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.redirect-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.1);
  color: var(--mint);
  font-size: 0.9rem;
  font-weight: 600;
}

.redirect-banner[hidden] {
  display: none;
}

.redirect-banner::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* —— Reveal —— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.steps .step:nth-child(1) { transition-delay: 0.05s; }
.steps .step:nth-child(2) { transition-delay: 0.1s; }
.steps .step:nth-child(3) { transition-delay: 0.15s; }
.steps .step:nth-child(4) { transition-delay: 0.2s; }

.features-grid .feature:nth-child(1) { transition-delay: 0.05s; }
.features-grid .feature:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature:nth-child(3) { transition-delay: 0.15s; }
.features-grid .feature:nth-child(4) { transition-delay: 0.2s; }
.features-grid .feature:nth-child(5) { transition-delay: 0.25s; }
.features-grid .feature:nth-child(6) { transition-delay: 0.3s; }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions,
  .store-badges,
  .streak-strip {
    justify-content: center;
  }

  .streak-strip {
    max-width: 280px;
    margin-inline: auto;
  }

  .hero-mockup {
    order: -1;
    height: 420px;
    margin-bottom: 0.5rem;
  }

  .mock-card--left {
    transform: translate(-70px, 40px) rotate(-6deg) scale(0.78);
  }

  .mock-card--right {
    transform: translate(70px, 40px) rotate(6deg) scale(0.78);
  }

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

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

  .privacy-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.25rem 1.5rem;
    background: rgba(4, 10, 8, 0.96);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
    z-index: 99;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 0.95rem 0.25rem;
  }

  .nav-links .nav-cta {
    display: inline-flex;
    margin-top: 0.75rem;
    text-align: center;
    justify-content: center;
  }

  body.nav-open {
    overflow: hidden;
  }

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

  .mock-card--left,
  .mock-card--right {
    display: none;
  }

  .hero-mockup {
    height: auto;
    min-height: 280px;
  }

  .mock-card--center {
    position: relative;
    width: min(300px, 88vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-kicker .dot,
  .redirect-banner::before,
  .mock-card--center {
    animation: none;
  }

  .btn:hover,
  .feature:hover {
    transform: none;
  }
}
