/* Lumara Tarot — design system. Tokens mirror apps/mobile/src/styles/tokens.ts. */

@font-face {
  font-family: 'Huiwen';
  src: url('../fonts/huiwen-latin.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+00B7, U+2013-2014, U+2018-2019, U+201C-201D, U+2022, U+2026;
}
@font-face {
  font-family: 'Huiwen';
  src: url('../fonts/huiwen-zh.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+FF00-FFEF;
}
@font-face {
  font-family: 'Cinzel';
  src: url('../fonts/cinzel-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Cinzel';
  src: url('../fonts/cinzel-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #060707;
  --ink-deep: #030A06;
  --panel: #0D1D14;
  --line-a: #032615;
  --line-b: #695938;
  --gold: #F1CA8B;
  --gold-strong: #C9A84C;
  --gold-pill-a: #E7B769;
  --gold-pill-b: #A17723;
  --gold-ink: #2B1E02;
  --parchment: #EDE0C4;
  --muted: #B9A47A;
  --rose: #C56E80;
  --mist: #A8A0CC;
  --gold-hair: rgba(241, 202, 139, 0.16);

  --font-display: 'Huiwen', 'Songti SC', 'Noto Serif SC', Georgia, serif;
  /* Huiwen's Chinese subset only covers .f-display text, so CJK in labels falls back to the system sans. */
  --font-label: 'Cinzel', Georgia, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, "SF Pro Text", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Roboto, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ritual: cubic-bezier(0.65, 0, 0.35, 1);
  --header-h: 72px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  color-scheme: dark;
}

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--line-b) var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--parchment);
  font: 400 1rem/1.7 var(--font-body);
  background:
    radial-gradient(1200px 640px at 50% -12%, rgba(201, 168, 76, 0.08), transparent 62%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Film grain over everything; purely decorative. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(231, 183, 105, 0.35);
  color: #fff8e8;
}

img,
svg,
canvas,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

p {
  margin: 0 0 1em;
}

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

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus {
  transform: none;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(88px, 12vw, 168px);
}

/* ── Type ───────────────────────────────────────────────────────────────── */

.f-display {
  margin: 0 0 0.45em;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: var(--gold);
  text-wrap: balance;
}
h1.f-display {
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
}
h2.f-display {
  font-size: clamp(2rem, 4.4vw, 3.6rem);
}
h3.f-display {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
}
:lang(zh-Hans) .f-display {
  line-height: 1.3;
  letter-spacing: 0.08em;
}

.gilded {
  background: linear-gradient(172deg, #FFEED3 0%, #EACA96 46%, #C99A52 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kicker {
  margin: 0 0 1.1rem;
  font: 400 0.78rem/1.4 var(--font-label);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-strong);
}
:lang(zh-Hans) .kicker {
  letter-spacing: 0.24em;
}

.lead {
  max-width: 40rem;
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
  line-height: 1.7;
  color: rgba(237, 224, 196, 0.86);
}

.muted {
  color: var(--muted);
}

/* Gold hairline with a diamond, used between blocks. */
.rule {
  position: relative;
  width: min(260px, 60%);
  height: 1px;
  margin: 28px auto;
  background: linear-gradient(90deg, transparent, var(--line-b) 30%, var(--gold) 50%, var(--line-b) 70%, transparent);
}
.rule::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 12px rgba(241, 202, 139, 0.8);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn,
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.95rem/1 var(--font-body);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background-color 0.35s;
}

.btn--gold,
.store-btn.is-live {
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-pill-a), var(--gold-pill-b));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 18px rgba(255, 255, 255, 0.16),
    0 14px 34px -16px rgba(231, 183, 105, 0.8);
}
.btn--gold:hover,
.store-btn.is-live:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 22px rgba(255, 255, 255, 0.22),
    0 18px 44px -14px rgba(231, 183, 105, 0.95);
}

.btn--ghost,
.store-btn.is-soon {
  color: var(--gold);
  background:
    linear-gradient(rgba(3, 10, 6, 0.72), rgba(3, 10, 6, 0.72)) padding-box,
    linear-gradient(120deg, var(--line-a), var(--line-b) 48%, var(--gold) 52%, var(--line-b) 56%, var(--line-a)) border-box;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px -6px rgba(241, 202, 139, 0.45);
}
.store-btn.is-soon {
  cursor: default;
}

