/* The Long Road (pages_road.py): the home page on a wide screen. index.html loads this file for 1100 px and up only, so
   a phone's home page is untouched. A real painting on the first screen, the eight eras as stops on one road ending in
   Today, the newest reports with the history behind them. Hover effects move and fade only (transform, opacity), so
   they stay smooth; a reader who asked for less motion gets none. No script is needed for any of it. */
:root { --spring: cubic-bezier(.3, 1.28, .5, 1); }
.road-wrap { display: block; max-width: 76rem; margin: 0 auto 1.2rem; }
html:lang(pa) .road-wrap .only-en, html:not(:lang(pa)) .road-wrap .only-pa { display: none; }

/* the first screen: the painting in place of the drawn plain; its introduction and counts are in the band below */
.hero .hero-sub, .hero > .hero-facts { display: none; }
.hero-art { --now: image-set(url("/art/real-hero-960.webp") 1x, url("/art/real-hero-1600.webp") 2x); min-height: 20rem; background-position: center 42%; }
html.art-warm .hero-art::after { background-image: none; }
:root:not([data-theme="day"]) .hero-art { filter: brightness(.8) saturate(.92); }
.hero > .hero-credit { display: block; grid-column: 2; grid-row: 1 / span 8; align-self: end; justify-self: end; margin: 0 2.2rem 1.6rem 0; }
.hero-credit a { display: inline-block; padding: .2rem .55rem; border-radius: 4px; background: rgba(0, 0, 0, .55); color: #fff; font: 500 .72rem/1.3 var(--font-sans); text-decoration: none; }
.hero-credit a:hover { text-decoration: underline; }
.hero-credit :lang(pa) { font-family: var(--font-gurmukhi-sans); font-size: .82rem; }
.home-search-go { order: -1; color: var(--accent-ink); }
.home-search-box input { padding-left: .15rem; }

/* the road: eight stops and Today, each with its dot on the line */
.road-stops { position: relative; list-style: none; margin: 0; padding: .4rem 0 1.9rem; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)) minmax(0, 1.25fr); gap: .55rem; }
.road-stops::before { content: ""; position: absolute; left: 0; right: 0; bottom: .7rem; height: 2px; background: linear-gradient(90deg, var(--brass), var(--accent)); }
.rs { position: relative; }
.rs::after { content: ""; position: absolute; left: 50%; bottom: -1.52rem; width: .75rem; height: .75rem; margin-left: -.375rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--brass); transition: transform .3s var(--spring), background-color .2s, border-color .2s, box-shadow .2s; }
.rs-link { display: block; height: 100%; color: inherit; text-decoration: none; border-radius: 8px; }
.rs-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.rs-lift { position: relative; z-index: 0; display: block; transform-origin: center bottom; transition: transform .32s var(--spring); will-change: transform; }
.rs-lift::before { content: ""; position: absolute; inset: -.45rem -.45rem -.55rem; z-index: -1; border-radius: 12px; background: var(--surface); border: 1.5px solid #e0b25c;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 4px rgba(224, 178, 92, .18); opacity: 0; transition: opacity .22s ease; }
.rs-lift picture { display: block; }
.rs-pic { display: block; width: 100%; height: 4.9rem; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.rs-pic-real-era-1 { object-position: center 30%; }
.rs-pic-real-era-4 { object-position: center 28%; }
.rs-pic-real-era-6 { object-position: center 36%; }
.rs-pic-real-era-7 { object-position: center 32%; }
:root:not([data-theme="day"]) .rs-pic { filter: brightness(.88) saturate(.94); }
.rs-y { display: block; margin-top: .42rem; font: 700 .7rem/1.2 var(--font-sans); color: var(--accent-ink); }
.rs-n { display: block; font: 500 .84rem/1.2 var(--font-display); color: var(--ink); transition: color .2s; }
.rs-n:lang(pa) { font: 700 .92rem/1.4 var(--font-gurmukhi); }
.rs:hover .rs-lift, .rs:focus-within .rs-lift { transform: scale(1.13) translateY(-4px); z-index: 3; }
.rs:hover .rs-lift::before, .rs:focus-within .rs-lift::before { opacity: 1; }
.rs:hover + .rs .rs-lift, .rs:has(+ .rs:hover) .rs-lift { transform: scale(1.04); }
.rs:hover .rs-n, .rs:focus-within .rs-n { color: var(--accent-ink); }
.rs:hover::after, .rs:focus-within::after { background: #ffd68a; border-color: #ffd68a; transform: scale(1.55); box-shadow: 0 0 0 6px rgba(255, 214, 138, .3); }
.rs:active .rs-lift { transform: scale(.97); }
/* Today, the last stop */
.rs-now .rs-link { display: flex; flex-direction: column; gap: .25rem; padding: .6rem .7rem; border: 1.5px solid var(--accent); border-radius: 8px; background: var(--accent-soft); transition: background-color .2s; }
.rs-now:hover .rs-link { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.rs-now::after, .rs-now:hover::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(234, 138, 44, .28); }
.rs-now:hover::after { transform: scale(1.4); }
.rs-eye { font: 700 .68rem/1.2 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.rs-eye:lang(pa) { font: 700 .86rem/1.4 var(--font-gurmukhi-sans); letter-spacing: 0; }
.rs-date { font: 500 1rem/1.2 var(--font-display); color: var(--ink); }
.rs-date:lang(pa) { font: 700 1rem/1.4 var(--font-gurmukhi); }
.rs-still { font: 500 .74rem/1.3 var(--font-sans); color: var(--ink-2); }
.rs-still:lang(pa) { font-family: var(--font-gurmukhi-sans); font-size: .84rem; }

/* the era cards further down carry the same real pictures on a wide screen (pages_eras.py chooses the file) */
.era-cards li:nth-child(1) .ec-art { object-position: center 30%; }
.era-cards li:nth-child(4) .ec-art { object-position: center 26%; }
.era-cards li:nth-child(6) .ec-art { object-position: center 34%; }
.era-cards li:nth-child(7) .ec-art { object-position: center 34%; }

/* under the road: the counts, the newest pages, the introduction, the pictures' credits */
.road .road-facts { justify-content: flex-start; margin: .35rem 0 0; }
.road-new { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 1rem; margin-top: 1.5rem; }
.road-h { margin: 0; font: 700 .72rem/1.3 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.road-h:lang(pa) { font: 700 .95rem/1.5 var(--font-gurmukhi-sans); letter-spacing: 0; }
.road-all { font: 600 .85rem/1.3 var(--font-sans); color: var(--accent-ink); }
.road-all:lang(pa) { font-family: var(--font-gurmukhi-sans); font-size: .95rem; }
.road-cards { grid-column: 1 / -1; list-style: none; margin: .65rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.rn { display: flex; flex-direction: column; gap: .55rem; padding: .85rem 1rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  transition: transform .3s var(--spring), border-color .2s; }
.rn:hover, .rn:focus-within { transform: translateY(-3px) scale(1.02); border-color: #e0b25c; }
.rn-link { display: block; color: inherit; text-decoration: none; }
.rn-when { display: block; font: 500 .82rem/1.3 var(--font-sans); color: var(--ink-2); }
.rn-title { display: block; margin-top: .3rem; font: 500 1.06rem/1.26 var(--font-display); color: var(--ink); }
.rn-when:lang(pa) { font-family: var(--font-gurmukhi-sans); font-size: .92rem; }
.rn-title:lang(pa) { font: 700 1.08rem/1.5 var(--font-gurmukhi); }
.rn-root { align-self: flex-start; max-width: 100%; margin-top: auto; padding: .2rem .7rem; border: 1px solid var(--brass); border-radius: 99px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 .76rem/1.4 var(--font-sans); color: var(--brass); text-decoration: none; }
.rn-root:hover { background: var(--accent-soft); }
.rn-root-t { color: var(--ink); }
.rn-root:lang(pa) { font-family: var(--font-gurmukhi-sans); font-size: .86rem; }
.road-about { margin-top: 1.7rem; max-width: 50rem; }
.road-about p { margin: .4rem 0 0; font: 400 1.05rem/1.55 var(--font-body); color: var(--ink-2); }
.road-about p:lang(pa) { font: 400 1.15rem/1.75 var(--font-gurmukhi); }
.road-credits { margin-top: 1rem; font: 400 .88rem/1.5 var(--font-sans); color: var(--ink-2); }
.road-credits summary { cursor: pointer; font-weight: 600; }
.road-credits ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.road-credits li { margin: .25rem 0; }
.road-credits a { color: var(--ink); }
.rc-lic { color: var(--ink-3); }
.road-credits:lang(pa) { font-family: var(--font-gurmukhi-sans); font-size: .98rem; }

@media (prefers-reduced-motion: reduce) {
  .rs-lift, .rs::after, .rn { transition: none; }
  .rs:hover .rs-lift, .rs:focus-within .rs-lift, .rs:hover + .rs .rs-lift, .rs:has(+ .rs:hover) .rs-lift, .rn:hover, .rn:focus-within { transform: none; }
}
