/* Lulworth & Winfrith Schools Community Action Group: site styles.
   Branding v4 (drafts/website-v1/branding-v4.html): white and pale yellow bands, yellow round buttons,
   sky blue for the name, small headings and our line on charts, slate for all other text. Figtree only. */

:root {
  --white: #FFFFFF;
  --pale: #FFF4CC;      /* bands */
  --sun: #FFC629;       /* buttons */
  --sky: #2B9BE0;      /* small headings, "crisis.", our chart line (big bold text only) */
  --burgundy: #9B2242; /* the group's name in the header (Katie, 22 Nov). On white only */
  --slate: #26313B;     /* all other text */
  --line: #ECE8E0;      /* thin dividers, chart gridlines */
  --flag: #FFE07A;      /* [placeholders] still to fill in */
  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 12px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--white); color: var(--slate); font: 400 18px/1.6 var(--font); }

.wrap { max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 1000px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

h1, h2, h3 { font-family: var(--font); font-weight: 700; letter-spacing: 0; color: var(--slate); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 8vw, 46px); line-height: 1.12; }
h2 { font-size: clamp(24px, 5.5vw, 30px); line-height: 1.2; margin-bottom: 14px; }
h3 { font-size: 20px; line-height: 1.3; color: var(--sky); }
p { margin: 0 0 14px; }
a { color: var(--slate); text-underline-offset: 3px; }
strong, b { font-weight: 700; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
.ph { background: var(--flag); padding: 0 3px; border-radius: 4px; }
.muted { font-size: 16px; }
.source { font-size: 15px; }

/* Buttons: one style, yellow, fully round, flat */
.btn { display: inline-block; background: var(--sun); color: var(--slate); font: 700 18px/1.1 var(--font);
  padding: 17px 26px; border-radius: 999px; border: 0; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.04); }
/* Second, smaller line inside a button, e.g. the survey deadline */
.btn-sub { display: block; font-size: 13px; font-weight: 400; line-height: 1.2; margin-top: 3px; text-align: center; }
.btn { text-align: center; }

/* Header: stays at the top as you scroll. The name in burgundy on the left, the survey button on the right */
.site-head { position: sticky; top: 0; z-index: 10; background: var(--white); padding: 10px 0; border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mark { display: block; font: 700 22px/1.2 var(--font); color: var(--burgundy); text-decoration: none; }
.site-head .mark { font-size: 16px; min-width: 0; }
.site-head .mark br { display: none; } /* phones: let the name wrap to fit beside the button */
.btn.head-survey { flex: none; white-space: nowrap; font-size: 15px; padding: 12px 16px; }

/* Back-to-top arrow: floats bottom right once you've scrolled down */
.to-top-float { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 15;
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--sun); color: var(--slate);
  display: grid; place-items: center; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s; }
.to-top-float.show { opacity: 1; visibility: visible; transform: none; }
.to-top-float svg { width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .to-top-float { transition: none; } }

/* Sections: white and pale yellow bands */
section { padding-block: 48px; }
.band { background: var(--pale); }
.hero { padding-block: 28px 40px; }
.who-line { font-size: 17px; margin: 0 0 22px; max-width: 70ch; }
.hero h1 .then { display: block; font-weight: 400; margin-top: 8px; }
.hero h1 .hl { color: var(--sky); }
.sec-head h2 { color: var(--sky); } /* section headings on the left: all light blue (Katie, 22 Nov) */
/* Short yellow accent line above the headline */
.hero h1 .accent { display: block; width: 72px; height: 6px; border-radius: 999px; background: var(--sun); margin-bottom: 20px; }
/* Note beside the headline (below it on phones): the meeting and survey deadline (Pete, 22 Nov) */
.hero-note { background: var(--white); border-radius: 14px; padding: 16px 18px; margin-top: 24px; font-size: 17px; line-height: 1.6; } /* same size and spacing as the intro line */
.hero-note p { margin: 0 0 8px; }
.hero-note p:last-child { margin-bottom: 0; }

.sec-body p, .sec-body li { max-width: 68ch; }
.sec-body > :last-child { margin-bottom: 0; }
.sec-body h3 { margin-bottom: 10px; }
.changes { margin: 0 0 14px; padding-left: 22px; }
.changes li { margin-bottom: 6px; padding-left: 4px; }
.indent .changes { padding-left: 52px; } /* bullets set further in than the line above them (Pete, 22 Nov) */
.ph-note { font-size: 16px; }

/* Help section: three numbered steps, light blue numbers "1." "2." "3." (Pete, 22 Nov) */
.steps { list-style: none; counter-reset: step; margin: 30px 0 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 32px; }
.steps > li:last-child { margin-bottom: 0; }
.steps .step-title { font: 700 20px/1.3 var(--font); color: var(--slate); margin: 0 0 12px; }
.steps > li > :last-child { margin-bottom: 0; }
/* Each step opens with its button(s), with the number beside them */
.steps .step-head { display: flex; align-items: center; margin: 0 0 12px -52px; }
.steps .step-head::before { content: counter(step) "."; flex: none; width: 52px; color: var(--sky); font: 700 36px/1 var(--font); } /* big enough to hold its own beside the buttons */
.steps .step-head-top { align-items: flex-start; }
.steps .step-head-top::before { padding-top: 4px; } /* level with the first row of share buttons */
/* All five buttons in the steps: one size, one font size, one width (Pete, 22 Nov) */
.steps .btn, .steps .btn.btn-small { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 224px; min-height: 52px; padding: 12px 16px; font-size: 17px; line-height: 1.15; }

