/* =========================================================
   samay.co.uk - site.css
   Shared look for the home page and the 11+ parent survey.
   (The game has its own look in romans/css/style.css.)
   ========================================================= */

:root {
  --bg: #f6f3ee;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #5b6670;
  --line: #ddd6cb;
  --accent: #2d5bd7;
  --accent-ink: #ffffff;
  --accent-soft: #e6edfc;
  --ok: #1e7a3c;
  --error: #b42318;
  --font: "Nunito", "Trebuchet MS", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --card: #1f242a;
    --ink: #eef1f4;
    --muted: #a6b0ba;
    --line: #353c44;
    --accent: #7ea2ff;
    --accent-ink: #0d1424;
    --accent-soft: #232f4d;
    --ok: #6fd18f;
    --error: #ff8a80;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
[hidden] { display: none !important; }

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); line-height: 1.15; margin: 0.4em 0 0.2em; }
h2 { font-size: 1.25rem; margin: 1.6em 0 0.5em; }
p { margin: 0.5em 0; }
.lead { font-size: 1.1rem; color: var(--muted); }
.small { font-size: 0.9rem; color: var(--muted); }
a { color: var(--accent); }

/* ---------- Cards (home page) ---------- */
.cards { display: grid; gap: 14px; margin-top: 16px; }
.card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
}
.card:hover { border-color: var(--accent); }
.card:active { transform: scale(0.99); }
.card .emoji { font-size: 2.6rem; line-height: 1; flex: none; }
.card h3 { margin: 0; font-size: 1.15rem; }
.card p { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.card.soon { opacity: 0.6; pointer-events: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 24px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.wide { width: 100%; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, .opt:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Survey ---------- */
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }

.step h2 { margin-top: 0.8em; }
.opts { display: grid; gap: 10px; margin: 12px 0; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.opt input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

label.field { display: block; margin: 14px 0 4px; font-weight: 800; }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 12px;
}
textarea { min-height: 110px; resize: vertical; }

.nav { display: flex; gap: 10px; margin-top: 20px; }
.nav .btn { flex: 1; }
.error { color: var(--error); font-weight: 700; }
.thanks { text-align: center; }
.thanks .emoji { font-size: 3.5rem; }

/* Hidden from people, visible to spam bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

footer { margin-top: 40px; font-size: 0.9rem; color: var(--muted); }
