/* Aether's website: the app's night sky, brass and Marcellus. Self-hosted font, no trackers,
   no cookies. Every page reads fine without site.js; the script only adds motion. */
@font-face {
  font-family: "Marcellus";
  src: url("Marcellus-Regular.ttf") format("truetype");
  font-display: swap;
}
:root {
  --deep: #0c0a26;
  --violet-night: #170e3a;
  --deep-end: #0a0b22;
  --ivory: #eeeaf8;
  --haze: #c4bdd6;
  --lavender: #d6cef0;
  --gold: #d4bc85;
  --gold-light: #f1dfae;
  --brass: #c8ae72;
  --line: rgba(212, 188, 133, 0.24);
  --serif: "Marcellus", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --page: 1000px;
  --gutter: clamp(20px, 4vw, 40px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--deep); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; color: var(--ivory); font: 18px/1.6 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
/* The hero's dial and thrown cards reach past the edges; keep the page itself phone-width. */
main > section { overflow-x: clip; }
a { color: var(--gold-light); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff3d2; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }
h2 { font-size: clamp(34px, 4.2vw, 50px); line-height: 1.1; margin-bottom: 20px; text-wrap: balance; }
p { margin: 0 0 14px; }

/* ---------- The sky (the app's CosmosBackground) ---------- */
.sky {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100lvh;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(55% 42% at 20% 14%, rgba(129, 86, 214, 0.3), transparent 72%),
    radial-gradient(52% 48% at 84% 64%, rgba(64, 96, 214, 0.22), transparent 72%),
    linear-gradient(180deg, var(--deep), var(--violet-night) 55%, var(--deep-end));
}
.sky canvas { width: 100%; height: 100%; display: block; }

/* ---------- Edge dials ---------- */
.dial {
  --size: 1000px;
  --show: 150px;
  position: fixed;
  top: 50%;
  width: var(--size);
  height: var(--size);
  margin-top: calc(var(--size) / -2);
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
}
.dial-left { left: calc(var(--show) - var(--size)); }
.dial-right { right: calc(var(--show) - var(--size)); }
.dial-rings { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(calc(var(--turn, 0) * 1deg)); }
.dial-right .dial-rings { transform: rotate(calc(var(--turn, 0) * -1deg)); }
.dial-marks { position: absolute; inset: 0; }
.dial-marks > * {
  position: absolute;
  left: 0; top: 0;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--lavender);
  white-space: nowrap;
  will-change: transform, opacity;
}
.dial-marks > .now { color: var(--gold-light); }
.dial-marks svg { width: 30px; height: 30px; display: block; overflow: visible; }
@media (max-width: 1180px) { .dial { --show: 110px; } .dial-marks > * { font-size: 24px; } }
@media (max-width: 860px) { .dial { display: none; } }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled { background: rgba(12, 10, 38, 0.95); border-bottom-color: rgba(212, 188, 133, 0.14); }
/* The wordmark is spaced as in the app; nothing else on the page is. */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font-family: var(--serif); letter-spacing: 0.42em; font-size: 15px; }
.nav nav { display: flex; gap: clamp(20px, 2.6vw, 36px); }
.nav nav a { color: var(--haze); text-decoration: none; font-size: 16px; }
.nav nav a:hover { color: var(--gold-light); }
.btn {
  padding: 8px 16px;
  border: 1px solid rgba(212, 188, 133, 0.6);
  border-radius: 8px;
  color: var(--gold-light);
  text-decoration: none;
  font-size: 16px;
}
.btn:hover { border-color: var(--gold-light); color: #fff3d2; }
@media (max-width: 760px) { .nav nav { display: none; } }

/* Apple's official badge, unaltered; Apple asks for clear space of a quarter of its height. */
.store { display: inline-block; padding: 14px; margin-top: 10px; }
.store img { height: 54px; width: auto; }
.store.small { padding: 10px; margin: 0 -10px; }
.store.small img { height: 40px; }

/* ---------- Screenshots: the App Store screenshots with the iPhone's own corner radius ---------- */
.shot { position: relative; margin: 0; width: clamp(220px, 24vw, 290px); flex: none; }
.shot img {
  width: 100%;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
  border-radius: 12.5% / 5.75%;
  outline: 1px solid rgba(238, 234, 248, 0.16);
  outline-offset: -1px;
  background: var(--deep);
  box-shadow: 0 40px 70px -35px rgba(0, 0, 0, 0.85);
}

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: clamp(40px, 8vh, 88px) var(--gutter) 0; }
h1 {
  font-size: clamp(46px, 7.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 auto 24px;
  max-width: 12ch;
  text-wrap: balance;
}
.lede { max-width: 34em; margin: 0 auto; color: var(--haze); font-size: clamp(18px, 1.6vw, 20px); }

.stage {
  position: relative;
  height: clamp(520px, 62vw, 760px);
  margin: clamp(24px, 4vw, 48px) auto 0;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 99%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 99%);
}
/* The star dial from the single-card pull, turning once every 200 seconds as in the app. */
.stage-dial {
  position: absolute;
  top: -6%;
  left: 50%;
  width: min(880px, 150vw);
  translate: -50% 0;
  overflow: visible;
  animation: turn 200s linear infinite;
}
.stage-dial .eye { opacity: 0.4; transform-origin: 200px 200px; scale: 0.82; }
@keyframes turn { to { rotate: 360deg; } }
.hero-shot { z-index: 2; width: clamp(240px, 25vw, 310px); align-self: flex-start; }
/* The card on the hero screen starts as blank paper; the paper wipes away top to bottom behind a
   thin line of light, like the art materialising (Materialize in the app). Placed over the card's
   art in pull.jpg: the art spans 35.3–64.6% across and 28.6–52.4% down. */
