:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #dde1e6;
  --text: #1c1f24;
  --text-muted: #6b7280;
  --accent: #3457d5;
  --accent-soft: rgba(52, 87, 213, 0.1);
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(28, 31, 36, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1c1f26;
    --border: #2b2f38;
    --text: #e7e9ee;
    --text-muted: #9aa0ab;
    --accent: #7691ff;
    --accent-soft: rgba(118, 145, 255, 0.14);
    --accent-text: #0e1116;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: var(--accent);
  transition: color 0.15s ease, opacity 0.15s ease;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.logo:hover { opacity: 0.75; }

nav a {
  margin-left: 28px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
nav a:hover { color: var(--text); }

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 36px;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 4px 14px var(--accent-soft);
}
.btn-primary:hover { box-shadow: 0 6px 20px var(--accent-soft); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--text-muted); }

.page-hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 72px 24px 16px;
  text-align: center;
}

.page-hero h1 {
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.page-hero p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.apps, .contact {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.app-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.app-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.app-card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.app-card-link {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.app-card-link:hover {
  border-color: var(--card-accent, var(--accent));
  color: var(--card-accent, var(--accent));
}

/* Thresh app card: its own accent (Grain) and display font, scoped to this card only -
   the rest of the site keeps Purple Sheep's own blue accent. */
.app-card.thresh {
  --card-accent: #D9A441;
  --card-accent-soft: rgba(217, 164, 65, 0.14);
}

.app-card.thresh:hover {
  border-color: var(--card-accent);
}

.app-card.thresh .app-tag {
  background: var(--card-accent-soft);
  color: var(--card-accent);
}

.app-card.thresh h3 {
  font-family: 'Big Shoulders Stencil', inherit;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.apps-note {
  margin: 24px 4px 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-card .email {
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.contact-card .address {
  margin: 16px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 15px;
}

.legal {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 96px;
  line-height: 1.7;
}
.legal h2 {
  font-size: 20px;
  margin: 36px 0 12px;
  letter-spacing: -0.01em;
}
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--text-muted); font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal .updated { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }

footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

footer a {
  color: var(--text-muted);
  margin-left: 16px;
}
footer a:hover { color: var(--text); }
