/* Maja Space download site. The page is the app icon made large: its cream paper, its heavy black
   wordmark and its fine rings; the colour comes from the app's own (dark) screens and its gold. */
@font-face { font-family: "Maja Display"; src: url("fonts/poppins-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  interpolate-size: allow-keywords;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --paper: #F5EDDD;
  --paper-2: #EBDFC8;
  --ink: #1A1712;
  --ink-2: #5C5446;
  --line: rgba(26, 23, 18, .13);
  --ring: rgba(26, 23, 18, .085);
  --gold: #C9A227;
  --gold-ink: #7D600F;
  --night: #0E0E11;
  --display: "Maja Display", "Poppins", ui-sans-serif, system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15130F;
    --paper-2: #201C16;
    --ink: #F2EADB;
    --ink-2: #B7AD9B;
    --line: rgba(242, 234, 219, .14);
    --ring: rgba(242, 234, 219, .075);
    --gold-ink: #E3C462;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
[id] { scroll-margin-top: 12px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
b { font-weight: 650; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ----- bar ----- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px/1 var(--display); }
.brand img { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.bar nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--ink-2); transition: color .2s ease; }
.bar nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) { .wide-only { display: none; } }

/* ----- hero: the wordmark in its rings, and the app ----- */
.hero-wrap { position: relative; overflow: hidden; isolation: isolate; }
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  padding: clamp(24px, 5vw, 72px) var(--gutter) clamp(48px, 7vw, 96px); max-width: 1320px; margin: 0 auto; }
/* centred on the app preview: the right column's middle */
.rings { position: absolute; z-index: -1; top: 50%; left: min(72.7%, calc(50% + 300px)); width: 1700px; height: 1700px; transform: translate(-50%, -50%); pointer-events: none; }
.rings circle { fill: none; stroke: var(--ring); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.wordmark { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: .84; letter-spacing: -.02em; }
.wordmark span { display: block; }
.wordmark .w1 { font-size: clamp(84px, 13.4vw, 176px); }
.wordmark .w2 { font-size: clamp(52px, 8.3vw, 109px); letter-spacing: .118em; margin-right: -.118em; margin-top: .14em; }
.lede { font-size: clamp(20px, 2.1vw, 24px); line-height: 1.45; max-width: 26ch; margin: clamp(22px, 3vw, 34px) 0 clamp(22px, 3vw, 30px); }
.get .note { margin: 12px 0 0; font-size: 15px; color: var(--ink-2); max-width: 44ch; }
.get .also { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
.get .also a { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1.5px solid var(--ink);
  font: 600 16px/1.2 var(--text); color: var(--ink); text-decoration: none; background: transparent; cursor: pointer; text-align: center;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease, transform .15s var(--ease); -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:hover { background: var(--paper-2); }
.btn.primary { min-height: 58px; padding: 0 30px; font-size: 18px; background: var(--gold); border-color: var(--gold); color: #17140E; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 10px 26px -14px rgba(125, 96, 15, .7); }
.btn.primary:hover { background: #D4AE36; border-color: #D4AE36; box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 14px 30px -14px rgba(125, 96, 15, .8); }
.get .btn + .btn { margin-left: 10px; }
.get .pair { display: flex; flex-wrap: wrap; gap: 10px; }
.get .pair .btn { margin: 0; }

/* ----- the device frames around real screenshots ----- */
.stage { margin: 0; display: grid; justify-items: center; gap: 22px; width: 100%; min-width: 0; }
.device { position: relative; background: var(--night); box-shadow: 0 30px 60px -30px rgba(20, 16, 8, .55), 0 0 0 1px rgba(255,255,255,.06) inset; transition: width .45s var(--ease), border-radius .45s var(--ease), padding .45s var(--ease); }
.device .screen { overflow: hidden; background: #070708; transition: border-radius .45s var(--ease); }
.device .screen img { width: 100%; transition: opacity .28s ease, transform .4s var(--ease); }
.device.fading .screen img { opacity: 0; transform: scale(.985); transition-duration: .18s; }
.device.phone { width: min(310px, 78vw); padding: 10px; border-radius: 44px; }
.device.phone .screen { border-radius: 35px; aspect-ratio: 600 / 1298; }
.device.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #1d1d22; box-shadow: 0 0 0 2px #0a0a0c; z-index: 1; }
.device.tablet { width: min(620px, 94%); padding: 14px; border-radius: 30px; }
.device.tablet .screen { border-radius: 16px; aspect-ratio: 1200 / 750; }
.device.laptop { width: min(640px, 86%); padding: 12px 12px 18px; border-radius: 16px 16px 6px 6px; }
.device.laptop .screen { border-radius: 4px; aspect-ratio: 1440 / 900; }
.device.laptop::after { content: ""; position: absolute; left: -7%; right: -7%; bottom: -14px; height: 14px; border-radius: 0 0 14px 14px; background: linear-gradient(#2a2a30, #121215); box-shadow: 0 12px 24px -12px rgba(20,16,8,.6); }
@media (prefers-reduced-motion: reduce) { .device, .device .screen img { transition: none; } }

.pickers { display: grid; gap: 10px; justify-items: center; max-width: 100%; }
.open-preview { margin-top: 6px; min-height: 42px; font-size: 15px; border-width: 1px; }
.get .try { margin-top: 2px; }
.seg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.seg button { font: 500 14px/1 var(--text); color: var(--ink-2); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .15s var(--ease); -webkit-tap-highlight-color: transparent; }
.seg button:active, .tabs button:active { transform: scale(.96); }
.seg button:hover { color: var(--ink); border-color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ----- sections ----- */
main > section:not(.hero-wrap) { max-width: 1320px; margin: 0 auto; padding: clamp(40px, 5.5vw, 72px) var(--gutter); }
h2 { font: 700 clamp(28px, 3.4vw, 40px)/1.1 var(--display); letter-spacing: -.01em; margin: 0 0 14px; }
h3 { font: 700 19px/1.3 var(--display); margin: 0; }
.sub { color: var(--ink-2); margin: 0 0 28px; max-width: 62ch; }
.small { font-size: 15px; color: var(--ink-2); max-width: 70ch; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px clamp(28px, 5vw, 72px); margin: 28px 0 0; max-width: 1000px; }
.features div { border-top: 1.5px solid var(--ink); padding-top: 14px; }
.features dt { font: 700 20px/1.25 var(--display); }
.features dd { margin: 6px 0 0; color: var(--ink-2); max-width: 46ch; }

.dl-list { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 1000px; }
.dl { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dl-what p { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.dl .btn { flex: none; min-width: 230px; }
.dl.mine .btn { background: var(--gold); border-color: var(--gold); color: #17140E; }
.dl.muted h3 { color: var(--ink-2); }

.tabs { display: flex; gap: 6px; margin: 0 0 18px; }
.tabs button { font: 600 15px/1 var(--text); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease, transform .15s var(--ease); -webkit-tap-highlight-color: transparent; }
.tabs button:hover { color: var(--ink); border-color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.js .panels { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.js .panel[aria-hidden="true"] { display: none; }
.js .panel h3 { display: none; }
.panel ol { margin: 14px 0 12px; padding-left: 1.3em; display: grid; gap: 10px; }
.panel li::marker { font: 700 16px var(--display); color: var(--gold-ink); }
.no-js .tabs, .tabs:not(.on) { display: none; }

.moving p { max-width: 64ch; }
.rescue { margin-top: 22px; padding: 20px 22px; border-radius: 18px; background: var(--paper-2); border: 1px solid var(--line); }
.rescue-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }

.questions details { border-bottom: 1px solid var(--line); max-width: 760px; }
.questions summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary { transition: color .2s ease; }
.questions summary:hover { color: var(--gold-ink); }
.questions summary::after { content: "+"; font: 700 20px/1 var(--display); color: var(--ink-2); transition: transform .3s var(--ease); }
.questions details[open] summary::after { transform: rotate(180deg); }
.questions details[open] summary::after { content: "–"; }
.questions details p { margin: 0 0 18px; color: var(--ink-2); max-width: 64ch; }

.foot { display: flex; align-items: center; gap: 14px; max-width: 1320px; margin: 0 auto; padding: 40px var(--gutter) 56px; color: var(--ink-2); font-size: 15px; }
.foot img { border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.foot p { margin: 0; }

/* ----- one moment: the rings open when the page loads ----- */
@media (prefers-reduced-motion: no-preference) {
  .rings circle { animation: ring-in 1.4s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 40ms); }
  @keyframes ring-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

  /* the hero settles in with the rings */
  .wordmark .w1, .wordmark .w2, .lede, .get, .stage { animation: rise .9s var(--ease) both; }
  .wordmark .w2 { animation-delay: 70ms; }
  .lede { animation-delay: 140ms; }
  .get { animation-delay: 210ms; }
  .stage { animation-delay: 160ms; animation-duration: 1.1s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  /* sections ease in as they scroll into view (site.js adds .reveal only when it can watch them) */
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .8s var(--ease); transition-delay: var(--d, 0ms); }
  .js .reveal.in { opacity: 1; transform: none; }

  /* the install steps fade between devices */
  .js .panel[aria-hidden="false"] { animation: rise .4s var(--ease) both; }

  /* the answers open and close instead of jumping (where the browser can animate it) */
  .questions details::details-content { block-size: 0; overflow: hidden; opacity: 0;
    transition: block-size .35s var(--ease), opacity .3s ease, content-visibility .35s allow-discrete; }
  .questions details[open]::details-content { block-size: auto; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .seg button, .tabs button, .questions summary::after { transition: none; }
  .btn:active, .seg button:active, .tabs button:active { transform: none; }
}

/* ----- narrow screens ----- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .rings { left: 50%; top: 70%; width: 1300px; height: 1300px; }
  .stage { margin-top: 12px; }
  .panels { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .dl { flex-direction: column; align-items: stretch; }
  .dl .btn { min-width: 0; }
  .btn.primary { width: 100%; }
  .get .pair .btn { flex: 1 1 100%; }
  .seg.screens { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; max-width: calc(100vw - 2 * var(--gutter)); padding-bottom: 2px; scrollbar-width: none; }
  .seg.screens { scroll-snap-type: x proximity; overscroll-behavior-x: contain; scroll-behavior: smooth; }
  .seg.screens button { flex: none; scroll-snap-align: center; }
}

/* ----- 404 ----- */
.lost { max-width: 560px; margin: 0 auto; padding: 18vh var(--gutter) 10vh; }
.lost img { border-radius: 16px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 26px; }
.lost h1 { font: 700 clamp(28px, 6vw, 40px)/1.1 var(--display); margin: 0 0 12px; }
.lost p { color: var(--ink-2); margin: 0 0 22px; }
