/* Grounded website. Palette and type follow the iOS app (OBDesign.swift). */

:root {
  --bg: #F7F7F7;
  --card: #FFFFFF;
  --ink: #141414;
  --grey: #727272;
  --grey-light: #A3A3A3;
  --border: #EFEFEF;
  --green: #16A75C;
  --green-dark: #0F8A4A;
  --green-soft: #E4F5EB;
  --mint: #CDEBDB;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 8px 24px rgba(20, 20, 20, .06);
  --radius: 24px;
  --max: 1120px;
  /* SF Pro Rounded on Apple devices (Safari and every iPhone browser). Apple's
     licence doesn't allow hosting the font, so other browsers use their system font. */
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* ---------- Nav (floating pill, like QUITTR) ---------- */

.nav {
  position: fixed; top: 16px; left: 0; right: 0; z-index: 50;
  padding: 0 16px;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 500; color: #3a3a3a; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 0;
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(22, 167, 92, .28); }
.btn-green:hover { background: var(--green-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

/* Apple's official "Download on the App Store" badge (keep at 40px tall or more). */
.badge { display: inline-block; border-radius: 12px; transition: transform .15s ease; }
.badge:active { transform: scale(.97); }
.badge img { height: 56px; width: auto; }

/* ---------- Hero ---------- */

.hero {
  position: relative; padding: 150px 0 0;
  background:
    linear-gradient(to bottom, rgba(247, 247, 247, 0) 55%, var(--bg) 100%),
    url("assets/lake.jpg") center 30% / cover no-repeat;
}
.hero::before { /* soften the lake behind the headline */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 30%, rgba(247, 247, 247, .85), rgba(247, 247, 247, 0) 70%);
  pointer-events: none;
}
.hero-copy { position: relative; max-width: 760px; margin: 0 auto; text-align: center; }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; color: #3a3a3a;
}
.pill img { width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); padding: 2px; }
.label {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 14px; font-weight: 600;
}

h1, h2, h3 { margin: 0; letter-spacing: -.03em; line-height: 1.08; }
h1 { font-size: clamp(42px, 7vw, 72px); font-weight: 600; margin: 22px 0 18px; }
h1 .hl { color: var(--green); }
h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; }
h3 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--grey); max-width: 600px; margin: 0 auto; }
.hero-cta { display: flex; justify-content: center; margin-top: 30px; }

/* Hero mockup (three phones) with a soft green glow behind, like QUITTR's purple one. */
.hero-phones { position: relative; max-width: 960px; margin: 52px auto 0; padding: 0 16px; }
.hero-phones::before {
  content: ""; position: absolute; left: 50%; top: 8%; width: 70%; aspect-ratio: 1;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 167, 92, .34), rgba(22, 167, 92, .1) 45%, rgba(22, 167, 92, 0) 70%);
  filter: blur(20px);
}
.hero-phones img { position: relative; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(20, 20, 20, .16)); }

