/* ============================================================================
   Tarot Sanctuary — landing
   Palette: near-black navy ground, candlelit cream ink, coral ember accent,
   burnished gold linework.
   ========================================================================== */

:root {
  --bg: #0a0c11;
  --bg-lift: #10131b;
  --panel: #0e1118;
  --panel-border: #262a35;
  --line: rgba(232, 222, 202, 0.14);
  --cream: #ede4d0;
  --cream-dim: #c9c0ac;
  --muted: #948d7c;
  --coral: #e0614b;
  --coral-deep: #cf4f3a;
  --gold: #c69a58;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --body: "Alegreya", Georgia, serif;
  --sans: "Jost", "Avenir Next", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

svg { display: block; }

/* ---------------------------------------------------------------- header */

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 18px 44px;
  border-bottom: 1px solid rgba(232, 222, 202, 0.08);
  background: rgba(9, 11, 16, 0.72);
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
}

.brand-mark { width: 30px; height: 30px; }

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
}

.nav {
  display: flex;
  gap: 38px;
  margin-inline: auto;
}

.nav a {
  position: relative;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream-dim);
  padding: 6px 2px;
  transition: color 160ms ease;
}

.nav a:hover { color: var(--cream); }

.nav a.active { color: var(--coral); }

.nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
  transform: translateX(-50%);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.account { color: var(--cream-dim); transition: color 160ms ease; }
.account:hover { color: var(--cream); }
.account svg { width: 26px; height: 26px; }

.private-space {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  border: 1px solid rgba(232, 222, 202, 0.28);
  border-radius: 10px;
  padding: 11px 20px;
  transition: border-color 160ms ease, background 160ms ease;
}

.private-space:hover {
  border-color: rgba(232, 222, 202, 0.5);
  background: rgba(232, 222, 202, 0.05);
}

.private-space svg { width: 15px; height: 15px; color: var(--gold); }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  /* Lets a drawn card park below the fold without growing the page scroll;
     horizontal overflow stays visible so panel shadows don't clip. */
  overflow-y: clip;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding: 56px 64px 72px 44px;
  min-height: calc(100vh - 73px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("../assets/bg.webp") center / cover no-repeat;
  opacity: 0.92;
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(10, 12, 17, 0) 46%, rgba(10, 12, 17, 0.62) 78%, rgba(10, 12, 17, 0.78) 100%),
    linear-gradient(to bottom, rgba(10, 12, 17, 0.55) 0%, rgba(10, 12, 17, 0) 22%, rgba(10, 12, 17, 0) 78%, rgba(10, 12, 17, 0.6) 100%);
}

.content-column { position: relative; z-index: 2; }

/* Above the content column so a card flying in from bottom center passes
   over the quote / panel instead of behind them. */
.card-column { position: relative; z-index: 3; }

/* ------------------------------------------------------------- card side */

.card-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.card-stage {
  position: relative;
  width: clamp(320px, 31.5vw, 470px);
}

/* Carries the draw-a-card entrance transform (translate / spin / scale) and
   the flip perspective, so the vanishing point travels with the card. */
.card-mover {
  position: relative;
  perspective: 1400px;
  will-change: transform;
}

/* Dynamic shadow: a blurred slab behind the card, slid opposite the
   pointer-driven key light by card.js via transform only. */
.card-shadow {
  position: absolute;
  inset: 3.5% 4.5%;
  border-radius: 28px;
  background: rgba(2, 3, 6, 0.62);
  filter: blur(26px);
  transform: translate3d(0, 22px, 0);
  will-change: transform, opacity;
  pointer-events: none;
}

.card-tilt {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.card-obj {
  position: relative;
  width: 100%;
  aspect-ratio: 1329 / 2048;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.4));
  backface-visibility: hidden;
}

/* Reverse of the card: shares the front's plane, pre-rotated 180 so it shows
   whenever a flip turns the card away. */
.card-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.4));
  backface-visibility: hidden;
}

.card-obj img,
.card-obj canvas,
.card-back img,
.card-back canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.card-obj.is-webgl img,
.card-back.is-webgl img { visibility: hidden; }

/* Disposable clone of the outgoing card: fixed over the card's home rect,
   then flown off the top-left corner by card.js. */
.card-fly {
  position: fixed;
  z-index: 80;
  perspective: 1400px;
  pointer-events: none;
}

.card-fly-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.fly-face {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.4));
  backface-visibility: hidden;
}

.fly-face.fly-back { transform: rotateY(180deg); }

.fly-face img,
.fly-face canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.card-quote {
  margin-top: 34px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cream);
  text-align: center;
}

.card-quote em { font-style: italic; }

.qmark {
  color: var(--coral);
  font-size: 1.35em;
  line-height: 0;
  vertical-align: -0.12em;
  padding-inline: 0.12em;
}

.quote-ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--gold);
}

.quote-ornament svg { width: 11px; height: 11px; opacity: 0.9; }

.orn-line {
  width: 34px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(198, 154, 88, 0.55));
}

