/* Flat isometric illustrations: light tops, blue-grey sides, thin dark edges, royal-blue accents. */
.s-top   { fill: #DCE8F5; }
.s-left  { fill: #7C95B2; }
.s-right { fill: #4D6785; }
.s-top, .s-left, .s-right { stroke: #0A2238; stroke-width: 1; stroke-linejoin: round; }
.seam, .s-rail { fill: none; stroke: #0A2238; stroke-opacity: .35; stroke-width: 1.2; stroke-linecap: round; }
.floor { fill: #2D7BFF; opacity: .12; }
.led { fill: #2D7BFF; }
.led-4 { fill: #5EE6A8; }
.led-dot { fill: #6FE3FF; }
.slab .s-top { transition: fill .35s ease; }
.slab.active .s-top { fill: #2D7BFF; }
.slab.active .s-rail { stroke: #fff; stroke-opacity: .7; }

.headline {
  font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-weight: 800; line-height: .98; letter-spacing: -.04em;
  margin: 0 0 .5em; max-width: 12ch;
}
.server { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35)); }

/* ---------- idle life (switched off with reduce motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .server-wrap { animation: drift 7s ease-in-out 1.6s infinite; }   /* suspended in water */
  .led.blink { animation: power-on .01s forwards, blink .18s steps(1) 2; }   /* stays on underneath the blink */
  .led-dot.blink { animation: blink .18s steps(1) 2; }
}
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- phones: the pinned stack moment fits one screen ---------- */
@media (max-width: 900px) {
  .js-stack.stack { min-height: 100svh; grid-template-rows: auto auto auto; align-content: center; row-gap: .75rem;
    padding-block: 8rem 1.5rem; }                         /* top padding clears the two-row floating bar */
  .js-stack .stack-head { margin-bottom: 0; }
  .js-stack .stack-art svg { height: min(38svh, 340px); width: 100%; max-width: none; }   /* viewBox keeps it centred */
  .js-stack.journey .stack-art svg { height: min(30svh, 280px); }                       /* the tall 6-stop route */
  .js-stack .wall-text p { font-size: 1.02rem; }
  .js-stack .progress { margin-top: 1rem; }
}

/* ---------- family cloud hero: photos float from the phone up to the server ---------- */
.page-hero { padding-top: clamp(2.5rem, 7vw, 5rem); }
.art-wrap svg { width: 100%; max-width: 460px; margin-inline: auto; height: auto; overflow: visible; }
.phone .s-top { fill: #16304D; } .phone .s-left, .phone .s-right { fill: #2B4A6B; }
.screen { fill: #2D7BFF; opacity: .85; }
.arc { fill: none; stroke: rgba(111, 227, 255, .35); stroke-width: 2; stroke-dasharray: 3 8; stroke-linecap: round; }
.photo { fill: #DCE8F5; stroke: #2D7BFF; stroke-width: 1.5; offset-path: var(--arc); offset-rotate: 0deg; offset-distance: 55%; opacity: 0;
  transform-box: fill-box; transform-origin: center; }
.photo.p0 { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .photo { animation: upload 3.6s cubic-bezier(.45, .05, .35, 1) infinite; opacity: 0; }
  .photo.p1 { animation-delay: .9s; } .photo.p2 { animation-delay: 1.8s; } .photo.p3 { animation-delay: 2.7s; }
}
@keyframes upload {
  0% { offset-distance: 0%; opacity: 0; transform: scale(.7); }
  12% { opacity: 1; transform: scale(1); }
  85% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; transform: scale(.6); }
}

/* ---------- journey: a dot travels a path of stepping stones (cloud: joining, work: a visit) ---------- */
.journey-svg { overflow: visible; }
.trail { fill: none; stroke: rgba(147, 179, 207, .35); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; }
.trail-lit { fill: none; stroke: #6FE3FF; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(111, 227, 255, .8)); }
.stone .s-top { fill: #1D3B5C; } .stone .s-left { fill: #142C47; } .stone .s-right { fill: #0E2238; }
.stone polygon { stroke: #2A4A6E; }
.marker .s-top { transition: fill .35s ease; }
.stop.reached .marker .s-top { fill: #2D7BFF; }
.stop.reached .stone .s-top { fill: #24507D; }
.packet-glow { fill: rgba(111, 227, 255, .28); }
.packet-core { fill: #FFFFFF; }

/* ---------- projects: a sideways gallery (swipe without JS; pinned + scroll-driven with JS) ---------- */
.rail { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.rail-head { margin-bottom: 1.75rem; max-width: 40rem; }
.rail-window { overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  scrollbar-width: none; }
.rail-window::-webkit-scrollbar { display: none; }
.rail-track { display: flex; gap: clamp(1rem, 2.5vw, 1.75rem); list-style: none; margin: 0; padding: 0 0 1rem; width: max-content; }
.card {
  flex: none; width: min(80vw, 360px); min-height: 21rem; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: .5rem; padding: clamp(1.4rem, 3vw, 1.9rem); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(45, 123, 255, .16), rgba(7, 34, 56, .55) 60%); box-shadow: inset 0 0 0 1px var(--hairline);
}
.card h3 { margin: .25rem 0 0; }
.card p { color: var(--muted); margin: 0; }
.card .tech { color: var(--blue); margin-top: auto; font-size: .95rem; }
.card-icon { width: 64px; height: 48px; }
.card.later { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hairline); }
.card.later .card-icon .s-top { fill: transparent; } .card.later .card-icon polygon { fill: transparent; stroke: #93B3CF; stroke-dasharray: 3 3; }
.js-rail.rail { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 6rem; }
.js-rail .rail-window { overflow: visible; scroll-snap-type: none; }

/* ---------- status page ---------- */
.overall { display: flex; align-items: center; gap: .8rem; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; }
.overall::before { content: ""; flex: none; width: .9rem; height: .9rem; border-radius: 50%; background: #93B3CF; }
.overall[data-state="up"]::before { background: #5EE6A8; box-shadow: 0 0 14px rgba(94, 230, 168, .8); }
.overall[data-state="down"]::before { background: #FF6B6B; box-shadow: 0 0 14px rgba(255, 107, 107, .8); }
.overall[data-state="maint"]::before { background: #FFB547; box-shadow: 0 0 14px rgba(255, 181, 71, .7); }
body[data-state="down"] .status-server .led { fill: #FF6B6B; }
body[data-state="maint"] .status-server .led { fill: #FFB547; }

.notice { margin-bottom: 2rem; display: grid; gap: 1rem; }
.note { padding: 1.25rem 1.5rem; border-radius: var(--radius); background: rgba(255, 181, 71, .08); box-shadow: inset 0 0 0 1px rgba(255, 181, 71, .35); }
.note strong { font-family: var(--display); font-size: 1.15rem; }
.note p { margin: .4rem 0 0; color: var(--muted); }

.services { display: grid; gap: 2.5rem; padding-bottom: 2.5rem; }
.group-name { font-family: var(--body); font-weight: 600; font-size: 1rem; letter-spacing: 0; color: var(--muted); margin-bottom: .25rem; }
.svc { display: grid; grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.5fr); grid-template-areas: "name badge ticks" "name badge uptime";
  gap: .35rem 1.5rem; align-items: center; padding-block: 1.1rem; border-top: 1px solid var(--hairline); }
.svc .name { grid-area: name; }
.svc .name strong { display: block; font-family: var(--display); font-size: 1.3rem; }
.svc .name span { color: var(--muted); font-size: .95rem; }
.badge { grid-area: badge; justify-self: start; padding: .3rem .85rem; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.badge.up { background: rgba(94, 230, 168, .14); color: #5EE6A8; }
.badge.down { background: rgba(255, 107, 107, .16); color: #FF9A9A; }
.badge.pending { background: rgba(255, 181, 71, .14); color: #FFC56E; }
.badge.maint { background: rgba(255, 181, 71, .14); color: #FFC56E; }
.ticks { grid-area: ticks; display: flex; gap: 3px; height: 26px; }
.tick { flex: 1; min-width: 2px; border-radius: 2px; background: #2D7BFF; opacity: .85; }
.tick.down { background: #FF6B6B; opacity: 1; }
.tick.pending, .tick.maint { background: #FFB547; }
.uptime { grid-area: uptime; color: var(--muted); font-size: .9rem; text-align: right; }
.status-foot { padding-bottom: 2rem; }
@media (max-width: 700px) {
  .svc { grid-template-columns: 1fr auto; grid-template-areas: "name badge" "ticks ticks" "uptime uptime"; }
  .uptime { text-align: left; }
}

.swipe-hint { display: none; }
@media (max-width: 900px) {
  .swipe-hint { display: block; color: var(--cyan); font-size: .95rem; margin-top: .5rem; }
  .card { width: min(82vw, 340px); }
}
