/* SOOL motion kit v1  (sool-motion.css)
   Progressive enhancement: everything below that HIDES or OFFSETS something only applies under html.sm-js,
   which sool-motion.js adds (and does NOT add under prefers-reduced-motion or ?motion=off).
   Without the kit, or without JS, every element sits in its FINAL static state.
   Loads no fonts and sets no typography on your titles/body: it only animates what you already styled. */

:root{
  --sm-maroon:#5a1f27; --sm-oxblood:#3f1219; --sm-olive:#5d5f32; --sm-mustard:#c4952c;
  --sm-cream:#f3ead8;  --sm-blush:#ead7cb;   --sm-brown:#3a2418; --sm-mauve:#b58a93;
  --sm-lilac:#b9a9c9;  --sm-powder:#aebfcf;  --sm-navy:#1d2a4a;   --sm-walnut:#4a3224;
  --sm-ease:cubic-bezier(.22,.7,.2,1);
  --sm-settle:cubic-bezier(.2,.9,.25,1.12);
  /* patch outlines (also as files in patches/) */
  --sm-shape-torn-a:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 220' preserveAspectRatio='none'%3E%3Cpath d='M388.8 108.9L384.7 141.8L383.1 150.9L382.1 157.3L381.9 162.7L377.0 165.8L374.4 169.0L370.9 171.4L372.5 175.3L372.5 178.5L368.4 179.8L370.8 183.7L372.0 187.1L370.7 189.3L369.1 191.3L364.9 191.9L360.7 192.4L360.0 194.7L356.2 195.3L353.5 196.4L350.9 197.7L347.0 198.2L345.5 200.1L343.1 201.5L342.1 204.0L338.5 204.8L335.1 206.0L330.5 206.5L326.5 207.5L321.2 207.7L314.9 207.4L311.3 209.9L306.3 211.8L299.5 212.9L290.9 213.5L279.5 212.9L265.1 212.4L242.7 212.5L151.3 212.2L127.3 214.5L112.6 215.1L99.6 217.1L90.2 217.1L79.8 219.0L71.0 220.0L66.6 217.7L61.3 216.7L53.4 218.1L48.4 217.3L41.6 218.0L38.5 216.3L37.1 213.6L32.7 212.9L28.1 212.4L27.0 209.9L26.6 207.1L24.7 205.2L19.4 205.2L16.4 203.8L17.5 200.4L17.3 197.7L17.6 194.7L17.8 191.7L13.3 190.8L13.6 187.8L11.2 185.7L10.0 183.0L10.4 179.4L7.2 177.0L8.5 172.7L6.1 169.2L7.4 164.0L6.4 158.7L6.9 151.7L6.9 142.2L2.5 108.9L0.5 74.5L2.2 65.0L0.0 57.4L2.7 52.4L3.7 47.8L1.9 42.8L2.3 39.0L6.3 36.8L4.4 32.6L8.3 30.9L11.5 29.1L11.6 26.1L15.2 24.8L18.9 23.7L23.9 23.4L28.5 22.9L30.2 21.1L34.6 20.8L37.1 19.5L41.5 19.2L45.5 18.8L47.1 17.0L52.1 17.1L56.5 16.9L59.6 15.8L66.3 17.1L72.4 18.0L74.7 15.9L78.3 14.5L84.7 15.1L91.0 15.4L95.4 13.4L100.3 10.9L109.2 11.2L117.2 8.5L129.4 6.4L151.2 5.5L242.7 5.1L264.9 5.6L278.7 5.9L292.2 2.8L301.4 2.9L311.2 1.3L318.2 1.8L327.0 0.2L333.8 0.0L338.6 1.0L342.8 2.3L349.3 1.7L352.0 3.7L355.6 4.9L360.8 5.0L366.9 4.6L370.9 5.4L372.8 7.4L378.3 7.4L379.2 10.0L379.4 12.8L381.6 14.6L384.8 16.0L385.3 18.7L386.8 21.0L389.2 23.0L392.4 24.8L392.1 28.1L393.2 31.1L397.0 33.2L400.0 35.9L399.8 40.2L399.3 44.9L397.8 50.4L393.5 57.4L389.1 65.5L385.2 75.9Z' fill='%236b6a3a'/%3E%3C/svg%3E");
  --sm-shape-torn-b:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 220' preserveAspectRatio='none'%3E%3Cpath d='M384.4 112.1L386.7 144.5L386.5 153.7L387.3 160.6L390.0 166.8L390.9 171.8L393.3 176.9L392.7 180.6L392.7 184.2L396.7 189.2L397.5 192.9L398.4 196.6L400.0 200.4L398.3 202.8L394.6 204.2L395.5 207.7L393.9 210.0L392.2 212.2L389.5 213.9L388.2 216.3L382.6 216.4L379.3 217.8L373.4 217.6L368.8 218.2L364.4 219.0L357.9 218.4L350.5 217.3L345.5 217.8L341.1 219.0L335.4 219.5L328.6 219.4L322.2 220.0L313.3 218.9L304.0 218.1L294.4 218.0L284.3 219.6L268.6 218.5L244.3 217.4L149.1 216.4L126.5 215.3L112.3 215.1L100.6 215.7L90.2 216.7L83.4 215.5L77.2 214.4L72.2 213.0L67.5 211.7L61.2 212.1L56.8 211.2L54.1 209.3L52.2 207.1L46.6 207.5L42.1 207.2L37.3 207.0L36.2 204.7L32.9 203.7L27.7 203.8L25.0 202.5L20.2 202.2L20.6 199.3L15.5 199.0L16.7 195.7L14.9 193.7L15.6 190.6L11.0 189.6L8.3 187.7L4.5 186.0L2.8 183.3L0.7 180.4L1.9 176.1L0.0 172.4L0.3 167.5L3.2 161.2L1.4 154.8L4.0 144.8L7.1 112.1L9.9 80.3L9.4 71.1L10.6 64.9L6.6 58.4L3.6 52.9L5.8 49.4L7.8 46.3L6.4 42.2L7.4 39.3L5.7 35.4L2.9 31.2L4.5 28.8L4.7 25.9L2.4 21.9L4.1 19.7L6.4 17.9L5.7 14.6L6.7 12.1L8.0 9.7L11.4 8.4L16.5 8.1L20.0 6.9L23.2 5.4L28.1 5.0L35.1 5.8L41.4 6.2L46.9 6.0L51.0 4.6L56.9 4.2L63.1 3.9L68.8 2.6L78.1 4.0L85.8 3.0L95.8 3.3L106.9 2.5L121.1 1.0L146.3 1.8L247.4 0.0L271.3 1.7L287.0 1.3L298.9 1.3L307.7 2.5L316.4 2.5L323.4 3.2L329.5 4.1L335.9 4.3L338.2 7.3L342.1 8.8L347.3 9.0L348.5 12.0L353.2 12.3L353.5 15.4L356.5 16.7L356.1 19.8L357.5 21.9L358.5 24.0L357.5 27.2L360.4 28.3L361.5 30.3L363.7 31.8L364.6 33.9L365.7 36.0L366.6 38.3L366.2 41.1L370.0 42.4L368.1 46.0L372.1 47.5L375.4 49.7L375.9 53.0L378.6 56.1L380.5 60.1L382.0 64.9L381.7 71.5L382.3 80.5Z' fill='%236b6a3a'/%3E%3C/svg%3E");
  --sm-shape-rock-a:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 220' preserveAspectRatio='none'%3E%3Cpath d='M373.4 110.3C373.0 120.0 375.0 131.5 376.4 139.3C377.9 147.1 381.1 151.8 382.1 157.4C383.1 163.1 383.9 168.5 382.4 173.2C380.8 177.9 377.4 182.1 372.9 185.6C368.5 189.2 362.1 191.8 355.7 194.6C349.3 197.3 342.2 199.5 334.5 202.0C326.8 204.4 319.4 207.0 309.6 209.4C299.7 211.8 293.2 214.5 275.4 216.2C257.7 218.0 227.5 219.6 203.0 220.0C178.6 220.4 147.3 220.0 128.8 218.9C110.3 217.9 102.5 215.8 91.8 213.8C81.1 211.8 73.0 209.2 64.5 206.9C56.1 204.5 48.5 202.3 41.2 199.6C33.9 197.0 26.5 194.5 20.6 191.2C14.6 187.8 9.1 184.1 5.7 179.6C2.2 175.0 0.4 169.7 0.0 163.7C-0.4 157.7 1.4 152.6 3.1 143.7C4.8 134.8 8.1 121.1 10.4 110.3C12.7 99.6 15.1 87.2 17.1 79.2C19.1 71.3 20.4 67.8 22.4 62.8C24.4 57.8 26.1 53.4 29.1 49.3C32.2 45.2 35.9 41.6 40.6 38.3C45.3 35.1 51.1 32.5 57.4 30.0C63.7 27.5 70.7 25.5 78.3 23.3C85.8 21.2 93.4 19.2 102.9 17.2C112.4 15.1 118.4 12.9 135.1 10.9C151.8 9.0 179.3 6.9 203.0 5.3C226.8 3.6 257.8 2.1 277.6 1.3C297.4 0.4 308.3 -0.2 321.7 0.0C335.0 0.2 347.1 0.9 357.6 2.6C368.1 4.2 377.7 6.7 384.6 10.1C391.5 13.6 396.7 18.2 399.3 23.4C401.8 28.5 401.5 34.9 400.0 41.2C398.5 47.5 393.9 54.5 390.3 61.1C386.8 67.7 381.5 72.7 378.7 81.0C375.9 89.2 373.8 100.6 373.4 110.3Z' fill='%236b6a3a'/%3E%3C/svg%3E");
  --sm-shape-rock-b:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 220' preserveAspectRatio='none'%3E%3Cpath d='M400.0 105.8C399.3 119.4 397.5 136.4 394.5 146.4C391.6 156.4 387.5 160.5 382.2 165.7C377.0 170.9 370.3 174.6 363.0 177.5C355.7 180.3 346.8 181.8 338.4 183.0C330.0 184.2 320.8 184.0 312.8 184.6C304.9 185.1 297.5 185.1 290.7 186.4C284.0 187.7 279.0 189.6 272.3 192.3C265.5 195.0 263.1 199.1 250.4 202.6C237.8 206.2 216.1 210.7 196.5 213.6C176.9 216.5 149.4 219.1 132.8 220.0C116.3 220.9 107.4 220.3 97.2 219.0C87.1 217.7 79.4 214.9 72.0 212.3C64.5 209.7 58.7 206.4 52.4 203.3C46.1 200.3 40.0 197.5 34.0 194.1C28.0 190.8 21.5 187.6 16.4 183.3C11.3 178.9 6.4 174.2 3.6 168.0C0.9 161.8 -0.3 156.4 0.0 146.1C0.3 135.7 2.9 118.6 5.7 105.8C8.4 92.9 12.7 77.9 16.4 68.8C20.0 59.7 24.0 56.5 27.6 51.3C31.2 46.1 34.4 41.8 38.1 37.6C41.9 33.4 45.5 29.5 50.2 26.2C54.8 22.8 60.1 19.9 66.1 17.4C72.1 15.0 78.8 13.1 86.2 11.4C93.5 9.7 101.1 8.4 110.0 7.1C118.9 5.8 125.1 4.6 139.5 3.5C153.9 2.4 177.2 1.3 196.5 0.7C215.8 0.2 240.2 -0.2 255.4 0.0C270.5 0.2 277.8 1.0 287.3 2.1C296.8 3.1 304.7 4.8 312.5 6.4C320.4 8.1 327.4 10.1 334.6 12.2C341.8 14.3 348.8 16.5 355.5 19.3C362.2 22.1 369.0 25.0 374.8 29.0C380.5 33.0 386.0 37.4 389.9 43.3C393.9 49.2 396.9 53.9 398.6 64.3C400.3 74.7 400.7 92.1 400.0 105.8Z' fill='%236b6a3a'/%3E%3C/svg%3E");
}

