/* Colors match PP in PainTrack/Views/Components/Theme.swift */
:root {
  color-scheme: dark;
  --bg: #07040d;
  --card: #0d0817;
  --surface: #120b1e;
  --line: #241a36;
  --line-strong: #3a2c55;
  --ink: #f4f0ff;
  --ink-soft: #d9d0ec;
  --muted: #9a8fb5;
  --lilac: #b98cff;
  --bolt: #ffe14d;
  --today: #6231b1;
  --display: "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

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

a { color: var(--lilac); }
a:hover { color: var(--ink); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Home ---------- */

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

.frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 32px;
  overflow: hidden;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 32px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
}
.nav-links a:hover { color: var(--ink); }
.nav-logo img { display: block; height: 52px; width: auto; }
.nav-cta { justify-self: end; }

.pill-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.pill-cta span {
  background: var(--ink);
  color: var(--bg);
  padding: 11px 20px;
  border-radius: 999px;
}
.pill-cta i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-style: normal;
  transition: transform 0.2s ease;
}
.pill-cta:hover i { transform: translateX(3px) rotate(-45deg); }

.hero {
  text-align: center;
  padding: 40px 20px 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
}
.badge img { width: 20px; height: 20px; border-radius: 6px; }

.hero h1 {
  margin: 20px auto 0;
  max-width: 11em;
  font-family: var(--display);
  font-size: clamp(46px, 8.4vw, 104px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--lilac);
}
.hero .lede {
  max-width: 34em;
  margin: 20px auto 0;
  font-size: 18px;
  color: var(--ink-soft);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 22px 10px 18px;
  border-radius: 14px;
  background: #000;
  border: 1px solid var(--line-strong);
  color: #fff;
  text-decoration: none;
  text-align: left;
  line-height: 1.1;
}
.store-badge svg { width: 26px; height: 26px; fill: currentColor; }
.store-badge small { display: block; font-size: 11px; opacity: 0.85; }
.store-badge strong { display: block; font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

/* Artwork stage with the phone and floating cards */
.stage {
  position: relative;
  height: clamp(420px, 52vw, 640px);
  margin: 48px 24px 0;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 120%, #2a1450 0%, var(--bg) 60%);
}
.stage-art {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 52%;
  object-fit: cover;
  height: 100%;
}
.stage-art.left {
  left: 0;
  -webkit-mask-image: linear-gradient(to right, #000 35%, transparent);
  mask-image: linear-gradient(to right, #000 35%, transparent);
}
.stage-art.right {
  right: 0;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent);
  mask-image: linear-gradient(to left, #000 35%, transparent);
}

.phone {
  position: relative;
  width: 300px;
  padding: 10px;
  border-radius: 52px;
  background: #050308;
  box-shadow:
    0 0 0 1.5px #3a2c55,
    0 0 0 4px #0b0712,
    0 40px 80px -24px rgba(0, 0, 0, 0.9);
}
.phone-screen {
  position: relative;
  border-radius: 42px;
  overflow: hidden;
  background: var(--bg);
}
.phone-screen img { display: block; width: 100%; height: auto; }
.phone-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 31%;
  margin: 2.7% 0 0 -15.5%;
  aspect-ratio: 125 / 37;
  border-radius: 999px;
  background: #000;
}

.stage .phone {
  position: absolute;
  left: 50%;
  top: 56px;
  margin-left: -150px;
  z-index: 2;
}

.float {
  position: absolute;
  z-index: 3;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.8);
}
.float img { display: block; width: 100%; height: auto; }
.float.weather { width: 270px; left: calc(50% - 450px); top: 150px; }
.float.stats { width: 320px; left: calc(50% + 160px); top: 270px; }

/* Facts strip, in place of a logo row */
.facts {
  padding: 40px 24px 44px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.facts p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.facts ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
}

/* Sections after the hero */
.section { padding: 96px 0 0; }
.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
  padding: 0 20px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lilac);
}
.section-head h2,
.privacy-band h2,
.cta h2 {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.section-head p { margin: 16px 0 0; }

.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "cal trends weather"
    "cal trends remind"
    "sleep sleep health";
}
.tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 28px 28px 0;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--card);
  isolation: isolate;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--art) center top / cover no-repeat;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.tile h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.tile p { margin: 8px 0 0; font-size: 15px; color: var(--ink-soft); max-width: 26em; }
