/* Witchen, witchen.app
   Daily Grace design system: cream, ink, gold, sage, moon-silver.
   Cormorant Garamond. No emojis, no em/en dashes in copy. */

:root {
  --cream: #F6F1E3;
  --card: #FFFDF8;
  --ink: #1A1512;
  --muted: #6B6257;
  --eyebrow: #544D3E;
  --gold: #C9A227;
  --gold-deep: #A8841C;
  --sage: #7C8B6F;
  --silver: #9AA1AD;
  --serif: "Cormorant Garamond", Georgia, serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--ink); }

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

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--cream);
  display: none; align-items: center; justify-content: center;
}
#preloader.on { display: flex; }
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
#preloader { transition: opacity 0.9s var(--ease-out), visibility 0.9s; }
#preloader svg { width: 72px; height: 72px; }
#preloader .draw-moon {
  fill: none; stroke: var(--gold); stroke-width: 2.5;
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: moondraw 1.4s var(--ease-out) forwards;
}
@keyframes moondraw { to { stroke-dashoffset: 0; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  transform: translateY(-100%);
  transition: transform 0.8s var(--ease-out);
}
body.ready .nav { transform: translateY(0); }
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 34px); align-items: center; }
.nav-links a {
  color: var(--eyebrow); text-decoration: none;
  font-size: 16.5px; letter-spacing: 0.04em;
  position: relative; transition: color 0.3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 860px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Wordmark ---------- */
.wordmark {
  font-family: var(--serif); font-weight: 500;
  font-size: 30px; letter-spacing: 0.01em; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: baseline;
  line-height: 1;
}
.wordmark .dl { position: relative; display: inline-block; }
.wordmark .tittle {
  position: absolute; left: 50%; top: -0.34em;
  width: 0.34em; height: 0.34em;
  transform: translateX(-38%);
  overflow: visible;
}

/* ---------- Brand mark (Moonstroke W) ---------- */
.brandmark { width: 34px; height: 34px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 18px; font-weight: 500;
  letter-spacing: 0.03em; text-decoration: none;
  padding: 14px 30px; border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--ink); background: transparent;
  cursor: pointer; position: relative;
  transition: background 0.4s, color 0.4s, border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
}
.btn.solid { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn:hover { box-shadow: 0 12px 34px rgba(201, 162, 39, 0.28); }
.btn.solid:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn.ghost:hover { background: rgba(201, 162, 39, 0.12); }
.btn .arr { transition: transform 0.35s var(--ease-out); }
.btn:hover .arr { transform: translateX(5px); }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
section { position: relative; padding: clamp(90px, 12vh, 150px) 0; }

.eyebrow {
  font-size: 14px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--eyebrow); margin-bottom: 22px; font-weight: 500;
}
h1, h2 { font-weight: 500; line-height: 1.08; letter-spacing: 0.005em; }
.h-xl { font-size: clamp(52px, 8.5vw, 118px); }
.h-lg { font-size: clamp(38px, 5.4vw, 72px); }
.lede { font-size: clamp(20px, 2.4vw, 26px); color: var(--muted); max-width: 34em; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Vine divider */
.vine-divider { display: flex; justify-content: center; padding: 10px 0 0; }
.vine-divider svg { width: min(420px, 70vw); height: 34px; color: var(--sage); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 110px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("assets/hero-botanical.webp") center top / cover no-repeat;
  opacity: 0.9;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(246,241,227,0.25), rgba(246,241,227,0.88) 78%);
}
#vineCanvas {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.85;
}
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); width: 100%; }
.hero .wordmark { font-size: clamp(64px, 11vw, 150px); margin: 6px 0 10px; }
.hero .wordmark .tittle { top: -0.36em; width: 0.36em; height: 0.36em; }
.hero-tag {
  font-size: clamp(26px, 3.6vw, 44px); font-style: italic;
  color: var(--ink); margin-bottom: 20px;
}
.hero-sub { max-width: 36em; color: var(--muted); font-size: clamp(19px, 2.2vw, 24px); margin-bottom: 38px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* Live moon chip */
.moon-chip {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 44px; padding: 12px 22px 12px 14px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.35); border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 17px; color: var(--eyebrow);
}
.moon-chip canvas { width: 44px; height: 44px; }
.moon-chip strong { color: var(--ink); font-weight: 600; }

.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--eyebrow); font-size: 14px; letter-spacing: 0.28em; text-transform: uppercase;
}
.scroll-hint .line { width: 1px; height: 44px; background: var(--gold); overflow: hidden; position: relative; }
.scroll-hint .line::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--ink); animation: hintdrop 2.2s var(--ease-out) infinite;
}
@keyframes hintdrop { 0% { top: -100%; } 55% { top: 0; } 100% { top: 100%; } }

