/* MesosticMORPH: a mesostic woven like cloth. Indigo field, cream thread, one coral spine (cloth.js). */
:root {
  --bg: #f3efe6;
  --ink: #1f2a5a;          /* indigo */
  --muted: #5d6585;
  --line: #d8d1c0;
  --thread: #e2725b;       /* coral */
  --field: #1f2a5a;        /* the hero cloth sits on indigo in both themes */
  --serif: "Fraunces", Georgia, serif;
  --sans: "Work Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121831; --ink: #e9e5da; --muted: #a2a8c4; --line: #2a3360; --thread: #f08a74; --field: #0d1330; }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.5; }
a { color: inherit; text-decoration-color: var(--thread); text-underline-offset: 3px; }

.top { position: absolute; inset: 0 0 auto 0; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 4vw, 48px); color: #f3efe6; }
.mark { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; text-decoration: none; }
.mark span { color: var(--thread); font-weight: 700; letter-spacing: .04em; }
.back { font-size: .85rem; text-decoration: none; opacity: .75; }
.back:hover { opacity: 1; color: var(--thread); }

.stage { position: relative; height: 100svh; min-height: 540px; background: var(--field); color: #f3efe6; overflow: hidden; }
#cloth { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.dim { position: absolute; right: clamp(16px, 4vw, 48px); top: 50%; transform: translateY(-50%); text-align: right; pointer-events: none; }
.dim b { display: block; font-family: var(--serif); font-size: clamp(3rem, 10vw, 7.5rem); line-height: 1; color: var(--thread);
  font-variation-settings: "wght" 300, "opsz" 144; }
.dim span { font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; opacity: .7; }
.title { position: absolute; left: clamp(16px, 4vw, 48px); bottom: clamp(28px, 6vh, 60px); pointer-events: none; }
.title h1 { font-family: var(--serif); font-size: clamp(2.6rem, 8vw, 6rem); line-height: 1; font-weight: 400;
  font-variation-settings: "wght" 300, "opsz" 144; }
.title h1 span { color: var(--thread); font-size: .38em; font-weight: 700; letter-spacing: .08em; margin-left: .25em; vertical-align: top; }
.title p { font-size: .8rem; letter-spacing: .3em; text-transform: uppercase; opacity: .65; margin-top: 10px; }
@media (max-width: 640px) { .dim { top: 92px; transform: none; } }

main > section:not(.stage) { max-width: 1100px; margin: 0 auto; padding-left: clamp(16px, 4vw, 40px); padding-right: clamp(16px, 4vw, 40px); }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; padding-top: 56px; padding-bottom: 36px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1.5px dashed var(--ink); }
.tile svg { width: 100%; height: auto; max-height: 110px; margin-bottom: 10px; }
.th { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.th2 { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 4 4; opacity: .6; }
.gel { fill: color-mix(in srgb, var(--thread) 30%, transparent); stroke: var(--thread); stroke-width: 2; }
.sp { stroke: var(--thread); stroke-width: 3; stroke-linecap: round; }
.drop { fill: var(--thread); }
.tile:hover .th { stroke-dasharray: 6 4; animation: run 1.2s linear infinite; }
@keyframes run { to { stroke-dashoffset: -20; } }
.k { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--thread); font-weight: 600; }
.t { font-family: var(--serif); font-size: 1.35rem; font-weight: 500; line-height: 1.2; }

.threads { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 36px; }
.threads span { font-family: var(--serif); font-size: 1.05rem; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--ink); }
.threads i { font-style: normal; color: var(--thread); }

.bound { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 18px; padding-bottom: 48px; border-top: 2px dashed var(--line);
  font-size: .9rem; color: var(--muted); }
.bound b { color: var(--thread); margin-right: 4px; }

.foot { padding: 24px clamp(16px, 4vw, 48px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .85rem; color: var(--muted); border-top: 2px dashed var(--line); }
.sibs { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--thread); }
