/*
 * LetKeeper website. The layout and class names follow the DoseTempo site
 * (www.dosetempo.co.uk), Streffdev Ltd's other app, so the two read as one
 * family: a coloured header and hero, feature cards with an amber dot, two
 * pricing plans, a small disclaimer and a footer with the company details.
 * The colours are the app's (app/lib/app/theme.dart, D108).
 */

:root {
  --teal: #1f4e5f;
  --teal-top: #2a6478;
  --teal-bottom: #163b48;
  --amber: #ffc145;
  --pale: #cfe3ea;
  --text: #1c2321;
  --muted: #5b6662;
  --background: #ffffff;
  --surface: #f4f5f2;
  --border: #e1e4df;
  --link: #1f4e5f;
  --ok: #1e7b47;
  --due: #a15c00;
  --unsafe: #b91c1c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6eae8;
    --muted: #a6b0ac;
    --background: #111614;
    --surface: #1a201e;
    --border: #2e3633;
    --link: #8cc3d6;
    --ok: #6ccb95;
    --due: #e3aa55;
    --unsafe: #f88a8a;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
}

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

img {
  max-width: 100%;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* Header and hero, on the app's teal */

.hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal-top), var(--teal-bottom));
}

.hero a {
  color: #ffffff;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.nav-links a {
  text-decoration: none;
  opacity: 0.9;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  opacity: 1;
}

.hero-body {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  padding-block: 40px 64px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
}

.hero .tagline {
  margin: 0 0 28px;
  font-size: 1.2rem;
  color: var(--pale);
}

/* A shorter hero for the detail pages. */
.hero.page .hero-body {
  grid-template-columns: 1fr;
  padding-block: 24px 48px;
}

.hero.page h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
}

.hero.page .tagline {
  margin-bottom: 0;
}

.hero-shot {
  width: 240px;
  border-radius: 28px;
  border: 6px solid #0e2630;
  box-shadow: 0 16px 36px rgb(0 0 0 / 0.3);
}

/* Placeholder until the store links exist: replace the href and the text. */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #1c2321 !important;
  background: #ffffff;
}

.store-button .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
}

.store-note {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--pale);
}

/* Sections */

section {
  padding-block: 48px;
}

section + section {
  border-top: 1px solid var(--border);
}

section h2 {
  margin: 0 0 20px;
  font-size: 1.6rem;
  line-height: 1.25;
}

section h3 {
  line-height: 1.3;
}

.lead {
  margin-top: -8px;
  font-size: 1.1rem;
  color: var(--muted);
}

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

.feature {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.feature h3::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--amber);
  vertical-align: middle;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

/* A feature card that links to a detail page. */
a.feature {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.feature:hover {
  border-color: var(--link);
}

.feature .more {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  color: var(--link);
}

/* Screenshots in a phone-shaped frame, with a caption. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  align-items: start;
}

.shot {
  margin: 0;
  text-align: center;
}

.shot img {
  display: block;
  width: 100%;
  max-width: 260px;
  margin: 0 auto 10px;
  border-radius: 22px;
  border: 5px solid #0e2630;
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.15);
}

.shot figcaption {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Text beside a screenshot on the detail pages. */
.split {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 40px;
  align-items: start;
}

.split.flip {
  grid-template-columns: 240px 1fr;
}

.split.flip .shot {
  order: -1;
}

.split h2 {
  margin-top: 0;
}

.checks {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 28px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
}

/* The app's status words, always with a symbol, never colour alone. */
.statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.statuses li {
  padding: 4px 12px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

.statuses .ok { color: var(--ok); }
.statuses .due { color: var(--due); }
.statuses .unsafe { color: var(--unsafe); }

.quote {
  margin: 16px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--surface);
}

.quote p {
  margin: 0 0 8px;
}

.quote cite {
  font-size: 0.9rem;
  font-style: normal;
  color: var(--muted);
}

.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.plan {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.plan.unlock {
  border: 2px solid var(--teal);
}

.plan h3 {
  margin: 0 0 4px;
}

.plan .price {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 700;
}

.plan ul {
  margin: 0;
  padding-left: 1.2em;
}

.small {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Details still to come from Streffdev Ltd, listed in docs/build-plan.md
   ("Website placeholders"). Visible on purpose so none is missed. */
.todo {
  padding: 0 4px;
  border: 1px dashed currentColor;
  border-radius: 4px;
  white-space: nowrap;
}

/* Footer */

footer {
  padding-block: 28px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

footer a {
  color: inherit;
}

/* The company details the law requires on the site, kept small. */
footer .legal {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .hero-body,
  .split,
  .split.flip {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-body {
    padding-block: 16px 48px;
  }

  .hero-shot {
    width: 180px;
    order: -1;
    justify-self: center;
  }

  .split .shot,
  .split.flip .shot {
    order: 0;
  }
}
