/* sph-links — Mulberry & Stone. Calm front door for SEND parents.
   Boldness spent in ONE place: the filled-plum assistant action. Everything
   else is quiet warm stone. Brand tokens mirror send-parents-help. */

/* ── self-hosted brand fonts ── */
@font-face { font-family: "Petrona"; src: url("/fonts/petrona-400.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Petrona"; src: url("/fonts/petrona-400i.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/fonts/manrope-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ── tokens ── */
:root {
  --bg: #f2ede6;
  --surface: #fbf7f0;
  --surface-2: #e9e2d8;
  --text: #1c1a18;
  --muted: #534840;
  --border: #c4baa9;
  --primary: #6e2840;
  --primary-2: #54183a;
  --primary-text: #6e2840;
  --soft: #f8dae3;
  --on-soft: #54183a;
  --green: #0d8a6a;        /* assistant "live" dot — readable green */
  --ring: #6e2840;
  --shadow: 110 40 64;     /* mulberry, for rgb(/a) shadows */
  --radius: 16px;
  --maxw: 600px;
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root.dark {
  --bg: #1c1b1e;
  --surface: #252428;
  --surface-2: #2e2d31;
  --text: #e5e0e2;
  --muted: #c8c3c5;
  --border: #38373b;
  --primary: #7a2e48;
  --primary-2: #6e2840;
  --primary-text: #ecbed0;
  --soft: #56223a;
  --on-soft: #f8dae3;
  --green: #1fb98c;
  --ring: #ecbed0;
  --shadow: 0 0 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(125% 55% at 50% -8%, color-mix(in oklab, var(--primary) 11%, var(--bg)), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
:where(a, button, input):focus-visible { outline: 2.5px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

.page { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.1rem, 4vw, 1.8rem) 1.15rem 3.5rem; position: relative; }

/* ── theme toggle ── */
.theme-toggle {
  position: absolute; top: clamp(1.1rem, 4vw, 1.8rem); right: 1.15rem;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
  color: var(--primary-text); cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.theme-toggle:hover { transform: translateY(-1px); background: var(--surface-2); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: none; } .dark .i-sun { display: none; } .dark .i-moon { display: inline; }

/* ── profile header (official SPH wordmark; carries the name → no text title) ── */
.profile { text-align: center; }
/* Transparent SPH wordmark; plum on light, pink on dark (crossfade like the site). */
.brand { position: relative; display: inline-block; width: min(42%, 150px); margin: 0; line-height: 0; }
.logo { width: 100%; height: auto; display: block; }
.logo-pink { position: absolute; inset: 0; }
.logo-plum { opacity: 1; }
.logo-pink { opacity: 0; }
.dark .logo-plum { opacity: 0; }
.dark .logo-pink { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .logo { transition: opacity .25s ease; } }
.intro { color: var(--muted); margin: 0.55rem auto 0; max-width: 38ch; font-size: 1rem; }

/* ── socials ── */
.socials { display: flex; justify-content: center; gap: 0.6rem; margin-top: 0.85rem; }
.social {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
  color: var(--primary-text); transition: transform .15s ease, background .15s ease, color .15s ease;
}
.social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { transform: translateY(-2px); background: var(--soft); color: var(--on-soft); }

/* ── SIGNATURE: assistant action ── */
.assistant {
  display: flex; align-items: center; gap: 0.85rem; margin: 1.5rem 0 0.4rem;
  padding: 1.05rem 1.15rem; text-decoration: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff; box-shadow: 0 10px 30px rgb(var(--shadow) / .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.dark .assistant { box-shadow: 0 10px 30px rgb(0 0 0 / .5), inset 0 0 0 1px rgb(255 255 255 / .06); }
.assistant:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgb(var(--shadow) / .36); }
.assistant-dot {
  flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgb(255 255 255 / .14); animation: pulse 2.4s ease-in-out infinite;
}
.assistant-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.assistant-label { font-weight: 600; font-size: 1.06rem; }
.assistant-sub { font-size: 0.83rem; color: rgb(255 255 255 / .8); }
.assistant-arrow { flex: none; font-size: 1.2rem; transition: transform .18s ease; }
.assistant:hover .assistant-arrow { transform: translateX(3px); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ── CTA pills (quiet; uniform 1px border, NO colour side stripe) ── */
.ctas ul { list-style: none; padding: 0; margin: 0.9rem 0 0; display: grid; gap: 0.65rem; }
.cta {
  display: block; text-align: center; padding: 0.95rem 1.1rem; min-height: 44px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--primary-text); font-weight: 600; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cta:hover { transform: translateY(-2px); background: var(--surface-2); box-shadow: 0 8px 22px rgb(var(--shadow) / .1); }

/* ── posts ── */
.grid-wrap { margin-top: 2.3rem; }
.grid-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.grid-head h2 { font-family: Petrona, Georgia, serif; font-weight: 600; font-size: 1.25rem; margin: 0; flex: none; }
.search { flex: 1 1 auto; }
.search input {
  width: 100%; padding: 0.6rem 0.85rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.search input::placeholder { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.post {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.post:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgb(var(--shadow) / .14); }
.post figure { margin: 0; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.post img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post figcaption {
  padding: 0.55rem 0.6rem 0.65rem; font-size: 0.78rem; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-empty { text-align: center; color: var(--muted); margin-top: 1rem; }

/* ── footer ── */
.foot { text-align: center; margin-top: 2.8rem; font-size: 0.85rem; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--primary-text); }

/* ── motion: a calm settle on load (only when motion is welcome) ── */
@media (prefers-reduced-motion: no-preference) {
  .profile, .assistant, .ctas, .grid-wrap { animation: rise .6s cubic-bezier(.22,.61,.36,1) both; }
  .assistant { animation-delay: .06s; }
  .ctas { animation-delay: .12s; }
  .grid-wrap { animation-delay: .18s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
