/* A Nexa school day · the dark version, with a path you can see and that changes colour through the day.
   Phones: cards step left and right so the line weaves down the open side, always visible.
   Wide screens: cards either side, the line swings down the middle. js/school-path.js does the rest. */
.sd { container-type: inline-size; position: relative; color: #fffef5; background: linear-gradient(180deg, #2a0410 0%, #4a0620 45%, #3a0418 80%, #2a0410 100%); overflow: hidden; }
.sd-intro { text-align: center; padding: 96px 24px 0; }
.sd-intro h2 { font-size: clamp(44px, 11cqi, 84px); line-height: .96; margin-top: 16px; }
.sd-intro h2 i { color: #e2fb84; }
.sd-intro p { font-size: 18px; line-height: 1.5; color: #f3d9dc; max-width: 600px; margin: 18px auto 0; }
.sd-stage { position: relative; max-width: 1200px; margin: 64px auto 0; padding: 0 20px 40px; box-sizing: border-box; }
.sd-lane { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.sd-lane svg { position: absolute; left: 0; top: 0; overflow: visible; }
.sd-dash { fill: none; stroke: rgba(251, 189, 183, .38); stroke-width: 4; stroke-dasharray: 2 12; stroke-linecap: round; }
.sd-lit { fill: none; stroke-width: 12; stroke-linecap: round; }
.sd-glow { fill: none; stroke-width: 26; stroke-linecap: round; opacity: .18; filter: blur(6px); }
.sd-head { position: absolute; left: 0; top: 0; width: 46px; height: 46px; margin: -23px 0 0 -23px; z-index: 3; pointer-events: none; }
.sd-head svg { width: 100%; height: 100%; display: block; fill: var(--c, #e2fb84); filter: drop-shadow(0 0 12px var(--c, #e2fb84)); animation: sd-spin 6s linear infinite; }
@keyframes sd-spin { to { transform: rotate(360deg); } }
.sd-spark { position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; z-index: 2; pointer-events: none; background: var(--c, #e2fb84); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); opacity: 0; }
.sd-spark.go { animation: sd-spark .8s ease-out forwards; }
@keyframes sd-spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2) rotate(120deg); } }
.sd-stop { position: relative; z-index: 1; margin-bottom: 56px; }
.sd-card { position: relative; width: calc(100% - 64px); background: #fffef5; color: #2a1219; border-radius: 28px; overflow: hidden; box-shadow: 0 34px 50px -36px rgba(0, 0, 0, .8); transition: box-shadow .4s ease, transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.sd-stop.sd-r .sd-card { margin-left: 64px; }
.sd-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.sd-tx { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.sd-tx .when { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6b022b; }
.sd-tx h3 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 34px; line-height: 1; }
.sd-tx p { font-size: 15.5px; line-height: 1.5; color: #4a3a40; }
.sd-stop.is-here .sd-card { box-shadow: 0 0 0 4px var(--c, #e2fb84), 0 34px 50px -36px rgba(0, 0, 0, .8); }
.sd-node { position: absolute; top: 34px; right: 10px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; box-sizing: border-box; background: #2a0410; color: #fbbdb7; border: 2px dashed rgba(251, 189, 183, .7); transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
.sd-stop.sd-r .sd-node { right: auto; left: 10px; }
.sd-node.on { background: var(--nc); color: #2a1219; border: 0; animation: sd-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sd-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.sd-home { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 0 60px; }
.sd-home svg { width: 170px; height: 162px; overflow: visible; }
.sd-home .win { fill: #4a0a22; transition: fill .6s ease; }
.sd-home.lit .win { fill: #e2fb84; }
.sd-home .smoke { opacity: 0; transition: opacity .6s ease; }
.sd-home.lit .smoke { opacity: 1; animation: sd-smoke 2.4s ease-in-out infinite; }
@keyframes sd-smoke { 50% { transform: translateY(-6px); } }
.sd-home .hl { font-family: 'Instrument Serif', Georgia, serif; font-size: 30px; font-style: italic; color: #fbbdb7; }
.sd-night { position: absolute; inset: -40px 0 0; pointer-events: none; }
.sd-night i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff6d6; opacity: 0; transition: opacity 1s ease; }
.sd.is-night .sd-night { position: absolute; inset: -40px 0 0; pointer-events: none; }
.sd-night i { opacity: .9; animation: sd-twinkle 2.8s ease-in-out infinite; }
.sd-night i:nth-child(2n) { animation-delay: -1.1s !important; } .sd-night i:nth-child(3n) { animation-delay: -1.9s !important; }
@keyframes sd-twinkle { 50% { opacity: .25; } }
@container (min-width: 760px) {
  .sd-stage { padding: 0 24px 40px; }
  .sd-stop { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); margin-bottom: -40px; }
  .sd-stop .sd-card, .sd-stop.sd-r .sd-card { grid-column: 1; width: auto; margin-left: 0; }
  .sd-stop.sd-r .sd-card { grid-column: 3; }
  .sd-stop.sd-last { margin-bottom: 40px; }
  .sd-node, .sd-stop.sd-r .sd-node { left: 50%; right: auto; margin-left: -24px; width: 48px; height: 48px; top: 60px; }
}
@media (prefers-reduced-motion: reduce) { .sd-head svg, .sd-node.on, .sd.is-night .sd-night i, .sd-home.lit .smoke { animation: none; } .sd-spark { display: none; } }
