/* Night-sky palette, taken from the app's src/theme.ts and
   src/display/OrbSky.tsx (habitapp repo). The app is dark only, so the
   site is too. The page itself is the sky: deep night at the top, down to
   the dusk glow and mountain ridges at the footer. */
:root {
  --border: rgba(169, 188, 224, 0.16);
  --border-strong: rgba(169, 188, 224, 0.32);
  --text: #eaf0ff;
  --text-secondary: #a9bce0;
  --text-muted: #6f82a8;
  --accent: #96beff;
  --horizon: 255, 168, 138;
  --ridge-near: rgb(21, 19, 38);
  --max-w: 960px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ridge-near);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* OrbSky SKY_STOPS, top to horizon */
body {
  position: relative;
  background: linear-gradient(to bottom,
    rgb(8, 12, 30) 0%,
    rgb(14, 22, 52) 18%,
    rgb(26, 34, 74) 40%,
    rgb(44, 46, 88) 62%,
    rgb(72, 58, 92) 82%,
    rgb(104, 74, 88) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Stars, thinning out towards the horizon as in the app */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 30% 0;
  background: url(/images/stars.svg) repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 100%);
  pointer-events: none;
}
/* The warm glow where the horizon still holds the last of the day */
body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 700px;
  background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(var(--horizon), 0.3), rgba(var(--horizon), 0.08) 55%, transparent 80%);
  pointer-events: none;
}
.nav, main, footer { position: relative; z-index: 1; }

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Nav */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 12, 30, 0.5);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; opacity: 0.85; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.nav-links a { color: var(--text-secondary); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 3rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
}
h1 .eyebrow { display: block; font-weight: 400; line-height: 1.5; }
.lede {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}
.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}
/* Official badge PNG carries the clear space Google's guidelines require */
.badge { display: block; }
.badge img { display: block; height: 72px; width: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-weight: 600;
  font-size: 0.98rem;
}
.btn-soon {
  background: rgba(18, 24, 54, 0.6);
  color: var(--text-secondary);
  cursor: default;
}
.btn-soon small {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.platforms li {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.hero-art {
  justify-self: center;
  width: min(100%, 320px);
  aspect-ratio: 1;
  border-radius: 22%;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--border),
    0 30px 90px -20px rgba(172, 132, 255, 0.35);
}
/* <picture> wrappers add no box, so the <img> sizes against its frame as before */
.hero-art picture, .phone picture { display: contents; }
.hero-art img { display: block; width: 100%; height: 100%; }

/* Video */
.video { padding-top: 0; }
.video-frame {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: rgb(8, 12, 30);
  box-shadow:
    0 0 0 1px var(--border-strong),
    0 30px 90px -20px rgba(172, 132, 255, 0.35);
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Sections */
section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
section h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.section-intro {
  color: var(--text-secondary);
  max-width: 40rem;
  margin: 0 0 2rem;
}

/* Screenshot on the left, the six feature cards in a 2x3 grid on the right */
.features-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
  gap: 2rem;
}
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.card {
  background: rgba(18, 24, 54, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}
.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card p { color: var(--text-secondary); margin: 0; }
/* A soft orb like the app's: each card its own shade (OrbSky COLD_SHADES),
   with a white-hot heart and no hard edge. */
.orb {
  --tint: 150, 190, 255;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle closest-side,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(var(--tint), 0.75) 35%,
    rgba(var(--tint), 0.25) 70%,
    rgba(var(--tint), 0) 100%);
  box-shadow: 0 0 14px 2px rgba(var(--tint), 0.35);
}
.card:nth-child(1) .orb { --tint: 132, 232, 160; }
.card:nth-child(2) .orb { --tint: 120, 168, 255; }
.card:nth-child(3) .orb { --tint: 172, 132, 255; }
.card:nth-child(4) .orb { --tint: 96, 222, 214; }
.card:nth-child(5) .orb { --tint: 236, 136, 222; }

.privacy-band {
  background: rgba(18, 24, 54, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 2.5rem;
}
.privacy-band ul {
  color: var(--text-secondary);
  padding-left: 1.2rem;
  margin: 0 0 1.25rem;
}
.privacy-band li { margin-bottom: 0.4rem; }
.privacy-band h3 { font-size: 1.05rem; margin: 1.5rem 0 0.4rem; }
.privacy-band p:not(.section-intro) { color: var(--text-secondary); margin: 0 0 1rem; }
.lede-privacy { display: block; margin-top: 0.75rem; color: var(--text); }

/* Phone frame for screenshots */
.phone {
  margin: 0;
  width: 100%;
  padding: 10px;
  border-radius: 40px;
  background: var(--ridge-near);
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 90px -20px rgba(172, 132, 255, 0.35);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
}

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

/* Legal */
.legal {
  padding-top: 3rem;
  padding-bottom: 4rem;
  max-width: 760px;
}
.legal-back { display: inline-block; margin-bottom: 2rem; font-size: 0.95rem; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.legal h2 { font-size: 1.25rem; font-weight: 600; margin: 2.25rem 0 0.6rem; }
.legal p, .legal li { color: var(--text-secondary); }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul, .legal ol { padding-left: 1.2rem; }
.legal table { border-collapse: collapse; margin: 0 0 1.25rem; color: var(--text-secondary); }
.legal th, .legal td { text-align: left; padding: 0.4rem 1.25rem 0.4rem 0; border-bottom: 1px solid var(--border); }
.legal th { color: var(--text); font-weight: 600; }

/* FAQ */
.faq { max-width: 760px; }
.faq h3 { font-size: 1.05rem; font-weight: 600; margin: 1.75rem 0 0.4rem; }
.faq p { color: var(--text-secondary); margin: 0; }
.legal li { margin-bottom: 0.5rem; }

/* Footer */
/* Footer sits on the near ridge, like the app's bottom bar */
footer {
  margin-top: 110px;
  background: var(--ridge-near);
  color: var(--text-muted);
  font-size: 0.88rem;
}
footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 110px;
  background: url(/images/ridges.svg) bottom center / 2400px 110px no-repeat;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}
footer nav { display: flex; gap: 1.25rem; }
footer a { color: var(--text-secondary); }

@media (max-width: 900px) {
  .features-layout { grid-template-columns: 200px 1fr; }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .hero-art { width: min(70%, 240px); order: -1; }
  .features-layout { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .phone { width: min(80%, 280px); justify-self: center; }
  .privacy-band { padding: 1.5rem; }
  .nav-links { display: none; }
}
