/* The AstroTracker page (pages\astrotracker.html): the video's stage and chapters, the tour of
   the app's tabs, the phone, and the shots from inside a project. Built on the site's own
   variables and its product classes (site.css .p-*), so it keeps the site's look. */

.at { --at-accent: var(--f-ha); --at-accent-2: var(--f-oiii); --at-radius: 14px; }

/* ---------------------------------------------------------------- the hero, centred */
.at .at-hero {
  padding-top: calc(var(--header) + 64px); display: flex; flex-direction: column;
  align-items: center; gap: 24px; text-align: center;
}
.at .at-hero .p-brand { justify-content: center; }
.at .at-hero .p-h1 { max-width: 22ch; font-size: clamp(40px, 4.6vw, 70px); }
.at .at-hero .p-lede { max-width: 720px; font-size: 19px; }
.at .at-hero .p-actions, .at .at-hero .p-meta { justify-content: center; }

/* ---------------------------------------------------------------- a window around a picture */
.at-window {
  position: relative; z-index: 1; overflow: hidden; border-radius: var(--at-radius);
  background: #0b0d12; border: 1px solid rgba(245, 243, 239, 0.13);
  box-shadow: 0 40px 100px -48px rgba(0, 0, 0, 0.95), 0 18px 40px -30px rgba(0, 0, 0, 0.8);
}
.at-bar {
  height: 36px; padding: 0 14px; display: flex; align-items: center;
  background: linear-gradient(180deg, #161920, #101217);
  border-bottom: 1px solid rgba(245, 243, 239, 0.07);
}
.at-dots { display: inline-flex; gap: 7px; flex: none; width: 47px; }
.at-dots i { display: block; width: 11px; height: 11px; border-radius: 50%; background: rgba(245, 243, 239, 0.15); }
.at-bar-title {
  flex: 1; margin-right: 47px; text-align: center; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.at-window img, .at-window video { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- the video's stage */
.at-stage { padding-top: 48px; }
.at-video { position: relative; max-width: 1200px; margin: 0 auto; }
.at-glow {
  position: absolute; inset: 6% 3% -8%; z-index: 0; pointer-events: none; filter: blur(48px);
  background:
    radial-gradient(55% 60% at 22% 38%, rgba(232, 85, 62, 0.34), transparent 70%),
    radial-gradient(50% 60% at 80% 72%, rgba(61, 181, 176, 0.26), transparent 70%);
}
.at-video .at-window { border-radius: 16px; }
.at-video video { aspect-ratio: 16 / 9; background: #07080c; }
.at-play {
  position: absolute; right: 16px; bottom: 16px; z-index: 2; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(7, 7, 8, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 243, 239, 0.25); color: var(--text); cursor: pointer;
  opacity: 0.7; transition: opacity 0.2s ease, border-color 0.2s ease;
}
.at-play:hover, .at-play:focus-visible { opacity: 1; border-color: var(--text); }
.at-play .i-play, .at-play[aria-pressed="true"] .i-pause { display: none; }
.at-play[aria-pressed="true"] .i-play { display: block; }

/* the chapters under it: each a step of the story, filling as it plays */
.at-chapters {
  max-width: 1200px; margin: 26px auto 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px;
}
.at-chapters button {
  position: relative; width: 100%; padding: 14px 4px 4px; display: flex; flex-direction: column;
  gap: 5px; text-align: left; background: none; border: 0; cursor: pointer; color: var(--faint);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
}
.at-chapters button::before, .at-chapters button::after {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; border-radius: 1px;
}
.at-chapters button::before { right: 0; background: rgba(245, 243, 239, 0.12); }
.at-chapters button::after { width: var(--fill, 0%); background: var(--at-accent); }
.at-chapters button span { font-family: var(--display); font-size: 15px; letter-spacing: 0; color: var(--muted); transition: color 0.2s ease; }
.at-chapters button:hover span, .at-chapters button[aria-current="true"] span { color: var(--text); }
.at-chapters button[aria-current="true"] { color: var(--at-accent); }
.no-js .at-play, .no-js .at-chapters { display: none; }

/* ---------------------------------------------------------------- the tour of the tabs */
.at-tour { padding-top: 128px; }
.at-tour-head { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.at-tour-head > p:not(.label) { max-width: 660px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.at-tabs {
  margin-top: 12px; padding: 5px; display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.at .at-tabs a { padding: 9px 16px; border-radius: 8px; font-size: 15px; color: var(--muted); text-decoration: none; transition: background 0.15s ease, color 0.15s ease; }
.at .at-tabs a:hover { color: var(--text); background: rgba(245, 243, 239, 0.07); }

.at-row {
  padding: 96px 0; display: grid; align-items: center; gap: 72px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header) + 8px);
}
.at-row:last-child { border-bottom: 0; }
.at-row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.at-row.flip .at-row-text { order: 2; }
.at-row-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.at-row-text > p:not(.at-kicker) { font-size: 18px; line-height: 1.6; color: var(--text-2); }
.at-kicker {
  display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.at-kicker b { font-weight: 500; color: var(--at-accent); }
.at-kicker i { width: 28px; height: 1px; background: rgba(245, 243, 239, 0.25); }
.at-shot { margin: 0; position: relative; }
.at-shot::before { /* a faint light behind each window */
  content: ""; position: absolute; inset: 10% 8% -4%; z-index: 0; filter: blur(46px); opacity: 0.55;
  background: radial-gradient(60% 60% at 50% 50%, var(--shot-glow, rgba(61, 181, 176, 0.22)), transparent 72%);
}
.at-row.flip .at-shot { --shot-glow: rgba(232, 85, 62, 0.2); }
.at-row.tall .at-shot { width: 100%; max-width: 580px; justify-self: center; }
.at-note-line, .at .at-phone-text > p.at-note-line { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--faint); }

/* ---------------------------------------------------------------- the phone */
.at-phone-band {
  margin-top: 120px; padding: 72px clamp(28px, 6vw, 88px); display: grid; align-items: center;
  gap: 64px; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(232, 85, 62, 0.14), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(61, 181, 176, 0.1), transparent 60%),
    var(--panel);
}
.at-phone-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.at-phone-text > p:not(.label) { max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.at-phone {
  position: relative; width: 300px; height: 610px; padding: 54px 14px 20px; border-radius: 46px;
  border: 10px solid #1c1e24; outline: 1px solid rgba(245, 243, 239, 0.12);
  background: radial-gradient(120% 70% at 50% 0%, #1f2a44 0%, #0e1322 55%, #090b12 100%);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.95);
}
.at-phone::before { /* the camera's island */
  content: ""; position: absolute; top: 12px; left: 50%; width: 86px; height: 24px;
  margin-left: -43px; border-radius: 14px; background: #050608;
}
.at-phone-time { text-align: center; font-weight: 600; font-stretch: 85%; font-size: 66px; line-height: 1; color: var(--text); }
.at-phone-date { margin-top: 6px; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.at-notes { margin-top: 26px; display: flex; flex-direction: column; gap: 9px; }
.at-notif {
  padding: 10px 12px 11px; border-radius: 16px; text-align: left;
  background: rgba(245, 243, 239, 0.09); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 243, 239, 0.06);
}
.at-notif-head {
  display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.at-notif-head img { width: 14px; height: 14px; border-radius: 4px; }
.at-notif-head span:last-child { margin-left: auto; letter-spacing: 0.04em; text-transform: none; }
.at-notif strong { display: block; margin-top: 5px; font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--text); }
.at-notif p { margin-top: 2px; font-size: 12px; line-height: 1.38; color: var(--text-2); }
@media (prefers-reduced-motion: no-preference) {
  .at-notif { animation: at-arrive 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 140ms); }
}
@keyframes at-arrive { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- inside every project */
.at-inside { padding-top: 128px; }
.at-inside-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.at-inside-grid { margin-top: 44px; display: grid; gap: 40px; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.at-inside-side { display: flex; flex-direction: column; gap: 40px; }
.at-fig { margin: 0; display: flex; flex-direction: column; gap: 20px; }
.at-fig figcaption { display: flex; flex-direction: column; gap: 8px; }
.at-fig h3 { margin: 0; font-weight: 700; font-stretch: 80%; font-size: 26px; line-height: 1.05; }
.at-fig p { font-size: 16px; line-height: 1.6; color: var(--text-2); }

/* the tiles: an icon each */
.at .p-tile svg { color: var(--at-accent); }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1000px) {
  .at-row, .at-row.flip, .at-inside-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .at-row.flip .at-row-text { order: 0; }
  .at-row { padding: 72px 0; }
  .at-phone-band { grid-template-columns: minmax(0, 1fr); justify-items: center; }
}
@media (max-width: 700px) {
  .at .at-hero { padding-top: calc(var(--header) + 48px); }
  .at .at-hero .p-lede { font-size: 17px; }
  .at-stage { padding-top: 40px; }
  .at-bar { height: 28px; padding: 0 10px; }
  .at-dots { width: 36px; gap: 5px; }
  .at-dots i { width: 8px; height: 8px; }
  .at-bar-title { margin-right: 36px; font-size: 9.5px; }
  .at-window, .at-video .at-window { border-radius: 10px; }
  .at-play { right: 10px; bottom: 10px; width: 38px; height: 38px; }
  .at-chapters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
  .at-tour, .at-inside { padding-top: 88px; }
  .at .at-tabs a { padding: 8px 11px; font-size: 14px; }
  .at-phone-band { margin-top: 88px; padding: 44px 20px; border-radius: 16px; }
  .at-phone { width: 280px; height: 580px; }
}

/* ---------------------------------------------------------------- the iPhone app, the links */
.at-store { padding-top: 4px; }
.at-legal {
  margin-top: 40px; display: flex; justify-content: center; gap: 12px; font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint);
}
.at .at-legal a { color: var(--muted); text-decoration: none; }
.at .at-legal a:hover { color: var(--text); }

/* ---------------------------------------------------------------- Privacy and Support */
.at-doc-head {
  padding-top: calc(var(--header) + 72px); display: flex; flex-direction: column;
  align-items: flex-start; gap: 18px;
}
/* one reading column, head and body together */
.at-doc-head, .at-doc-body { max-width: 980px; margin-left: auto; margin-right: auto; }
.at-doc .label a { color: inherit; text-decoration: none; }
.at-doc .label a:hover { color: var(--text); }
.at-doc-head .p-h2 { font-size: clamp(36px, 4.4vw, 56px); }
.at-doc-lede { max-width: 680px; font-size: 19px; line-height: 1.6; color: var(--text-2); }
.at-doc-body { padding-top: 48px; }
.at-doc-body h2 {
  margin: 48px 0 14px; font-weight: 700; font-stretch: 80%; font-size: 30px; line-height: 1.1;
}
.at-doc-body p, .at-doc-body li { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.at-doc-body p + p { margin-top: 14px; }
.at-doc-body ul + p { margin-top: 20px; }
.at-doc-body ul { margin: 14px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.at-doc-body strong { color: var(--text); font-weight: 600; }
.at-doc-body code {
  font-family: var(--mono); font-size: 0.88em; color: var(--text); background: rgba(245, 243, 239, 0.07);
  padding: 1px 6px; border-radius: 4px; overflow-wrap: anywhere;
}
.at-doc-body pre {
  margin: 14px 0; padding: 14px 16px; overflow-x: auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px;
}
.at-doc-body pre code { background: none; padding: 0; }
.at-doc-body hr { margin: 44px 0 0; border: 0; border-top: 1px solid var(--line); }
.at-doc-body a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.at-doc-body a:hover { text-decoration-color: currentColor; }
.at-doc .at-legal { justify-content: flex-start; margin-top: 64px; font-size: 12px; line-height: 1.4; }
/* the table of what leaves the PC: scrolls inside itself on a phone, never the page */
.at-table { margin: 20px 0 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.at-table table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14.5px; }
.at-table th {
  text-align: left; padding: 12px 14px; font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.at-table td { padding: 12px 14px; vertical-align: top; line-height: 1.55; color: var(--text-2); border-top: 1px solid var(--line); }
.at-table tr:first-child td { border-top: 0; }
.at-table td:first-child { color: var(--text); font-weight: 600; min-width: 150px; }
@media (max-width: 700px) {
  /* the table as a card per row, each cell under its column's name */
  .at-table { border: 0; overflow: visible; }
  .at-table table { min-width: 0; }
  .at-table thead { display: none; }
  .at-table tbody, .at-table tr, .at-table td { display: block; }
  .at-table tr { margin-top: 12px; padding: 4px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
  .at-table td { border-top: 0; padding: 8px 14px; }
  .at-table td::before {
    content: attr(data-label); display: block; margin-bottom: 3px; font-family: var(--mono);
    font-size: 10.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  }
  .at-table td:first-child { font-size: 17px; }
  .at-table td:first-child::before { display: none; }
  .at-doc-head { padding-top: calc(var(--header) + 44px); }
  .at-doc-body h2 { font-size: 26px; }
  .at-doc-body p, .at-doc-body li { font-size: 16px; }
}

/* ---------------------------------------------------------------- the moving sky (starfield.js) */
/* .at is a stacking context, so the sky (fixed, the whole window) lies behind its content and in
   front of the page's own black; the footer is lifted above it, its words clear of the stars */
.at { position: relative; z-index: 0; }
.at-sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.foot { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- the iPhone app, his screenshots */
.at-phones { display: grid; grid-template-columns: repeat(2, 232px); gap: 20px; align-items: start; }
.at-device { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.at-device-low { margin-top: 56px; }
.at-device-frame {
  position: relative; width: 100%; padding: 8px; border-radius: 40px; background: #16181e;
  border: 1px solid rgba(245, 243, 239, 0.14);
  box-shadow: 0 44px 80px -36px rgba(0, 0, 0, 0.95), inset 0 0 0 1px #000;
}
.at-device-frame img { display: block; width: 100%; height: auto; border-radius: 32px; }
.at-device-frame::after { /* the camera's island, over the screenshot's status bar */
  content: ""; position: absolute; top: 15px; left: 50%; width: 30%; height: 15px; margin-left: -15%;
  border-radius: 10px; background: #000;
}
.at-device figcaption {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.at-phone-more {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
  align-items: start; padding-top: 32px; border-top: 1px solid var(--line);
}
.at-snap { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.at-snap img {
  display: block; width: 100%; height: auto; border-radius: 22px;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.9);
}
.at-snap figcaption { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.at-snap figcaption strong { color: var(--text); font-weight: 600; }
@media (max-width: 1000px) {
  .at-phone-more { justify-self: stretch; }
}
@media (max-width: 700px) {
  .at-phones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
  .at-device-low { margin-top: 34px; }
  .at-device-frame { padding: 5px; border-radius: 26px; }
  .at-device-frame img { border-radius: 21px; }
  .at-device-frame::after { top: 9px; height: 10px; }
  .at-phone-more { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