/* Scan-to-install QR code: shown only where a second device is likely (wide screens). */
.store-qr {
  display: none;
  margin: 18px 0 0;
  text-align: center;
}
.store-qr img {
  display: block;
  width: 135px;
  height: 135px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(241, 202, 139, 0.55),
    0 0 36px -10px rgba(241, 202, 139, 0.5);
}
.store-qr figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
@media (min-width: 900px) {
  .store-qr {
    display: block;
  }
}

.store-btn--sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.8rem;
}
.store-btn--lg {
  min-height: 56px;
  padding: 0 30px;
  font-size: 1rem;
}
.icon {
  flex: none;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition:
    background-color 0.4s,
    -webkit-backdrop-filter 0.4s,
    backdrop-filter 0.4s;
}
.site-header.is-scrolled {
  background: rgba(3, 10, 6, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.site-header.is-scrolled::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-b), transparent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.brand {
  position: relative;
  z-index: 2;
  display: block;
  padding: 8px 0;
}
.brand__logo {
  width: auto;
  height: 24px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav__list {
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 12px 0;
  font: 400 0.76rem/1 var(--font-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237, 224, 196, 0.78);
  text-decoration: none;
  transition: color 0.25s;
}
:lang(zh-Hans) .site-nav__link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}
.site-nav__link:hover,
.site-nav__link[aria-current='page'] {
  color: var(--gold);
}
.site-nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
}
.site-nav__extra {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid rgba(241, 202, 139, 0.24);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.25s,
    border-color 0.25s;
}
.lang-switch:hover {
  color: var(--gold);
  border-color: rgba(241, 202, 139, 0.6);
}

.menu-toggle {
  display: none;
}

@media (max-width: 959px) {
  .menu-toggle {
    position: relative;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--gold);
    cursor: pointer;
  }
  .menu-toggle__bars,
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    display: block;
    width: 22px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.35s var(--ease-out), opacity 0.2s;
  }
  .menu-toggle__bars {
    position: relative;
  }
  .menu-toggle__bars::before,
  .menu-toggle__bars::after {
    content: '';
    position: absolute;
    left: 0;
  }
  .menu-toggle__bars::before {
    top: -7px;
  }
  .menu-toggle__bars::after {
    top: 7px;
  }
  [data-menu-open] .menu-toggle__bars {
    background: transparent;
  }
  [data-menu-open] .menu-toggle__bars::before {
    transform: translateY(7px) rotate(45deg);
  }
  [data-menu-open] .menu-toggle__bars::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: safe center;
    gap: 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: calc(var(--header-h) + 24px) var(--gutter) 48px;
    background:
      radial-gradient(600px 420px at 50% 30%, rgba(201, 168, 76, 0.12), transparent 70%),
      rgba(6, 7, 7, 0.97);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
      opacity 0.35s var(--ease-out),
      transform 0.35s var(--ease-out),
      visibility 0s linear 0.35s;
  }
  [data-menu-open] .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 0.35s var(--ease-out),
      transform 0.35s var(--ease-out);
  }
  [data-menu-open] body {
    overflow: hidden;
  }
  .site-nav__list {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
  .site-nav__link {
    font: 400 1.7rem/1.2 var(--font-display);
    letter-spacing: 0.06em;
    text-transform: none;
  }
  :lang(zh-Hans) .site-nav__link {
    font: 400 1.35rem/1.3 var(--font-body);
    letter-spacing: 0.24em;
  }
  .site-nav__extra {
    flex-direction: column;
    gap: 18px;
  }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0 36px;
  background: linear-gradient(180deg, transparent, rgba(3, 10, 6, 0.92) 28%);
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-b), transparent);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.site-footer__logo {
  width: auto;
  height: 26px;
}
.site-footer__tagline {
  margin: 18px 0 0;
  font-size: 1.5rem;
}
.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  color: rgba(237, 224, 196, 0.74);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover {
  color: var(--gold);
}
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding: 24px var(--gutter) 0;
  border-top: 1px solid var(--gold-hair);
}
.disclaimer {
  max-width: 72ch;
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}
.site-footer__copy {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(185, 164, 122, 0.7);
}
@media (max-width: 760px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

/* ── Lenis smooth scroll ────────────────────────────────────────────────── */

html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* ── Reveal on scroll (only when JS motion is running) ──────────────────── */

.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1s var(--ease-out),
    transform 1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.js-motion [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
