/*
Theme Name: Bloom Curriculum
Theme URI: https://bloomcurriculum.co.uk
Author: WW Web Design
Description: Bespoke hand-drawn / scrapbook theme for Bloom Curriculum — primary-school curriculum planning. Code-registered ACF blocks, no build step.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: bloom
*/

/* =========================================================================
   Local fonts — bundled in assets/fonts/ (self-hosted, no Google request).
   Handyman = display/marker; Patrick Hand SC = handwriting. Poppins (body)
   is still loaded from Google in inc/enqueue.php.
   ========================================================================= */
@font-face {
  font-family: "Handyman";
  src: url("assets/fonts/handyman-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Patrick Hand SC";
  src: url("assets/fonts/patrick-hand-sc.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================================
   Design tokens — the single source of truth for cross-block values.
   Sampled directly from the supplied design mockups.
   ========================================================================= */
:root {
  /* Brand palette */
  --bloom-forest: #00492c;  /* dark green — footer / contact / deep accents */
  --bloom-green:  #559b70;  /* medium green — WHY / Help sections, buttons   */
  --bloom-green-d:#3f7f59;  /* darker medium green for hovers / depth         */
  --bloom-sage:   #9dc0a0;  /* sage — hero & packs section background          */
  --bloom-mist:   #c1d0bd;  /* pale grey-green — header bar, soft panels       */
  --bloom-cream:  #eceada;  /* cream — banners, cards, reviewer section bg     */
  --bloom-paper:  #f3efe4;  /* lighter cream — page paper tone                 */
  --bloom-ink:    #1a1a1a;  /* near-black rough outline ink                    */

  /* Surfaces */
  --bloom-bg:        var(--bloom-paper);
  --bloom-card-bg:   #ffffff;

  /* Type — Handyman is the single site-wide typeface (display, hand and body
     all resolve to it); the trailing families are load-failure fallbacks only. */
  --bloom-font-marker: "Handyman", "Permanent Marker", "Comic Sans MS", cursive;
  --bloom-font-hand:   "Handyman", "Patrick Hand SC", "Comic Sans MS", cursive;
  --bloom-font-body:   "Handyman", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --bloom-content-max: 1180px;
  --bloom-header-height: 48px;

  /* Misc */
  --bloom-radius: 18px;
  --bloom-shadow: 6px 6px 0 rgba(0, 73, 44, 0.16);
}

/* =========================================================================
   Base / reset-lite
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--bloom-font-body);
  color: var(--bloom-forest);
  background: var(--bloom-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3, h4 { margin: 0 0 0.4em; line-height: 1.05; }

p { margin: 0 0 1em; }

.bloom-container {
  width: min(100% - 48px, var(--bloom-content-max));
  margin-inline: auto;
}

/* Marker / hand display utility classes used across blocks */
.bloom-marker { font-family: var(--bloom-font-marker); font-weight: 400; letter-spacing: .5px; }
.bloom-hand   { font-family: var(--bloom-font-hand); }

/* Visually-hidden (a11y) */
.bloom-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================================
   Generic content pages (page.php) — legal/policy pages (Refund, T&Cs).
   The homepage uses front-page.php, so these only style standalone pages.
   ========================================================================= */
.bloom-page { padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 8vw, 96px); }
.bloom-page__header,
.bloom-page__content {
  width: min(100% - 48px, 760px);
  margin-inline: auto;
}
.bloom-page__header { margin-bottom: 1.4rem; }
.bloom-page__header h1 {
  font-family: var(--bloom-font-marker);
  color: var(--bloom-forest);
  font-size: clamp(2rem, 5vw, 3rem);
}
.bloom-page__content { color: var(--bloom-forest); }
.bloom-page__content .bloom-page__lead {
  font-family: var(--bloom-font-marker);
  font-size: 1.3rem;
  color: var(--bloom-green-d);
  margin-bottom: .15rem;
}
.bloom-page__content .bloom-page__meta { color: var(--bloom-green-d); margin-bottom: 2rem; }
.bloom-page__content h2 {
  font-family: var(--bloom-font-marker);
  color: var(--bloom-forest);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  margin: 2.2rem 0 .6rem;
}
.bloom-page__content p  { margin: 0 0 1rem; line-height: 1.6; }
.bloom-page__content ul { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.bloom-page__content li { margin-bottom: .35rem; line-height: 1.55; }
.bloom-page__content a  { color: var(--bloom-green-d); text-decoration: underline; }
.bloom-page__content a:hover { color: var(--bloom-forest); }
