/* plainandfree.com styles: the Plain Baby app's theme (colors, Nunito, radii, spacing) for the web. */

@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/Nunito_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/Nunito_700Bold.ttf") format("truetype"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/Nunito_800ExtraBold.ttf") format("truetype"); }

/* Day: the app's light theme (app/src/ui/theme.ts). */
:root {
  --bg: #F6F3EE;
  --surface: #FFFFFF;
  --surface-alt: #EEE9E1;
  --text: #26242E;
  --text-muted: #6C6775;
  --border: #E4DED4;
  --shadow: rgba(91, 79, 58, 0.08);

  --sleep: #5458C2;   --sleep-soft: #E6E6F8;   --sleep-on-soft: #383B95;
  --feed: #D46E48;    --feed-soft: #FAE4D9;    --feed-on-soft: #8F4122;
  --diaper: #3A937E;  --diaper-soft: #DCEFE9;  --diaper-on-soft: #1F6555;
  --sky: #22729F;     --sky-soft: #DDEBF3;     --sky-on-soft: #1A5577;

  --space-xs: 4px; --space-sm: 8px; --space-md: 12px; --space-lg: 16px;
  --space-xl: 24px; --space-xxl: 32px; --space-xxxl: 48px;
  --radius-sm: 12px; --radius-md: 18px; --radius-lg: 26px; --radius-pill: 999px;
  --target: 48px;
}

/* Night: the app's dark theme. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121117;
    --surface: #1C1B23;
    --surface-alt: #26252F;
    --text: #E4DFD6;
    --text-muted: #9A95A3;
    --border: #2D2C37;
    --shadow: rgba(0, 0, 0, 0.3);

    --sleep: #4B4FA6;   --sleep-soft: #23243F;   --sleep-on-soft: #B4B7F2;
    --feed: #A85A3D;    --feed-soft: #33241E;    --feed-on-soft: #F0B79F;
    --diaper: #2F7566;  --diaper-soft: #1A2D29;  --diaper-on-soft: #9FD8C8;
    --sky: #22617F;     --sky-soft: #172833;     --sky-on-soft: #A3CDE6;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

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

.page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 960px;
  margin: 0 auto;
  padding: max(var(--space-lg), env(safe-area-inset-top)) max(var(--space-lg), env(safe-area-inset-right)) max(var(--space-lg), env(safe-area-inset-bottom)) max(var(--space-lg), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

main { display: flex; flex-direction: column; gap: var(--space-xl); flex: 1; justify-content: center; }

/* Wordmark: three dots in the app's sleep, feed and diaper colors. */
.top { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--target); }
.mark { display: inline-flex; gap: 3px; }
.d { width: 10px; height: 10px; border-radius: 50%; display: block; }
.d.sleep, .bar.sleep { background: var(--sleep); }
.d.feed, .bar.feed { background: var(--feed); }
.d.diaper, .bar.diaper { background: var(--diaper); }
.brand { font-weight: 800; font-size: 18px; letter-spacing: -0.2px; }

h1 { font-weight: 800; font-size: 38px; line-height: 42px; letter-spacing: -0.8px; }
.lead { margin-top: var(--space-md); color: var(--text-muted); font-size: 18px; line-height: 25px; max-width: 30ch; }

/* Promises: four tiles, two by two on a phone, one row on a wide screen. */
.promises { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-md) var(--space-lg);
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 2px 8px var(--shadow);
}
.tile strong { font-weight: 800; font-size: 18px; line-height: 24px; margin-top: var(--space-sm); }
.tile .sub { color: var(--text-muted); font-size: 14px; line-height: 19px; font-weight: 700; }

.chip { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; }
.chip svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip.sleep { background: var(--sleep-soft); color: var(--sleep-on-soft); }
.chip.feed { background: var(--feed-soft); color: var(--feed-on-soft); }
.chip.diaper { background: var(--diaper-soft); color: var(--diaper-on-soft); }
.chip.sky { background: var(--sky-soft); color: var(--sky-on-soft); }

/* Apps. */
h2 { font-size: 14px; line-height: 20px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--space-sm); }
.app {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md) var(--space-lg);
  align-items: center;
  box-shadow: 0 2px 8px var(--shadow);
}
.app-icon {
  width: 64px; height: 64px; border-radius: var(--radius-md);
  background: var(--surface-alt);
  display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 12px;
}
.bar { display: block; height: 8px; border-radius: var(--radius-pill); }
.bar.sleep { width: 100%; }
.bar.feed { width: 60%; margin-left: 25%; }
.bar.diaper { width: 35%; margin-left: 50%; }
.app h3 { font-weight: 800; font-size: 22px; line-height: 28px; }
.app p { color: var(--text-muted); }
.badge {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--sleep-soft);
  color: var(--sleep-on-soft);
  font-weight: 800; font-size: 14px; line-height: 20px;
  padding: 6px var(--space-md);
  border-radius: var(--radius-pill);
}

.foot { color: var(--text-muted); font-size: 14px; line-height: 20px; font-weight: 700; text-align: center; }

/* Wide screens: the promises in one row, the app card beside its badge. */
@media (min-width: 720px) {
  .page { padding: var(--space-xxl); gap: var(--space-xxl); }
  main { gap: var(--space-xxl); }
  h1 { font-size: 64px; line-height: 68px; letter-spacing: -1.5px; }
  .lead { font-size: 21px; line-height: 30px; max-width: none; }
  .promises { grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
  .tile { padding: var(--space-lg) var(--space-lg) var(--space-xl); }
  .app { grid-template-columns: auto 1fr auto; }
  .badge { grid-column: auto; justify-self: end; }
}

/* Short phones: tighten so the whole page still fits without scrolling. */
@media (max-width: 719px) and (max-height: 760px) {
  .page, main { gap: var(--space-lg); }
  h1 { font-size: 32px; line-height: 36px; }
  .lead { margin-top: var(--space-sm); font-size: 17px; line-height: 23px; }
  .tile { padding: var(--space-sm) var(--space-md) var(--space-md); }
  .chip { width: 34px; height: 34px; }
  .chip svg { width: 20px; height: 20px; }
  .tile strong { margin-top: var(--space-xs); }
}

/* Very short phones: the headline and tiles say it; drop the lead line. */
@media (max-width: 719px) and (max-height: 700px) {
  .lead { display: none; }
  .top { min-height: 40px; }
  .app { padding: var(--space-md); gap: var(--space-sm) var(--space-md); }
  .app-icon { width: 52px; height: 52px; padding: 0 10px; gap: 4px; }
  .bar { height: 7px; }
}
