/* HOW GROUNDWORK LOOKS: the "Fieldstone" palette (chosen November 2026).
   Cool stone-white pages, one confident evergreen for things you press, harvest
   gold as a small spark, and a color for each app. Colors follow the device's
   light/dark setting.

   Every color is a token here at the top. Pages use the tokens, never a color
   written straight into a rule, so light and dark always match.

   Type: Inter for everything you read, Plus Jakarta Sans for titles and big
   numbers. Both are files in fonts/ (SIL Open Font License, fonts/OFL.txt), the
   same ones Groundwork Farm uses, so nothing loads from another website. */

@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/jakarta.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

/* Light */
:root {
  color-scheme: light dark;
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;

  --bg: #f4f6f5;          /* the page: stone white */
  --surface: #ffffff;     /* cards */
  --ink: #14201a;         /* text */
  --muted: #5c6962;       /* quieter text */
  --line: #e2e7e4;        /* hairlines */
  --line-strong: #cfd6d2;
  --accent: #16774e;      /* evergreen: buttons and links */
  --accent-hover: #11603f;
  --on-accent: #ffffff;   /* text on evergreen */
  --accent-soft: #e0f0e7;
  --gold: #dba43a;        /* the sun in the mark; small highlights only */

  /* One color per app (the dots, icons and each app's own header) */
  --farm: #2f7d52;
  --books: #2f64b0;
  --home: #b65a33;
  --garage: #5a6878;
  --lists: #7552c2;
  --sensors: #13808a;

  --shadow: 0 1px 2px rgba(20, 32, 26, 0.04), 0 10px 30px -14px rgba(20, 32, 26, 0.18);
  --radius: 16px;
}

/* Dark: deep green-tinted charcoal (never pure black), colors softened so nothing glares. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1110; --surface: #151a18; --ink: #e7ecea; --muted: #97a39d;
    --line: #232a27; --line-strong: #323b37;
    --accent: #5ccf96; --accent-hover: #7ddcac; --on-accent: #06150d; --accent-soft: #14291e;
    --gold: #e6b955;
    --farm: #7ccb9c; --books: #8db1ef; --home: #eb9d77; --garage: #a8b5c4; --lists: #b7a1ee; --sensors: #6fcdd4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss03"; /* Inter: a single-storey a, rounder quotes */
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; text-wrap: balance; margin: 0; }

/* The page column: at most 1080px wide, with at least 20px either side on a phone. */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- Top bar: the mark and the name ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding-block: 22px; }
.topbar img { width: 32px; height: 32px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.015em; color: var(--ink); text-decoration: none; }

/* ---------- The opening: what Groundwork is ---------- */
.hero { display: flex; flex-direction: column; gap: 18px; padding-block: 56px 64px; max-width: 760px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 64px); line-height: 1.04; font-weight: 700; }
.hero h1 .sun { color: var(--gold); }
.hero p { margin: 0; font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 58ch; }

/* ---------- The apps ---------- */
.apps { display: flex; flex-direction: column; gap: 20px; padding-bottom: 72px; }
.apps-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.apps-head h2 { font-size: 26px; }
.apps-head p { margin: 0; color: var(--muted); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.app {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}
.app-top { display: flex; align-items: center; gap: 12px; }
/* The app's icon on a soft tile of its own color. */
.icon {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
}
.icon svg { width: 24px; height: 24px; }
.app h3 { font-size: 19px; }
.app p { margin: 0; color: var(--muted); font-size: 15px; }
.status { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.status.ready { color: var(--accent); }
.status.ready::before { background: var(--accent); }

/* ---------- Bottom ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 26px 40px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }

/* Tablets: two apps across. Phones: one. */
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero { padding-block: 28px 44px; }
}
