/*
 * Shared styles for the Yum Rank site.
 *
 * Two static pages that exist to fill App Store Connect's Privacy Policy URL
 * and Support URL fields. No framework, no build step, no web fonts — a build
 * step would be more to maintain than the thing it builds.
 *
 * The palette is the app's own (`src/theme/colors.ts`), so someone arriving
 * from the App Store listing recognises where they are. `--brand` is
 * `brand.mid` and not the prettier `brand.light`, for the same reason the app
 * makes that trade: #F97316 carries white at 3.5:1 and #C2410C at 5.2:1.
 */

:root {
  --brand: #c2410c;
  --brand-light: #fb923c;
  --brand-deep: #7c2d12;
  --bg: #0b0b0f;
  --surface: #16161c;
  --text: #f5f5f7;
  --text-dim: rgba(235, 235, 245, 0.62);
  --text-faint: rgba(235, 235, 245, 0.38);
  --border: rgba(255, 255, 255, 0.09);
  --max: 720px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
    Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

header {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  width: fit-content;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.brand span {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ---------- hero ---------- */

.hero {
  padding: 88px 0 72px;
  text-align: center;
}

.hero img {
  width: 104px;
  height: 104px;
  border-radius: 23px;
  margin-bottom: 28px;
}

h1 {
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.08;
  letter-spacing: -1.4px;
  font-weight: 700;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff 30%, var(--brand-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--text-dim);
  max-width: 30em;
  margin: 0 auto;
}

/* ---------- features ---------- */

.features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 8px 0 88px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}

.card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card p {
  font-size: 15px;
  color: var(--text-dim);
}

/* ---------- content pages ---------- */

.page {
  padding: 56px 0 96px;
}

.page h1 {
  font-size: clamp(30px, 5vw, 40px);
  text-align: left;
  margin-bottom: 8px;
}

.updated {
  color: var(--text-faint);
  font-size: 14px;
  margin-bottom: 40px;
}

.page h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.3px;
  margin: 40px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.page h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 22px 0 6px;
}

.page p,
.page li {
  color: var(--text-dim);
  margin-bottom: 12px;
}

.page ul {
  padding-left: 22px;
  margin-bottom: 12px;
}

.page li {
  margin-bottom: 7px;
}

.page strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--brand-light);
}

a:hover {
  color: #fff;
}

/* A statement worth not skimming past. */
.callout {
  background: rgba(194, 65, 12, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 24px 0;
}

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

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 56px;
  font-size: 14px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

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

footer a:hover {
  color: #fff;
}

.spacer {
  flex: 1;
}

/* Light mode: the same palette, re-weighted rather than inverted. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f7f7f9;
    --text: #0b0b0f;
    --text-dim: rgba(60, 60, 67, 0.72);
    --text-faint: rgba(60, 60, 67, 0.5);
    --border: rgba(0, 0, 0, 0.1);
  }

  h1 {
    background: linear-gradient(135deg, #1a1a1f 30%, var(--brand));
    -webkit-background-clip: text;
    background-clip: text;
  }

  a {
    color: var(--brand);
  }

  a:hover {
    color: var(--brand-deep);
  }
}