/* Share buttons: smaller yellow pills with slate line icons */
.share-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.btn-small { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; padding: 12px 18px; }
.btn-small svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Closing line above Joy's message: big, light blue, full width, on white only */
.closing { font: 700 clamp(28px, 7vw, 44px)/1.2 var(--font); color: var(--sky); margin: 0 0 40px; }

/* Joy's message */
.letter { background: var(--pale); border-radius: 16px; padding: 26px 24px; }
.band .letter { background: var(--white); }
.letter .sig { font: 700 22px/1.2 var(--font); margin: 18px 0 0; }

/* Joy's message as a quote: full-width box, big blue quote marks */
.letter.quote { position: relative; }
.q-mark { display: block; font: 700 96px/1 var(--font); color: var(--sky); height: 52px; overflow: visible; }
.q-open { margin: 4px 0 8px; }
.q-close { text-align: right; margin: -46px 0 4px; } /* pulled up beside the last line */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Joy's draft marker and sign-off line */
.status { display: inline-block; background: var(--flag); font: 700 14px/1 var(--font); padding: 8px 12px; border-radius: 999px; margin-bottom: 14px; }
.letter .sig-role { font-size: 16px; margin: 4px 0 0; }
.letter.quote .sig { margin-top: 44px; text-align: right; } /* a line's gap after the quote, name on the right */
.letter.quote .sig-role { text-align: right; }

/* Charts */
.charts { display: grid; gap: 40px; margin: 36px 0 8px; }
.chart { margin: 0; }
.chart h3 { margin-bottom: 4px; }
.chart svg { display: block; width: 100%; height: auto; margin: 10px 0 6px; }
.chart svg text { font-family: var(--font); }
/* Chart key: plain text under each chart, above the source, so it stays readable on phones */
.key { list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.key li { display: flex; align-items: center; gap: 8px; }
.key-stack { flex-direction: column; } /* one item per line */
.source .key { margin: 10px 0 0; } /* key under the source line */
.key-stack li { align-items: baseline; }
.key-stack .sw { position: relative; top: -4px; }
.sw { display: inline-block; flex: none; width: 22px; }
.sw-sky { height: 4px; border-radius: 2px; background: var(--sky); }
.sw-slate { height: 3px; border-radius: 2px; background: var(--slate); }
.sw-dash { border-top: 3px dashed var(--sky); }
.sw-shade { width: 16px; height: 16px; border-radius: 3px; background: var(--pale); border: 1px solid var(--line); }
@media (max-width: 600px) {
  .chart text.odd { display: none; }
  /* Phones shrink the charts, so chart text is set larger here (Katie, 22 Nov: easier to read) */
  .chart svg text { font-size: 17px; }
  .chart svg text.pct-note { font-size: 13px; }
}

/* Survey page */
.survey-intro p { max-width: 68ch; }
.survey-frame { margin-top: 8px; }
.survey-frame iframe { display: block; width: 100%; border: 0; }

/* Privacy page */
.prose { max-width: 72ch; }
.prose h2 { font-size: 22px; margin-top: 30px; margin-bottom: 8px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding-block: 36px 40px; font-size: 16px; }
footer .grid { display: grid; gap: 14px; }
footer p { margin: 0; }
footer .mark { font-size: 20px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  background: var(--slate); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 15px; max-width: calc(100% - 32px); }

/* Desktop: wide header and data, prose in a readable column beside a heading rail */
@media (min-width: 1000px) {
  section { padding-block: 64px; }
  .mark { font-size: 24px; }
  .site-head { padding: 16px 0; }
  .site-head .mark { font-size: 24px; }
  .site-head .mark br { display: inline; }
  .btn.head-survey { font-size: 20px; padding: 18px 30px; }
  .hero { padding-block: 48px 56px; }
  .hero h1 { font-size: 54px; }
  .hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; column-gap: 56px; align-items: end; }
  .hero-note { margin-top: 0; }
  .sec { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 64px; }
  .sec-head { grid-column: 1; }
  .sec-body { grid-column: 2; }
  .sec > .full { grid-column: 1 / -1; }
  .closing { font-size: 52px; margin-bottom: 56px; }
  .letter.quote { padding: 40px 56px; font-size: 20px; }
  .q-mark { font-size: 128px; height: 68px; }
  .q-close { margin-top: -52px; }
  .charts.full { grid-template-columns: 1fr 1fr; gap: 48px 56px; }
  footer .grid { grid-template-columns: 1.3fr 1fr 1fr; align-items: start; column-gap: 40px; }
  footer .grid > .mark { grid-row: span 2; }
}
