/* The Cocoon Tarot - redesign preview (bakhouse)
   Fraunces: the deck's own serif in Nina's app, soft organic curves, italic for the one word that matters.
   League Spartan: the sans on both of Nina's sites, used for reading text and small tracked labels. */

:root {
  --cream: #f7ede2;
  --paper: #fbf6f0;
  --sand: #efe4d6;
  --ink: #3a3a38;
  --muted: #655e56;
  --line: rgba(58, 58, 56, .16);
  --rose: #965f60;          /* the card back */
  --rose-deep: #7d4d4f;
  --rose-tint: #ebd9cf;
  --sage: #a8b59a;
  --sage-deep: #7a8b6f;
  --sage-tint: #e2e5d8;
  --olive: #6b6d43;         /* her button colour, the one action colour */
  --olive-deep: #55572f;
  --gold: #9a7848;          /* lines and large italic only */

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'League Spartan', 'Helvetica Neue', Arial, sans-serif;
  --logo: 'Italiana', var(--serif);

  /* 1.25 scale */
  --t-xs: .75rem;   /* 12 */
  --t-s: .875rem;   /* 14 */
  --t-m: 1.0625rem; /* 17 */
  --t-l: 1.3125rem; /* 21 */
  --t-xl: 1.625rem; /* 26 */
  --t-2xl: 2.0625rem; /* 33 */
  --t-3xl: 2.5625rem; /* 41 */
  --t-4xl: 3.1875rem; /* 51 */

  --gut: 20px;
  --max: 1180px;
  --r: 12px;
  --shadow: 0 22px 44px -22px rgba(70, 40, 30, .55);
  --ease: cubic-bezier(.22, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 var(--t-m)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--serif); font-weight: 340; letter-spacing: -.015em; line-height: 1.06; margin: 0; font-optical-sizing: auto; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 320; color: var(--rose); }
