/* ============================================================
   DESIGN TOKENS  (design.md §1–5 + §6a/6c motion)
   All durations multiply by --motion-speed so one knob tunes
   the whole site's pacing.
   ============================================================ */
:root{
  /* Motion speed multiplier */
  --motion-speed: 1;

  /* Durations (scaled) */
  --duration-instant: calc(50ms  * var(--motion-speed));
  --duration-fast:    calc(100ms * var(--motion-speed));
  --duration-normal:  calc(200ms * var(--motion-speed));
  --duration-slow:    calc(300ms * var(--motion-speed));
  --duration-slower:  calc(500ms * var(--motion-speed));
  --duration-slowest: calc(700ms * var(--motion-speed));

  /* Stagger (scaled) */
  --stagger-tight:  calc(40ms  * var(--motion-speed));
  --stagger-normal: calc(80ms  * var(--motion-speed));
  --stagger-loose:  calc(160ms * var(--motion-speed));

  /* Easings */
  --ease-out-expo:  cubic-bezier(.16, 1, .3, 1);
  --ease-out-quart: cubic-bezier(.25, 1, .5, 1);
  --ease-in-out:    cubic-bezier(.65, 0, .35, 1);
  --ease-spring:    cubic-bezier(.34, 1.4, .64, 1);

  /* Scroll */
  --scroll-reveal-distance: 40px;
  --scroll-parallax-factor: .08;

  /* Motion geometry */
  --settle-scale: 1.08;
  --settle-rotate: 3deg;
  --lift: -6px;

  /* ---------- COLOR ---------- */
  --locker:#356a23; --locker-shade:#306021; --locker-lit:#3e793b;
  --cork:#bf9d73;   --cork-shade:#98734f;   --kraft:#c87c3e;
  --notebook:#d4d2cc; --butter:#f9ef9a; --sticky:#f4e671;
  --charcoal:#231f21; --navy:#353889; --leaf:#4c914e; --body:#454246;
  --label-green:#42592f; --brick:#b4411e; --marigold:#e0973f;
  --sticker-yellow:#edc449; --neon:#f7f856; --tape:#8dca49;
  --cobalt:#4875b6; --sky:#a1c4d7; --purple:#7361a1; --pin:#d9363a;
  --cream:#fdfcf3; --muted:#7c7973; --rim:#2a1517;

  /* ---------- TYPE ---------- */
  --f-hero:'Bowlby One', sans-serif;
  --f-label:'Passion One', sans-serif;
  --f-greet:'Fredoka', sans-serif;
  --f-body:'Montserrat', sans-serif;
  --f-hand:'Caveat', cursive;

  /* ---------- SPACE / RADIUS ---------- */
  --s1:4px; --s2:8px; --s3:16px; --s4:24px; --s5:32px;
  --s6:48px; --s7:64px; --s8:96px; --s9:128px;
  --r-paper:3px; --r-card:16px; --r-tile:24px; --r-pill:9999px;
  --container:1200px;

  /* ---------- EFFECTS ---------- */
  --shadow:       0 10px 20px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.35);
  --shadow-hover: 0 18px 28px rgba(0,0,0,.4),  0 3px 6px rgba(0,0,0,.35);

  --halftone: radial-gradient(rgba(0,0,0,.08) 1.2px, transparent 1.6px) 0 0 / 7px 7px;
  --seams: repeating-linear-gradient(
    90deg,
    transparent 0 22%,
    var(--locker-shade) 22% calc(22% + 2px),
    rgba(255,255,255,.07) calc(22% + 2px) calc(22% + 4px),
    transparent calc(22% + 4px) 44%
  );
  --torn: polygon(
    0 14px, 4% 5px, 9% 13px, 14% 4px, 20% 12px, 26% 3px, 32% 11px,
    38% 5px, 45% 14px, 52% 4px, 58% 12px, 65% 3px, 71% 11px,
    78% 5px, 85% 13px, 92% 4px, 100% 10px, 100% 100%, 0 100%
  );
}

