/* Peka about.css: /about/ and /id/tentang/ only.
   Head: the riak field reacts to the cursor, next to what "peka" means.
   Story: three chapters lit by reading position. The rail's motif follows the chapter:
   rings going out (loud), rings coming in plus the loop (listening), rings pulsing out inside a held edge (scale).
   Every ring is a perfect circle scaled from its own centre. */

/* ---------- head ---------- */
.peka-about__head { position: relative; isolation: isolate; overflow: hidden; padding-top: clamp(4rem, 12vh, 8rem); padding-bottom: clamp(3rem, 8vh, 5rem); }
.peka-about__head::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to bottom, transparent, var(--ink)); z-index: -1; pointer-events: none; }
.peka-about__hero h1 { font-size: clamp(2.9rem, 7.2vw, 6.5rem); line-height: .98; letter-spacing: -.035em; margin: 0 0 1.5rem; max-width: 14ch; }
.peka-about__hero .peka-lede { max-width: 44ch; margin: 0 0 2.25rem; }
.pk-def { display: inline-grid; grid-template-columns: auto auto; gap: .4rem 1.5rem; align-items: baseline; margin: 0; padding: 1.1rem 1.4rem 1.15rem; border: 1px solid var(--line2); background: rgba(10,10,10,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pk-def dt { margin: 0; font: 800 1.875rem/1 var(--display); letter-spacing: -.03em; color: var(--light); }
.pk-def dt i { margin-left: .35rem; font: italic 400 .875rem/1 var(--sans); letter-spacing: 0; color: var(--fg3); }
.pk-def dd { margin: 0; font-size: 1.0625rem; color: var(--fg2); }
.pk-def dd small { display: block; margin-top: .3rem; font-size: .75rem; color: var(--fg3); }
@media (max-width: 599px) { .pk-def { grid-template-columns: 1fr; } }

/* ---------- story layout ---------- */
.pk-story { padding-top: clamp(2rem, 6vh, 4rem); padding-bottom: clamp(5rem, 14vh, 10rem); }
.pk-story__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); padding: 0 clamp(1.25rem, 4vw, 3rem); }
.pk-story__sticky { position: sticky; top: calc(var(--pk-top, var(--hdr, 72px)) + 6vh); display: grid; justify-items: start; gap: 1.25rem; }
.pk-story__motif { position: relative; width: min(100%, 400px); }
.pk-story__motif svg { display: block; width: 100%; height: auto; overflow: visible; }
.pk-story__center { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; pointer-events: none; }
.pk-story__center span, .pk-story__cap span { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity 300ms var(--ease-exit), transform 300ms var(--ease-exit); }
.pk-story__center span { font: 800 clamp(1.25rem, 2.2vw, 1.75rem)/1 var(--display); letter-spacing: -.03em; color: var(--light); text-shadow: 0 0 4px var(--ink), 0 0 14px var(--ink); }
/* an ink disc: the rings coming in disappear into it, the label stays legible */
.pk-story__center::before { content: ""; grid-area: 1 / 1; width: 20%; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.pk-story__cap { display: grid; margin: 0; font-size: 1.0625rem; color: var(--fg2); }
.pk-story__rail[data-state="0"] [data-s="0"], .pk-story__rail[data-state="1"] [data-s="1"], .pk-story__rail[data-state="2"] [data-s="2"] { opacity: 1; transform: none; transition: opacity 520ms var(--ease-notice) 120ms, transform 520ms var(--ease-notice) 120ms; }
.pk-story__idx { display: flex; gap: 1.25rem; margin: .5rem 0 0; padding: 0; list-style: none; font: 500 .75rem/1 var(--sans); letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--fg3); }
.pk-story__idx li { padding-bottom: .5rem; background: linear-gradient(var(--light), var(--light)) 0 100% / 0 1px no-repeat; transition: color 420ms var(--ease-notice), background-size 420ms var(--ease-notice); }
.pk-story__rail[data-state="0"] .pk-story__idx li:nth-child(1), .pk-story__rail[data-state="1"] .pk-story__idx li:nth-child(2), .pk-story__rail[data-state="2"] .pk-story__idx li:nth-child(3) { color: var(--light); background-size: 100% 1px; }

