/* Compoundly — marketing + legal site.
   Palette and feel are pulled straight from the app (Theme.swift):
   accent #33D89E, background #11141A → #07080A, emerald halo, faint film grain. */

:root {
  --accent: #33d89e;
  --accent-bright: #5fe6b7;
  --bg-top: #11141a;
  --bg-bottom: #07080a;

  --text: rgba(255, 255, 255, 0.92);
  --text-dim: rgba(255, 255, 255, 0.58);
  --text-faint: rgba(255, 255, 255, 0.40);
  --hairline: rgba(255, 255, 255, 0.08);
  --surface: rgba(255, 255, 255, 0.05);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", var(--font-body);

  --maxw: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(51, 216, 158, 0.16), transparent 62%),
    linear-gradient(180deg, var(--bg-top) 0%, #0a0c11 38%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}

/* Faint film grain, echoing the app's always-on grain overlay (opacity ~0.05). */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

/* ---- layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.nav {
  position: relative;
  z-index: 2;
  padding: 22px 0 8px;
}
.nav .wrap { display: flex; align-items: center; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.wordmark img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 0 0 0.5px var(--hairline);
}

/* ---- hero ---- */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 64px 0 40px;
}
.hero-icon {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  box-shadow:
    0 0 0 0.5px var(--hairline),
    0 24px 60px rgba(51, 216, 158, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
}
.hero h1 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 18px;
}
.hero .lede {
  font-size: clamp(16px, 4.4vw, 19px);
  color: var(--text-dim);
  max-width: 30ch;
  margin: 0 auto 34px;
}

/* App Store button — a tasteful stand-in; swap for Apple's official badge asset. */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 22px 13px 20px;
  border-radius: 14px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.appstore:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5); }
.appstore svg { width: 22px; height: 22px; }
.appstore .small { display: block; font-size: 11px; font-weight: 500; opacity: 0.7; line-height: 1; margin-bottom: 2px; }
.appstore .big { display: block; font-size: 17px; line-height: 1; }

.hero .micro {
  margin-top: 18px;
  font-family: var(--font-rounded);
  font-size: 13px;
  color: var(--text-faint);
}

/* ---- values ---- */
.values {
  position: relative;
  z-index: 1;
  /* Keep the wrap's 24px horizontal inset (a bare 0 here clobbered it, letting
     the cards touch the screen edge on mobile and outgrow the premium card). */
  padding: 30px 24px 56px;
  display: grid;
  gap: 14px;
}
.value {
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  border-radius: 16px;
  padding: 20px 22px;
}
.value h3 {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 5px;
}
.value p { font-size: 14.5px; color: var(--text-dim); }
.value .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(51, 216, 158, 0.6);
}

/* ---- premium ---- */
.premium { position: relative; z-index: 1; padding: 2px 24px 56px; }
.premium-card {
  background: var(--surface);
  border: 0.5px solid rgba(51, 216, 158, 0.28);
  border-radius: 18px;
  padding: 26px 26px 22px;
}
.premium-card h2 {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 6px;
}
.premium-lede { font-size: 15px; color: var(--text-dim); margin-bottom: 16px; }
.premium-card ul { list-style: none; display: grid; gap: 9px; margin-bottom: 18px; }
.premium-card li {
  font-size: 14.5px;
  color: var(--text);
  padding-left: 22px;
  position: relative;
}
.premium-card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(51, 216, 158, 0.6);
}
.premium-foot {
  font-family: var(--font-rounded);
  font-size: 13px;
  color: var(--text-faint);
}

/* ---- footer ---- */
.disclaimer-wrap { padding-bottom: 18px; }
.disclaimer { font-size: 12.5px; color: var(--text-faint); max-width: 62ch; }
footer {
  position: relative;
  z-index: 1;
  border-top: 0.5px solid var(--hairline);
  padding: 26px 0 40px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}
footer .copy { font-size: 13px; color: var(--text-faint); }
footer nav { display: flex; gap: 20px; }
footer nav a {
  font-size: 13px;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
footer nav a:hover { color: var(--accent); }

/* ---- legal pages ---- */
/* Horizontal 24px kept explicitly — a bare 0 clobbers .wrap's inset (same bug
   the value cards had on mobile). */
.legal { padding: 40px 24px 64px; position: relative; z-index: 1; }
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-rounded);
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 34px;
  transition: color 0.15s ease;
}
.back:hover { color: var(--accent); }
.legal h1 {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: clamp(28px, 7vw, 38px);
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 6px;
}
.legal .updated { font-size: 13.5px; color: var(--text-faint); margin-bottom: 30px; }
.legal .intro { font-size: 16px; color: var(--text-dim); margin-bottom: 30px; }
.legal h2 {
  font-family: var(--font-rounded);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  margin: 30px 0 8px;
}
.legal p { font-size: 15.5px; color: var(--text-dim); margin-bottom: 12px; }
.legal a { color: var(--accent); }
.legal a:hover { color: var(--accent-bright); }

/* ---- larger screens ---- */
@media (min-width: 680px) {
  .values { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  /* The feature grid runs 2×2 with the privacy strip spanning the full width. */
  .values.features { grid-template-columns: repeat(2, 1fr); }
  .values.features .value.privacy { grid-column: 1 / -1; }
  .value h3 { min-height: 2.6em; }   /* reserve two lines so the card bodies align */
  .values.features .value.privacy h3 { min-height: 0; }
  .hero { padding-top: 76px; }
}
