/* =========================================================================
   Witch — Night Reading landing page
   Painted cosmic blue, white type, one quiet accent: candlelight gold.
   ========================================================================= */

@font-face {
  font-family: "Berkshire Swash";
  src: url("../assets/fonts/BerkshireSwash-Regular.woff2") format("woff2"),
       url("../assets/fonts/BerkshireSwash-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-start: #20435B;
  --bg-end:   #10151D;
  --ink:      #FFFFFF;
  --ink-70:   rgba(255, 255, 255, 0.72);
  --ink-50:   rgba(255, 255, 255, 0.5);
  --ink-35:   rgba(255, 255, 255, 0.35);
  --gold:     #E8C98A;
  --gold-dim: rgba(232, 201, 138, 0.55);
  --surface:        rgba(10, 14, 20, 0.55);
  --surface-strong: rgba(10, 14, 20, 0.82);
  --frost:          rgba(255, 255, 255, 0.12);
  --frost-strong:   rgba(255, 255, 255, 0.2);
  --rim: linear-gradient(to bottom, rgba(255,255,255,0.25), rgba(255,255,255,0.02));
  --display: "Berkshire Swash", "Apple Chancery", cursive;
  --body: "Avenir", "Avenir Next", "Nunito Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --card-ratio: 2 / 3; /* matches the app, fronts crop like .scaledToFill */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 20% 0%, var(--bg-start) 0%, transparent 60%),
    radial-gradient(100% 80% at 85% 110%, #1B3247 0%, transparent 55%),
    var(--bg-end);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: #1A2230; }

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

a { color: inherit; }

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

/* ------------------------------ Backdrop ------------------------------ */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 40%, transparent 55%, rgba(5, 8, 12, 0.55) 100%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(6) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* Spiky-star sparkle layer, ported from website/. Sits just above the WebGL
   sky (#sky, z 0) and below content. Note: distinct from the reviews .stars
   rating, which is unrelated. Positions are injected by the inline spawner. */
.sparkles { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.sparkles .sp {
  position: absolute;
  background: url("../assets/particles/spikyStar.svg") center / contain no-repeat;
  opacity: 0;
  animation: sparkle-twinkle var(--d, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; }
  50%      { opacity: 0.9; }
}

main { position: relative; z-index: 3; }

/* -------------------------------- Nav --------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  padding-top: calc(14px + env(safe-area-inset-top));
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(11, 16, 23, 0.7);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.nav-wordmark {
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.nav-actions { display: flex; gap: 10px; }

/* ---------------------------- Store buttons ---------------------------- */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 14px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}

.store-btn:hover {
  background: var(--frost-strong);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(232, 201, 138, 0.12);
}

.store-btn:active { transform: translateY(0) scale(0.98); }

.store-icon { width: 20px; height: 20px; flex: none; }

/* compact white nav variant: same prominent style as the hero buttons */
.store-btn-nav {
  padding: 7px 16px 7px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #131922;
  border-color: transparent;
}
.store-btn-nav:hover { background: #FFFFFF; }
.store-btn-nav .store-icon { width: 20px; height: 20px; }
.store-btn-nav .store-btn-text { font-size: 14px; }
.store-btn-nav .store-btn-text small { font-size: 9px; }

.store-btn-lg {
  padding: 12px 22px 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #131922;
  border-color: transparent;
}
.store-btn-lg:hover { background: #FFFFFF; }
.store-btn-lg .store-icon { width: 26px; height: 26px; }

.store-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-size: 17px;
  font-weight: 800;
  text-align: left;
}
.store-btn-text small {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* -------------------------------- Hero --------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: clamp(72px, 9svh, 120px) 20px clamp(40px, 6svh, 72px);
}

.hero-copy {
  position: relative;
  z-index: 5;
  max-width: 720px;
}

/* olive-branch "Apps We Love" eyebrow, ported from website/ */
.hero-eyebrow {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: var(--ink-70);
}
.eyebrow-branch {
  width: 22px;
  height: auto;
  opacity: 0.85;
}
.eyebrow-branch-right { transform: scaleX(-1); }
.eyebrow-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.eyebrow-top {
  font-family: var(--body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.eyebrow-main {
  font-family: var(--body);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.eyebrow-stars {
  margin-top: 3px;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 3px;
}

.hero-title {
  font-family: var(--display);
  font-weight: 400;
  /* scales with width AND height so the fan below stays above the fold */
  font-size: clamp(48px, min(9.5vw, 10.5svh), 108px);
  line-height: 1.02;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero-line {
  display: block;
  overflow: hidden;
  /* room for Berkshire Swash descenders inside the clip box */
  padding: 0.08em 0.1em 0.16em;
  margin-bottom: -0.16em;
}
.hero-line > span { display: inline-block; }

.hero-sub {
  margin: 18px auto 0;
  max-width: 560px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--ink-70);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hero-note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--ink-70);
}

.hero-rating {
  margin-top: 26px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-70);
}
.stars {
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-right: 4px;
}

/* Card fan */
.hero-fan {
  position: relative;
  z-index: 4;
  /* center in whatever vertical space the viewport leaves over */
  margin-top: auto;
  margin-bottom: auto;
  padding-top: clamp(12px, 2svh, 32px);
  width: min(680px, 92vw);
  height: clamp(140px, 21svh, 230px);
  perspective: 1200px;
  flex: none;
}

.fan-card {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(96px, min(15vw, 14svh), 150px);
  aspect-ratio: var(--card-ratio);
  object-fit: fill; /* stretch the taller scans into 2:3, no cropping */
  border-radius: 6px; /* tight, stays off the cards' printed black edges */
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform-origin: 50% 120%;
  will-change: transform;
}

/* Default fanned layout. GSAP overrides these inline when it runs, so this
   doubles as the no-JS and reduced-motion state. */
.fan-card:nth-child(1) { transform: translate(-50%, 34px) rotate(-26deg); }
.fan-card:nth-child(2) { transform: translate(-50%, 10px) rotate(-13deg); }
.fan-card:nth-child(3) { transform: translate(-50%, 0); }
.fan-card:nth-child(4) { transform: translate(-50%, 10px) rotate(13deg); }
.fan-card:nth-child(5) { transform: translate(-50%, 34px) rotate(26deg); }

/* ------------------------------ Manifesto ------------------------------ */
.manifesto {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50svh;
  padding: clamp(80px, 12svh, 120px) 24px;
}

.manifesto-text {
  max-width: 880px;
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.manifesto-text .word { opacity: 0.13; display: inline-block; }

/* -------------------------------- Draw --------------------------------- */
.draw {
  text-align: center;
  padding: 80px 20px 110px;
}

.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 56px);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.section-sub {
  margin: 14px auto 0;
  max-width: 460px;
  color: var(--ink-70);
  font-size: 16.5px;
  line-height: 1.5;
}

.draw-stage {
  position: relative;
  height: clamp(330px, 46vh, 430px);
  margin-top: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}

.deck {
  position: relative;
  width: clamp(150px, 20vw, 190px);
  aspect-ratio: var(--card-ratio);
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* holding must not scroll the page, long-press must not pop image menus */
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.deck img {
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.deck-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
  object-fit: cover;
}
.deck-card-3 { transform: rotate(-5deg) translate(-7px, 5px); }
.deck-card-2 { transform: rotate(3deg) translate(5px, 2px); }
.deck-card-1 { transition: transform 0.3s var(--ease); }

.deck:hover .deck-card-1 { transform: translateY(-10px) rotate(-1.5deg); }
.deck:hover::after { opacity: 1; }

/* while channeling, GSAP drives the top card every frame */
.deck.charging .deck-card-1 { transition: none; }

/* golden aura that swells with the charge */
.deck-aura {
  position: absolute;
  inset: -72px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%,
    rgba(245, 222, 170, 0.65) 0%,
    rgba(232, 201, 138, 0.3) 42%,
    transparent 70%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: opacity, transform;
}

/* gold shimmer that fills the card face as energy flows in */
.deck-veil {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: radial-gradient(85% 70% at 50% 45%,
    rgba(245, 222, 170, 0.55) 0%,
    rgba(232, 201, 138, 0.22) 55%,
    rgba(232, 201, 138, 0.05) 100%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: opacity;
}

.deck-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF6E3 0%, var(--gold) 55%, transparent 75%);
  box-shadow: 0 0 8px 2px rgba(232, 201, 138, 0.55);
  opacity: 0;
  will-change: transform, opacity;
}
.spark-star {
  border-radius: 0;
  background: var(--gold);
  box-shadow: 0 0 10px 3px rgba(232, 201, 138, 0.5);
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
}

/* release flash */
.deck-burst {
  position: absolute;
  inset: -70px;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%,
    rgba(255, 248, 230, 0.95) 0%,
    rgba(232, 201, 138, 0.55) 35%,
    transparent 70%);
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.channel-hint {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 201, 138, 0.85);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.deck::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 22px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(232, 201, 138, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.drawn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* author display beats the UA [hidden] rule, restate it */
.drawn[hidden] { display: none; }

.drawn-flip {
  position: relative;
  width: clamp(170px, 23vw, 215px);
  aspect-ratio: var(--card-ratio);
  transform-style: preserve-3d;
}

.drawn-back,
.drawn-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  object-fit: fill;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.drawn-front { transform: rotateY(180deg); }

.draw-result { min-height: 164px; margin-top: 26px; }

.draw-name {
  font-family: var(--display);
  font-size: 27px;
  color: var(--gold);
  opacity: 0;
}

.draw-line {
  margin: 14px auto 0;
  max-width: 480px;
  font-family: var(--display);
  color: var(--ink);
  font-size: 27px;
  line-height: 1.4;
  min-height: 2.7em; /* reserve ~2 lines so varying advice length doesn't jump the CTA */
  opacity: 0;
}

/* shown only while a drawn card is open */
.post-draw { margin-top: 22px; }
.post-draw[hidden] { display: none; }

.draw-hint {
  margin: 0 auto;
  max-width: 420px;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-70);
}

/* the two pills sit side by side under the nudge */
.draw-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

/* matched frosted pills: white pills are reserved for store links.
   Get the app keeps a richer hover as the primary action. */
.draw-again,
.draw-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.2s var(--ease);
}

.draw-again {
  font-weight: 700;
  cursor: pointer;
}
.draw-again:hover { background: var(--frost-strong); transform: translateY(-1px); }

.draw-cta { font-weight: 800; }
.draw-cta:hover {
  background: var(--frost-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(232, 201, 138, 0.15);
}
.draw-cta:active { transform: translateY(0) scale(0.98); }

/* ------------------------------ Features ------------------------------- */
.features {
  max-width: 1060px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 48px) 60px;
  display: flex;
  flex-direction: column;
  gap: clamp(72px, 12vh, 140px);
}

.feature {
  display: flex;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.feature-reverse { flex-direction: row-reverse; }

.feature-media { flex: 0 0 44%; display: flex; justify-content: center; }

.phone {
  width: min(290px, 78vw);
  border-radius: 38px;
  padding: 10px;
  background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.04));
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transform: rotate(-2deg);
}
.feature-reverse .phone { transform: rotate(2deg); }

.phone img {
  border-radius: 29px;
  width: 100%;
  aspect-ratio: 1284 / 2778; /* reserve space before lazy images load (no CLS) */
}

.feature-copy { flex: 1; }

.feature-kicker {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 12px;
}

.feature-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.feature-copy p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-70);
  max-width: 46ch;
}

/* ------------------------------- Reviews ------------------------------- */
.reviews {
  max-width: 1060px;
  margin: 0 auto;
  padding: 70px clamp(20px, 5vw, 48px) 20px;
  text-align: center;
}

/* horizontal scroll carousel: native swipe + snap, arrows, edge fades */
.reviews-shell {
  position: relative;
  margin-top: 40px;
}

.reviews-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 12px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3.5%, #000 96.5%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 3.5%, #000 96.5%, transparent);
}
.reviews-track::-webkit-scrollbar { display: none; }
.reviews-track:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.review-card {
  flex: 0 0 calc((100% - 36px) / 3);
  scroll-snap-align: start;
  margin: 0;
  padding: 24px 22px;
  text-align: left;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
}

.review-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 16, 23, 0.72);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.review-arrow svg { width: 20px; height: 20px; }
.review-arrow:hover {
  background: rgba(20, 28, 38, 0.9);
  border-color: rgba(232, 201, 138, 0.45);
  transform: translateY(-50%) scale(1.06);
}
.review-arrow:active { transform: translateY(-50%) scale(0.96); }
.review-arrow-prev { left: -14px; }
.review-arrow-next { right: -14px; }