.paper { display: none; }
html.js .paper { display: block; position: absolute; left: 35.1%; width: 29.8%; top: 28.4%; height: 24.3%; }
.paper b { position: absolute; inset: 0; background: #d9d4c3; }
.paper i {
  position: absolute;
  left: -6%;
  right: -6%;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff6da 20%, #fff6da 80%, transparent);
  box-shadow: 0 0 14px 3px rgba(241, 223, 174, 0.75);
}
html.js .stage.go .paper b { animation: wipe 2.6s cubic-bezier(0.45, 0.05, 0.3, 1) 0.9s both; }
html.js .stage:not(.go) .paper i { opacity: 0; }
html.js .stage.go .paper i { animation: wipe-line 2.6s cubic-bezier(0.45, 0.05, 0.3, 1) 0.9s both; }
@keyframes wipe { from { clip-path: inset(0 -10% 0 -10%); } to { clip-path: inset(100% -10% 0 -10%); } }
@keyframes wipe-line { from { top: 0; opacity: 1; } 92% { opacity: 1; } to { top: 100%; opacity: 0; } }
/* Cards thrown out from behind the phone, as on the single-card pull. Each .fly holds the
   resting place (and the scroll parallax); its img does the throw. */
.fly {
  --spread: 1;
  position: absolute;
  top: 34%;
  left: 50%;
  width: clamp(96px, 11vw, 158px);
  z-index: 3;
  transform:
    translate(-50%, -50%)
    translate(calc(var(--dx) * var(--spread) * 1px), calc(var(--dy) * var(--spread) * 1px + var(--lift, 0px) * var(--d)));
}
.fly.far { z-index: 1; width: clamp(80px, 8.5vw, 120px); filter: blur(1px) brightness(0.7); }
.fly img {
  width: 100%;
  border-radius: 7px;
  rotate: calc(var(--r) * 1deg);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.7);
}
/* The throw and the reveal wait until the stage is in view (site.js adds .go). */
html.js .stage:not(.go) .fly img { opacity: 0; }
html.js .stage.go .fly img { animation: throw 1.25s cubic-bezier(0.2, 0.75, 0.25, 1) both; animation-delay: calc(0.1s + var(--d) * 0.5s); }
@keyframes throw {
  from {
    opacity: 0;
    transform: translate(calc(var(--dx) * var(--spread) * -1px), calc(var(--dy) * var(--spread) * -1px + 60px)) scale(0.55) rotate(calc(var(--r) * -2deg));
  }
  30% { opacity: 1; }
}
@media (max-width: 760px) {
  .fly { --spread: 0.5; top: 30%; }
  .fly.far { display: none; }
}

/* ---------- Rows: words on one side, the screen on the other ---------- */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(40px, 8vw, 110px);
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) var(--gutter);
}
.row.flip { grid-template-columns: auto minmax(0, 1fr); }
.row.flip > .copy { order: 2; }
.copy { max-width: 31em; }
.copy p { color: var(--haze); }
@media (max-width: 860px) {
  .row, .row.flip { grid-template-columns: 1fr; justify-items: center; }
  .row.flip > .copy { order: 0; }
  .copy { justify-self: stretch; }
}

