/* ZAS website. The sky above (deep night blue, starlight text), granite ground below,
   and the app's night-vision mode in reds. Amber is kept for planets: in the real sky they
   look warmer than the stars around them. Night vision uses long-wavelength light only:
   black, crimson, red, dim rose and a deep amber for planets, never white, blue or green. */
:root {
  --sky-top: #050817;
  --sky-low: #14254D;
  --sky: var(--sky-top);
  --land: #0B0C0F;
  --ink: #F2EEE3;
  --soft: #8D97B5;
  --planet: #E9A14B;
  --rule: rgba(141, 151, 181, .22);
  --line: rgba(242, 238, 227, .14);
  --star: #F2EEE3;
  --read: Literata, Georgia, serif;
  --ui: Jost, system-ui, sans-serif;
}
:root.red {
  --sky-top: #000000;
  --sky-low: #2A0705;
  --land: #070101;
  --ink: #FF5A4E;
  --soft: #B8544B;
  --planet: #E8803A;
  --rule: rgba(255, 90, 78, .2);
  --line: rgba(255, 90, 78, .18);
  --star: #FF5A4E;
}
/* Photos keep their detail: drained of colour, then multiplied by red. */
:root.red img { filter: grayscale(1) brightness(.62) sepia(1) saturate(7) hue-rotate(-38deg); }
:root.red .logo img { filter: brightness(0) saturate(100%) invert(38%) sepia(86%) saturate(2600%) hue-rotate(345deg); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--land); }
body {
  margin: 0;
  background: var(--land);
  color: var(--ink);
  font: 400 18px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bar, main, .foot {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}
.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.logo img { width: 78px; }
.bar nav { display: flex; align-items: center; gap: clamp(12px, 2.6vw, 28px); font-weight: 500; }
.bar nav a { text-decoration: none; color: var(--soft); }
.bar nav a:hover { color: var(--ink); }
.night {
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
}
.night[aria-pressed="true"] { background: var(--ink); color: #000; }

/* ------------------------------------------------------------------ the live sky */
body:has(.vista) .bar { position: absolute; left: 0; right: 0; }
.vista {
  position: relative;
  height: clamp(540px, 86vh, 900px);
  background:
    radial-gradient(120% 40% at 50% 84%, rgba(233, 161, 75, .10), transparent 70%),
    linear-gradient(to bottom, var(--sky-top) 0%, #081030 45%, var(--sky-low) 82%, var(--land) 82%);
}
:root.red .vista {
  background:
    radial-gradient(120% 40% at 50% 84%, rgba(232, 128, 58, .10), transparent 70%),
    linear-gradient(to bottom, var(--sky-top) 0%, #0D0201 45%, var(--sky-low) 82%, var(--land) 82%);
}
#sky { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#sky.dragging { cursor: grabbing; }
#sky:focus-visible { outline-offset: -6px; }
.sky-controls {
  position: absolute;
  top: clamp(96px, 13vh, 132px);
  left: max(clamp(16px, 4vw, 48px), calc((100% - 1200px) / 2 + 48px));
  right: 16px;
  pointer-events: none;
}
.sky-title { font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 500; color: var(--soft); line-height: 1.4; }
.town { pointer-events: auto; }
.town select {
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  padding: 0 22px 1px 2px;
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(-45deg, transparent 50%, currentColor 50%);
  background-size: 5px 5px;
  background-position: right 8px top 55%, right 3px top 55%;
  background-repeat: no-repeat;
}
.town select option { color: #000; }
.sky-hint { margin-top: 4px; font-size: .9rem; color: var(--soft); transition: opacity .6s; }
.sky-hint.done { opacity: 0; }

/* ------------------------------------------------------------------ on the ground */
.ground {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(32px, 6vw, 88px);
  margin-top: clamp(-150px, -11vh, -64px);
  padding-bottom: clamp(56px, 8vw, 104px);
  position: relative;
}
.ground h1 {
  font-size: clamp(2.7rem, 6.6vw, 5.6rem);
  font-weight: 800;
  line-height: .94;
  letter-spacing: -.025em;
  max-width: 11ch;
  text-wrap: balance;
}
.lede { margin-top: 26px; max-width: 36ch; font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--soft); }
.cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.download, .browser {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid var(--ink);
}
.download { background: var(--ink); color: #000; }
.download svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.download:hover { box-shadow: 0 0 0 4px var(--land), 0 0 0 6px var(--ink); }
.browser:hover { background: var(--ink); color: #000; }
.meta { margin-top: 16px; max-width: 46ch; font-size: .95rem; color: var(--soft); }

.tonight { align-self: end; padding-top: 8px; }
.tonight h2 { font-size: 1.35rem; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.tonight ul { list-style: none; margin: 0; padding: 0; }
.tonight li { padding: 10px 0; border-bottom: 1px solid var(--rule); line-height: 1.35; }
.tonight .name { font: inherit; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 0; }
.tonight button.name { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 4px; }
.tonight button.name:hover { color: var(--planet); }
.tonight .detail { display: block; color: var(--soft); font-size: .95rem; }
.tonight .quiet { color: var(--soft); font-size: .95rem; }
.tonight .next-title { margin-top: 32px; }
.next li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.next time { font-weight: 700; }

/* ------------------------------------------------------------------ sections */
.inside, .features, .install { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--rule); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -.015em; }
.strip {
  margin-top: 36px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, 23vw, 270px);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-color: var(--soft) transparent;
}
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { border-radius: 16px; border: 1px solid var(--rule); }
.strip figcaption { margin-top: 12px; font-weight: 500; color: var(--soft); }

.grid {
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 40px 56px;
}
.grid dt { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.grid dt a, .link { text-decoration: none; color: var(--ink); }
.grid dt a:hover, .link:hover { text-decoration: underline; }
.link { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.grid dd { margin: 10px 0 0; color: var(--soft); max-width: 38ch; }

.install ol { margin: 32px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 20px; max-width: 640px; }
.install li { counter-increment: step; position: relative; padding-left: 52px; font-size: 1.15rem; }
.install li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -.1em;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
}
.fine { margin-top: 28px; max-width: 640px; color: var(--soft); font-size: .95rem; }
.fine code { word-break: break-all; font-size: .85rem; }

/* ------------------------------------------------------------------ footer */
.horizon { display: block; width: 100%; height: clamp(40px, 7vw, 100px); margin-top: 48px; fill: var(--land); background: var(--sky-low); }
.foot { padding-top: 48px; padding-bottom: 48px; border-top: 1px solid var(--rule); color: var(--soft); }
.horizon + .foot { border-top: 0; padding-top: 24px; }
.motto { display: flex; flex-direction: column; color: var(--ink); font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -.015em; }
.motto span { color: var(--soft); font-weight: 500; }
.motto + p { margin-top: 18px; }
.foot nav { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.credit { margin-top: 28px; font-size: .8rem; }

@media (max-width: 860px) {
  .ground { grid-template-columns: 1fr; }
  .tonight { align-self: start; }
}
@media (max-width: 760px) {
  .bar nav a { display: none; }
  .vista { height: clamp(500px, 78vh, 700px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sky-hint { transition: none; }
}