/* Speed presets (re-declared on body so tokens re-resolve) */
body.motion-fast { --motion-speed: .6; }
body.motion-slow { --motion-speed: 1.5; }
body.motion-off  { --motion-speed: 0; }

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 clamp(15px, 1.15vw, 18px) / 1.9 var(--f-body);
  color: var(--body);
  background: var(--locker);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus {
  left: var(--s3); top: var(--s3); z-index: 99;
  background: var(--cream); padding: var(--s2);
}
:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }

/* Lucide icon sizing inside text */
.icon-inline {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  margin-left: 0.35em;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ============================================================
   SCENES
   ============================================================ */
.scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--s8) max(var(--s4), calc((100% - var(--container)) / 2));
}
.bg {
  position: absolute;
  inset: -10% 0;
  z-index: -1;
  background: var(--halftone), var(--seams), var(--locker);
}
.torn {
  -webkit-clip-path: var(--torn);
  clip-path: var(--torn);
  margin-top: -14px;
  padding-top: calc(var(--s8) + 14px);
}

/* ============================================================
   NAV — tape tags
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav nav {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tag {
  font: 400 clamp(15px, 1.4vw, 19px) / 1 var(--f-label);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 10px 18px;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.35));
  -webkit-clip-path: polygon(0 8%, 3% 0, 97% 6%, 100% 0, 98% 50%, 100% 100%, 3% 94%, 0 100%, 2% 50%);
  clip-path: polygon(0 8%, 3% 0, 97% 6%, 100% 0, 98% 50%, 100% 100%, 3% 94%, 0 100%, 2% 50%);
  transition:
    translate var(--duration-normal) var(--ease-out-quart),
    rotate    var(--duration-normal) var(--ease-out-quart);
}
.tag:hover { translate: 0 -3px; rotate: 0deg !important; }

.tag--yellow { background: var(--sticker-yellow); color: var(--label-green); rotate: -2deg; }
.tag--lime   { background: var(--tape);           color: var(--label-green); rotate: 1.5deg; }
.tag--red    { background: var(--brick);          color: var(--butter);      rotate: -1deg; }
.tag--navy   { background: var(--cream);          color: var(--navy);        rotate: 1deg; }

/* ============================================================
   GENERIC COLLAGE OBJECT
   Rest tilt lives in `rotate`, lift in `translate`.
   GSAP folds + restores these so hover still works after reveal.
   ============================================================ */
.o {
  position: relative;
  isolation: isolate;
  box-shadow: var(--shadow);
  transition:
    translate var(--duration-normal) var(--ease-out-quart),
    rotate    var(--duration-normal) var(--ease-out-quart);
}
.o::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-quart);
  pointer-events: none;
}
.o:hover, .o:focus-visible { translate: 0 var(--lift); rotate: 0deg !important; }
.o:hover::after, .o:focus-visible::after { opacity: 1; }

/* ============================================================
   STICKER LETTERING
   ============================================================ */
.die {
  position: relative;
  isolation: isolate;
  font: 400 clamp(48px, 11vw, 170px) / .88 var(--f-hero);
  color: var(--navy);
  text-transform: uppercase;
  text-align: center;
  text-shadow: .04em .05em 0 var(--sticker-yellow);
  rotate: -3deg;
  padding: .12em .3em;
  background: #fff;
  border-radius: 42% 58% 46% 54% / 60% 42% 58% 40%;
  box-shadow: var(--shadow);
}
.die::before {
  content: attr(data-t);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: #fff;
  -webkit-text-stroke: .22em #fff;
  text-shadow: 0 6px 10px rgba(0,0,0,.35);
  padding: inherit;
  font: inherit;
  text-transform: inherit;
  line-height: inherit;
  text-align: inherit;
  display: none; /* opt-in: remove to enable the sticker outline */
}
.die small { display: block; font-size: .34em; margin-bottom: .1em; }
.die--sm {
  font-size: clamp(34px, 6.5vw, 92px);
  margin: 0 auto var(--s6);
  max-width: 12ch;
}