p { margin: 0; }
.eyebrow { font: 500 var(--t-xs)/1.3 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: var(--t-l); line-height: 1.45; color: var(--ink); max-width: 34ch; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--olive); color: var(--paper);
  font: 500 var(--t-s)/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: background-color .25s, transform .2s var(--ease);
}
.btn:hover { background: var(--olive-deep); }
.btn:active { transform: scale(.97); }
.btn--wide { width: 100%; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { background: rgba(58, 58, 56, .05); }
.btn .price { font-family: var(--serif); font-size: 1.15em; letter-spacing: 0; text-transform: none; font-weight: 400; }
.tlink {
  display: inline-flex; align-items: center; gap: .45em; text-decoration: none;
  font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; line-height: 1.2;
}
.tlink svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.tlink:hover svg { transform: translateX(3px); }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- preview strip (not part of the design) ---------- */
.pv {
  position: relative; z-index: 60; background: var(--ink); color: #efe8df;
  font: 400 12px/1.2 var(--sans); letter-spacing: .02em;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px var(--gut); min-height: 36px;
}
.pv b { font-weight: 600; }
.pv nav { display: flex; gap: 4px; }
.pv nav a, .pv button {
  color: #efe8df; text-decoration: none; padding: 5px 10px; border-radius: 99px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(239, 232, 223, .25);
}
.pv nav a[aria-current="page"] { background: #efe8df; color: var(--ink); }
.pv .pv-note { display: none; }
@media (min-width: 760px) { .pv .pv-note { display: inline; opacity: .75; } }

/* ---------- the card (signature) ---------- */
.tcard { aspect-ratio: 944 / 1417; border-radius: 10px; overflow: hidden; background: var(--rose); box-shadow: var(--shadow); }
.tcard img { width: 100%; height: 100%; object-fit: cover; }

.draw { display: grid; justify-items: center; text-align: center; }
.stage { position: relative; width: min(58vw, 236px); perspective: 1400px; margin: 8px 0 28px; }
.halo {
  position: absolute; left: 50%; top: 50%; width: 170%; aspect-ratio: 1; margin: -85% 0 0 -85%;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 253, 249, 1), rgba(255, 252, 246, .55) 55%, rgba(255, 252, 246, 0));
  transform: scale(.72); opacity: .55;
}
.ring {
  position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; margin: -75% 0 0 -75%;
  border-radius: 50%; border: 1px solid rgba(154, 120, 72, .55); pointer-events: none;
  transform: scale(.6); opacity: 0;
}
.draw.is-breathing .ring { animation: ring 7.4s var(--ease) forwards; }
@keyframes ring {
  0% { transform: scale(.6); opacity: 0; }
  12% { opacity: .9; }
  42% { transform: scale(1.04); opacity: .9; }
  100% { transform: scale(.66); opacity: 0; }
}
.breather { transform-origin: 50% 60%; will-change: transform; }
.halo, .ring { will-change: transform, opacity; }
.flip {
  position: relative; display: block; width: 100%; aspect-ratio: 944 / 1417;
  transform-style: preserve-3d; transition: transform 1.15s var(--ease); will-change: transform;
}
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip .front { transform: rotateY(180deg); }
.draw.is-turned .flip { transform: rotateY(180deg); }
.draw.is-breathing .halo { animation: halo 7.4s var(--ease) forwards; }
.draw.is-breathing .breather { animation: breathe 7.4s ease-in-out forwards; }
@keyframes halo {
  0% { transform: scale(.72); opacity: .55; }
  42% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(.8); opacity: .7; }
}
@keyframes breathe {
  0% { transform: scale(1); }
  42% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.cue { min-height: 1.6em; font-family: var(--serif); font-style: italic; font-size: var(--t-l); color: var(--ink); margin-bottom: 16px; transition: opacity .5s; }
.cue.is-out { opacity: 0; }
.draw-actions { display: grid; justify-items: center; gap: 14px; width: 100%; }
.draw-actions small { font-size: var(--t-s); color: var(--muted); }
.draw.is-breathing .draw-actions .btn, .draw.is-turned .draw-actions { display: none; }
.skip { font-size: var(--t-s); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; display: none; min-height: 44px; }
.draw.is-breathing .skip { display: inline-block; }
.draw.is-breathing .draw-actions small { display: none; }

/* reading */
.reading { width: 100%; max-width: 560px; text-align: left; display: none; }
.draw.is-turned .reading { display: block; animation: rise .8s var(--ease) both .35s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reading .r-name { font-size: var(--t-2xl); margin: 10px 0 4px; }
.reading .r-trad { color: var(--muted); font-size: var(--t-s); }
.reading .r-quote { font-family: var(--serif); font-style: italic; font-size: var(--t-l); line-height: 1.35; margin: 18px 0; color: var(--rose-deep); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.facts div { padding: 0 12px; border-left: 1px solid var(--line); }
.facts div:first-child { padding-left: 0; border-left: 0; }
.facts dt { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 500; line-height: 1.3; }
.r-text { margin-bottom: 22px; }
.r-breathe { background: rgba(255, 252, 246, .7); border-radius: var(--r); padding: 18px 18px 20px; margin-bottom: 22px; }
.r-breathe .eyebrow { color: var(--sage-deep); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.r-more { border-top: 1px solid var(--line); padding-top: 20px; }
.r-more p { font-weight: 500; margin-bottom: 10px; }
.locklist { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; font-size: var(--t-s); }
.locklist li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.locklist svg { width: 15px; height: 15px; flex: none; color: var(--rose); }
.r-full { display: none; }
.r-full h4 { font: 500 var(--t-xs)/1.3 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.is-unlocked .r-full { display: block; }
.is-unlocked .r-more { display: none; }

/* ---------- sheet (unlock) ---------- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92svh;
  background: var(--paper); color: var(--ink); border-radius: 22px 22px 0 0; overflow: auto;
  overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(40, 30, 26, .5); }
.sheet[open] { animation: sheet-in .45s var(--ease); }
.sheet[open]::backdrop { animation: fade .35s ease; }
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 760px) { .sheet { margin: auto; border-radius: 22px; } .sheet[open] { animation: rise .4s var(--ease); } }
.sheet-in { padding: 14px 24px 28px; position: relative; }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet-x { position: absolute; right: 10px; top: 8px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.sheet-x:hover { background: rgba(58, 58, 56, .06); }
.fan { position: relative; height: 150px; margin: 6px 0 34px; }
.fan .tcard { position: absolute; width: 82px; left: 50%; bottom: 0; transform-origin: 50% 120%; box-shadow: 0 14px 26px -16px rgba(70, 40, 30, .6); }
.fan .tcard:nth-child(1) { transform: translateX(-50%) rotate(-14deg) translateX(-56px); }
.fan .tcard:nth-child(2) { transform: translateX(-50%) rotate(0deg); z-index: 2; }
.fan .tcard:nth-child(3) { transform: translateX(-50%) rotate(14deg) translateX(56px); }
.sheet h2 { font-size: var(--t-2xl); text-align: center; }
.sheet .sub { text-align: center; color: var(--muted); margin: 8px 0 22px; }
.inc { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line); }
.inc li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--t-m); line-height: 1.4; }
.inc svg { width: 18px; height: 18px; color: var(--sage-deep); flex: none; margin-top: 2px; }
.pricebox { display: flex; align-items: baseline; justify-content: center; gap: 12px; margin-bottom: 16px; }
.pricebox strong { font: 340 var(--t-4xl)/1 var(--serif); }
.pricebox span { color: var(--muted); font-size: var(--t-s); }
.pvnote {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px; border: 1px dashed rgba(58, 58, 56, .35);
  font-size: var(--t-s); color: var(--muted); line-height: 1.45;
}
.pvnote b { color: var(--ink); font-weight: 600; }
.step2 { display: none; text-align: center; }
.sheet.is-step2 .step1 { display: none; }
.sheet.is-step2 .step2 { display: block; animation: rise .5s var(--ease); }
.stripe { margin: 8px 0 20px; padding: 18px; border-radius: var(--r); background: var(--cream); text-align: left; font-size: var(--t-s); }
.stripe .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stripe .row:last-child { border: 0; font-weight: 600; }
.step2 .btn + .btn { margin-top: 10px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; z-index: 80; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-size: var(--t-s);
  width: max-content; max-width: calc(100vw - 40px); transition: opacity .3s, transform .3s var(--ease); pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* lang switch */
.lang { display: flex; gap: 2px; font: 500 12px/1 var(--sans); letter-spacing: .16em; }
.lang button { padding: 10px 6px; color: var(--muted); min-height: 40px; }
.lang button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--gold); }

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