/* ============================================================
   Matheteuo Ministries: "Margin Notes" ink layer (site-wide)
   Approved by Yvad 2026-10-24 (boards: https://claude.ai/artifact/SZWxwoeKYiqE4NEsg4Fjby; picks: brain/decisions.md).
   Paper texture (T3 papyrus fibres), pen-asterisk eyebrows, hand-drawn circles on key words, NKJV verse notes,
   inked duotone icons, the About chapter thread, the footer wordmark. No gradients anywhere.
   Loaded AFTER each page's own <style>. Markup is injected by /assets/js/mm-motion.js; motion lives there too.
   Everything here is the resting (finished) state: with no JS motion the page is complete.
   ============================================================ */
:root { --mm-ink: #0C243C; --mm-coral: #E8502A; --mm-peach: #F6C9B6; --mm-cream: #FEF8F6; --mm-note: 'Caveat', 'Segoe Print', cursive; }
html { scroll-behavior: auto !important; }   /* ScrollTrigger measures wrong under smooth scrolling */

/* (vine leaves, grapes and the stem are line art in the icon palette; no gradients) */
/* ---------- Paper: T3 papyrus fibres on the page itself and on every flat section (Yvad 2026-10-24: same paper everywhere).
   Light = multiply map (white = no change, so it suits every cream tone). Navy = the same fibres as a screen map.
   Classes are set by mm-motion.js after checking each element's real background: transparent sections (the hero)
   show the body's paper, and photos are never covered. ---------- */
.mm-paper { background-image: url("../images/mm/paper-fibres.jpg") !important; background-size: 512px 512px !important; background-blend-mode: multiply; }
.mm-paper-dark { background-image: url("../images/mm/paper-fibres-dark.jpg") !important; background-size: 512px 512px !important; background-blend-mode: screen; }

/* ---------- No gradients (Yvad 2026-10-24) ---------- */
.pw-wrap { -webkit-mask-image: none !important; mask-image: none !important; overflow: hidden; padding: 28px 0; margin: -28px 0; }  /* the fade mask also clipped the strip */
.sermon-card-thumb::after { background: rgba(6, 15, 26, 0.22) !important; }
.hero-visual { background: var(--mm-ink) !important; }
.pastor-photo, .pastor-photo-b { background: var(--bg-paper) !important; }
.pastor-photo-a { background: var(--mm-ink) !important; }

/* ---------- Eyebrow: pen asterisk before the label ---------- */
.mm-eb { display: inline-flex; align-items: center; gap: 8px; }
.label.center.mm-eb { display: flex; }
.story-eyebrow.mm-eb { display: flex; }
.eyebrow.mm-eb { display: flex; }
.mm-mark { width: 16px; height: 16px; flex-shrink: 0; overflow: visible; }
.mm-mark path { fill: none; stroke: var(--mm-coral); stroke-width: 2.1; stroke-linecap: round; }

/* ---------- Hand-drawn circle around a key word (one per section). Drawn as an overlay on the heading so the
   heading's own word-mask reveal never clips it. ---------- */
.mm-key-host { position: relative; }
.mm-key { white-space: nowrap; }   /* a circled phrase moves to the next line as one piece, never splits */
.mm-circ { position: absolute; overflow: visible; pointer-events: none; z-index: 0; }
.mm-circ path { fill: none; stroke: var(--mm-coral); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ---------- Verse notes: short NKJV quote + reference, coral handwriting, pen arrow ---------- */
/* Two copies of each note: --float (beside the heading, 1024px+) and --inline (in the flow, under 1024px).
   The tilt lives on .tilt so GSAP can move .mm-note without fighting a CSS transform. */
.mm-note { position: absolute; z-index: 3; width: 290px; font-family: var(--mm-note); font-weight: 600;
  font-size: 24px; line-height: 1.05; color: var(--mm-coral); pointer-events: none; }
.mm-note .tilt { position: relative; display: grid; gap: 4px; transform: rotate(-5deg); }
.mm-note .ref { font-size: 19px; opacity: 0.8; }
.mm-note .mm-arrow { position: absolute; left: -50px; top: 30px; width: 46px; height: 32px; overflow: visible; }
.mm-arrow path { fill: none; stroke: var(--mm-coral); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mm-note--inline { position: relative; display: none; width: auto; max-width: 290px; margin: 12px 0 16px; }
.mm-note--inline .tilt { transform: rotate(-2deg); }
.mm-note--inline .mm-arrow { display: none; }
@media (max-width: 1023px) { .mm-note--float { display: none; } .mm-note--inline { display: block; } }

/* ---------- Inked duotone icons ---------- */
.mm-ico { display: block; overflow: visible; }
.mm-ico .ico-blob { fill: var(--mm-peach); }
.mm-ico .ico-line, .mm-ico .ico-line * { fill: none; stroke: var(--mm-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.svc-acc-icon.mm-ico-host { width: 46px; height: 46px; background: none !important; border-radius: 0; }
.svc-acc-icon.mm-ico-host .mm-ico { width: 44px; height: 44px; }
.mm-val-ico .mm-ico { width: 54px; height: 54px; margin-bottom: 16px; }
/* Inner-page icon slots: the duotone icon replaces the old coral circle */
.category-icon.mm-ico-host, .svc-icon.mm-ico-host, .visit-item-icon.mm-ico-host { background: none !important; border: 0 !important; border-radius: 0 !important; }
.category-icon.mm-ico-host .mm-ico { width: 46px; height: 46px; }
.svc-icon.mm-ico-host { width: 52px; height: 52px; }
.svc-icon.mm-ico-host .mm-ico { width: 52px; height: 52px; }
.visit-item-icon.mm-ico-host .mm-ico { width: 42px; height: 42px; }


/* ---------- About: chapter icons on a grapevine (desktop), inline icons (phone) ---------- */
.story-block { position: relative; }
.mm-node { position: absolute; left: -104px; margin-top: -16px; width: 54px; height: 54px; z-index: 2; background: var(--bg, #FEF8F6); border-radius: 50%; box-shadow: 0 0 0 8px var(--bg, #FEF8F6); }
.mm-node .mm-ico { width: 54px; height: 54px; }
.mm-vine { position: absolute; left: -136px; width: 120px; overflow: visible; pointer-events: none; }
.mm-vine .v-stem { fill: none; stroke: var(--mm-ink); stroke-width: 2; stroke-linecap: round; opacity: 0.7; }
.mm-vine .v-petiole, .mm-vine .v-tendril { fill: none; stroke: var(--mm-ink); stroke-width: 1.3; stroke-linecap: round; opacity: 0.6; }
.mm-vine .v-leaf-fill { fill: var(--mm-peach); stroke: var(--mm-ink); stroke-width: 0.75; stroke-linejoin: round; }
.mm-vine .v-vein { fill: none; stroke: var(--mm-ink); stroke-width: 0.55; stroke-linecap: round; opacity: 0.55; }
.mm-vine .v-grapes circle { fill: #EFA48B; stroke: var(--mm-ink); stroke-width: 0.8; }
@media (max-width: 1023px) {
  .mm-vine { display: none; }
  .mm-node { position: relative; left: auto; top: auto !important; width: 46px; height: 46px; margin: 0 0 12px; background: none; box-shadow: none; }
  .mm-node .mm-ico { width: 46px; height: 46px; }
}

/* ---------- Pull quote: hand-drawn bracket instead of the flat bar ---------- */
.mm-pq { position: relative; border-left: 0 !important; background: none !important; padding-left: 46px !important; }
.mm-bracket { position: absolute; left: 8px; top: 6px; width: 22px; height: calc(100% - 12px); overflow: visible; }
.mm-bracket path { fill: none; stroke: var(--mm-coral); stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ---------- Footer wordmark: inline SVG so it can ink itself in. Resting look = today's 6% fill. ---------- */
.footer-wordmark svg { display: block; width: min(90%, 1200px); height: auto; margin: 0 auto; opacity: 0.06; overflow: visible; }
.footer-wordmark svg path, .footer-wordmark svg polygon { fill: #ECF0F5; stroke: #ECF0F5; stroke-width: 0; }

/* ---------- Reduced motion also stills the site's own CSS animations (verifier 2026-10-24) ---------- */
@media (prefers-reduced-motion: reduce) {
  .hl-track, .pw-track, .marquee-track, .pulse-ring-1, .pulse-ring-2, .pulse-ring-3 { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-eyebrow, .hl-top, .hl-slot, .hl-bottom, .hero-subtext, .hero-ctas, .hero-visual { animation: none !important; opacity: 1 !important; }   /* the hero's one-time fade-in */
  .voices-dot-fill { transition: none !important; }
}
/* One texture only: the papyrus. The site's older 8% SVG-noise overlay on .section is switched off. */
.section::before { background-image: none !important; }
/* Hero media: the square frame sized itself off the window height and overflowed sideways at ~901-904px. */
/* Width from the room the headline needs: it is about 3.8x its 9.5vw font size wide, so the frame may take what is left
   (64vw - 128px covers the page margin, the grid gap and ~60px of air). Still a square; still 780px at 1440x900. */
@media (min-width: 901px) { .hero-visual { height: auto; width: min(calc(100svh - 120px), calc(64vw - 128px)); } }

/* Nav: the desktop row needs ~1000px (it crowded and wrapped at 901-959). Use the phone menu up to 1023px on every page. */
@media (min-width: 901px) and (max-width: 1023px) {
  .nav-links, .nav .nav-cta { display: none !important; }
  .hamburger { display: flex; }
  .nav-drawer { display: flex; }
}
/* The service icons are no longer a coloured circle: no background transition when the layer swaps them in. */
.svc-acc-icon.mm-ico-host { transition: none !important; }