.hand {
  font: 600 clamp(20px, 2.2vw, 28px) / 1.1 var(--f-hand);
  color: var(--navy);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding-top: var(--s9);
}
.board {
  width: min(94%, 980px);
  padding: clamp(24px, 5vw, 72px);
  background: var(--halftone), var(--cork);
  border: clamp(10px, 1.6vw, 22px) solid #a8713b;
  box-shadow: var(--shadow-hover), inset 0 0 40px rgba(0,0,0,.3);
  rotate: -2deg;
  text-align: center;
  display: grid;
  gap: var(--s4);
  justify-items: center;
}
.hero-sub {
  font: 700 clamp(13px, 1.2vw, 16px) / 1.4 var(--f-body);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--cream);
  text-shadow: 0 2px 3px rgba(0,0,0,.5);
}

.starburst {
  position: absolute;
  top: 16%;
  left: 4%;
  width: clamp(100px, 16vw, 230px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--purple);
  rotate: -12deg;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.35));
  -webkit-clip-path: polygon(
    50% 0, 60% 28%, 86% 10%, 72% 38%, 100% 42%, 74% 58%, 92% 84%,
    62% 72%, 50% 100%, 40% 72%, 8% 84%, 28% 58%, 0 42%, 28% 38%, 14% 10%, 40% 28%
  );
  clip-path: polygon(
    50% 0, 60% 28%, 86% 10%, 72% 38%, 100% 42%, 74% 58%, 92% 84%,
    62% 72%, 50% 100%, 40% 72%, 8% 84%, 28% 58%, 0 42%, 28% 38%, 14% 10%, 40% 28%
  );
  font: 400 clamp(20px, 3vw, 40px) var(--f-label);
  color: #fff;
}

