/* Grounded website. Palette comes from the app icon: a dawn sky over green
   hills. Pages above the "ground line" are sky; what stays on the phone sits
   below it, in soil. */

:root {
  --ink: #1b2340;        /* pre-dawn indigo: text */
  --ink-soft: #4a5275;   /* secondary text */
  --sky: #eef0fb;        /* high sky, page background */
  --dawn: #f8dcc0;       /* horizon glow */
  --sun: #fff1d6;
  --hill: #5c9a63;       /* near hills */
  --hill-far: #8fbf8a;
  --moss: #234a35;       /* links, ground line */
  --soil: #1f2a22;       /* below-ground band */
  --soil-text: #e6eadf;
  --soil-muted: #a9b5a4;
  --focus: #7c8cff;      /* the app's accent */

  --display: "Young Serif", Georgia, serif;
  --body: "Figtree", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --measure: 64ch;
  --gutter: clamp(16px, 5vw, 48px);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}

img, svg { display: block; max-width: 100%; }

a { color: var(--moss); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header ------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 400 1.35rem/1 var(--display);
}
.brand img { width: 36px; height: auto; }

.site-nav { display: flex; gap: 20px; font-weight: 600; font-size: 0.95rem; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* Labels -------------------------------------------------------------- */

.label {
  margin: 0;
  font: 500 0.75rem/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Hero: the sky -------------------------------------------------------- */

.hero {
  /* Ends in the meadow colour so the SVG's bottom edge never shows a seam. */
  background: linear-gradient(180deg, var(--sky) 0%, #e4e2f6 45%, var(--dawn) calc(100% - 12px), #eef4ea calc(100% - 12px));
}

.hero-copy { padding-top: clamp(32px, 8vw, 88px); }
.hero-copy h1 { max-width: 15ch; }

.hero h1 {
  margin: 12px 0 20px;
  font: 400 clamp(2.4rem, 6.2vw, 4.25rem)/1.04 var(--display);
  letter-spacing: -0.01em;
}

.hero p {
  margin: 0 0 28px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 30rem;
}

.button {
  display: inline-block;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--moss);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: #1a3a29; text-decoration: none; }

/* The horizon. The sun rises once on load; the hills sit in front of it. */
.horizon { position: relative; margin-top: clamp(24px, 6vw, 56px); }
.horizon svg { width: 100%; height: auto; }

.sun {
  transform-box: fill-box;
  transform-origin: center;
  animation: rise 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes rise {
  from { transform: translateY(70%); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

/* Sky sections ------------------------------------------------------ */

.section { padding: clamp(56px, 9vw, 104px) 0; }
.meadow { background: #eef4ea; }
.meadow + .meadow { padding-top: 0; }

.section h2 {
  margin: 10px 0 16px;
  font: 400 clamp(1.9rem, 4vw, 2.75rem)/1.1 var(--display);
}

.lede { max-width: var(--measure); font-size: 1.1rem; color: var(--ink-soft); margin: 0; }

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin-top: 36px;
}

.app-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 1px 0 rgba(27, 35, 64, 0.06), 0 12px 32px -18px rgba(27, 35, 64, 0.35);
}
.app-card h3 { margin: 8px 0 10px; font: 400 1.5rem/1.2 var(--display); }
.app-card p { margin: 0 0 14px; color: var(--ink-soft); }
.app-card ul { margin: 0; padding-left: 1.1em; }
.app-card li { margin: 6px 0; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 28px 36px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}
.features h3 { margin: 0 0 6px; font: 700 1.05rem/1.3 var(--body); }
.features p { margin: 0; color: var(--ink-soft); }

/* The ground line, then soil ----------------------------------------- */

.ground-line { display: block; width: 100%; height: auto; background: var(--soil); }

.soil {
  background: var(--soil);
  color: var(--soil-text);
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 104px);
}
.soil .label { color: var(--soil-muted); }
.soil h2 { margin: 10px 0 16px; font: 400 clamp(1.9rem, 4vw, 2.75rem)/1.1 var(--display); color: #fff; }
.soil .lede { color: var(--soil-muted); }
.soil a { color: #c9e7b8; }
.soil .more { margin: 28px 0 0; }

.roots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 0 48px;
  margin: 36px 0 0;
}
.roots div { border-top: 1px solid rgba(230, 234, 223, 0.18); padding: 18px 0; }
.roots dt { font-weight: 700; color: #fff; margin-bottom: 4px; }
.roots dd { margin: 0; color: var(--soil-muted); }

/* Personal mode --------------------------------------------------- */

.personal {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.personal-list { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.personal-list li { color: var(--ink-soft); padding-left: 18px; border-left: 3px solid var(--hill-far); }
.personal-list strong { color: var(--ink); }

/* A copy of the app's personal-mode block screen, in the app's own colours. */
.block-mock { margin: 0; justify-self: center; width: min(100%, 300px); }
.block-screen {
  background: radial-gradient(120% 70% at 50% 0%, #1d2a3a 0%, #0f1115 70%);
  color: #f2f4f8;
  border-radius: 34px;
  border: 8px solid #2f4060;
  padding: 44px 24px 28px;
  text-align: center;
  box-shadow: 0 24px 48px -24px rgba(27, 35, 64, 0.55);
}
.block-glyph { width: 48px; height: 48px; margin: 0 auto 18px; }
.block-title { margin: 0 0 8px; font: 400 1.5rem/1.2 var(--display); }
.block-message { margin: 0 0 22px; color: #9aa3b2; font-size: 0.95rem; }
.block-tip { margin: 0 0 24px; padding: 14px; border-radius: 14px; background: #1f232c; font-style: italic; font-size: 0.92rem; }
.block-button { display: inline-block; padding: 10px 40px; border-radius: 999px; background: #7c8cff; color: #0f1115; font-weight: 700; font-size: 0.9rem; }
.block-mock figcaption { margin-top: 12px; text-align: center; font: 500 0.75rem/1.4 var(--mono); color: var(--ink-soft); }

@media (max-width: 760px) {
  .personal { grid-template-columns: 1fr; }
}

/* Testing / contact -------------------------------------------------- */

.join { display: grid; gap: 16px; }
.join > * { max-width: var(--measure); }
.join p { margin: 0; color: var(--ink-soft); }

/* Footer --------------------------------------------------------------- */

.site-footer {
  background: var(--soil);
  color: var(--soil-muted);
  padding: 28px 0 36px;
  font-size: 0.9rem;
  border-top: 1px solid rgba(230, 234, 223, 0.12);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer a { color: var(--soil-text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Policy page ---------------------------------------------------------- */

.policy-head { background: linear-gradient(180deg, var(--sky), #e9e6f7); padding: 0 0 40px; }
.policy-head .site-header + .wrap { padding-top: clamp(16px, 4vw, 40px); }
.policy-head h1 { margin: 10px 0 12px; font: 400 clamp(2.2rem, 5vw, 3.25rem)/1.08 var(--display); }
.policy-head p { margin: 0; color: var(--ink-soft); }

.policy { background: #fff; padding: 48px 0 80px; }
.policy .wrap > * { max-width: var(--measure); }
.policy h2 { margin: 48px 0 12px; font: 400 1.6rem/1.2 var(--display); }
.policy h3 { margin: 28px 0 8px; font: 700 1.05rem/1.3 var(--body); }
.policy p, .policy li { color: #2a3150; }
.policy ul { padding-left: 1.2em; }
.policy li { margin: 6px 0; }
.policy code { font: 0.9em var(--mono); background: var(--sky); padding: 1px 5px; border-radius: 4px; }

.summary {
  background: var(--sky);
  border-left: 4px solid var(--hill);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
}
.summary ul { margin: 8px 0 0; }

.data-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid #e3e6ef; }
.data-table th { font-weight: 700; color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* Small screens ------------------------------------------------------- */

@media (max-width: 560px) {
  .site-nav { gap: 14px; font-size: 0.9rem; }
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sun { animation: none; }
}
