/* ===== Mindful Magic — styles =====
   Recreates the Claude Design prototype (Mind Magic.dc.html + GameCard.dc.html).
   Card internals use container-query units (cqw) so a card scales identically
   tiny in the grid and large in the zoom overlay. */

:root {
  --accent: #E2604F;
  --accent-soft: #FCE6E1;
  --accent-shadow: rgba(226, 96, 79, .45);
  --ink: #2C2722;
  --paper: #FBFAF8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}

/* ----- floating background blobs ----- */
@keyframes mmFloatA { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(22px,-28px) rotate(8deg); } }
@keyframes mmFloatB { 0%,100% { transform: translate(0,0) rotate(0deg); } 50% { transform: translate(-26px,20px) rotate(-7deg); } }
@keyframes mmPop  { 0% { opacity: 0; transform: scale(.9) translateY(8px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes mmFade { from { opacity: 0; } to { opacity: 1; } }

.mm-blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.mm-blob { position: absolute; border-radius: 50%; }
.mm-blob-a { top: -130px; left: -90px; width: 430px; height: 430px; background: #F8C9C0; filter: blur(64px); opacity: .55; animation: mmFloatA 17s ease-in-out infinite; }
.mm-blob-b { top: 24%; right: -130px; width: 390px; height: 390px; background: #FBE3A1; filter: blur(64px); opacity: .5;  animation: mmFloatB 20s ease-in-out infinite; }
.mm-blob-c { bottom: -150px; left: 32%; width: 450px; height: 450px; background: #D7C4EE; filter: blur(72px); opacity: .42; animation: mmFloatA 23s ease-in-out infinite; }

.mm-page { position: relative; z-index: 1; min-height: 100vh; }

/* ----- header ----- */
.mm-header { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 58px 28px 30px; text-align: center; }
.mm-leaf { height: 108px; width: auto; display: block; margin: 0 auto 16px; }
.mm-title { font-family: 'Lora', serif; font-size: clamp(40px, 6vw, 64px); font-weight: 600; line-height: 1.02; margin: 0; color: var(--ink); text-wrap: balance; }
.mm-subtitle { font-size: clamp(15px, 1.7vw, 19px); color: #6b635c; max-width: 940px; margin: 15px auto 0; line-height: 1.5; }

/* heart "want a physical deck" */
.mm-heart-wrap { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.mm-heart {
  display: inline-flex; align-items: center; gap: 13px; cursor: pointer; border: none; background: #fff;
  padding: 11px 24px 11px 13px; border-radius: 99px;
  box-shadow: 0 10px 28px -16px rgba(60,30,20,.5), 0 0 0 1px rgba(60,30,20,.05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.mm-heart:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -16px rgba(226,96,79,.55), 0 0 0 1px rgba(60,30,20,.05); }
.mm-heart-glyph {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 20px; line-height: 1;
  transition: background .2s, color .2s;
}
.mm-heart.is-voted .mm-heart-glyph { background: var(--accent); color: #fff; }
.mm-heart-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.12; }
.mm-heart-count-row { display: flex; align-items: baseline; gap: 5px; }
.mm-heart-count { font-size: 20px; font-weight: 700; color: var(--ink); }
.mm-heart-of { font-size: 12px; font-weight: 500; color: #9a918a; }
.mm-heart-label { font-size: 11px; font-weight: 500; letter-spacing: .02em; color: #9a918a; }

.mm-progress { width: min(330px, 82vw); }
.mm-progress-track { height: 7px; border-radius: 99px; background: #EFE7DF; overflow: hidden; }
.mm-progress-fill { height: 100%; width: 0%; background: var(--accent); border-radius: 99px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.mm-progress-text { font-size: 12px; color: #9a918a; margin-top: 8px; }

/* ----- grid ----- */
.mm-grid {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 12px 28px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 36px 26px;
}

/* ===== the flip card (shared by grid + zoom) ===== */
.card { cursor: pointer; perspective: 1600px; container-type: inline-size; width: 100%; aspect-ratio: 5 / 7; }
.card-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .62s cubic-bezier(.2,.85,.25,1); transform: rotateY(0deg); }

/* grid: hover flips to content */
.mm-grid .card:hover .card-inner { transform: rotateY(180deg); }
/* zoom: opens to content (back); .show-front flips to the art */
.card.is-zoom .card-inner { transform: rotateY(180deg); }
.card.is-zoom.show-front .card-inner { transform: rotateY(0deg); }

.card-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 5cqw; overflow: hidden; background: #fff;
  box-shadow: 0 4cqw 8cqw -4.5cqw rgba(74,38,26,.42), 0 0 0 1px rgba(60,30,20,.05);
}

/* ----- front ----- */
.card-front { display: flex; flex-direction: column; }
.card-art {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: var(--soft);
}
.card-art-img { position: absolute; top: 3cqw; left: 3cqw; width: calc(100% - 6cqw); height: calc(100% - 6cqw); object-fit: contain; }
.card-art-blob1 { position: absolute; width: 58cqw; height: 58cqw; border-radius: 50%; background: var(--mid); opacity: .6; }
.card-art-blob2 { position: absolute; width: 33cqw; height: 33cqw; border-radius: 50%; background: var(--c-accent); opacity: .3; }
.card-art-label { position: relative; font-size: 3.1cqw; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--deep); opacity: .6; }
.card-score {
  position: absolute; top: 4.5cqw; left: 4.5cqw; display: inline-flex; align-items: center; gap: 1.4cqw;
  background: rgba(255,255,255,.85); padding: 1.6cqw 3.2cqw 1.6cqw 2.6cqw; border-radius: 99px;
  box-shadow: 0 1.2cqw 3cqw -1.6cqw rgba(0,0,0,.45);
}
.card-score-arrow { color: var(--c-accent); font-size: 3.4cqw; line-height: 1; }
.card-score-num { font-size: 3.9cqw; font-weight: 700; color: var(--deep); }
.card-namebar { padding: 5.5cqw 5cqw 6.5cqw; text-align: center; background: #fff; }
.card-eyebrow { font-size: 2.9cqw; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 1.8cqw; }
.card-name { font-family: 'Lora', serif; font-size: 8.6cqw; font-weight: 600; line-height: 1.08; color: var(--ink); }

/* ----- back ----- */
.card-back { transform: rotateY(180deg); display: flex; flex-direction: column; border-top: 1.8cqw solid var(--c-accent); }
.card-back-head { background: var(--soft); padding: 5cqw 6cqw 4.2cqw; position: relative; overflow: hidden; }

/* faint illustration echo behind the colored bands; keep text above it */
.card-back-head > *:not(.card-back-art),
.card-worked > *:not(.card-back-art) { position: relative; z-index: 1; }
.card-back-art {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; z-index: 0; opacity: .3;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.3) 55%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.3) 55%, #000 100%);
}
.card-back-art--head { transform: scale(2.3) rotate(-7deg); transform-origin: 72% 36%; }
.card-back-art--worked { transform: scale(2.7) rotate(6deg); transform-origin: 64% 50%; }
.card-back-name { font-family: 'Lora', serif; font-size: 7.6cqw; font-weight: 600; line-height: 1.02; color: var(--ink); }
.card-meta { margin-top: 2.6cqw; display: flex; flex-direction: column; gap: 1.4cqw; }
.card-meta-row { font-size: 3.7cqw; line-height: 1.3; color: #6f665f; }
.card-meta-row b { font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--c-accent); }
.card-play { flex: 1; min-height: 0; background: #fff; padding: 4.4cqw 6cqw 4cqw; display: flex; flex-direction: column; }
.card-play-label { font-size: 3.5cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 1cqw; }
.card-steps { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-around; gap: 1.6cqw; }
.card-step { display: flex; gap: 2.6cqw; align-items: flex-start; }
.card-step-num { flex: none; width: 6cqw; height: 6cqw; border-radius: 50%; background: var(--soft); color: var(--deep); font-size: 3.5cqw; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.card-step-text { font-size: 4.1cqw; line-height: 1.32; color: #4f4943; }
.card-worked { background: var(--soft); padding: 3.2cqw 6cqw; display: flex; align-items: baseline; gap: 2.4cqw; position: relative; overflow: hidden; }
.card-worked-label { font-size: 3.1cqw; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--deep); white-space: nowrap; }
.card-worked-text { font-family: 'Lora', serif; font-style: italic; font-size: 4.3cqw; line-height: 1.15; color: var(--deep); }

/* ----- footer ----- */
.mm-footer { position: relative; z-index: 1; margin-top: 96px; background: #2C2722; padding: 54px 32px 58px; }
.mm-footer-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 40px 56px; flex-wrap: wrap; }
.mm-footer-left { flex: 1 1 340px; text-align: left; }
.mm-footer-leaf { height: 48px; width: auto; display: block; margin: 0 0 18px; }
.mm-footer-brand { font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 600; color: #cbc1b6; line-height: 1.3; margin: 0; }
.mm-footer-brand a { color: var(--accent); text-decoration: none; }
.mm-footer-brand a:hover { text-decoration: underline; }
.mm-footer-tagline { font-family: 'Poppins', sans-serif; font-size: 13.5px; color: #948a80; line-height: 1.6; max-width: 460px; margin: 12px 0 0; }

/* external-link icon (open-in-new) appended to links that leave the site */
.ext-link::after {
  content: ""; display: inline-block; width: 0.72em; height: 0.72em; margin-left: 0.34em; vertical-align: -0.06em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M19%2019H5V5h7V3H5c-1.11%200-2%20.9-2%202v14c0%201.1.89%202%202%202h14c1.1%200%202-.9%202-2v-7h-2v7zM14%203v2h3.59l-9.83%209.83%201.41%201.41L19%206.41V10h2V3h-7z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M19%2019H5V5h7V3H5c-1.11%200-2%20.9-2%202v14c0%201.1.89%202%202%202h14c1.1%200%202-.9%202-2v-7h-2v7zM14%203v2h3.59l-9.83%209.83%201.41%201.41L19%206.41V10h2V3h-7z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* latest blog posts (lead-in lives at the end of the tagline) */
.mm-footer-posts { margin-top: 12px; }
.mm-footer-posts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mm-footer-posts a { font-family: 'Poppins', sans-serif; font-size: 14.5px; line-height: 1.35; color: #d7cec4; text-decoration: none; }
.mm-footer-posts a:hover { color: var(--accent); }

/* custom newsletter subscribe */
.mm-footer-right { flex: 0 1 auto; display: flex; justify-content: flex-end; }
/* 480px keeps Substack's embed in its compact "form + fine print" layout
   (narrower than ~480 it switches to a card with the publication title/author) */
.mm-subscribe { width: 480px; max-width: 100%; }
.mm-subscribe-label { font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: #8a8076; margin-bottom: 14px; }
/* the Substack embed framed in the brand coral so it ties to the rest of the
   page (a dark drop shadow is invisible on the dark footer) */
.mm-substack { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 3px rgba(226, 96, 79, .9), 0 0 22px 2px rgba(226, 96, 79, .55), 0 0 54px 8px rgba(226, 96, 79, .32); }
.mm-substack iframe { display: block; width: 100%; height: 150px; border: 0; }

@media (max-width: 680px) {
  .mm-footer-inner { flex-direction: column; align-items: flex-start; gap: 34px; }
  .mm-footer-right { width: 100%; justify-content: flex-start; }
  .mm-subscribe { width: 100%; }
}

/* ===== zoom overlay ===== */
.mm-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(42,24,18,.5); backdrop-filter: blur(11px); -webkit-backdrop-filter: blur(11px); animation: mmFade .28s ease;
}
.mm-nav, .mm-close {
  position: fixed; border: none; cursor: pointer; background: rgba(255,255,255,.94); color: var(--ink);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 32px -12px rgba(0,0,0,.55); z-index: 52;
}
.mm-nav { width: 54px; height: 54px; border-radius: 50%; top: 50%; transform: translateY(-50%); font-size: 28px; line-height: 1; padding-bottom: 3px; }
.mm-nav-prev { left: max(18px, 3vw); }
.mm-nav-next { right: max(18px, 3vw); }
/* on phones the zoomed card fills most of the width, so the side arrows would
   overlap it — hide them and let people close + tap another card */
@media (max-width: 560px) { .mm-nav { display: none; } }
.mm-close { top: 22px; right: 24px; width: 46px; height: 46px; border-radius: 50%; font-size: 17px; }

.mm-zoom-stage { position: relative; animation: mmPop .34s cubic-bezier(.2,.85,.25,1); }
.mm-zoom-card { width: min(86vw, 408px); max-width: 408px; }
.mm-vote { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.mm-vote-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 18px; border-radius: 13px;
  border: 1.5px solid rgba(255,255,255,.6); background: transparent; color: #fff;
  font-family: 'Poppins', sans-serif; font-size: 13.5px; font-weight: 600; transition: all .15s ease;
}
.mm-vote-btn .arr { font-size: 12px; line-height: 1; }
.mm-vote-btn.is-active { background: #fff; color: var(--ink); border-color: #fff; }
.mm-vote-score { text-align: center; min-width: 66px; color: #fff; }
.mm-vote-num { font-size: 44px; font-weight: 700; line-height: 1; }
.mm-vote-unit { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; opacity: .72; margin-top: 5px; }

/* ===== waitlist modal ===== */
.mm-modal-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(42,24,18,.5); backdrop-filter: blur(11px); -webkit-backdrop-filter: blur(11px); animation: mmFade .26s ease;
}
.mm-modal {
  position: relative; width: min(92vw, 452px); background: #fff; border-radius: 26px; padding: 38px 36px 32px;
  box-shadow: 0 44px 92px -44px rgba(0,0,0,.62); animation: mmPop .32s cubic-bezier(.2,.85,.25,1);
}
.mm-modal-close { position: absolute; top: 15px; right: 15px; width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer; background: #F4EEE8; color: #7a716a; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.mm-modal-icon { width: 54px; height: 54px; border-radius: 50%; background: #FCE6E1; color: var(--accent); font-size: 26px; line-height: 1; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.mm-modal h2 { font-family: 'Lora', serif; font-size: 27px; font-weight: 600; line-height: 1.08; margin: 0; color: var(--ink); text-align: center; }
.mm-modal-lead { font-size: 14.5px; color: #6b635c; line-height: 1.55; max-width: 340px; margin: 11px auto 0; text-align: center; }
.mm-modal-progress { width: 240px; max-width: 80%; margin: 18px auto 0; }
.mm-modal-progress .mm-progress-track { height: 6px; }
.mm-modal-progress-text { font-size: 12px; color: #9a918a; margin-top: 7px; text-align: center; }

.mm-form { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.mm-field { display: flex; align-items: center; gap: 14px; }
.mm-field label { flex: none; width: 62px; font-size: 14px; font-weight: 600; color: var(--ink); }
.mm-field.mm-field-price label { flex: 1; width: auto; }
.mm-field input { flex: 1; min-width: 0; padding: 11px 15px; border-radius: 12px; border: 1px solid #e7e0d8; background: var(--paper); font-family: 'Poppins', sans-serif; font-size: 15px; color: var(--ink); outline: none; }
.mm-field.mm-field-price input { flex: none; width: 108px; }
.mm-field input:focus { border-color: var(--accent); }
.mm-form input::placeholder { color: #c4bcb3; opacity: 1; }
.mm-consent { display: flex; align-items: center; gap: 10px; text-align: left; margin-top: 4px; cursor: pointer; }
.mm-consent input { flex: none; width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.mm-consent span { font-size: 13.5px; line-height: 1.4; color: #5b534c; }
.mm-consent strong { color: var(--ink); font-weight: 600; }
.mm-submit { border: none; cursor: pointer; margin-top: 6px; padding: 14px; border-radius: 99px; background: var(--accent); color: #fff; font-family: 'Poppins', sans-serif; font-size: 15px; font-weight: 600; box-shadow: 0 12px 26px -12px var(--accent-shadow); }
.mm-form-error { color: var(--accent); font-size: 13px; text-align: center; min-height: 0; }

.mm-done { text-align: center; padding: 6px 0 4px; }
.mm-done-icon { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 27px; line-height: 1; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.mm-done p { font-size: 15px; color: #6b635c; line-height: 1.55; max-width: 330px; margin: 11px auto 0; }
.mm-done p strong { color: var(--ink); }
.mm-done-back { border: none; cursor: pointer; margin-top: 22px; padding: 13px 34px; border-radius: 99px; background: #F4EEE8; color: var(--ink); font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; }

/* ===== "add a card" submission tile ===== */
.card-add {
  width: 100%; aspect-ratio: 5 / 7; cursor: pointer;
  border: 2px dashed #d8cec4; border-radius: 14px; background: rgba(255, 255, 255, .4);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: #b1a79e; font-family: 'Poppins', sans-serif;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}
.card-add:hover { color: var(--accent); border-color: var(--accent); background: rgba(255, 255, 255, .7); transform: translateY(-3px); }
.card-add-plus { width: 56px; height: 56px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 300; line-height: 1; padding-bottom: 3px; }
.card-add-label { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* ===== submit-a-card form ===== */
.mm-modal--tall { max-height: calc(100vh - 40px); overflow-y: auto; }
.mm-sform { display: flex; flex-direction: column; margin-top: 8px; }
.mm-sfield { display: flex; flex-direction: column; gap: 5px; text-align: left; margin-top: 14px; }
.mm-sfield label { font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600; color: var(--ink); }
.mm-sfield .hint { font-family: 'Poppins', sans-serif; font-size: 11.5px; font-weight: 400; color: #9a918a; line-height: 1.35; }
.mm-sfield input, .mm-sfield textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid #e7e0d8; background: var(--paper);
  font-family: 'Poppins', sans-serif; font-size: 14.5px; color: var(--ink); outline: none;
}
.mm-sfield textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
.mm-sfield input:focus, .mm-sfield textarea:focus { border-color: var(--accent); }
.mm-sform input::placeholder, .mm-sform textarea::placeholder { color: #c4bcb3; opacity: 1; }
.mm-sfield label .opt { font-weight: 400; color: #9a918a; }
.mm-sdivider { height: 1px; background: #efe7df; margin: 20px 0 2px; }
.mm-sform .mm-consent { margin-top: 16px; }
.mm-sform .mm-submit { margin-top: 18px; }
.mm-done-icon.is-green { background: #4F9D67; }

.mm-hidden { display: none !important; }
