/*
 * TarotOracle marketing site. Plain CSS, no build step.
 * Palette: apps/mobile-web/theme/colors.ts + brand kit v3 design-tokens.json.
 * Display face: Cinzel (OFL, self-hosted; see assets/fonts/OFL.txt), as in the app.
 */

@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #04040e;
  --bg-raised: #0f0d22;
  --line: rgba(212, 168, 67, 0.22);
  --gold: #d4a843;
  --gold-bright: #e6b84f;
  --text: #f5f0e8;
  --text-soft: #b9afd2;
  --entwined: #cda6ef;
  --display: "Cinzel", Georgia, "Times New Roman", serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --slow: 9s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-bright);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-raised);
  color: var(--text);
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- the night sky (both pages) ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(26, 10, 46, 0.9), transparent 62%),
    var(--bg);
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  inset: -10%;
  background-repeat: repeat;
  opacity: 0.55;
  animation: drift 160s linear infinite, twinkle 11s ease-in-out infinite;
}

.sky::before {
  background-image:
    radial-gradient(1px 1px at 12% 18%, #f5f0e8 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, #e6b84f 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 72%, #f5f0e8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 64%, #f5f0e8 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 40%, #b9afd2 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 88%, #e6b84f 50%, transparent 51%);
  background-size: 420px 420px;
}

.sky::after {
  background-image:
    radial-gradient(1px 1px at 22% 44%, #f5f0e8 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 82%, #b9afd2 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 92% 26%, #e6b84f 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 8%, #f5f0e8 50%, transparent 51%);
  background-size: 610px 610px;
  animation-duration: 240s, 14s;
  animation-delay: 0s, -5s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-60px, -120px, 0);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.7;
  }
}

/* ---------- home ---------- */

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 16px 2rem;
}

.sigil {
  position: relative;
  width: min(68vw, 340px);
  aspect-ratio: 1;
  margin-bottom: 1.5rem;
  animation: arrive 2.4s ease-out both;
}

.sigil::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.32), transparent 68%);
  filter: blur(18px);
  animation: breathe var(--slow) ease-in-out infinite;
}

.sigil img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, #000 60%, transparent 71%);
  mask-image: radial-gradient(circle, #000 60%, transparent 71%);
}

.sigil .orbit {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  animation: turn 180s linear infinite;
}

.orbit circle {
  fill: none;
  stroke: var(--gold);
  stroke-opacity: 0.35;
  stroke-width: 0.4;
  stroke-dasharray: 0.6 3.4;
  stroke-linecap: round;
}

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  letter-spacing: 0.16em;
  margin: 0;
  padding-left: 0.16em; /* balance the trailing letter-spacing */
  color: var(--text);
  animation: arrive 2.4s 0.4s ease-out both;
}

.oneline {
  font-family: var(--display);
  font-size: clamp(1rem, 3.6vw, 1.2rem);
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin: 0.75rem 0 2.25rem;
  animation: arrive 2.4s 0.9s ease-out both;
}

.enter-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: arrive 2.4s 1.4s ease-out both;
}

.enter {
  display: inline-block;
  min-width: 11rem;
  padding: 0.85rem 2.5rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold-bright);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  background: rgba(212, 168, 67, 0.05);
  transition:
    background-color 0.6s ease,
    box-shadow 0.6s ease,
    color 0.6s ease;
}

.enter:hover {
  color: var(--text);
  background: rgba(212, 168, 67, 0.14);
  box-shadow: 0 0 28px rgba(212, 168, 67, 0.25);
}

.invite-note {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.04);
  }
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- inner pages ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 60rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: 0.12em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.top .enter {
  min-width: 0;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  letter-spacing: 0.24em;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 16px 3rem;
}

.page h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  letter-spacing: 0.08em;
  text-align: center;
  margin: 1rem 0 3rem;
}

.feature {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}

.feature h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  margin: 0 0 0.6rem;
}

.feature p {
  margin: 0;
  color: var(--text-soft);
}

.decks {
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  gap: 1.5rem;
  margin: 1.75rem 0 0;
}

.decks figure {
  margin: 0;
}

.decks img {
  width: auto;
  height: clamp(12rem, 44vw, 16rem);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line), 0 12px 36px rgba(0, 0, 0, 0.6);
}

.decks figcaption {
  margin-top: 0.6rem;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--text-soft);
}

.arcanas {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.arcanas li {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
  color: var(--text-soft);
}

.arcanas strong {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
}

.arcanas .entwined {
  border-left-color: rgba(205, 166, 239, 0.45);
}

.arcanas .entwined strong {
  color: var(--entwined);
}

.tag {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: var(--body);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.languages {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  color: var(--text);
}

.price {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0.25rem 0 0.25rem;
}

.feature .disclosure {
  margin-top: 1rem;
  font-size: 0.8125rem;
}

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--line);
}

/* ---------- 404 ---------- */

.lost .sigil {
  width: min(40vw, 160px);
}

.lost p {
  color: var(--text-soft);
  margin: 0.5rem 0 1.5rem;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 1.5rem 16px 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-soft);
}

.site-footer ul {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
}

.site-footer a {
  color: var(--text-soft);
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer small {
  font-size: 0.75rem;
}

/* ---------- motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
