/* TarotTheme — shared layer (every page): tokens, header, footer, night bands,
   buttons, section titles, the tarot card component, ad boxes.
   Page sheets: home.css (index), pages.css (everything else), blog.css,
   article.css. Images: static/img/themes/TarotTheme/ (extracted from the
   design's embedded base64). */

:root {
  --tt-navy: #24205a; --tt-purple: #4a2a86; --tt-purple-dk: #3a1f6e; --tt-text: #3e3d55; --tt-muted: #55546c;
  --tt-gold: #d79b2c; --tt-gold-lt: #f4c35c; --tt-gold-dk: #b9801c; --tt-cream: #fdfaf2;
  --tt-line: #ece4d3; --tt-card-bg: #fff;
  --tt-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --tt-sans: "Poppins", "Segoe UI", Roboto, Arial, sans-serif;
  --tt-love: #feebed; --tt-love-2: #fecfd8;
  --tt-career: #fef2dc; --tt-career-2: #fee6b7;
  --tt-yes: #eee8fd; --tt-yes-2: #ded1fe;
  --tt-fin: #e4f7ea; --tt-fin-2: #baf2cf;
  --tt-grow: #e2f0fe; --tt-grow-2: #bee1fd;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.tt-body { margin: 0; font-family: var(--tt-sans); color: var(--tt-text); background: var(--tt-cream); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.tt-body img { max-width: 100%; display: block; }
.tt-body a { color: inherit; text-decoration: none; }
.tt-body h1, .tt-body h2, .tt-body h3, .tt-body h4, .tt-body p { margin: 0; }
.tt-body :focus-visible { outline: 3px solid var(--tt-gold-lt); outline-offset: 3px; border-radius: 8px; }
.tt-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.tt-main { display: block; min-height: 50vh; }
.tt-center { text-align: center; }
.tt-feather { -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 60%, transparent 100%); mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 60%, transparent 100%); }