/* ---------- Kinetic lines ---------- */
.k-line { overflow: hidden; display: block; }
.k-word { display: inline-block; will-change: transform; }
.manifesto { background: var(--cream); }
.manifesto .h-lg { max-width: 20em; }
.manifesto .h-lg .k-line { padding-bottom: 0.12em; margin-bottom: -0.12em; }
.manifesto .accent { color: var(--gold-deep); font-style: italic; }

/* ---------- Practice: sticky card stack ---------- */
.stack-pin { height: 420vh; position: relative; }
.stack-stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.p-card {
  position: absolute; left: 50%; top: 50%;
  width: min(560px, 88vw);
  background: var(--card);
  border: 1px solid rgba(201, 162, 39, 0.4); border-radius: 22px;
  padding: clamp(30px, 4vw, 52px);
  box-shadow: 0 30px 80px rgba(26, 21, 18, 0.12);
  will-change: transform, opacity;
}
.p-card .num {
  font-size: 15px; letter-spacing: 0.3em; color: var(--gold-deep); margin-bottom: 14px;
}
.p-card h3 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 500; margin-bottom: 12px; }
.p-card p { color: var(--muted); font-size: 19px; }
.p-card .fine {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(201, 162, 39, 0.3);
  font-size: 16.5px; color: var(--sage); font-style: italic;
}
.stack-label {
  position: absolute; top: clamp(90px, 12vh, 130px); left: 0; right: 0;
  text-align: center; z-index: 5; pointer-events: none;
}

/* ---------- Feature rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 2; } }
.frame {
  border-radius: 26px; overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 34px 90px rgba(26, 21, 18, 0.14);
  position: relative; background: var(--card);
}
.frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/4.6; }
.frame.tall img { aspect-ratio: 4/5.2; }
.feat-list { list-style: none; margin-top: 30px; display: grid; gap: 20px; }
.feat-list li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.feat-list .tick { width: 26px; height: 26px; margin-top: 4px; color: var(--gold-deep); }
.feat-list strong { font-weight: 600; }
.feat-list p { color: var(--muted); font-size: 18px; }

/* ---------- Circle candles ---------- */
.circle-sec { background: linear-gradient(to bottom, var(--cream), #EFE7D2 130%); }

/* ---------- Tarot ---------- */
.tarot-sec { overflow: hidden; }
.fan-stage { position: relative; height: clamp(380px, 52vw, 560px); margin: 50px auto 0; max-width: 760px; }
.fan-card {
  position: absolute; left: 50%; top: 0;
  width: clamp(180px, 24vw, 250px);
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-shadow: 0 26px 70px rgba(26, 21, 18, 0.2);
  will-change: transform;
  transform-style: preserve-3d;
}
.fan-card img { width: 100%; aspect-ratio: 5/8.4; object-fit: cover; }
.spread-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 44px; }
.spread {
  border: 1px solid rgba(201, 162, 39, 0.45); border-radius: 999px;
  padding: 10px 24px; font-size: 17.5px; color: var(--eyebrow); background: var(--card);
}

/* ---------- Ethics ---------- */
.ethics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 54px; }
@media (max-width: 900px) { .ethics-grid { grid-template-columns: 1fr; } }
.ethic-card {
  background: var(--card); border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 20px; padding: 38px 32px;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
}
.ethic-card:hover { transform: translateY(-8px); box-shadow: 0 24px 60px rgba(26,21,18,0.1); }
.ethic-card h3 { font-size: 27px; margin: 16px 0 10px; font-weight: 500; }
.ethic-card p { color: var(--muted); font-size: 18px; }
.ethic-card .glyph { width: 40px; height: 40px; color: var(--gold-deep); }

/* ---------- Download ---------- */
.download-sec { text-align: center; }
.store-note {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 30px; padding: 16px 30px;
  border: 1px dashed rgba(84, 77, 62, 0.5); border-radius: 999px;
  color: var(--eyebrow); font-size: 18px;
}
.domain { font-size: clamp(40px, 6vw, 76px); margin-top: 26px; }
.domain a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--gold); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid rgba(201, 162, 39, 0.3);
  padding: 60px 0 46px; background: var(--cream);
}
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.foot-brand { display: flex; gap: 16px; align-items: center; }
.foot-note { color: var(--muted); font-size: 16.5px; margin-top: 14px; max-width: 34em; }
.foot-links { display: flex; gap: 26px; }
.foot-links a { color: var(--eyebrow); text-decoration: none; font-size: 16.5px; }
.foot-links a:hover { color: var(--ink); }
.legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(201,162,39,0.25); color: var(--muted); font-size: 15.5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Reveal defaults (JS enhances; content visible without JS) ---------- */
html.js .rv { opacity: 0; transform: translateY(36px); }
html.js .k-word { transform: translateY(115%); }
.no-motion .rv, .no-js .rv { opacity: 1; transform: none; }
html.no-motion .k-word { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1 !important; transform: none !important; }
  html.js .k-word { transform: none !important; }
  #preloader { display: none; }
  .scroll-hint { display: none; }
}