.tile .panel {
  display: block;
  width: 100%;
  margin-top: 20px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
}

/* Shows the top of a phone, cut off by the bottom of the tile */
.peek {
  flex: 1;
  min-height: 440px;
  margin: 28px -28px 0;
  position: relative;
  overflow: hidden;
}
.peek .phone {
  position: absolute;
  top: 0;
  left: 50%;
  width: 300px;
  margin-left: -150px;
}

.tile.cal { grid-area: cal; }
.tile.trends { grid-area: trends; }
.tile.weather { grid-area: weather; min-height: 0; padding-bottom: 28px; }
.tile.remind { grid-area: remind; min-height: 0; padding-bottom: 28px; }
.tile.sleep { grid-area: sleep; }
.tile.health { grid-area: health; padding-bottom: 28px; }


.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.pair .panel { margin-top: 0; }

.checks {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}
.checks li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.checks li::before { content: "✦"; color: var(--bolt); }

/* Privacy band */
.privacy-band {
  margin-top: 96px;
  padding: 64px 40px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(185, 140, 255, 0.18), transparent 55%),
    var(--card);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.privacy-band p { margin: 16px 0 0; }
.privacy-band ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.privacy-band li {
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 15px;
}
.privacy-band li strong { display: block; color: var(--ink); font-size: 16px; }

/* Final call to action */
.cta {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 80px 24px;
  border-radius: 28px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--card);
  isolation: isolate;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("/images/art/trends-wave.jpg") center 18% / cover no-repeat;
  opacity: 0.5;
}
.cta .icon { width: 88px; height: 88px; border-radius: 22px; }
.cta p { margin: 14px auto 0; max-width: 30em; }

.home-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 32px 8px 24px;
  font-size: 14px;
  color: var(--muted);
}
.home-footer nav { display: flex; gap: 24px; }
.home-footer a { color: var(--muted); text-decoration: none; }
.home-footer a:hover { color: var(--ink); }

@media (max-width: 960px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "cal trends"
      "weather remind"
      "sleep sleep"
      "health health";
  }
  .float.weather { left: 16px; width: 220px; }
  .float.stats { left: auto; right: 16px; width: 260px; }
  .privacy-band { grid-template-columns: 1fr; padding: 40px 24px; }
}

@media (max-width: 720px) {
  .shell { padding: 8px; }
  .frame { border-radius: 24px; }
  .nav { grid-template-columns: 1fr auto; padding: 16px 16px 0 20px; }
  .nav-links { display: none; }
  .nav-logo img { height: 40px; }
  .pill-cta span { display: none; }
  .hero { padding-top: 28px; }
  .hero .lede { font-size: 16px; }
  .stage { margin: 36px 8px 0; height: 520px; }
  .stage .phone { width: 260px; margin-left: -130px; top: 40px; border-radius: 46px; }
  .stage .phone-screen { border-radius: 37px; }
  .peek { min-height: 380px; margin: 24px -20px 0; }
  .peek .phone { width: 250px; margin-left: -125px; }
  .float.weather { width: 46%; left: 8px; top: auto; bottom: 24px; }
  .float.stats { display: none; }
  .bento {
    grid-template-columns: 1fr;
    grid-template-areas: "cal" "trends" "weather" "remind" "sleep" "health";
  }
  .tile { min-height: 0; padding: 24px 20px 0; }
  .tile.weather, .tile.remind, .tile.health { padding-bottom: 24px; }
  .pair { grid-template-columns: 1fr; }
  .section { padding-top: 72px; }
  .privacy-band { margin-top: 72px; }
  .home-footer { flex-direction: column; }
}

/* ---------- Policy pages ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.site-header img { height: 56px; width: auto; display: block; }

.doc { padding: 32px 0 16px; }
.doc h1 {
  color: var(--ink);
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 4px;
}
.doc h2 {
  color: var(--ink);
  font-size: 20px;
  margin: 36px 0 8px;
}
.doc .meta { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }

.site-footer {
  margin-top: 56px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