.sticky-note-hero {
  position: absolute;
  top: 14%;
  right: 5%;
  width: clamp(100px, 13vw, 170px);
  padding: var(--s4) var(--s3) var(--s3);
  background: var(--sticky);
  font: 600 clamp(16px, 1.8vw, 24px) / 1.1 var(--f-hand);
  rotate: 4deg;
  box-shadow: var(--shadow);
}
.sticky-note-hero b { font-size: 1.25em; color: #111; }

.pin {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a8a, var(--pin) 55%, #7a1218);
  box-shadow: 3px 5px 5px rgba(0,0,0,.4);
  z-index: 2;
}

/* Art placeholder gradients */
.art      { aspect-ratio: 3/4; background: linear-gradient(160deg, var(--marigold), var(--brick)); }
.art.a1   {
  background-image: url("img/Web/webFasya.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.art.a2   { 
  background-image: url("img/Web/indomontir.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat; 
}

.art.a3   { 
  background-image: url("img/Web/it.png");
  background-position: left;
  background-size: cover;
  background-repeat: no-repeat;  
}
.art.a4   {background: linear-gradient(150deg, var(--tape),     var(--locker-lit));}

.art.a5   {
  background-image: url("img/Web/profile1.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ============================================================
   TOC BOX
   ============================================================ */
.toc { text-align: center; }
.box {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 56px);
  background: var(--cork-shade);
  border: clamp(10px, 2vw, 22px) solid #b0936b;
  box-shadow: var(--shadow-hover), inset 0 0 50px rgba(0,0,0,.4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  justify-content: center;
  align-items: center;
  min-height: 300px;
}
.obj {
  display: grid;
  place-items: center;
  min-width: 150px;
  min-height: 110px;
  padding: var(--s3) var(--s4);
  font: 400 clamp(18px, 2vw, 26px) / 1 var(--f-label);
  text-transform: uppercase;
  text-decoration: none;
}
.obj.envelope     { background: #9a2d2d; color: var(--cream); rotate: -6deg; }
.obj.note         { background: repeating-linear-gradient(transparent 0 21px, #c9ccc4 21px 22px), #eceee4; color: var(--marigold); rotate: 4deg; }
.obj.kraft        { background: var(--kraft); color: #7b1f10; rotate: -3deg; }
.obj.folder-blue  { background: var(--sky); color: var(--cobalt); rotate: 7deg; border-radius: var(--r-paper) 30px var(--r-paper) var(--r-paper); min-height: 140px; }
.obj.tape-lime    { background: var(--tape); color: var(--label-green); rotate: -5deg; min-height: 60px; }

/* ============================================================
   CHAPTERS
   ============================================================ */
.chapter {
  padding-inline: max(var(--s4), calc((100% - var(--container)) / 2));
  position: relative;
}
.chapter--yellow { background: var(--butter); }
.chapter--dark   { background: var(--charcoal); color: var(--cream); }

.folder-tabs {
  position: absolute;
  top: -6px;
  inset-inline: 0;
  height: 60px;
  pointer-events: none;
}
.folder-tabs i {
  position: absolute;
  left: 0;
  height: 60px;
  border-radius: 30px 30px 0 0;
}
.folder-tabs i:first-child { width: 70%; background: var(--brick); }
.folder-tabs i:last-child  { width: 55%; background: var(--marigold); top: 18px; }

.tab-title {
  position: relative;
  font: 400 clamp(32px, 4.5vw, 60px) / 1 var(--f-label);
  color: var(--brick);
  text-transform: uppercase;
  text-align: right;
  margin: var(--s5) 0 var(--s6);
}

.prints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
  align-items: center;
}
.print {
  position: relative;
  background: #fff;
  padding: 14px 14px 8px;
  border-radius: var(--r-paper);
}
.print.r-l { rotate: -5deg; }
.print.r-m { rotate:  3deg; margin-top: var(--s6); }
.print.r-r { rotate: -3deg; }
.print figcaption {
  font: 700 13px / 2 var(--f-body);
  color: var(--muted);
  text-align: center;
}
.cap { text-align: center; margin-top: var(--s7); }

.chapter-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--s6);
  align-items: center;
  margin-bottom: var(--s7);
}
.paper-note {
  padding: var(--s5) var(--s4);
  background: repeating-linear-gradient(transparent 0 25px, #c9ccc4 25px 26px), #eceee4;
  color: var(--brick);
  font: 400 clamp(26px, 3vw, 40px) / 1.1 var(--f-label);
  text-transform: uppercase;
  rotate: -4deg;
  box-shadow: var(--shadow);
  border-radius: var(--r-paper) var(--r-card) var(--r-paper) var(--r-paper);
}
.chapter-head p { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.chapter-head em { font-weight: 300; opacity: .9; }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 20px);
  max-width: 880px;
  margin: 0 auto;
}
.tile {
  aspect-ratio: 1;
  display: grid;
  place-items: end start;
  padding: var(--s3);
  border: clamp(7px, 1vw, 12px) solid var(--rim);
  border-radius: var(--r-tile);
  font: 400 15px / 1 var(--f-label);
  text-transform: uppercase;
  color: var(--cream);
}
.tile:nth-child(odd)  { background: linear-gradient(145deg, #e47a63, var(--brick)); }
.tile:nth-child(even) { background: linear-gradient(145deg, var(--marigold), #c7632b); }
.tile:nth-child(3n)   { background: linear-gradient(145deg, var(--sky), var(--cobalt)); }
.tile:nth-child(5n)   { background: linear-gradient(145deg, var(--tape), var(--locker-lit)); }

/* ============================================================
   ABOUT
   ============================================================ */
.book {
  background: linear-gradient(90deg, #e6e4df 0, var(--notebook) 46%, #f2f2f2 50%, var(--notebook) 54%, #dcdad4 100%);
  box-shadow: inset 0 14px 30px rgba(0,0,0,.2);
}
.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--s7);
  align-items: center;
  margin-bottom: var(--s8);
}
.polaroid {
  position: relative;
  background: var(--butter);
  padding: var(--s4) var(--s4) var(--s3);
  rotate: -6deg;
  box-shadow: var(--shadow);
  border-radius: var(--r-paper);
}
.polaroid .hand { text-align: center; padding-top: var(--s2); display: block; }

.greet {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 var(--s4);
  font: 300 clamp(30px, 4.6vw, 62px) / 1.1 var(--f-greet);
  color: var(--navy);
  margin-bottom: var(--s4);
}
.greet > span:first-child { grid-column: 1 / -1; }
.greet b { font: 400 1em var(--f-label); }
.greet .you { font-size: .75em; align-self: end; max-width: 3.5ch; }
.name {
  font: 400 clamp(60px, 9vw, 125px) / .95 var(--f-label);
  color: var(--leaf);
  text-transform: uppercase;
}
.about-text p { text-align: justify; line-height: 2; }

.resume { display: grid; gap: var(--s7); max-width: 1000px; margin-inline: auto; }
.row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 4fr;
  gap: var(--s5);
  align-items: center;
}
.row:nth-child(even) { translate: 32px 0; }

.badge {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  min-width: 190px;
  padding: .5em 1.6em;
  border: 4px solid;
  border-radius: var(--r-pill);
  font: 400 clamp(20px, 2.4vw, 32px) / 1 var(--f-label);
  text-transform: uppercase;
  text-decoration: none;
  rotate: -2deg;
  transition:
    translate var(--duration-normal) var(--ease-out-quart),
    rotate    var(--duration-normal) var(--ease-out-quart);
}
.badge::after {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: inherit;
  background: rgba(0,0,0,.35);
  translate: 6px 8px;
  transition: translate var(--duration-normal) var(--ease-out-quart);
}
.badge:hover { translate: 0 -3px; rotate: 0deg; }
.badge:hover::after { translate: 8px 12px; }
.badge:active { translate: 3px 5px; transition-duration: var(--duration-fast); }
.badge:active::after { translate: 2px 2px; transition-duration: var(--duration-fast); }

.badge--yellow { background: var(--sticker-yellow); border-color: var(--locker-lit);    color: var(--rim); }
.badge--red    { background: var(--brick);          border-color: var(--rim);           color: var(--sticker-yellow); }
.badge--blue   { background: var(--cobalt);         border-color: var(--sticker-yellow);color: var(--sticker-yellow); }

.sticky-note {
  background: var(--sticky);
  padding: var(--s5);
  rotate: -2deg;
  box-shadow: var(--shadow);
  line-height: 1.6;
}
.sticky-note h3 {
  font: 700 clamp(14px, 1.4vw, 20px) / 1.4 var(--f-body);
  text-transform: uppercase;
  color: var(--label-green);
}
.sw { display: flex; flex-wrap: wrap; gap: var(--s3); }
.sw li {
  width: 78px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--locker-lit);
  color: var(--sticker-yellow);
  border-radius: var(--r-tile);
  font: 400 30px / 1 var(--f-label);
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s5);
  align-items: center;
}
.mail {
  background: var(--cream);
  padding: var(--s5);
  rotate: -2deg;
  line-height: 1.8;
}
.mail .hand { color: var(--brick); font-size: clamp(26px, 3vw, 38px); display: block; margin-bottom: var(--s3); }

.qr {
  display: grid;
  place-items: center;
  gap: var(--s2);
  padding: var(--s4);
  background: #fff;
  border-radius: var(--r-card);
  font: 700 13px / 1.2 var(--f-body);
  text-decoration: none;
  text-align: center;
}
.qr.r-l { rotate: -4deg; }
.qr.r-r { rotate:  4deg; }
.qr span {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background-image: url("img/Web/akar-icons--instagram-fill.svg");
  color: transparent;
}
.qr testing {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background-image: url("img/Web/akar-icons--github-fill.svg");
  color: transparent;
}
/* Logo chip centered on the checkerboard pattern */
.qr span img {
  width: 62%;
  height: 62%;
  padding: 11%;
  background: var(--cream);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.copy { grid-column: 1 / -1; text-align: center; color: var(--cream); font-size: 13px; line-height: 1.4; }

/* ============================================================
   MOTION SPEED CONTROL (floating UI)
   ============================================================ */
.speed {
  position: fixed;
  right: var(--s3);
  bottom: var(--s3);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 8px 12px;
  background: rgba(35, 31, 33, .9);
  color: var(--cream);
  border-radius: var(--r-pill);
  font: 700 11px / 1 var(--f-body);
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.speed button {
  border: 0;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out-quart);
}
.speed button:hover { background: rgba(255,255,255,.12); }
.speed button[aria-pressed="true"] { background: var(--sticker-yellow); color: var(--charcoal); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-height: 760px) and (min-width: 900px) {
  .hero { padding-top: 88px; padding-bottom: var(--s6); }
  .board { gap: var(--s3); padding: var(--s5); }
  .die   { font-size: clamp(48px, 9vw, 130px); }
  .paddingicon {padding-left: 14%;}
  .paddingicon2 {padding-left: 4%;}
}
@media (max-width: 900px) {
  .scene { padding-block: var(--s7); }
  .torn  { padding-top: calc(var(--s7) + 14px); }
  .prints, .about-grid, .chapter-head, .foot { grid-template-columns: 1fr; }
  .print.r-m { margin-top: 0; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 1fr; }
  .row:nth-child(even) { translate: none; }
  .about-text p, .chapter-head p { text-align: left; }
  .starburst, .sticky-note-hero { display: none; }
  .badge { min-width: 0; justify-self: start; }
  
}
@media (max-width: 520px) {
  .nav { padding: var(--s2) var(--s3); }
  .logo { display: none; }
  .nav nav { width: 100%; justify-content: center; }
  .box { gap: var(--s3); }
  .obj { min-width: 120px; }
}
@media (max-width:350px){
  .scene {justify-content: center; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  :root,
  body.motion-fast,
  body.motion-slow { --motion-speed: 0; }
  * { transition: none !important; scroll-behavior: auto; }
  .scroll-prog { display: none; }
}

/* ============================================================
   POLISH — additive motion & style (no structural changes)
   ============================================================ */

/* Ink-style text selection */
::selection { background: var(--sticker-yellow); color: var(--charcoal); }

/* Scroll progress bar (element created by main.js) */
.scroll-prog {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--sticker-yellow), var(--tape));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  /* TOC tiles: sticker lift + tilt on hover */
  .tile {
    cursor: default;
    transition:
      translate   var(--duration-normal) var(--ease-out-quart),
      rotate      var(--duration-normal) var(--ease-out-quart),
      box-shadow  var(--duration-normal) var(--ease-out-quart);
  }
  .tile:hover {
    translate: 0 -8px;
    rotate: -1.5deg;
    box-shadow: var(--shadow-hover);
  }
  .tile:nth-child(even):hover { rotate: 1.5deg; }

  /* Software chips: playful pop */
  .sw li {
    transition:
      scale  var(--duration-normal) var(--ease-spring),
      rotate var(--duration-normal) var(--ease-out-quart);
  }
  .sw li:hover { scale: 1.12; rotate: -4deg; }

  /* Photo prints: art warms up + caption inks navy on hover */
  .print .art {
    transition: filter var(--duration-slower) var(--ease-out-expo);
  }
  .print:hover .art { filter: saturate(1.12) contrast(1.03); }
  .print figcaption {
    transition: color var(--duration-normal) var(--ease-out-quart);
  }
  .print:hover figcaption { color: var(--navy); }
}

/* ============================================================
   CASE STUDY SECTION — merged from performance-graph.html
   Every selector is scoped under .case-study (or cs- prefixed)
   → zero overlap with site styles or Tailwind utilities.
   Visual language: cream paper cards + pin, tape tag, sticky
   note, palette/type tokens from :root.
   ============================================================ */
.case-study { color: var(--cream); }

.case-study .cs-head {
  display: grid;
  justify-items: center;
  gap: var(--s3);
  text-align: center;
  max-width: 780px;
  margin: 0 auto var(--s6);
}
.case-study .cs-head .die { margin-bottom: var(--s2); }
.cs-sub {
  font-size: clamp(14px, 1.2vw, 17px);
  line-height: 1.75;
  max-width: 62ch;
  opacity: .92;
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s5);
  max-width: 1040px;
  margin-inline: auto;
}
.cs-chart {
  position: relative;
  isolation: isolate;
  background: var(--cream);
  color: var(--body);
  border-radius: var(--r-paper);
  padding: clamp(26px, 3vw, 36px) clamp(20px, 2.6vw, 30px) clamp(22px, 2.4vw, 30px);
  box-shadow: var(--shadow);
  rotate: -1deg;
}
.cs-chart:nth-child(even) { rotate: 1deg; }
.cs-chart--wide { grid-column: 1 / -1; }
.cs-chart h3 {
  font: 400 clamp(20px, 2.2vw, 27px) / 1.05 var(--f-label);
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 2px;
}
.cs-hint { font-size: 13px; color: var(--muted); margin-bottom: var(--s4); }

/* ---- 1 · delivery facts ---- */
.cs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s3);
}
.cs-fact {
  position: relative;
  overflow: hidden;
  background: var(--butter);
  border: 2px solid var(--sticker-yellow);
  border-radius: var(--r-paper);
  padding: var(--s3) var(--s3) var(--s4);
}
.cs-tick {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--locker);
  color: var(--cream);
  font: 800 14px/1 var(--f-body);
  margin-bottom: var(--s2);
  transform: scale(0);
}
.cs-k { font: 700 15px/1.3 var(--f-body); color: var(--charcoal); }
.cs-v { font: 700 12.5px/1.4 var(--f-body); color: var(--label-green); margin-top: 2px; }
.cs-prog {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--locker);
  transform: scaleX(0);
  transform-origin: left center;
}

/* ---- 2 · conversion flow ---- */
.cs-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: var(--s3);
}
.cs-node {
  flex: 0 0 auto;
  min-width: 118px;
  text-align: center;
  background: #eceee4;
  border: 2px solid #c9ccc4;
  border-radius: var(--r-paper);
  padding: 10px 14px;
  opacity: 0;
  transform: translateY(14px);
}
.cs-node .ico { display: block; font-size: 22px; line-height: 1.2; }
.cs-node .t { font: 700 13px/1.3 var(--f-body); color: var(--charcoal); margin-top: 6px; }
.cs-node .d { font-size: 11px; color: var(--muted); }
.cs-node.wa  { border-color: #25d366; }
.cs-node.win { border-color: var(--locker); background: var(--butter); }
.cs-edge {
  flex: 1 1 26px;
  min-width: 26px;
  height: 2px;
  background: linear-gradient(90deg, #c9ccc4, var(--marigold));
  position: relative;
  opacity: 0;
}
.cs-edge::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--marigold);
}
.cs-flow-note { margin-top: var(--s4); font-size: 13px; color: var(--muted); }
.cs-flow-note b { color: var(--locker); }

/* ---- 3 · delivery timeline ---- */
.cs-tl { position: relative; padding-left: 34px; }
.cs-tl::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--notebook);
}
.cs-spine {
  position: absolute;
  left: 11px;
  top: 6px;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, var(--tape), var(--locker));
}
.cs-step { position: relative; margin-bottom: var(--s4); opacity: 0; transform: translateX(-16px); }
.cs-step:last-child { margin-bottom: 0; }
.cs-dot {
  position: absolute;
  left: -34px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--navy);
  display: grid;
  place-items: center;
  font: 800 12px/1 var(--f-body);
  color: var(--navy);
}
.cs-step.done .cs-dot { border-color: var(--locker); background: var(--butter); color: var(--locker); }
.cs-ph {
  display: block;
  font: 700 11px/1.4 var(--f-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brick);
}
.cs-step.done .cs-ph { color: var(--locker); }
.cs-ttl { font: 700 15px/1.3 var(--f-body); color: var(--charcoal); margin: 2px 0; }
.cs-txt { font-size: 13px; line-height: 1.7; color: var(--muted); }

/* ---- 4 · architecture ---- */
.cs-arch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s3);
}
.cs-box {
  background: #eceee4;
  border: 2px solid #c9ccc4;
  border-radius: var(--r-paper);
  padding: var(--s3);
  opacity: 0;
  transform: scale(.94);
}
.cs-box .ico { display: block; font-size: 20px; line-height: 1.2; }
.cs-box .t { font: 700 14px/1.3 var(--f-body); color: var(--charcoal); margin-top: 6px; }
.cs-box .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cs-box.hl { border-color: var(--navy); }
.cs-box.wa { border-color: #25d366; }

/* ---- honesty note (reuses existing .sticky-note) ---- */
.case-study .cs-note {
  max-width: 1040px;
  margin: var(--s6) auto 0;
  color: var(--body);
  font-size: 14px;
}
.cs-note a { color: var(--navy); font-weight: 700; }

/* ---- fallbacks: final states when JS motion is off ---- */
@media (prefers-reduced-motion: reduce) {
  .cs-node, .cs-step, .cs-box { opacity: 1; transform: none; }
  .cs-tick  { transform: scale(1); }
  .cs-prog  { transform: scaleX(1); }
  .cs-edge  { opacity: 1; }
  .cs-spine { height: auto; bottom: 6px; }
}
.reduced .cs-node, .reduced .cs-step, .reduced .cs-box { opacity: 1; transform: none; }
.reduced .cs-tick  { transform: scale(1); }
.reduced .cs-prog  { transform: scaleX(1); }
.reduced .cs-edge  { opacity: 1; }
.reduced .cs-spine { height: auto; bottom: 6px; }

@media (max-width: 900px) {
  .cs-grid { grid-template-columns: 1fr; }
  .cs-chart--wide { grid-column: auto; }
}

/* ============================================================
   METHOD CHAIN — "How I Work" section (replaced Icon Set tiles)
   mc- prefix → scoped, zero overlap. Reuses existing motion:
   data-stagger (sticker-stick + pin drop) + data-reveal head.
   No CSS initial-hidden states → reduced-motion needs no fallback
   (JS hide() is what hides these, and JS never runs when off).
   ============================================================ */
.mc-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.mc-step {
  position: relative;
  flex: 1 1 210px;
  max-width: 270px;
  background: var(--cream);
  color: var(--body);
  text-align: center;
  border-radius: var(--r-paper);
  padding: var(--s5) var(--s3) var(--s4);
  box-shadow: var(--shadow);
  rotate: -1.5deg;
}
.mc-step:nth-child(even) { rotate: 1.5deg; }
.mc-step:last-child { background: var(--butter); }

.mc-step .ico {
  display: block;
  font-size: 34px;
  line-height: 1.2;
  font-style: normal;
}
.mc-step h3 {
  font: 400 clamp(18px, 1.8vw, 24px) / 1.05 var(--f-label);
  text-transform: uppercase;
  color: var(--brick);
  margin: var(--s2) 0 var(--s1);
}
.mc-step:last-child h3 { color: var(--label-green); }
.mc-step p { font-size: 13px; line-height: 1.65; color: var(--muted); }

/* chain arrow sitting in the gap between cards
   --arrow (default 1) is tweened by main.js Pattern 7 to draw the
   chain in; no-JS / reduced-motion always shows the final state */
.mc-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: calc(var(--s4) / -2);
  translate: 50% -50%;
  color: var(--marigold);
  font: 700 24px/1 var(--f-body);
  transform: scaleX(var(--arrow, 1));
  transform-origin: left center;
  z-index: 2;
}

@media (prefers-reduced-motion: no-preference) {
  .mc-step {
    transition:
      translate var(--duration-normal) var(--ease-out-quart),
      rotate    var(--duration-normal) var(--ease-out-quart);
  }
  .mc-step:hover { translate: 0 -6px; rotate: 0deg !important; }
}

@media (max-width: 900px) {
  .mc-flow { flex-direction: column; align-items: center; }
  .mc-step { max-width: 420px; width: 100%; flex: 1 1 auto; }
  .mc-step:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: auto;
    bottom: calc(var(--s4) / -2);
    left: 50%;
    translate: -50% 50%;
  }
}