/* Single phone frame used in the How it works rows. */
.phone {
  position: relative; width: 280px; aspect-ratio: 1206 / 2622;
  border-radius: 48px; padding: 9px; background: #121212;
  box-shadow: 0 30px 60px rgba(20, 20, 20, .25), inset 0 0 0 2px #2a2a2a;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 40px; }

/* ---------- Mission (words light up as you scroll) ---------- */

.mission { padding: 140px 0; }
.mission p {
  max-width: 900px; margin: 0 auto; text-align: center;
  font-size: clamp(28px, 4vw, 44px); font-weight: 700; line-height: 1.25; letter-spacing: -.025em;
}
.mission .w { color: #D3D3D3; transition: color .25s ease; }
.mission .w.on { color: var(--ink); }
.mission .w.green.on { color: var(--green); }

/* ---------- Facts row ---------- */

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact { background: var(--card); border-radius: var(--radius); padding: 30px 24px; text-align: center; box-shadow: var(--shadow); }
.fact b { display: block; font-size: 48px; line-height: 1; letter-spacing: -.04em; color: var(--green); }
.fact span { display: block; margin-top: 10px; color: var(--grey); font-weight: 500; }

/* ---------- Section heads ---------- */

.section { padding: 120px 0 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-head h2 { margin-top: 16px; }
.section-head .lead { margin-top: 16px; }

/* ---------- How it works rows ---------- */

.rows { display: grid; gap: 40px; }
.row {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px;
  background: var(--card); border-radius: 36px; padding: 48px 56px 0; overflow: hidden;
  box-shadow: var(--shadow);
}
.row .shot { align-self: end; display: flex; justify-content: center; position: relative; }
.row .shot::before {
  content: ""; position: absolute; bottom: -80px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 167, 92, .22), rgba(22, 167, 92, 0) 68%);
}
.row .phone { width: 260px; margin-bottom: -150px; }
.row .text { padding-bottom: 48px; }
.row .text h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; }
.row .text p { color: var(--grey); font-size: 18px; margin: 16px 0 0; }
.row .text .step { display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: 700; color: var(--green); letter-spacing: .02em; }
.row.flip .shot { order: 2; }

/* ---------- Features grid ---------- */

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,20,20,.04), 0 16px 36px rgba(20,20,20,.08); }
.card .icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: var(--bg); margin-bottom: 20px;
}
.card .icon img { width: 44px; height: 44px; object-fit: contain; }
.card .icon.emoji { font-size: 32px; }
.card h3 { font-size: 21px; }
.card p { color: var(--grey); margin: 10px 0 0; font-size: 16px; }

/* ---------- Meet Groundy ---------- */

