/* A story's page (/stories/<slug>, story_page.py, 2026-11-13), on top of article.css.
   Book-like reading in Cormorant, one colour per place (Kerala green, Accra coral, Quebec lake blue),
   the paintings a little wider than the words, and the little sun that travels the day. */
:root {
  --st-kerala: #2c6e47;
  --st-accra: #a44a22;
  --st-quebec: #2a5f86;
  --st-later: var(--ar-gold);
}
@media screen {
  :root[data-theme="dark"] {
    --st-kerala: #94d6aa;
    --st-accra: #f2a882;
    --st-quebec: #9fcaee;
  }
}

.st-hero .ar-line { max-width: 660px; }
.st-hero .ar-hero__sky img { object-position: 50% 60%; }

/* the words */
.st-body { max-width: 680px; font: 500 clamp(21px, 2.15vw, 23px)/1.66 var(--ar-serif); color: var(--ar-ink); }
.st-body p { margin: 0 0 1em; }
.st-body em { font-style: italic; }

/* each scene opens with its place and time */
.st-scene { --st-accent: var(--st-later); padding: 30px 0 6px; scroll-margin-top: 24px; }
.st-scene--kerala { --st-accent: var(--st-kerala); }
.st-scene--accra { --st-accent: var(--st-accra); }
.st-scene--quebec { --st-accent: var(--st-quebec); }
.st-place { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 34px 0 30px; text-align: center; }
.st-place::before { content: ""; width: 120px; height: 14px; margin-bottom: 10px;
  background: radial-gradient(circle at 50% 50%, var(--st-accent) 0 4px, transparent 5px),
              linear-gradient(90deg, transparent, var(--st-accent) 30%, transparent 46%, transparent 54%, var(--st-accent) 70%, transparent) center / 100% 1px no-repeat;
  opacity: .9; }
.st-where { font: 600 clamp(14px, 1.5vw, 16px)/1.4 var(--ar-cinzel); letter-spacing: .24em; text-transform: uppercase; color: var(--st-accent); }
.st-when { font: italic 500 clamp(19px, 2vw, 22px)/1.3 var(--ar-serif); color: var(--ar-soft); }
.st-scene:first-of-type .st-place { margin-top: 10px; }
.st-scene:first-of-type .st-place + p::first-letter { float: left; margin: .06em .1em 0 0; font: 500 4.1em/.8 var(--ar-serif); color: var(--st-accent); }
.st-scene--later .st-where { font-size: clamp(16px, 1.7vw, 18px); }

/* the paintings, a little wider than the words */
.st-figure { width: min(880px, calc(100vw - 32px)); margin: 34px 0 38px 50%; transform: translateX(-50%); }
.st-figure img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 22px; box-shadow: var(--ar-shadow), 0 0 0 1px var(--ar-line); }

.st-end { margin: 46px 0 10px !important; text-align: center; font-size: 30px; color: var(--ar-honey); }

/* after the story */
.st-after { padding-top: 0; }
.st-next .st-next__more { margin: 24px 0 0; font-size: 17px; line-height: 1.75; }

/* the little sun that travels the day: Kerala, Accra, Quebec */
.st-sun { position: fixed; z-index: 30; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100vw - 32px));
  padding: 12px 22px 10px; border: 1px solid var(--ar-line); border-radius: 22px; background: var(--ar-card);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--ar-shadow);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .5s ease, opacity .5s ease; pointer-events: none; }
.st-sun.is-on { transform: translate(-50%, 0); opacity: 1; }
.st-sun__path { position: relative; height: 30px; margin: 0 8px; }
.st-sun__path::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; border-top: 1px dashed var(--ar-line); }
.st-sun__dot { position: absolute; top: 10px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--ar-line); transition: background .4s ease, box-shadow .4s ease; }
.st-sun__dot[data-place="kerala"] { left: 0; --st-accent: var(--st-kerala); }
.st-sun__dot[data-place="accra"] { left: 50%; --st-accent: var(--st-accra); }
.st-sun__dot[data-place="quebec"] { left: 100%; --st-accent: var(--st-quebec); }
.st-sun__dot.is-here { background: var(--st-accent); box-shadow: 0 0 0 4px rgba(var(--ar-haze), .9), 0 0 0 5px var(--st-accent); }
.st-sun__name { position: absolute; top: 13px; left: 50%; transform: translateX(-50%); font: 700 9px/1 var(--ar-read); letter-spacing: .16em; text-transform: uppercase; color: var(--ar-soft); white-space: nowrap; }
.st-sun__orb { position: absolute; top: 0; left: calc(var(--p, 0) * 100%); width: 16px; height: 16px; margin: calc(var(--y, 0) * -1px) 0 0 -8px; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff6d6, #f6c757 55%, #e39a2c);
  box-shadow: 0 0 14px 4px rgba(246, 199, 87, .65), 0 0 34px 10px rgba(246, 199, 87, .25); }
.st-sun__now { margin: 10px 0 0; text-align: center; font: italic 500 17px/1.3 var(--ar-serif); color: var(--ar-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sun__where { font: 600 11px/1 var(--ar-cinzel); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: var(--ar-gold); }

@media (max-width: 640px) {
  .st-body { font-size: 20px; line-height: 1.62; }
  .st-figure { margin: 26px 0 30px 50%; }
  .st-figure img { border-radius: 16px; }
  .st-sun { padding: 8px 18px 7px; }
  .st-sun__path { height: 18px; }
  .st-sun__path::before { top: 8px; }
  .st-sun__dot { top: 4px; }
  .st-sun__name { display: none; }
  .st-sun__orb { top: -2px; width: 14px; height: 14px; margin-left: -7px; }
  .st-sun__now { margin-top: 4px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-sun, .st-sun__dot { transition: none; }
}
@media print {
  .st-sun { display: none; }
}
