/* Gram Slam site. One accent (ember, from App/Shared/BrandColor.swift: rgb 0.91 0.41 0.17), rounded headings,
   generous spacing. Light and dark follow the visitor's system setting. */

:root {
  --ember: #e8692b;          /* BrandColor.ember */
  --ember-strong: #c4521b;   /* ember darkened for text links on light backgrounds (AA contrast) */
  --ember-soft: rgba(232, 105, 43, 0.12);
  --bg: #ffffff;
  --bg-grouped: #f2f2f7;     /* iOS systemGroupedBackground */
  --card: #ffffff;
  --text: #1c1c1e;
  --text-2: #5b5b61;
  --line: rgba(60, 60, 67, 0.16);
  --radius: 18px;            /* Brand.corner */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ember-strong: #f0854f;
    --ember-soft: rgba(232, 105, 43, 0.20);
    --bg: #000000;
    --bg-grouped: #000000;
    --card: #1c1c1e;
    --text: #f2f2f7;
    --text-2: #aeaeb2;
    --line: rgba(235, 235, 245, 0.16);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg-grouped);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, .brand {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin: 0 0 0.4em; letter-spacing: -0.01em; }
h2 { font-size: 1.35rem; margin: 2em 0 0.5em; }
h3 { font-size: 1.08rem; margin: 1.5em 0 0.3em; }

a { color: var(--ember-strong); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

header.site {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.15rem; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
nav a { color: var(--text-2); text-decoration: none; margin-left: 16px; font-size: 0.95rem; }
nav a:first-child { margin-left: 0; }
nav a[aria-current="page"], nav a:hover { color: var(--ember-strong); }

main { padding: 32px 0 48px; }

.hero { text-align: center; padding: 24px 0 8px; }
.hero img.icon { width: 128px; height: 128px; border-radius: 28px; box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.hero p.lede { font-size: 1.2rem; color: var(--text-2); max-width: 34em; margin: 0 auto 1.2em; }

.button {
  display: inline-block; background: var(--ember); color: #fff; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; font-weight: 600;
}
.button:hover { filter: brightness(1.05); }
.button.soon { opacity: 0.8; cursor: default; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 28px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 18px 18px 14px;
  border: 1px solid var(--line);
}
.card h3 { margin-top: 0; }
.card p { margin: 0.2em 0 0.4em; color: var(--text-2); font-size: 0.97rem; }

.bar { position: relative; height: 14px; border-radius: 999px; background: var(--line); margin: 28px auto 6px; max-width: 420px; overflow: visible; }
.bar .fill { position: absolute; inset: 0 30% 0 0; background: var(--ember); border-radius: 999px; }
.bar .band { position: absolute; top: 0; bottom: 0; left: 62%; right: 0; background: var(--ember-soft); border-radius: 999px; }
.bar .tick { position: absolute; left: 62%; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: 0.55; }
.bar-caption { text-align: center; color: var(--text-2); font-size: 0.9rem; }

.promise {
  background: var(--card); border-radius: var(--radius); padding: 18px 20px; margin-top: 28px;
  border: 1px solid var(--line); border-left: 4px solid var(--ember);
}
.promise p { margin: 0.3em 0; }

.doc { background: var(--card); border-radius: var(--radius); padding: 8px 22px 22px; border: 1px solid var(--line); }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 0.25em 0; }
.meta { color: var(--text-2); font-size: 0.92rem; }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 0.6em 0 1em; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--text-2); font-weight: 600; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

details { border-bottom: 1px solid var(--line); padding: 12px 0; }
details summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
details[open] summary { color: var(--ember-strong); }
details p, details ol, details ul { margin: 0.6em 0 0.2em; }

.todo {
  background: #fff3cd; color: #5c4400; border-radius: 6px; padding: 1px 6px; font-size: 0.85em; font-weight: 600;
}
@media (prefers-color-scheme: dark) { .todo { background: #4a3a00; color: #ffe08a; } }

.disclaimer { color: var(--text-2); font-size: 0.92rem; text-align: center; margin-top: 28px; }

footer.site { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--text-2); font-size: 0.9rem; background: var(--bg); }
footer.site a { color: var(--text-2); }
footer.site .links a { margin-right: 14px; }

@media (max-width: 480px) {
  body { font-size: 16px; }
  nav a { margin-left: 12px; }
  .doc { padding: 4px 16px 16px; }
}