.groundy {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px;
  background: linear-gradient(135deg, #EFFAD5, #C8F4CA); border-radius: 36px; padding: 56px;
}
.groundy h2 { color: #0B4D2A; }
.groundy p { color: #2F5D43; font-size: 18px; margin: 16px 0 0; max-width: 460px; }
.groundy-trio { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.groundy-trio img { width: 33%; filter: drop-shadow(0 14px 18px rgba(11, 77, 42, .18)); animation: bob 5s ease-in-out infinite; }
.groundy-trio img:nth-child(2) { width: 38%; animation-delay: -1.6s; }
.groundy-trio img:nth-child(3) { animation-delay: -3.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Benefits marquee ---------- */

.marquee { overflow: hidden; padding: 6px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee + .marquee { margin-top: 14px; }
.track { display: flex; gap: 14px; width: max-content; animation: slide 40s linear infinite; }
.marquee.reverse .track { animation-direction: reverse; }
.track span {
  white-space: nowrap; padding: 14px 24px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow); font-weight: 600; font-size: 17px;
}
.track span::before { content: "✓"; color: var(--green); margin-right: 10px; font-weight: 800; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Privacy band ---------- */

.privacy-band {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: var(--card); border-radius: 36px; padding: 40px 48px; box-shadow: var(--shadow);
}
.privacy-band .lock { width: 76px; height: 76px; border-radius: 22px; background: var(--green-soft); display: grid; place-items: center; font-size: 36px; }
.privacy-band h3 { font-size: 28px; }
.privacy-band p { margin: 8px 0 0; color: var(--grey); }
.privacy-band a { color: var(--green-dark); font-weight: 600; }

/* ---------- FAQ ---------- */

.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 64px 22px 26px; position: relative;
  font-weight: 650; font-size: 18px; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg);
  display: grid; place-items: center; font-weight: 500; font-size: 22px; line-height: 1; transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 26px 24px; color: var(--grey); }

/* ---------- Final CTA ---------- */

.cta {
  margin-top: 120px; text-align: center; position: relative; overflow: hidden;
  border-radius: 40px; padding: 80px 24px 0;
  background:
    linear-gradient(to bottom, rgba(247,247,247,.15), rgba(247,247,247,.0) 40%),
    url("assets/lake.jpg") center 60% / cover no-repeat;
}
.cta h2 { max-width: 640px; margin: 0 auto; }
.cta .lead { margin-top: 16px; color: #4d4d4d; }
.cta .hero-cta { margin-top: 28px; }
.cta img { width: 260px; margin: 40px auto 0; filter: drop-shadow(0 20px 26px rgba(20, 20, 20, .18)); }

/* ---------- Footer ---------- */

.footer { padding: 80px 0 48px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-top p { color: var(--grey); margin: 14px 0 0; max-width: 300px; font-size: 15px; }
.footer h4 { margin: 4px 0 14px; font-size: 14px; color: var(--grey-light); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { text-decoration: none; font-weight: 500; color: #3a3a3a; }
.footer ul a:hover { color: var(--green-dark); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid #E6E6E6;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  color: var(--grey-light); font-size: 14px;
}
.footer-bottom p { margin: 0; max-width: 640px; }

/* ---------- Legal and support pages ---------- */

.page { padding: 150px 0 40px; }
.doc {
  max-width: 780px; margin: 0 auto; background: var(--card); border-radius: 32px;
  padding: 56px clamp(24px, 6vw, 64px); box-shadow: var(--shadow);
}
.doc h1 { font-size: clamp(36px, 5vw, 48px); margin: 14px 0 8px; }
.doc .updated { color: var(--grey-light); font-size: 15px; margin: 0 0 32px; }
.doc h2 { font-size: 24px; letter-spacing: -.02em; margin: 40px 0 10px; }
.doc h3 { font-size: 19px; margin: 24px 0 6px; }
.doc p, .doc li { color: #3d3d3d; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--green-dark); font-weight: 600; }
.doc .note { background: var(--green-soft); border-radius: 18px; padding: 18px 22px; color: #1d5236; margin: 24px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.doc th { color: var(--grey); font-weight: 600; }
.contact-card { display: flex; align-items: center; gap: 18px; background: var(--bg); border-radius: 20px; padding: 20px 22px; margin: 20px 0 8px; }
.contact-card img { width: 64px; }
.contact-card p { margin: 0; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .track, .groundy-trio img { animation: none; }
  .mission .w { color: var(--ink); }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav-links a:not(.btn) { display: none; }
  .row, .row.flip { grid-template-columns: 1fr; padding: 40px 28px 0; gap: 32px; text-align: center; }
  .row.flip .shot { order: 0; }
  .row .text { padding-bottom: 0; }
  .row .shot { order: 2 !important; }
  .grid { grid-template-columns: 1fr 1fr; }
  .groundy { grid-template-columns: 1fr; text-align: center; padding: 44px 28px; }
  .groundy p { margin-left: auto; margin-right: auto; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav { top: 10px; padding: 0 10px; }
  .nav-inner { padding: 8px 8px 8px 14px; }
  .brand { font-size: 18px; }
  .brand img { width: 30px; height: 30px; }
  .nav .btn { padding: 11px 18px; font-size: 15px; }
  .hero { padding-top: 120px; }
  .hero-phones { margin-top: 36px; padding: 0; }
  .mission { padding: 100px 0; }
  .facts { grid-template-columns: 1fr; }
  .section { padding-top: 96px; }
  .section-head { margin-bottom: 40px; }
  .row .phone { width: 220px; margin-bottom: -130px; }
  .grid { grid-template-columns: 1fr; }
  .privacy-band { grid-template-columns: 1fr; padding: 32px 24px; text-align: center; }
  .privacy-band .lock { margin: 0 auto; }
  .cta { border-radius: 28px; padding-top: 56px; }
  .cta img { width: 200px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > div:first-child { grid-column: 1 / -1; }
  .page { padding-top: 110px; }
  .doc { border-radius: 24px; padding-top: 40px; }
}
