/* Just Do It — marketing, privacy and support site.
   Dark-only on purpose: the app itself is dark-only (Info.plist pins
   UIUserInterfaceStyle), so a light site would misrepresent it.
   Palette is lifted from JustDoIt/Theme/Theme.swift. */

:root {
  --blue: #0a84ff;
  --purple: #bf5af2;
  --green: #32d74b;
  --gold: #ffd60a;

  --bg: #08080c;
  --bg-glow-a: rgba(10, 132, 255, 0.18);
  --bg-glow-b: rgba(191, 90, 242, 0.14);

  --text: #f5f5f7;
  --text-secondary: rgba(245, 245, 247, 0.62);
  --text-tertiary: rgba(245, 245, 247, 0.4);

  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --hairline: rgba(255, 255, 255, 0.13);

  --radius-field: 20px;
  --radius-card: 26px;
  --radius-hero: 32px;

  --gutter: 24px;
  --max-width: 1080px;
  --max-text: 720px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Two soft brand glows behind everything, mirroring AppBackground. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 15% -10%, var(--bg-glow-a), transparent 60%),
    radial-gradient(50rem 35rem at 90% 10%, var(--bg-glow-b), transparent 60%);
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--text {
  max-width: var(--max-text);
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

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

.small {
  font-size: 0.9rem;
}

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--hairline);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

nav.site {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  font-weight: 600;
}

nav.site a {
  color: var(--text-secondary);
}

nav.site a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ---------- Sections ---------- */

section {
  padding: 72px 0;
}

section.tight {
  padding: 48px 0;
}

.section-head {
  max-width: var(--max-text);
  margin-bottom: 32px;
}

.section-head p {
  margin-top: 12px;
  color: var(--text-secondary);
}

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

.hero {
  padding: 84px 0 64px;
  text-align: center;
}

.hero img.app-icon {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(10, 132, 255, 0.28);
  margin-bottom: 28px;
}

.hero p.lede {
  max-width: 620px;
  margin: 20px auto 0;
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  box-shadow: 0 16px 40px rgba(10, 132, 255, 0.35);
}

.btn--ghost {
  background: var(--glass);
  border-color: var(--hairline);
  color: var(--text);
}

.btn[aria-disabled="true"] {
  opacity: 0.75;
  cursor: default;
  box-shadow: none;
}

.hero .note {
  margin-top: 18px;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* ---------- Cards ---------- */

.card {
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card .icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ---------- Callout ---------- */

.callout {
  border-radius: var(--radius-hero);
  padding: 32px;
  background: linear-gradient(
    135deg,
    rgba(10, 132, 255, 0.16),
    rgba(191, 90, 242, 0.12)
  );
  border: 1px solid var(--hairline);
}

.callout h2 {
  margin-bottom: 12px;
}

.callout p:last-child {
  margin-bottom: 0;
  color: var(--text-secondary);
}

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.plan {
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px;
}

.plan--pro {
  background: var(--glass-strong);
  border-color: rgba(10, 132, 255, 0.45);
}

.plan .price {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 8px 0 4px;
}

.plan .price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0;
}

.plan ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.plan li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.plan li.off {
  color: var(--text-tertiary);
}

.plan li.off::before {
  content: "—";
  color: var(--text-tertiary);
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(10, 132, 255, 0.16);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---------- Long-form documents ---------- */

.doc {
  padding: 56px 0 80px;
}

.doc h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.doc .updated {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-top: 12px;
}

.doc section {
  padding: 0;
  margin-top: 36px;
}

.doc section h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.doc section p,
.doc section li {
  color: var(--text-secondary);
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

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

details.faq {
  background: var(--glass);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-field);
  padding: 18px 20px;
  margin-bottom: 12px;
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq summary::after {
  content: "+";
  color: var(--text-tertiary);
  font-size: 1.3rem;
  line-height: 1;
  flex: none;
}

details.faq[open] summary::after {
  content: "–";
}

details.faq .body {
  margin-top: 12px;
  color: var(--text-secondary);
}

details.faq .body p:last-child {
  margin-bottom: 0;
}

/* ---------- Contact ---------- */

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.contact .email {
  font-size: 1.15rem;
  font-weight: 700;
}

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

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 56px;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

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

footer.site nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

footer.site a {
  color: var(--text-secondary);
}

@media (max-width: 600px) {
  section {
    padding: 56px 0;
  }

  nav.site {
    gap: 14px;
    font-size: 0.85rem;
  }

  footer.site nav {
    margin-left: 0;
    width: 100%;
  }
}

/* The app is dark-only, so the site never flips — but honour reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
