/* Tuppy website. Plain CSS, no build step. Colours match the app (docs/mockups, Color.Tuppy). */
:root {
  --bg: #f2f2f7;            /* systemGroupedBackground */
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #5f5f66;         /* 6.0:1 on --bg */
  --accent: #5e5ce6;        /* indigo fill with white text, 5.06:1 */
  --accent-text: #5e5ce6;
  --gold: #ffc53d;
  --gold-text: #8a5a00;
  --gold-tint: #fff3d1;
  --green: #34c759;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --muted: #a1a1aa;
    --accent-text: #7d7aff;   /* #5E5CE6 is too dark on dark cards */
    --gold-text: #ffd36b;
    --gold-tint: #3a2f12;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3 { font-family: ui-rounded, -apple-system, "SF Pro Rounded", "SF Pro Display", system-ui, sans-serif; line-height: 1.2; }
h1 { font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 800; margin: 0 0 0.4em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 800; margin: 0 0 0.6em; }
h3 { font-size: 1.15rem; margin: 0 0 0.25em; }
p { margin: 0 0 1em; }
a { color: var(--accent-text); font-weight: 600; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 10; }

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

header.site { padding: 16px 0; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
nav.site a { margin-left: 16px; text-decoration: none; color: var(--muted); font-weight: 600; }
nav.site a:hover { color: var(--accent-text); }

.hero { text-align: center; padding: 32px 0 48px; }
.hero .icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: var(--shadow); margin-bottom: 20px; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; margin: 0 auto 1.5em; }
.pill { display: inline-block; background: var(--gold-tint); color: var(--gold-text); font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 16px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.button:hover { filter: brightness(1.08); }
.small { font-size: 0.9rem; color: var(--muted); }

section { padding: 40px 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.steps { display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; list-style: none; padding: 0; margin: 0; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { position: relative; }
.steps .tile { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; color: #fff; }
.orange { background: #ff9500; } .blue { background: #007aff; } .green { background: #34c759; }
.purple { background: #af52de; } .pink { background: #ff2d55; } .teal { background: #30b0c7; }
.steps p { color: var(--muted); margin: 0; }

.features { display: grid; gap: 12px; grid-template-columns: 1fr; padding: 0; margin: 0; list-style: none; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { display: flex; gap: 12px; align-items: flex-start; }
.features .dot { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800; }

.coin { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--gold); color: #6b4500; font-weight: 900; font-size: 0.8em; vertical-align: -0.15em; }

.faq details { background: var(--card); border-radius: 16px; padding: 4px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.faq details[open] summary { margin-bottom: 4px; }

/* Legal pages generated from docs/*.md */
.legal { padding-top: 8px; padding-bottom: 48px; }
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.4rem; margin-top: 1.8em; }
.legal h3 { margin-top: 1.4em; }
.legal blockquote { margin: 0 0 1.5em; padding: 14px 18px; border-radius: 14px; background: var(--gold-tint); color: var(--text); }
.legal blockquote p { margin: 0; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 0.4em; }
.table-scroll { overflow-x: auto; margin: 0 0 1.5em; }
.legal table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.95rem; background: var(--card); border-radius: 14px; overflow: hidden; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(127, 127, 127, 0.2); vertical-align: top; }
.legal th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.fill { background: var(--gold-tint); color: var(--gold-text); border-radius: 4px; padding: 0 3px; font-weight: 600; }

footer.site { padding: 32px 0 48px; color: var(--muted); font-size: 0.95rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer.site nav a { margin-right: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .button { transition: filter 0.15s; }
}