/* ---------- 1. grain gradient  data-sm="grain" ----------
   Put on any block (hero, section) or on a fixed full-page layer (.sm-grain--fixed).
   Static state = maroon > olive > mustard > maroon gradient with a still grain layer.
   Under .sm-js: soft colour blobs drift (transform only) and the grain jitters in steps. */
:where([data-sm="grain"]){position:relative;overflow:hidden;isolation:isolate}
[data-sm="grain"]{background:linear-gradient(180deg,var(--sm-maroon) 0,#565a2e 40%,#a58330 70%,var(--sm-maroon) 100%)}
.sm-grain--fixed{position:fixed;inset:0;z-index:-1;pointer-events:none}
[data-sm="grain"]::before,[data-sm="grain"]::after{content:"";position:absolute;z-index:-1;pointer-events:none}
[data-sm="grain"]::before{
  inset:-18%;
  background:
    radial-gradient(38% 30% at 22% 78%,rgba(190,148,50,.7),transparent 70%),
    radial-gradient(34% 34% at 78% 46%,rgba(108,112,54,.8),transparent 70%),
    radial-gradient(40% 28% at 28% 10%,rgba(92,24,36,.95),transparent 70%),
    radial-gradient(30% 22% at 88% 90%,rgba(180,138,46,.42),transparent 70%);
}
[data-sm="grain"]::after{inset:-120px;background:url(textures/grain.png) 0 0/160px 160px;opacity:.22}
.sm-js [data-sm="grain"]::before{animation:sm-drift 42s ease-in-out infinite alternate;will-change:transform}
.sm-js [data-sm="grain"]::after{animation:sm-grain .8s steps(1) infinite;will-change:transform}
.sm-js [data-sm="grain"].sm-off::before,.sm-js [data-sm="grain"].sm-off::after{animation-play-state:paused}
@keyframes sm-drift{
  0%{transform:translate3d(-4%,3%,0) rotate(0deg) scale(1)}
  50%{transform:translate3d(3%,-3%,0) rotate(4deg) scale(1.06)}
  100%{transform:translate3d(5%,4%,0) rotate(-3deg) scale(1.03)}}
@keyframes sm-grain{
  0%{transform:translate3d(0,0,0)}10%{transform:translate3d(-84px,46px,0)}20%{transform:translate3d(52px,-96px,0)}
  30%{transform:translate3d(-30px,88px,0)}40%{transform:translate3d(96px,24px,0)}50%{transform:translate3d(-62px,-58px,0)}
  60%{transform:translate3d(18px,102px,0)}70%{transform:translate3d(-100px,-20px,0)}80%{transform:translate3d(70px,70px,0)}
  90%{transform:translate3d(-14px,-90px,0)}}

/* ---------- 2. titles  data-sm="title" ----------
   Your own letter-spacing is the END state. Before reveal it is pulled tight and faded.
   Tune the start with style="--sm-ls-from:.04em". */
.sm-js [data-sm="title"]{transition:letter-spacing 2s var(--sm-ease),opacity 1.5s ease-out;transition-delay:var(--sm-delay,0s)}
.sm-js [data-sm="title"]:not(.sm-in){letter-spacing:var(--sm-ls-from,.03em);opacity:0}

/* ---------- 3. torn patches  data-sm="patch" ----------
   .sm-patch = the look (mask-shaped colour block with grain). data-sm="patch" = the settle-in.
   Shapes: --torn-a (default) --torn-b --rock-a --rock-b.  Colours: --olive (default) --cream --blush --mustard --mauve --oxblood --lilac.
   Tilt: style="--sm-rot:-1.5deg". Question = .sm-patch__q, italic answer = .sm-patch__a. */
.sm-patch{
  --sm-mask:var(--sm-shape-torn-a);--sm-bg:var(--sm-olive); --sm-fg:var(--sm-cream);
  position:relative;display:block;box-sizing:border-box;max-width:36em;margin-inline:auto;
  padding:3.4em 4em;text-align:center;color:var(--sm-fg);background:var(--sm-bg);
  transform:translate3d(0,0,0) rotate(var(--sm-rot,0deg)) scale(1);
  -webkit-mask:var(--sm-mask) center/100% 100% no-repeat;mask:var(--sm-mask) center/100% 100% no-repeat;
}
.sm-patch::after{content:"";position:absolute;inset:0;pointer-events:none;background:url(textures/grain.png) 0 0/160px 160px;opacity:.26}
.sm-patch__q{margin:0 0 .6em;font-size:.95em;line-height:1.5}
.sm-patch__a{margin:0;font-style:italic;font-size:1.55em;line-height:1.25}
.sm-patch--olive{--sm-bg:var(--sm-olive);--sm-fg:var(--sm-cream)}
.sm-patch--cream{--sm-bg:var(--sm-cream);--sm-fg:var(--sm-brown)}
.sm-patch--mustard{--sm-bg:var(--sm-mustard);--sm-fg:var(--sm-brown)}
.sm-patch--blush{--sm-bg:var(--sm-blush);--sm-fg:var(--sm-brown)}
.sm-patch--mauve{--sm-bg:var(--sm-mauve);--sm-fg:var(--sm-brown)}
.sm-patch--oxblood{--sm-bg:var(--sm-oxblood);--sm-fg:var(--sm-cream)}
.sm-patch--lilac{--sm-bg:var(--sm-lilac);--sm-fg:var(--sm-brown)}
/* default shape */
.sm-patch--torn-a{--sm-mask:var(--sm-shape-torn-a)}
.sm-patch--torn-b{--sm-mask:var(--sm-shape-torn-b)}
.sm-patch--rock-a{--sm-mask:var(--sm-shape-rock-a)}
.sm-patch--rock-b{--sm-mask:var(--sm-shape-rock-b)}
.sm-js [data-sm="patch"]{transition:transform 1.5s var(--sm-settle),opacity 1s ease-out;transition-delay:var(--sm-delay,0s)}
.sm-js [data-sm="patch"]:not(.sm-in){opacity:0;transform:translate3d(0,-20px,0) rotate(calc(var(--sm-rot,0deg) - 2.6deg)) scale(1.03)}
@media (max-width:600px){.sm-patch{padding:2.8em 2.4em}}

/* ---------- 4. constellation  data-sm="constellation" ----------
   Wrapper (or the <svg> itself) holding an inline <svg viewBox> with:
     <path class="sm-line" d="M x y L x y"/>   dotted line (drawn on via a mask, stroke-dashoffset)
     <circle class="sm-dot" cx cy r="3.5"/>     dot (pops in)
   Items animate in DOM order: dot, line, dot, line ... Colour = currentColor. */
[data-sm="constellation"]{color:var(--sm-cream)}
.sm-line{fill:none;stroke:currentColor;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:.1 7;vector-effect:non-scaling-stroke}
.sm-dot{fill:currentColor;transform-box:fill-box;transform-origin:center}
.sm-js .sm-m{stroke-dasharray:var(--sm-len) var(--sm-len);stroke-dashoffset:var(--sm-len);transition:stroke-dashoffset 1.3s var(--sm-ease);
  transition-delay:calc(var(--sm-i,0)*var(--sm-step,.32s) + var(--sm-delay,0s))}
.sm-js [data-sm="constellation"].sm-in .sm-m{stroke-dashoffset:0}
.sm-js [data-sm="constellation"] .sm-dot{transition:transform .6s var(--sm-settle),opacity .4s ease-out;
  transition-delay:calc(var(--sm-i,0)*var(--sm-step,.32s) + var(--sm-delay,0s))}
.sm-js [data-sm="constellation"]:not(.sm-in) .sm-dot{transform:scale(0);opacity:0}

/* ---------- 5. handwritten note  data-sm="note" ----------
   Real text: JS wraps each word in <span class="sm-w"> and wipes them in left to right, one after another.
   SVG version: give centre-line <path class="sm-stroke"> children (see handwriting/); they draw on in order.
   Font: placeholder only. See README. */
.sm-w{display:inline-block}
.sm-js [data-sm="note"] .sm-w{clip-path:inset(-25% 100% -25% -6%);transition:clip-path .6s var(--sm-ease);
  transition-delay:calc(var(--sm-i,0)*var(--sm-ws,.08s) + var(--sm-delay,0s))}
.sm-js [data-sm="note"].sm-in .sm-w{clip-path:inset(-25% -8% -25% -6%)}
.sm-stroke{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.sm-js [data-sm="note"] .sm-stroke{stroke-dasharray:1 2;stroke-dashoffset:1.02;transition:stroke-dashoffset 1.2s ease-in-out;
  transition-delay:calc(var(--sm-sb,0s) + var(--sm-i,0)*.7s + var(--sm-delay,0s))}
.sm-js [data-sm="note"].sm-in .sm-stroke{stroke-dashoffset:0}

/* ---------- 6. parallax  data-sm="parallax" ----------
   data-sm-amp="18" = max travel in px each way (default 16, capped at 30 in JS).
   Put images inside an overflow:hidden frame. JS scales <img>/<video> slightly so edges never show.
   Uses the individual `translate` / `scale` properties (your own `transform` is untouched). */
[data-sm="parallax"]{will-change:translate}
.sm-parallax-frame{overflow:hidden}

/* ---------- 7. glyph wobble  data-sm="glyph" ----------
   Hand-drawn sun / hand: gentle wobble on hover, tap and keyboard focus (CSS only, so works without JS;
   switched off under reduced motion). Under .sm-js they also ease in with a small turn. */
[data-sm="glyph"]{display:inline-block;transform-origin:50% 50%}
@media (prefers-reduced-motion:no-preference){
  [data-sm="glyph"]:hover,[data-sm="glyph"]:focus-visible,[data-sm="glyph"]:focus-within,[data-sm="glyph"]:active{animation:sm-wobble 1s ease-in-out}
}
@keyframes sm-wobble{
  0%{rotate:0deg;scale:1}18%{rotate:-9deg;scale:1.07}42%{rotate:7deg;scale:1.05}66%{rotate:-4deg;scale:1.02}84%{rotate:2deg}100%{rotate:0deg;scale:1}}
.sm-js [data-sm="glyph"]{transition:opacity 1.4s ease-out,rotate 1.8s var(--sm-ease),scale 1.8s var(--sm-ease);transition-delay:var(--sm-delay,0s)}
.sm-js [data-sm="glyph"]:not(.sm-in){opacity:0;rotate:-26deg;scale:.84}

/* Safety nets: reduced motion = no animation anywhere, even if html.sm-js was added by hand. */
@media (prefers-reduced-motion:reduce){
  [data-sm],[data-sm] *,[data-sm]::before,[data-sm]::after{animation:none!important;transition:none!important}
}
@media print{.sm-js [data-sm]{opacity:1!important}}
