/* SpaceWise website. Colors match the app: white-to-cream in light mode, midnight blue in dark mode. */
:root {
  --bg-top: #ffffff;
  --bg-bottom: #f7f1e3;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --border: rgba(30, 41, 59, 0.10);
  --text: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-text: #ffffff;
  --safe: #15803d;
  --careful: #c2410c;
  --keep: #b91c1c;
  --tile-orange: linear-gradient(135deg, #f59e4c, #e2742b);
  --tile-blue: linear-gradient(135deg, #5aa9e6, #3b82c4);
  --tile-indigo: linear-gradient(135deg, #8b8cf0, #6366d1);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-top: #162240;
    --bg-bottom: #080d1e;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-strong: #121b33;
    --border: rgba(255, 255, 255, 0.10);
    --text: #f3f4f6;
    --text-secondary: #c3c9d6;
    --text-tertiary: #9aa3b5;
    --accent: #6496ff;
    --accent-hover: #82abff;
    --accent-text: #0b1226;
    --safe: #4ade80;
    --careful: #fb923c;
    --keep: #f87171;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg-top: #162240;
  --bg-bottom: #080d1e;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: #121b33;
  --border: rgba(255, 255, 255, 0.10);
  --text: #f3f4f6;
  --text-secondary: #c3c9d6;
  --text-tertiary: #9aa3b5;
  --accent: #6496ff;
  --accent-hover: #82abff;
  --accent-text: #0b1226;
  --safe: #4ade80;
  --careful: #fb923c;
  --keep: #f87171;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  background-color: var(--bg-bottom);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 20px; font-size: 15px; flex-wrap: wrap; }
.nav a { color: var(--text-secondary); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Hero */
.hero { text-align: center; padding: 48px 0 24px; }
.hero .icon { width: 112px; height: 112px; margin: 0 auto 20px; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 16px; }
.hero p.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--text-secondary); max-width: 640px; margin: 0 auto 28px; }

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 16px;
  background: var(--accent); color: var(--accent-text); border: 1px solid transparent;
}
.button:hover { background: var(--accent-hover); text-decoration: none; }
.button.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.button.secondary:hover { background: var(--surface-strong); }
.meta { margin-top: 14px; font-size: 14px; color: var(--text-tertiary); }

.screenshot { margin: 48px auto 0; max-width: 980px; }
.screenshot img { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.caption { text-align: center; font-size: 14px; color: var(--text-tertiary); margin-top: 12px; }

/* Sections */
section { padding: 56px 0; }
h2 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.015em; margin: 0 0 12px; line-height: 1.15; }
.section-lede { color: var(--text-secondary); max-width: 680px; margin: 0 0 32px; font-size: 18px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(8px);
}
.card h3 { margin: 12px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--text-secondary); font-size: 16px; }
.badge {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; font-size: 20px; background: var(--tile-blue);
}
.badge.orange { background: var(--tile-orange); }
.badge.indigo { background: var(--tile-indigo); }

.tiers { display: grid; gap: 12px; }
.tier { display: flex; gap: 14px; align-items: flex-start; }
.tier .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 8px; }
.tier strong { display: block; }
.tier span { color: var(--text-secondary); font-size: 16px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split img { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { padding-left: 30px; position: relative; color: var(--text-secondary); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; margin-top: 3px;
}

/* Text pages */
.page { padding: 32px 0 64px; max-width: 760px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; margin: 16px 0 8px; line-height: 1.1; }
.page h2 { font-size: 24px; margin: 40px 0 10px; }
.page p, .page li { color: var(--text-secondary); }
.page .updated { color: var(--text-tertiary); font-size: 15px; }
.page details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
.page summary { cursor: pointer; font-weight: 600; color: var(--text); }
.page details p { margin: 10px 0 0; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }

.status {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin: 24px 0;
}
.status h2 { margin: 0 0 6px; font-size: 24px; }
.status p { margin: 0 0 16px; }
.status.ok h2 { color: var(--safe); }
.status.new h2 { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; margin-top: 24px; font-size: 14px; color: var(--text-tertiary); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-secondary); }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .split { grid-template-columns: 1fr; gap: 24px; }
  .nav { gap: 14px; font-size: 14px; }
  .hero { padding-top: 24px; }
  section { padding: 40px 0; }
}

.button.disabled, .button.disabled:hover { background: var(--surface); color: var(--text-secondary); border-color: var(--border); cursor: default; text-decoration: none; }
.disclaimer { font-size: 15px; color: var(--text-tertiary); max-width: 760px; margin: 24px 0 0; }
.status ul { margin: 0; padding-left: 20px; }
.status li { margin: 6px 0; }

@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
}