/* How a reading works: the four steps, joined by the app's constellation line. */
.steps { display: grid; margin-top: 26px; }
.steps button {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 16px;
  padding: 12px 0;
  background: none;
  border: 0;
  color: var(--haze);
  font: 16px/1.5 var(--sans);
  text-align: left;
  cursor: pointer;
}
.steps b { font: 400 22px/1.3 var(--serif); color: var(--haze); }
.steps span { grid-column: 2; }
.steps i { grid-row: 1 / span 2; width: 22px; height: 22px; margin-top: 3px; display: grid; place-items: center; }
.steps i::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--violet-night);
  box-shadow: inset 0 0 0 1px rgba(238, 234, 248, 0.5);
}
.steps button:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 37px;
  bottom: -15px;
  width: 1px;
  background: rgba(238, 234, 248, 0.2);
}
.steps button.done::after { background: var(--brass); }
.steps button.done i::before { background: var(--brass); box-shadow: none; }
.steps button[aria-selected="true"] b { color: var(--ivory); }
.steps button[aria-selected="true"] i::before {
  width: 17px; height: 17px;
  border-radius: 0;
  background: var(--gold-light);
  box-shadow: none;
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
}
.steps button:hover b { color: var(--ivory); }
.stack img + img { position: absolute; inset: 0; }
.stack img { opacity: 0; transition: opacity 0.4s ease; }
.stack img.on, html:not(.js) .stack img:first-child { opacity: 1; }

.pair { display: flex; gap: clamp(14px, 2vw, 22px); }
.pair .shot { width: clamp(150px, 17vw, 220px); }
.pair .shot + .shot { margin-top: 56px; }

/* The Major Arcana, laid out like a plate in a book. */
.arcana { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 8vw, 104px); }
.arcana ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 10px; }
.arcana img { width: 100%; border-radius: 4px; }
.arcana figcaption { margin-top: 14px; font-size: 15px; color: var(--haze); }
@media (max-width: 860px) { .arcana ol { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .arcana ol { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
  .arcana li { scroll-snap-align: start; }
}

/* ---------- Decks, pricing, privacy ---------- */
.decks, .pricing, .privacy { max-width: var(--page); margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter); }
.deck-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.deck { margin: 0; }
.fan { position: relative; height: 230px; }
.fan img {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 112px;
  margin-left: -56px;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  border-radius: 6px;
  transform-origin: 50% 120%;
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.8);
}
.fan img:nth-child(1) { rotate: -14deg; }
.fan img:nth-child(3) { rotate: 14deg; }
.deck figcaption { margin-top: 24px; text-align: center; color: var(--haze); font-size: 15px; }
.deck figcaption b { display: block; font: 400 22px/1.3 var(--serif); color: var(--ivory); }
.backs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin: 56px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.backs li { display: grid; justify-items: center; gap: 12px; text-align: center; font-size: 15px; line-height: 1.35; color: var(--haze); }
.backs img { width: 72px; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5)); }
@media (max-width: 760px) {
  .deck-row { grid-template-columns: 1fr; gap: 40px; }
  .backs { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
}

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 72px); margin-top: 32px; }
.plan h3 { font-size: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.plan ul { list-style: none; margin: 0; padding: 0; }
.plan li { padding: 11px 0; border-bottom: 1px solid rgba(238, 234, 248, 0.08); font-size: 17px; }
.fine { margin-top: 28px; font-size: 15px; color: var(--haze); max-width: 40em; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.foot { background: #07061a; border-top: 1px solid rgba(212, 188, 133, 0.16); padding: 44px var(--gutter) max(36px, env(safe-area-inset-bottom)); }
.foot > * { max-width: var(--page); margin-left: auto; margin-right: auto; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 24px; }
.foot-links a { color: var(--haze); text-decoration: none; font-size: 16px; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--gold-light); }
.credits { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(212, 188, 133, 0.12); font-size: 14px; line-height: 1.6; color: var(--haze); }

/* ---------- Text pages: privacy, support, terms ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter) clamp(72px, 10vw, 120px); }
.doc-head { padding-bottom: clamp(28px, 4vw, 40px); margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(44px, 6.4vw, 68px); line-height: 1.05; max-width: none; margin: 0 0 14px; }
.doc-head .updated { margin: 0; font-size: 15px; color: var(--haze); }
.doc-head .lede { margin: 18px 0 0; max-width: none; }
.doc h2 { font-size: clamp(26px, 3vw, 32px); line-height: 1.2; margin: 48px 0 14px; color: var(--gold-light); }
.doc h3 { font-size: clamp(21px, 2.4vw, 24px); line-height: 1.3; margin: 0 0 10px; }
.doc p, .doc li { color: var(--haze); font-size: 17px; line-height: 1.7; }
.doc strong { color: var(--ivory); font-weight: 600; }
.doc ul { margin: 0 0 18px; padding-left: 22px; display: grid; gap: 10px; }
.doc li::marker { color: var(--gold); }
.faq article { padding: 26px 0 12px; border-top: 1px solid var(--line); }
.faq article:first-child { border-top: 0; padding-top: 6px; }
.faq p { margin: 0; }

/* ---------- Reduce Motion: nothing turns or flies ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage-dial, html.js .stage.go .fly img { animation: none !important; }
  html.js .stage:not(.go) .fly img { opacity: 1; }
  html.js .paper { display: none; }
  .stack img { transition: none; }
}
