/* APFE — shared site styles.
   Brand colors track the app: --accent mirrors the AccentColor asset
   (Clutter/resources/Assets.xcassets/AccentColor.colorset), and --tan / --slate
   come from the app icon's kraft tape and grey-blue tote. */

:root {
  --bg:        #f7f5f1;
  --bg-alt:    #efeae1;
  --card:      #ffffff;
  --ink:       #1a201e;
  --body:      #2c3532;
  --muted:     #6c7672;
  --line:      #e5dfd5;

  --accent:       #157a54;  /* link / text-weight green, contrast-safe on cream */
  --accent-solid: #1b9c6b;  /* app AccentColor (light) — fills and marks */
  --accent-soft:  #e4f1ea;
  --tan:          #c9a26b;  /* icon tape */
  --tan-soft:     #f7edda;
  --tan-line:     #ecd9b8;
  --tan-ink:      #6f5327;
  --slate:        #7c93a3;  /* icon tote */

  --radius-card: 18px;
  --radius-btn:  13px;
  --shadow: 0 1px 2px rgba(26,32,30,.04), 0 8px 24px -14px rgba(26,32,30,.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #12171a;
    --bg-alt:    #171e21;
    --card:      #1a2226;
    --ink:       #e9efec;
    --body:      #c6d0cc;
    --muted:     #94a09c;
    --line:      #2a3336;

    --accent:       #6bd3a5;
    --accent-solid: #4dc994;  /* app AccentColor (dark) */
    --accent-soft:  #16302690;
    --tan:          #d9b67f;
    --tan-soft:     #2a231a;
    --tan-line:     #433725;
    --tan-ink:      #e0c294;
    --slate:        #8fa6b6;

    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -14px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--ink); }
a { color: var(--accent); }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

/* Brand lockup */
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); font-weight: 700;
  letter-spacing: -0.01em; font-size: 17px;
}
.brand img {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); display: block;
}
.brand small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); letter-spacing: 0; }

.topbar { padding: 28px 0 0; }

/* Home hero */
header.hero { padding: 56px 0 64px; text-align: center; }
.badge {
  display: inline-block; font-size: 13px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
  background: var(--accent-soft); border-radius: 999px; padding: 6px 14px; margin-bottom: 20px;
}
.hero .icon {
  width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 24px; display: block;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -0.02em; }
h1 .hl { color: var(--accent); }
.lede { font-size: clamp(17px, 2.4vw, 21px); color: var(--muted); max-width: 620px; margin: 0 auto 34px; }

.cta {
  display: inline-block; background: var(--accent-solid); color: #fff; text-decoration: none;
  padding: 14px 26px; border-radius: var(--radius-btn); font-weight: 600; font-size: 16px;
  border: 1px solid transparent;
}
.cta.secondary { background: transparent; color: var(--ink); border-color: var(--line); margin-left: 8px; }

section { padding: 56px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(24px, 4vw, 32px); letter-spacing: -0.01em; margin: 0 0 28px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 24px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* Accent hairline on the feature cards — the kraft-tape stripe from the icon. */
.grid .card { position: relative; overflow: hidden; }
.grid .card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--tan);
}
.priv .card::before { background: var(--accent-solid); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { position: relative; padding-left: 52px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-solid); color: #fff; font-weight: 700; display: grid; place-items: center;
}
.steps h3 { margin: 0 0 4px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

.priv { background: var(--bg-alt); }

/* Support page */
.page { padding: 40px 0 72px; }
.sub { color: var(--muted); margin: 0 0 40px; font-size: 18px; }
.page .card { margin-bottom: 20px; box-shadow: var(--shadow); }
.page .card h2 { font-size: 20px; margin: 0 0 8px; }
.page .card p { color: var(--body); font-size: inherit; margin: 0 0 12px; }
a.btn {
  display: inline-block; background: var(--accent-solid); color: #fff; text-decoration: none;
  padding: 12px 22px; border-radius: 12px; font-weight: 600;
}
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:first-of-type { border-top: none; }
summary { font-weight: 600; cursor: pointer; font-size: 16px; color: var(--ink); }
summary::marker { color: var(--accent); }
details p { margin: 10px 0 0; color: var(--muted); }

/* Legal pages */
.legal { padding: 32px 0 96px; line-height: 1.65; }
.legal h1 { font-size: 34px; margin: 0 0 4px; }
.legal h2 { font-size: 21px; margin: 40px 0 10px; }
.updated { color: var(--muted); margin: 0 0 36px; }
.legal p, .legal li { color: var(--body); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.note {
  background: var(--tan-soft); border: 1px solid var(--tan-line); border-left: 4px solid var(--tan);
  border-radius: 12px; padding: 14px 18px; color: var(--tan-ink); font-size: 15px;
}
code { background: var(--bg-alt); padding: 1px 6px; border-radius: 5px; }

footer {
  padding: 40px 0 64px; margin-top: 48px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
footer.center { text-align: center; margin-top: 0; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }
