/* ==========================================================================
   05 · STORIES BAND — a strip of sun-yellow paper pulled across the spread.
   The brushed top/bottom edges are a CSS mask (inline SVG, so it also works on
   file://) — the real page paper shows through the dry-brush gaps.
   Layer order: sheet (ochre, far range, clouds) → torii gate (unmasked: it rises
   out of the band into the section above) → front sheet (near ridge) → words.
   ========================================================================== */
.stories-band {
  --sb-edge-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 48' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' d='M0 48L0 21.3L28 17.6L38 17L61 17.1L80 17.5L99 17.2L123 15.3L128 10.2L156 9.7L172 12L194 14.5L213 16.9L239 19.5L255 19.7L270 19.1L280 23.5L348 20.5L381 20.3L403 18.4L430 14.8L440 19.8L500 19.4L554 18.1L574 17L588 17.1L614 19.3L628 13.9L689 25.3L715 28.5L734 28.4L744 28.3L762 28.9L778 30.1L794 31.3L807 31.8L818 28.4L869 23.5L906 23.5L934 25.6L952 26.8L974 27L990 26.2L999 25.6L1014 24.6L1026 24.3L1036 18.5L1100 25.8L1138 28.3L1167 25.6L1189 24.1L1210 24L1221 24.1L1245 23.6L1269 20.9L1275 12.1L1303 10.2L1315 12.3L1340 12L1351 12.3L1374 13.8L1397 14.8L1422 14.1L1433 13.4L1450 12.6L1460 20L1527 25.2L1570 21L1592 18.3L1600 17.8L1600 48ZM1 12.1L9 11.1L121 11.1L135 12.1L125 13L6 13ZM1130 10.3L1138 9.8L1168 9.8L1182 10.3L1172 10.8L1135 10.8ZM858 11.7L866 10.4L1018 10.4L1032 11.7L1022 13.1L863 13.1ZM1375 3.6L1383 3L1411 3L1425 3.6L1415 4.2L1380 4.2ZM553 15.4L561 14.5L658 14.5L672 15.4L662 16.4L558 16.4ZM85 4.2L93 3.5L199 3.5L213 4.2L203 4.9L90 4.9ZM1017 17.4L1025 16.7L1121 16.7L1135 17.4L1125 18.2L1022 18.2ZM522 13.7L530 13L733 13L747 13.7L737 14.4L527 14.4ZM343 4.5L351 3.8L499 3.8L513 4.5L503 5.3L348 5.3ZM901 19L909 18.5L927 18.5L941 19L931 19.6L906 19.6ZM1151 19.1L1159 17.8L1203 17.8L1217 19.1L1207 20.4L1156 20.4ZM885 13.2L893 12L1068 12L1082 13.2L1072 14.4L890 14.4ZM140 6.9L148 5.7L183 5.7L197 6.9L187 8.1L145 8.1ZM158 1.7L166 1.2L249 1.2L263 1.7L253 2.2L163 2.2ZM895 13.8L903 12.8L1058 12.8L1072 13.8L1062 14.8L900 14.8ZM989 19.3L997 18.1L1088 18.1L1102 19.3L1092 20.5L994 20.5ZM286 13.8L294 12.7L338 12.7L352 13.8L342 14.9L291 14.9ZM789 14.4L797 13L999 13L1013 14.4L1003 15.7L794 15.7ZM1227 10.1L1235 9.1L1263 9.1L1277 10.1L1267 11.1L1232 11.1ZM354 -2.3L362 -2.9L567 -2.9L581 -2.3L571 -1.8L359 -1.8ZM661 21.8L669 20.4L863 20.4L877 21.8L867 23.3L666 23.3ZM648 23.4L656 22.9L756 22.9L770 23.4L760 23.9L653 23.9ZM133 2.7L141 1.3L175 1.3L189 2.7L179 4.2L138 4.2ZM800 26.1L808 24.7L870 24.7L884 26.1L874 27.5L805 27.5ZM1170 14.8L1178 14.3L1248 14.3L1262 14.8L1252 15.3L1175 15.3ZM534 12.2L542 11.4L587 11.4L601 12.2L591 13.1L539 13.1ZM1292 23.8L1298 23L1381 23L1391 23.8L1383 24.5L1296 24.5ZM501 23.4L507 22.6L590 22.6L600 23.4L592 24.3L505 24.3ZM726 38.9L732 38.2L859 38.2L869 38.9L861 39.5L730 39.5ZM586 27.3L592 26.7L621 26.7L631 27.3L623 27.9L590 27.9ZM30 22.1L36 21.1L61 21.1L71 22.1L63 23.1L34 23.1ZM307 27.3L313 26.2L379 26.2L389 27.3L381 28.3L311 28.3ZM872 34.8L878 34.1L973 34.1L983 34.8L975 35.5L876 35.5ZM1328 17.7L1334 16.7L1387 16.7L1397 17.7L1389 18.7L1332 18.7ZM189 24L195 23.1L271 23.1L281 24L273 25L193 25ZM1325 25.4L1331 24.9L1455 24.9L1465 25.4L1457 25.9L1329 25.9ZM552 28.9L558 28L657 28L667 28.9L659 29.7L556 29.7ZM1391 19.6L1397 19L1464 19L1474 19.6L1466 20.2L1395 20.2ZM1029 38.7L1035 38.3L1134 38.3L1144 38.7L1136 39.2L1033 39.2ZM176 24.9L182 23.9L248 23.9L258 24.9L250 25.9L180 25.9Z'/%3E%3C/svg%3E");
  --sb-edge-bot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 48' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' d='M0 48L0 33.9L18 33.6L34 32.4L49 31.3L64 24.8L124 27.3L150 29.3L175 26.2L189 33.6L262 26.6L306 22.9L321 20.8L326 16.6L343 16.8L359 19.2L382 21.6L410 24.5L433 24.9L460 22.6L487 19.4L491 23.8L515 21.1L527 18.8L540 18.5L554 14.4L605 12.1L637 9.1L662 9.6L682 11.3L695 12.7L707 13.7L723 14.4L738 14.5L766 13.9L785 14.6L814 18.2L833 21.4L842 30L877 29.7L903 24.4L914 22.7L936 22.1L958 23.1L971 24.2L994 25.3L1009 19.9L1068 17.1L1097 20.7L1126 25L1151 27.4L1165 27.8L1180 32.4L1231 31.5L1257 32.4L1275 34L1296 34.9L1309 34.4L1323 33.1L1347 30L1361 21.2L1400 21.3L1440 25.4L1449 25.5L1471 22.1L1499 18.1L1508 17.4L1522 17.1L1550 18.8L1566 20.1L1589 20.7L1600 20.4L1600 48ZM149 11.6L157 10.6L364 10.6L378 11.6L368 12.6L154 12.6ZM803 17.8L811 16.5L855 16.5L869 17.8L859 19.1L808 19.1ZM182 12.3L190 10.9L327 10.9L341 12.3L331 13.7L187 13.7ZM335 14.3L343 13L542 13L556 14.3L546 15.5L340 15.5ZM735 9.5L743 8.3L929 8.3L943 9.5L933 10.7L740 10.7ZM415 12.5L423 11.1L523 11.1L537 12.5L527 13.9L420 13.9ZM1382 11.2L1390 10.1L1480 10.1L1494 11.2L1484 12.3L1387 12.3ZM112 20.9L120 19.7L198 19.7L212 20.9L202 22.1L117 22.1ZM234 8L242 6.6L312 6.6L326 8L316 9.4L239 9.4ZM1124 13.5L1132 12.6L1207 12.6L1221 13.5L1211 14.5L1129 14.5ZM1061 21.8L1069 20.8L1249 20.8L1263 21.8L1253 22.8L1066 22.8ZM645 2.5L653 1L772 1L786 2.5L776 4L650 4ZM1187 31.6L1195 30.6L1378 30.6L1392 31.6L1382 32.6L1192 32.6ZM491 9.5L499 8.6L535 8.6L549 9.5L539 10.3L496 10.3ZM1109 19.4L1117 18.7L1177 18.7L1191 19.4L1181 20.1L1114 20.1ZM1092 19.9L1100 18.7L1306 18.7L1320 19.9L1310 21.1L1097 21.1ZM287 4.8L295 3.4L434 3.4L448 4.8L438 6.2L292 6.2ZM347 5L355 4.6L389 4.6L403 5L393 5.5L352 5.5ZM224 16.3L232 14.9L321 14.9L335 16.3L325 17.6L229 17.6ZM133 9.6L141 8.2L238 8.2L252 9.6L242 10.9L138 10.9ZM642 4.3L650 3.5L842 3.5L856 4.3L846 5.1L647 5.1ZM840 12.4L848 11.4L942 11.4L956 12.4L946 13.4L845 13.4ZM1178 13.1L1186 12.3L1221 12.3L1235 13.1L1225 13.9L1183 13.9ZM617 -6L625 -6.7L711 -6.7L725 -6L715 -5.3L622 -5.3ZM650 1L658 0.6L735 0.6L749 1L739 1.4L655 1.4ZM195 15.9L203 15.3L317 15.3L331 15.9L321 16.4L200 16.4ZM314 23.9L320 23.3L341 23.3L351 23.9L343 24.5L318 24.5ZM1416 33.6L1422 32.7L1490 32.7L1500 33.6L1492 34.4L1420 34.4ZM533 22.1L539 21.3L649 21.3L659 22.1L651 22.9L537 22.9ZM566 15.4L572 14.4L663 14.4L673 15.4L665 16.4L570 16.4ZM463 30L469 29.6L485 29.6L495 30L487 30.4L467 30.4ZM675 21.6L681 20.5L782 20.5L792 21.6L784 22.7L679 22.7ZM1107 39L1113 38L1198 38L1208 39L1200 39.9L1111 39.9ZM756 26L762 24.9L848 24.9L858 26L850 27.2L760 27.2ZM676 20.9L682 19.9L765 19.9L775 20.9L767 21.8L680 21.8ZM85 41.1L91 40.5L148 40.5L158 41.1L150 41.7L89 41.7ZM1236 38.9L1242 37.8L1374 37.8L1384 38.9L1376 39.9L1240 39.9ZM1328 34.5L1334 34L1444 34L1454 34.5L1446 35.1L1332 35.1ZM674 19.1L680 18.6L719 18.6L729 19.1L721 19.6L678 19.6ZM968 32L974 30.9L1034 30.9L1044 32L1036 33.2L972 33.2Z' transform='matrix(1 0 0 -1 0 48)'/%3E%3C/svg%3E");
  --sb-h: clamp(15.5rem, 22vw, 24rem);
  --sb-edge: clamp(16px, 2.3vw, 38px);
  --sb-gate: calc(var(--sb-h) * .86);
  --sb-mask:
    var(--sb-edge-top) 0 0 / 100% var(--sb-edge) no-repeat,
    var(--sb-edge-bot) 0 100% / 100% var(--sb-edge) no-repeat,
    linear-gradient(#000, #000) 0 calc(var(--sb-edge) - 1px) / 100% calc(100% - 2 * var(--sb-edge) + 2px) no-repeat;
  position: relative; z-index: 1;
  min-height: var(--sb-h);
  overflow-x: clip;
}

.stories-band__sheet {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  background-color: var(--ochre);
  /* woodblock ink lay: broad uneven tone + fine tooth */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='400'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .02' numOctaves='3' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .62 0 0 0 0 .36 0 0 0 0 .05 0 0 0 .55 -.17'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='b' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' seed='8' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .3 0 0 0 0 .05 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
  -webkit-mask: var(--sb-mask); mask: var(--sb-mask);
}
.stories-band__sheet--front { background: none; z-index: 2; }

/* far range: pale, wide, slow */
.stories-band__far { position: absolute; left: 50%; bottom: -2%; width: max(112%, 1500px); aspect-ratio: 4 / 1; margin-left: calc(max(112%, 1500px) / -2); color: var(--ink); opacity: .2; }
/* near ridge: solid ink, in front of the gate's feet */
.stories-band__near { position: absolute; left: 50%; bottom: -1px; width: max(106%, 1400px); aspect-ratio: 4 / 1; margin-left: calc(max(106%, 1400px) / -2); color: var(--ink); }
.stories-band__near::after { content: ""; position: absolute; left: 0; right: 0; top: 99.5%; height: 40px; background: var(--ink); }

.stories-band__cloud { position: absolute; color: var(--ink); opacity: .2; }
.stories-band__cloud--l { left: 3%; top: 14%; width: clamp(150px, 15vw, 280px); }
.stories-band__cloud--r { right: -2%; top: 20%; width: clamp(200px, 21vw, 400px); opacity: .24; }

/* the gate */
.stories-band__gate { position: absolute; z-index: 1; left: 50%; bottom: calc(var(--sb-h) * .13); width: var(--sb-gate); margin-left: calc(var(--sb-gate) / -2); pointer-events: none; }
.stories-band__torii { color: var(--ink); }

/* words */
.stories-band__inner {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--sb-gate) minmax(0, 1fr); align-items: start;
  column-gap: clamp(1rem, 3vw, 4rem);
  min-height: var(--sb-h); padding-block: calc(var(--sb-edge) + clamp(2.2rem, 4vw, 4.2rem)) calc(var(--sb-edge) + 2rem);
}
.stories-band__motto, .stories-band__place {
  display: grid; font-family: var(--font-sans); font-weight: 500; text-transform: uppercase; line-height: 1.3;
  font-size: clamp(.82rem, 1.12vw, 1.15rem); letter-spacing: .52em;
}
.stories-band__motto { grid-column: 1; justify-self: end; justify-items: center; gap: 1.05em; margin-right: -.52em; text-align: center; }
.stories-band__where { grid-column: 3; justify-self: start; display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.4rem); }
.stories-band__place { gap: 1.05em; }
.stories-band__dash { display: block; width: clamp(1.5rem, 3vw, 3.5rem); height: 1px; background: var(--ink); opacity: .6; }
.stories-band__compass { position: relative; flex: none; width: clamp(3.6rem, 5.4vw, 5.6rem); color: var(--ink); }
.stories-band__compass::before { content: ""; position: absolute; inset: -9%; border-radius: 50%; border: 1px solid rgba(22, 22, 22, .55); }

/* ---- 768–1199 ---- */
@media (max-width: 1199.98px) {
  .stories-band { --sb-h: clamp(15rem, 29vw, 21rem); --sb-gate: calc(var(--sb-h) * .78); }
  .stories-band__motto, .stories-band__place { letter-spacing: .42em; }
  .stories-band__motto { margin-right: -.42em; }
  .stories-band__dash { display: none; }
}

/* ---- <768 · words above, gate centred on the ridge, band taller ---- */
@media (max-width: 767.98px) {
  .stories-band { --sb-h: clamp(27rem, 118vw, 33rem); --sb-edge: clamp(14px, 4.4vw, 22px); --sb-gate: min(62vw, 17rem); }
  .stories-band__inner { grid-template-columns: minmax(0, 1fr); justify-items: center; row-gap: 0; align-content: space-between; padding-block: calc(var(--sb-edge) + 2.6rem) calc(var(--sb-edge) + 1.4rem); }
  .stories-band__motto { grid-column: 1; justify-self: center; font-size: clamp(.9rem, 4vw, 1.05rem); letter-spacing: .46em; margin-right: -.46em; }
  .stories-band__where { grid-column: 1; justify-self: stretch; justify-content: space-between; align-items: flex-end; color: var(--parchment); }
  .stories-band__place { font-size: .78rem; letter-spacing: .4em; }
  .stories-band__dash { display: none; }
  .stories-band__compass { width: 3.4rem; }
  .stories-band__compass::before { border-color: rgba(242, 238, 231, .5); }
  .stories-band__compass .art { color: var(--parchment); }
  .stories-band__gate { bottom: calc(var(--sb-h) * .2); }
  .stories-band__far { width: 1150px; margin-left: -575px; bottom: 12%; }
  .stories-band__near { width: 1250px; margin-left: -560px; }
  .stories-band__near::after { height: 120px; }
  .stories-band__cloud--l { left: -12%; top: 25%; width: 46vw; }
  .stories-band__cloud--r { right: -14%; top: 33%; width: 56vw; }
}