/* ── Header ─────────────────────────────────────────────────────────────── */
.tt-header { position: sticky; top: 0; z-index: 30; background: #fff; box-shadow: 0 2px 14px rgba(40, 20, 80, .08); }
.tt-nav-bar { max-width: 1180px; margin: 0 auto; height: 62px; display: flex; align-items: center; gap: 20px; padding: 0 16px; }
.tt-brand { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.tt-brand-mark { width: 62px; height: 48px; object-fit: contain; }
.tt-brand-logo { max-height: 46px; width: auto; }
.tt-brand-name { font-family: var(--tt-serif); font-weight: 700; font-size: 26px; line-height: 1; color: var(--tt-navy); letter-spacing: -.4px; }
.tt-brand-name span { color: var(--tt-gold); }
.tt-brand small { display: block; font-size: 8px; letter-spacing: 1.4px; color: var(--tt-navy); margin-top: 5px; text-transform: uppercase; }
.tt-menu { display: flex; gap: 26px; margin: 0 auto; }
.tt-menu a { font-size: 13px; font-weight: 500; color: var(--tt-navy); position: relative; padding: 4px 0; white-space: nowrap; }
.tt-menu a:hover { color: var(--tt-gold-dk); }
.tt-menu a.is-active { color: var(--tt-gold-dk); }
.tt-menu a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--tt-gold); }
.tt-btn-reading { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; background: var(--tt-purple); color: #fff !important; font-weight: 500; font-size: 13px; padding: 9px 18px 9px 20px; border-radius: 22px; flex: 0 0 auto; }
.tt-btn-reading:hover { background: var(--tt-purple-dk); }
.tt-btn-reading svg { width: 18px; height: 18px; flex: 0 0 auto; }
.tt-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.tt-burger span { display: block; width: 24px; height: 2.5px; background: var(--tt-navy); margin: 5px 0; border-radius: 2px; }
.tt-mobile-menu { display: none; background: #fff; padding: 6px 24px 16px; border-top: 1px solid #efeaf5; }
.tt-mobile-menu a { display: block; padding: 10px 0; font-weight: 500; color: var(--tt-navy); }
.tt-mobile-menu a.is-active { color: var(--tt-gold-dk); }
.tt-mobile-menu.is-open { display: block; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.tt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 30px; border-radius: 24px; font: 500 14px var(--tt-sans); border: 0; cursor: pointer; transition: filter .15s, background .15s; text-align: center; }
.tt-btn-gold { background: linear-gradient(180deg, #dda43a, #c9891f); color: #fff !important; box-shadow: 0 8px 20px rgba(201, 137, 31, .3); }
.tt-btn-gold:hover { filter: brightness(.95); }
.tt-btn-purple { background: var(--tt-purple); color: #fff !important; }
.tt-btn-purple:hover { background: var(--tt-purple-dk); }
.tt-btn-ghost { background: transparent; color: var(--tt-navy); border: 1px solid #cfc6e3; }
.tt-btn-ghost:hover { background: #f5f0ff; }
.tt-btn-light { background: rgba(255, 255, 255, .04); color: #fff !important; border: 1px solid rgba(255, 255, 255, .85); }
.tt-btn-light:hover { background: rgba(255, 255, 255, .12); }
.tt-btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tt-btn-lg { height: 50px; padding: 0 38px; font-size: 15px; }

/* ── Section titles ─────────────────────────────────────────────────────── */
.tt-sec-title { text-align: center; padding: 0 16px; }
.tt-sec-title h2 { font-family: var(--tt-serif); font-weight: 700; font-size: clamp(22px, 1.9vw, 28px); color: var(--tt-navy); display: inline-flex; align-items: center; gap: 12px; }
.tt-sec-title p { font-size: 13.5px; color: var(--tt-muted); margin-top: 8px; }
.tt-deco { display: inline-flex; align-items: center; gap: 3px; color: var(--tt-gold); }
.tt-deco svg { width: 16px; height: 16px; }
.tt-deco::before { content: ""; width: 38px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--tt-gold)); }
.tt-deco.r { flex-direction: row-reverse; }
.tt-deco.r::before { background: linear-gradient(90deg, var(--tt-gold), transparent); }
.tt-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--tt-gold-dk); font-weight: 500; }

/* ── Night bands (How it works, page heroes, footer) ────────────────────── */
.tt-night { position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(ellipse 55% 80% at 50% 115%, rgba(150, 70, 130, .65), transparent 70%),
              linear-gradient(180deg, #371c52 0%, #4a2463 60%, #5d2c6c 100%); }
.tt-night::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .8;
  background-image: radial-gradient(1.5px 1.5px at 6% 22%, #fff, transparent), radial-gradient(1px 1px at 18% 64%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 31% 14%, #ffe, transparent), radial-gradient(1px 1px at 44% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 58% 26%, #fff, transparent), radial-gradient(1px 1px at 71% 72%, #ffe, transparent),
    radial-gradient(2px 2px at 86% 20%, #fff, transparent), radial-gradient(1px 1px at 94% 58%, #fff, transparent),
    radial-gradient(1px 1px at 52% 50%, #fff, transparent); }
.tt-night .tt-k-l, .tt-night .tt-k-r { position: absolute; pointer-events: none; opacity: .9; width: 140px; }
.tt-night .tt-k-l { left: 0; top: 6px; }
.tt-night .tt-k-r { right: 0; top: 0; }
.tt-night .tt-sec-title h2 { color: #fff; font-weight: 400; }
.tt-night .tt-sec-title p { color: #e6dcf2; }

/* Inner page hero (night band with title) */
.tt-page-hero { padding: 34px 0 38px; text-align: center; }
.tt-page-hero .tt-wrap { position: relative; }
.tt-page-hero h1 { font-family: var(--tt-serif); font-weight: 700; font-size: clamp(28px, 3vw, 42px); line-height: 1.12; margin: 8px 0 10px; }
.tt-page-hero h1 .tt-gold { color: var(--tt-gold-lt); }
.tt-page-hero p { color: #efe6f4; max-width: 640px; margin: 0 auto; font-size: 15px; }
.tt-page-hero .tt-eyebrow { color: var(--tt-gold-lt); }
.tt-crumbs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 12.5px; color: #d8cfe8; margin-bottom: 6px; }
.tt-crumbs a:hover { color: var(--tt-gold-lt); }

/* ── Tarot card component ───────────────────────────────────────────────────
   .tt-card (face: a Rider–Waite–Smith scan, static/img/themes/TarotTheme/
   cards/<slug>.webp — 1909 deck, public domain via Wikimedia Commons) and
   .tt-card-back. Sizes: default ~120px, .tt-card-sm, .tt-card-lg. Reversed
   cards rotate the image. Card ratio 300:518 matches the scans. */
.tt-card { --w: 120px; width: var(--w); aspect-ratio: 300 / 518; flex: 0 0 auto; border-radius: calc(var(--w) * .06); overflow: hidden;
  background: #efe6d2; box-shadow: 0 10px 24px rgba(30, 15, 60, .28), 0 0 0 1px rgba(60, 40, 90, .12); position: relative; }
.tt-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tt-card.is-reversed img { transform: rotate(180deg); }
.tt-card-sm { --w: 84px; }
.tt-card-lg { --w: 200px; }
.tt-card-back { display: block; --w: 120px; width: var(--w); aspect-ratio: 300 / 518; border-radius: calc(var(--w) * .08); flex: 0 0 auto; position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(244, 195, 92, .35) 0 9%, transparent 10%),
              repeating-linear-gradient(45deg, rgba(244, 195, 92, .14) 0 2px, transparent 2px 12px),
              repeating-linear-gradient(-45deg, rgba(244, 195, 92, .14) 0 2px, transparent 2px 12px),
              linear-gradient(160deg, #4a2a86, #2c1b4b);
  box-shadow: 0 8px 18px rgba(30, 15, 60, .25), inset 0 0 0 4px #2c1b4b, inset 0 0 0 5.5px rgba(244, 195, 92, .7); }
.tt-card-back::after { content: "\2726"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--tt-gold-lt); font-size: calc(var(--w) * .2); }

/* Keyword chips */
.tt-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tt-chips li { font-size: 12px; padding: 3px 11px; border-radius: 14px; background: #f3edfd; color: var(--tt-purple-dk); }
.tt-chips.is-rev li { background: #fdeee9; color: #8a3a22; }
.tt-tag-rev { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: #a3421f; background: #fdeee9; border-radius: 10px; padding: 2px 9px; vertical-align: middle; }

/* Generic white panel */
.tt-panel { background: var(--tt-card-bg); border: 1px solid var(--tt-line); border-radius: 14px; padding: clamp(18px, 2.4vw, 28px); box-shadow: 0 2px 12px rgba(80, 50, 120, .05); }
.tt-panel h2 { font-family: var(--tt-serif); color: var(--tt-navy); font-size: 21px; margin-bottom: 10px; }
.tt-panel h3 { font-family: var(--tt-serif); color: var(--tt-navy); font-size: 17px; margin: 14px 0 6px; }
.tt-panel p { font-size: 14.5px; }
.tt-lead { font-size: 15.5px; color: var(--tt-muted); }

/* ── Ads ─────────────────────────────────────────────────────────────────── */
.tt-ad { margin: 26px auto; text-align: center; max-width: 100%; overflow: hidden; }
.tt-ad-label { display: block; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #a49fb5; margin-bottom: 6px; }
.tt-ad-slot { display: inline-block; min-height: 50px; }
.tt-ad.is-empty { display: none; }
.tt-ad-top { margin: 14px auto 0; }
.tt-sticky { position: sticky; top: 84px; margin-top: 0; }
body.tt-has-anchor { padding-bottom: 100px; }

/* Two-column layout with optional sticky sidebar ad */
.tt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.tt-layout-single { max-width: 860px; margin-left: auto; margin-right: auto; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.tt-footer { margin-top: 56px; border-top: 1px solid rgba(244, 195, 92, .18);
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(130, 60, 120, .35), transparent 70%), linear-gradient(180deg, #2f1a4f 0%, #251443 100%); }
.tt-f-top { position: relative; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.6fr; gap: 36px; padding: 52px 0 40px; }
.tt-f-brand .tt-brand-name { color: #fff; font-size: 28px; }
.tt-f-brand .tt-brand { margin-bottom: 14px; }
.tt-f-brand .tt-brand small { color: #d8cfe8; }
.tt-f-brand p { font-size: 13px; line-height: 1.6; color: #ddd3ea; max-width: 280px; }
.tt-f-col h4, .tt-f-daily h4 { font-family: var(--tt-serif); font-weight: 400; font-size: 17px; color: #fff; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.tt-f-col h4::before, .tt-f-daily h4::before { content: "\2726"; color: var(--tt-gold-lt); font-size: 11px; }
.tt-f-col a { display: block; font-size: 13px; color: #ddd3ea; margin-bottom: 9px; }
.tt-f-col a:hover { color: var(--tt-gold-lt); }
.tt-f-daily p { font-size: 13px; color: #ddd3ea; line-height: 1.55; margin-bottom: 14px; }
.tt-f-daily-row { display: flex; gap: 14px; align-items: center; }
.tt-f-daily-row .tt-card-back { --w: 54px; }
.tt-f-bottom { position: relative; border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0 22px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 12.5px; color: #c8bcd9; }
.tt-f-bottom p { max-width: 640px; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .tt-f-top { grid-template-columns: 1fr 1fr 1fr; }
  .tt-f-brand { grid-column: 1 / -1; }
  .tt-f-daily { grid-column: 1 / -1; max-width: 520px; }
  .tt-menu { gap: 18px; }
}
@media (max-width: 1060px) {
  .tt-menu { display: none; }
  .tt-burger { display: block; }
  .tt-btn-reading { margin-left: auto; }
}
@media (max-width: 992px) {
  .tt-layout { grid-template-columns: 1fr; }
  .tt-sticky { position: static; }
}
@media (max-width: 640px) {
  .tt-brand-name { font-size: 21px; }
  .tt-brand-mark { width: 46px; height: 38px; }
  .tt-brand small { font-size: 7px; letter-spacing: .8px; }
  .tt-btn-reading span { display: none; }
  .tt-btn-reading { padding: 9px 11px; }
  .tt-deco::before { width: 16px; }
  .tt-f-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .tt-night .tt-k-l, .tt-night .tt-k-r { width: 90px; }
  .tt-card-lg { --w: 160px; }
}
@media (max-width: 440px) {
  .tt-f-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .tt-body * { transition: none !important; animation: none !important; } }

/* ── Reading cards (home "Popular Tarot Readings", readings hub, result) ── */
.tt-r-card { border-radius: 10px; text-align: center; padding: 6px 12px 16px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 2px 10px rgba(80, 50, 120, .06); transition: transform .15s, box-shadow .15s; }
.tt-r-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(80, 50, 120, .12); }
.tt-r-card img { height: 96px; width: auto; max-width: 100%; object-fit: contain; }
.tt-r-card h3 { font-family: var(--tt-serif); font-weight: 700; font-size: clamp(16px, 1.15vw, 19px); color: var(--tt-navy); margin-top: 6px; }
.tt-r-card p { font-size: 13px; line-height: 1.35; color: var(--tt-muted); margin: 6px 0 14px; max-width: 220px; }
.tt-r-card .tt-r-btn { margin-top: auto; display: inline-flex; align-items: center; gap: 12px; padding: 9px 28px; border-radius: 22px; font-size: 12.5px; font-weight: 500; color: var(--tt-navy); }
.tt-tone-love { background: var(--tt-love); } .tt-tone-love .tt-r-btn { background: var(--tt-love-2); }
.tt-tone-career { background: var(--tt-career); } .tt-tone-career .tt-r-btn { background: var(--tt-career-2); }
.tt-tone-yes { background: var(--tt-yes); } .tt-tone-yes .tt-r-btn { background: var(--tt-yes-2); }
.tt-tone-fin { background: var(--tt-fin); } .tt-tone-fin .tt-r-btn { background: var(--tt-fin-2); }
.tt-tone-grow { background: var(--tt-grow); } .tt-tone-grow .tt-r-btn { background: var(--tt-grow-2); }

/* ── Article cards (home latest, blog) ─────────────────────────────────── */
.tt-post { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--tt-line); border-radius: 14px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.tt-post:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(80, 50, 120, .1); }
.tt-post-media { aspect-ratio: 16 / 9; background: linear-gradient(160deg, #4a2a86, #2c1b4b); display: grid; place-items: center; overflow: hidden; }
.tt-post-media img { width: 100%; height: 100%; object-fit: cover; }
.tt-post-noimg { color: var(--tt-gold-lt); font-size: 34px; }
.tt-post-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.tt-post-cat { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--tt-gold-dk); font-weight: 600; }
.tt-post-body h3 { font-family: var(--tt-serif); font-size: 17px; line-height: 1.3; color: var(--tt-navy); }
.tt-post-date { font-size: 12px; color: #8f8aa3; }