.review-stars {
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.18em;
}

.review-title {
  margin-top: 12px;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
}

.review-quote {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-70);
}

@media (max-width: 760px) {
  /* one card per view with a peek of the next, swipe to browse */
  .review-card { flex-basis: 82%; }
  .review-arrow { display: none; }
  .reviews-track {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5%, #000 97.5%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 2.5%, #000 97.5%, transparent);
  }
}

/* --------------------------------- FAQ --------------------------------- */
.faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 70px 20px 30px;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 36px;
  text-align: left;
}

.faq details {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 4px 22px;
}

.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-size: 16.5px;
  font-weight: 700;
  list-style: none;
  position: relative;
  padding-right: 32px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--gold);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-body { overflow: hidden; }

.faq details p {
  margin: 0;
  padding-bottom: 18px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-70);
}

/* --------------------------------- CTA --------------------------------- */
.cta {
  text-align: center;
  padding: 110px 20px 130px;
}

.cta-icon {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  margin: 0 auto 26px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.cta-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 72px);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.cta-sub {
  margin: 16px auto 0;
  max-width: 460px;
  color: var(--ink-70);
  font-size: 17px;
  line-height: 1.55;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

/* ------------------------------- Footer -------------------------------- */
.footer {
  text-align: center;
  padding: 48px 20px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 11, 16, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-triquetra { width: 30px; height: 30px; margin: 0 auto 18px; opacity: 0.6; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}
.footer-links a {
  color: var(--ink-70);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--ink); }

.footer-note { margin-top: 18px; font-size: 12.5px; color: var(--ink-35); }

/* ----------------------------- Mobile dock ----------------------------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  z-index: 30;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(11, 16, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  transition: transform 0.45s var(--ease);
}

.dock.visible { transform: translate(-50%, 0); }

.store-btn-dock {
  font-size: 14px;
  font-weight: 800;
  min-height: 44px;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #131922;
  border-color: transparent;
}
.store-btn-dock .store-icon { width: 17px; height: 17px; }

/* ------------------------------ Responsive ----------------------------- */
@media (max-width: 760px) {
  .nav-actions { display: none; }

  .hero { padding-top: max(72px, 9svh); padding-bottom: 52px; }

  .hero-title { font-size: clamp(32px, min(8.6vw, 9svh), 56px); }
  .hero-sub { font-size: 15px; margin-top: 14px; }
  .hero-ctas { margin-top: 12px; gap: 10px; }
  .hero-note { margin-top: 18px; }

  .hero-fan { height: clamp(120px, 20svh, 180px); }
  .fan-card { width: clamp(80px, 23vw, 108px); }

  /* compact store buttons so both sit side by side above the fold */
  .hero-ctas .store-btn-lg {
    padding: 9px 14px 9px 12px;
    gap: 8px;
  }
  .hero-ctas .store-btn-lg .store-icon { width: 20px; height: 20px; }
  .store-btn-text { font-size: 14px; }
  .store-btn-text small { font-size: 9px; }

  .feature,
  .feature-reverse {
    flex-direction: column;
    text-align: center;
  }
  .feature-copy p { margin-left: auto; margin-right: auto; }
  .feature-media { flex: none; }
  .phone { width: min(250px, 72vw); }

  .manifesto { min-height: 56svh; padding: 90px 24px; }

  .cta { padding-bottom: 170px; } /* room for dock */
}

@media (min-width: 761px) {
  .dock { display: none; }
}

/* --------------------------- Reduced motion ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .manifesto-text .word { opacity: 1; }
  .sparkles .sp { animation: none; opacity: 0.85; }
}

/* =========================================================================
   Shared chrome for Card Meanings: nav links + mobile menu, suit accents,
   suit portals (used on the overview and the home teaser).
   ========================================================================= */

/* per-suit accent. Brightened from the app's Suite colors for legibility
   on the dark surface. Set on a suit/card page <body> and on each portal. */
/* coded by element: fire=red, air=yellow, water=blue, earth=green; major=purple */
.cm-suit--major     { --suit-accent: rgb(176, 140, 214); } /* — */
.cm-suit--wands     { --suit-accent: rgb(212, 112, 122); } /* fire  → red */
.cm-suit--swords    { --suit-accent: rgb(224, 190, 116); } /* air   → yellow */
.cm-suit--cups      { --suit-accent: rgb(132, 176, 220); } /* water → blue */
.cm-suit--pentacles { --suit-accent: rgb(132, 191, 142); } /* earth → green */

/* ---- nav text links + CTA (replaces the old store buttons in the bar) --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.nav-link {
  color: var(--ink-70);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link-cta {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--frost);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  color: var(--ink);
  font-weight: 700;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.nav-link-cta:hover { background: var(--frost-strong); transform: translateY(-1px); }

/* hamburger, hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px clamp(16px, 4vw, 48px) 18px;
    background: rgba(11, 16, 23, 0.94);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .nav.nav-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-link {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-link-cta {
    margin-top: 14px;
    border-bottom: 0;
    text-align: center;
    justify-content: center;
  }
  .nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ------------------------------ suit portals --------------------------- */
.cm-portals {
  display: grid;
  /* 8 tracks so a 2-track card lands a quarter-width and Major can center over
     the middle two tracks: Major alone on row 1, the four suits on row 2. */
  grid-template-columns: repeat(8, 1fr);
  gap: clamp(12px, 1.5vw, 20px);
  margin-top: clamp(30px, 5vh, 56px);
}
.cm-suit--major { grid-column: 4 / 6; grid-row: 1; } /* centered on top */
.cm-suit--wands { grid-column: 1 / 3; grid-row: 2; }
.cm-suit--cups { grid-column: 3 / 5; grid-row: 2; }
.cm-suit--swords { grid-column: 5 / 7; grid-row: 2; }
.cm-suit--pentacles { grid-column: 7 / 9; grid-row: 2; }
@media (max-width: 880px) {
  /* Major full-width banner on top, suits 2x2 below */
  .cm-portals { grid-template-columns: repeat(2, 1fr); }
  .cm-suit--major { grid-column: 1 / -1; grid-row: auto; }
  .cm-suit--wands,
  .cm-suit--cups,
  .cm-suit--swords,
  .cm-suit--pentacles { grid-column: auto; grid-row: auto; }
}
.cm-portal {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 34px 20px 26px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--suit-accent, #ffffff) 24%, rgba(255, 255, 255, 0.08));
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.cm-portal-glow {
  position: absolute;
  top: -45%;
  left: 50%;
  width: 170%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, var(--suit-accent, var(--gold)) 0%, transparent 64%);
  opacity: 0.15;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.cm-portal:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--suit-accent, #ffffff) 55%, transparent);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}
.cm-portal:hover .cm-portal-glow { opacity: 0.32; }
.cm-portal-icon {
  position: relative;
  width: 46px;
  height: 46px;
  /* source SVGs have mixed dark fills; force them white uniformly */
  filter: brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}
.cm-portal-name { position: relative; font-family: var(--display); font-size: 24px; }
.cm-portal-themes {
  position: relative;
  margin-top: auto; /* spacer after the title: pin description + count to the bottom */
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-70);
  max-width: 22ch;
}
.cm-portal-count {
  position: relative;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--suit-accent, var(--gold));
}

/* ----------------------- home "explore the cards" ---------------------- */
.cm-teaser {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) clamp(20px, 5vw, 48px) 20px;
  text-align: center;
}
.cm-teaser .section-title { margin-bottom: 6px; }
.cm-teaser-foot { margin-top: 30px; }
.cm-teaser-link {
  color: var(--gold);
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease);
}
.cm-teaser-link:hover { border-color: var(--gold); }