.quote-ornament .orn-line:last-child {
  background: linear-gradient(to left, transparent, rgba(198, 154, 88, 0.55));
}

/* ---------------------------------------------------------- content side */

.content-column {
  max-width: 620px;
  padding-top: 26px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow-orn { color: var(--gold); letter-spacing: 0.05em; padding-left: 6px; }

h1 {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 4.6vw, 66px);
  line-height: 1.08;
  letter-spacing: 0.005em;
  color: #f2ead9;
}

.sun-divider { margin-top: 26px; color: var(--gold); }
.sun-divider svg { width: 24px; height: 24px; }

.lede {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 19px;
  line-height: 1.6;
  color: var(--cream-dim);
}

.rule {
  margin-top: 30px;
  border: 0;
  height: 1px;
  background: var(--line);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 22px;
  color: var(--cream-dim);
}

.privacy-note svg { width: 19px; height: 19px; margin-top: 3px; color: var(--muted); }

.privacy-note p { font-size: 16px; line-height: 1.5; }

.privacy-note strong { color: var(--cream); font-weight: 500; }

/* --------------------------------------------------------- reading panel */

.reading-panel {
  margin-top: 30px;
  background: linear-gradient(180deg, rgba(20, 23, 32, 0.92), rgba(13, 16, 23, 0.92));
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 26px 26px 0;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.panel-label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.lbl-orn { letter-spacing: 0.05em; padding-right: 6px; }

.action {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 16px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.action-primary {
  background:
    linear-gradient(180deg, rgba(224, 97, 75, 0.32), rgba(195, 66, 46, 0.5)),
    url("../assets/paper-coral.webp") repeat;
  background-size: auto, 460px;
  box-shadow: 0 14px 30px rgba(207, 79, 58, 0.28);
  color: #fdf3e4;
}

.action-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(207, 79, 58, 0.38);
}

.action-secondary {
  background:
    linear-gradient(180deg, rgba(232, 222, 202, 0.02), rgba(0, 0, 0, 0.12)),
    url("../assets/paper-dark.webp") repeat;
  background-size: auto, 460px;
  border: 1px solid rgba(232, 222, 202, 0.16);
  color: var(--cream);
}

.action-secondary:hover {
  border-color: rgba(232, 222, 202, 0.34);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
}

.action-primary .action-icon { background: rgba(253, 243, 228, 0.16); }
.action-secondary .action-icon { border: 1px solid rgba(232, 222, 202, 0.18); color: var(--cream-dim); }

.action-icon svg { width: 20px; height: 20px; }

.action-text { display: flex; flex-direction: column; gap: 3px; }

.action-title {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.action-sub { font-size: 15px; opacity: 0.82; }

.action-arrow { width: 20px; height: 20px; margin-left: auto; flex: none; opacity: 0.9; }

.intention-label { margin-top: 26px; }

.intentions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  border: 1px solid rgba(232, 222, 202, 0.16);
  border-radius: 999px;
  padding: 10px 20px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.chip svg { width: 15px; height: 15px; color: var(--gold); }

.chip:hover {
  color: var(--cream);
  border-color: rgba(232, 222, 202, 0.36);
  background: rgba(232, 222, 202, 0.04);
}

.chip-love { border-color: rgba(224, 97, 75, 0.45); }
.chip-love svg { color: var(--coral); }
.chip-love:hover { border-color: rgba(224, 97, 75, 0.8); background: rgba(224, 97, 75, 0.07); }

.panel-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding: 18px 2px 20px;
  border-top: 1px solid rgba(232, 222, 202, 0.1);
  color: var(--cream-dim);
}

.panel-foot > svg { width: 19px; height: 19px; color: var(--gold); flex: none; }

.panel-foot p { font-size: 15px; }
.panel-foot strong { color: var(--cream); font-weight: 500; }

.learn-more {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--cream);
  white-space: nowrap;
  transition: color 160ms ease;
}

.learn-more:hover { color: var(--coral); }
.learn-more svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------- moon chip */

.moon-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  float: right;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--cream-dim);
  background: rgba(13, 16, 23, 0.85);
  border: 1px solid rgba(232, 222, 202, 0.14);
  border-radius: 12px;
  padding: 13px 20px;
}

.moon-chip svg { width: 16px; height: 16px; color: var(--cream-dim); }

.moon-days {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  border-left: 1px solid rgba(232, 222, 202, 0.14);
  padding-left: 12px;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr; padding: 48px 32px; }
  .card-column { order: 2; margin-top: 48px; }
  .content-column { order: 1; max-width: 640px; margin-inline: auto; }
  .nav { display: none; }
}

@media (max-width: 620px) {
  .site-header { padding: 14px 20px; gap: 16px; }
  .private-space { display: none; }
  .hero { padding: 36px 18px 56px; }
  .card-stage { width: min(86vw, 420px); }
}

@media (prefers-reduced-motion: reduce) {
  .card-tilt,
  .card-mover { transform: none !important; }
}
