/* The home page: one big card per subject, two by two on an iPad, stacked on a phone. */

@font-face { font-family: 'Andika'; src: url('../fonts/andika.woff2') format('woff2'); font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --ink: #1d2433;
  --muted: #5b6577;
  --line: #e4dfd4;
  --accent: #2f5fb3;
  --shadow: 0 1px 2px rgb(29 36 51 / 0.08), 0 8px 24px rgb(29 36 51 / 0.1);
  --ui: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --book: 'Andika', var(--ui);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.4 var(--ui);
  -webkit-tap-highlight-color: transparent;
}

.home-head {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 24px 8px;
}
.logo { width: 52px; height: 52px; flex: none; }
.logo rect { fill: var(--accent); }
.logo path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.home-head h1 { margin: 0; font: 400 40px/1.1 var(--book); }
.home-head p { margin: 4px 0 0; color: var(--muted); }

.sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px max(32px, env(safe-area-inset-bottom));
}

.section {
  --tint: var(--accent);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  min-height: 250px;
  padding: 24px;
  border-radius: 28px;
  border-top: 10px solid var(--tint);
  background: #fff;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}
.writing { --tint: #2f5fb3; }
.reading { --tint: #1f9d55; }
.maths { --tint: #e07a1f; }
.science { --tint: #7b4fc9; }

.section-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: color-mix(in srgb, var(--tint) 14%, #fff);
  font-size: 40px;
  line-height: 1;
}
.section-name { font: 400 40px/1.1 var(--book); }
.section-note { color: var(--muted); }
.section-go {
  justify-self: start;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--tint);
  color: #fff;
  font-weight: 700;
}

a.section:active { transform: scale(0.97); }
@media (hover: hover) {
  a.section:hover { box-shadow: 0 2px 4px rgb(29 36 51 / 0.1), 0 14px 32px rgb(29 36 51 / 0.16); }
}

/* Not built yet: shown so the family knows it is on the way. */
.soon { border-top-color: color-mix(in srgb, var(--tint) 35%, #fff); box-shadow: none; background: rgb(255 255 255 / 0.6); }
.soon .section-go { background: transparent; color: var(--muted); border: 2px dashed var(--line); }