/* ---------- motif ---------- */
.pk-m-ring { fill: none; stroke: var(--fg3); stroke-width: 1; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; transform: scale(var(--s)); opacity: .9; transition: transform 900ms var(--ease-settle), opacity 600ms var(--ease-notice); }
.pk-m-loop { opacity: 0; transition: opacity 520ms var(--ease-notice); }
.pk-m-orbit { fill: none; stroke: var(--line2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pk-m-dot { fill: var(--light); }
.pk-m-spin { transform-box: view-box; transform-origin: 120px 120px; }
.pk-m-q { font: 500 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; fill: var(--fg3); }
/* 0 loud: waves leave the centre */
.pk-story__rail[data-state="0"] .pk-m-ring { animation: pk-out 4s var(--ease-notice) infinite; animation-delay: calc(var(--i) * -.8s); }
@keyframes pk-out { from { transform: scale(.08); opacity: 0; } 12% { opacity: .9; } to { transform: scale(1); opacity: 0; } }
/* 1 listening: waves come back in, the loop turns, its four stages light in order */
.pk-story__rail[data-state="1"] .pk-m-ring { animation: pk-in 4s var(--ease-notice) infinite; animation-delay: calc(var(--i) * -.8s); }
@keyframes pk-in { from { transform: scale(.92); opacity: 0; } 30% { opacity: .55; } to { transform: scale(.08); opacity: 0; } }
.pk-story__rail[data-state="1"] .pk-m-loop { opacity: 1; }
.pk-story__rail[data-state="1"] .pk-m-spin { animation: pk-orbit 8s linear infinite; }
.pk-story__rail[data-state="1"] .pk-m-q { animation: pk-q 8s steps(1, end) infinite; animation-delay: calc(var(--q) * 2s - 8s); }
@keyframes pk-orbit { to { transform: rotate(360deg); } }
@keyframes pk-q { 0% { fill: var(--light); } 25%, 100% { fill: var(--fg3); } }
/* 2 scale: the outer ring holds the edge, the rings inside keep pulsing out to it */
.pk-story__rail[data-state="2"] .pk-m-ring { stroke: var(--fg2); animation: pk-scale 4s linear infinite; animation-delay: calc(var(--i) * -1s); }
.pk-story__rail[data-state="2"] .pk-m-ring:nth-of-type(5) { animation: none; transform: scale(1); opacity: .9; }
@keyframes pk-scale { from { transform: scale(.08); opacity: 0; } 10% { opacity: .9; } 88% { opacity: .9; } to { transform: scale(1); opacity: 0; } }

/* ---------- chapters ---------- */
.pk-ch + .pk-ch { margin-top: clamp(7rem, 26vh, 16rem); }
.pk-ch__k { margin: 0 0 1.5rem; font: 500 .75rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--fg3); font-variant-numeric: tabular-nums; }
.pk-ch__lead { margin: 0; font: 700 clamp(1.625rem, 2.7vw, 2.5rem)/1.18 var(--display); letter-spacing: -.025em; color: var(--light); }
.pk-ch__lead + .pk-ticks, .pk-ch__lead + .pk-strike { margin-top: 2.25rem; }
.pk-ticks + .pk-ch__lead { margin-top: 2.5rem; }
.pk-strike, .pk-ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 1rem; font-size: 1.1875rem; line-height: 1.5; color: var(--fg2); }
.pk-strike li, .pk-ticks li { position: relative; padding-left: 2rem; }
.pk-ticks b { color: var(--light); font-weight: 600; }
/* the old way: a struck line, drawn across every line of the item */
.pk-strike li::before { content: "×"; position: absolute; left: 0; top: 0; color: var(--fg3); }
.pk-strike li > span { background: linear-gradient(currentColor, currentColor) 0 58% / 100% 1px no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 700ms var(--ease-settle), color 420ms var(--ease-notice); }
.pk-strike li.is-done > span { color: var(--fg3); }
/* the Peka way: a ring that fills */
.pk-ticks li::before { content: ""; position: absolute; left: .15rem; top: .5em; width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--fg2); box-sizing: border-box; transition: background-color 420ms var(--ease-notice), border-color 420ms var(--ease-notice); }
.pk-ticks li.is-done::before { background: var(--light); border-color: var(--light); }
/* key points: a 2px rule drawn under the phrase once it has been read */
.pk-hl { background: linear-gradient(var(--light), var(--light)) 0 100% / 100% 2px no-repeat; color: inherit; padding-bottom: .04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 800ms var(--ease-settle); }
.pk-names > span { white-space: nowrap; }

/* ---------- lit by reading (only once about.js has split the words) ---------- */
.pk-story.is-live .w { opacity: .2; transition: opacity 420ms var(--ease-notice); }
.pk-story.is-live .w.is-lit { opacity: 1; }
.pk-story.is-live .pk-hl { background-size: 0 2px; }
.pk-story.is-live .pk-hl.is-done { background-size: 100% 2px; }
.pk-story.is-live .pk-strike li > span { background-size: 0 1px; }
.pk-story.is-live .pk-strike li.is-done > span { background-size: 100% 1px; }

/* ---------- phones: the rail pins under the header as a small strip ---------- */
@media (max-width: 899px) {
  .pk-story__grid { display: block; }
  .pk-story__rail { position: sticky; top: var(--pk-top, var(--hdr, 64px)); z-index: 2; margin: 0 calc(clamp(1.25rem, 4vw, 3rem) * -1) 2rem; padding: .75rem clamp(1.25rem, 4vw, 3rem) 1.75rem; background: linear-gradient(var(--ink) 72%, rgba(10,10,10,0)); }
  .pk-story__sticky { position: static; grid-template-columns: 76px 1fr; align-items: center; gap: .25rem 1rem; }
  .pk-story__motif { width: 76px; grid-row: span 2; }
  .pk-story__center, .pk-m-q { display: none; }
  .pk-story__cap { font-size: .9375rem; }
  .pk-story__idx { margin: 0; gap: 1rem; }
  .pk-ch + .pk-ch { margin-top: 7rem; }
  .pk-ch__lead { font-size: 1.625rem; }
  .pk-strike, .pk-ticks { font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pk-story__rail .pk-m-ring, .pk-story__rail .pk-m-spin, .pk-story__rail .pk-m-q { animation: none !important; }
}
