/* Witch101 — warm ivory & antique gold editorial */
:root {
  --bg: #f6f0e1;
  --bg-soft: #eee4cc;
  --bg-card: #fffdf6;
  --ink: #241a10;
  --ink-dim: #77644c;
  --gold: #a87f2f;
  --gold-soft: #8a641f;
  --gold-deep: #6f5118;
  --bronze: #7c5a24;
  --line: #ddcfae;
  --shadow: rgba(74, 54, 26, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  line-height: 1.7;
}

/* Images can never overflow their container */
img { max-width: 100%; height: auto; }


h1, h2, h3, .brand-name, .hero-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold-deep); }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--gold-soft);
  margin-bottom: 1em;
}
.kicker.small { font-size: 0.62rem; margin-bottom: 0.4em; }

.lede {
  font-size: 1.12rem;
  color: var(--ink-dim);
  max-width: 36em;
}

/* Header — elegant wordmark, not game-logo */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(246, 240, 225, 0.94);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
}
.brand-moon { color: var(--gold); flex: none; }
.brand-name {
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
}
.main-nav a { color: var(--ink-dim); }
.main-nav a:hover { color: var(--gold-deep); }

/* Hero — warm ivory glow over photography */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 6.5rem 0 5rem;
  overflow: hidden;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(246, 240, 225, 0.93) 0%, rgba(246, 240, 225, 0.62) 45%, rgba(246, 240, 225, 0.12) 75%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  max-width: 12em;
  color: var(--ink);
}
.hero-title em { color: var(--bronze); font-style: italic; }
.hero .lede { margin: 0 0 2rem; }
.hero-cta { margin-top: 0.5rem; }

.btn {
  display: inline-block;
  padding: 0.85rem 2.4rem;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 400;
  border-radius: 3px;
  background: rgba(255, 253, 246, 0.5);
  transition: background 0.25s, color 0.25s;
}
.btn:hover {
  background: var(--gold);
  color: #fffdf6;
}

.section-title {
  font-size: 2.1rem;
  margin: 3.5rem 0 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
}
.section-title .rule {
  display: inline-block;
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-title .rule:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
  margin-bottom: 3.5rem;
}
.hub-cards { grid-template-columns: repeat(5, 1fr); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 32px var(--shadow);
}
.card-link { color: inherit; display: block; }
.card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-soft);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 1.3rem 1.4rem 1.6rem; text-align: center; }
.card-title { font-size: 1.5rem; margin-bottom: 0.35em; color: var(--ink); }
.card-excerpt { color: var(--ink-dim); font-size: 0.92rem; margin: 0 0 0.9em; }
.card-cta {
  color: var(--gold-soft);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.empty-note {
  color: var(--ink-dim);
  font-style: italic;
  padding: 2rem 0;
  text-align: center;
}

/* Hub pages */
.hub-hero {
  padding: 4rem 0 1rem;
  text-align: center;
}
.hub-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.hub-intro { margin-bottom: 2.5rem; color: var(--ink-dim); max-width: 44em; margin-left: auto; margin-right: auto; }

/* Articles */
.article { padding: 3rem 0; }
.article-narrow { max-width: 760px; }
.article-title { font-size: clamp(2rem, 5vw, 3rem); }
.article-meta { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 1.5rem; }

.hero-figure { margin: 0 0 2rem; }
.hero-figure img { width: 100%; border-radius: 4px; border: 1px solid var(--line); }

.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.8rem; margin-top: 2.2em; color: var(--bronze); }
.prose h3 { font-size: 1.4rem; margin-top: 1.8em; }
.prose p { margin: 1.1em 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.5em 0; }
.prose blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.5em 0;
  padding: 0.2em 0 0.2em 1.2em;
  color: var(--ink-dim);
  font-style: italic;
}

.related { margin-top: 4rem; }
.related h2 { font-size: 1.7rem; margin-bottom: 1.2rem; text-align: center; }

/* Footer — deep espresso anchor */
.site-footer {
  border-top: 1px solid var(--gold-deep);
  margin-top: 4rem;
  padding: 2.8rem 0 2.2rem;
  background: #241a10;
  color: #f6f0e1;
}
.footer-inner { text-align: center; }
.footer-brand {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.3em;
}
.footer-tag { color: #c9b992; font-size: 0.9rem; margin-bottom: 1.2rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-nav a { color: #c9b992; }
.footer-nav a:hover { color: #e8c96a; }
.footer-copy { color: #a08e6d; font-size: 0.78rem; }

/* Ad slots (rendered only when ads are enabled) */
.ad-slot {
  border: 1px dashed var(--line);
  color: var(--ink-dim);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
  margin: 1.5rem auto;
  max-width: 728px;
}

/* Responsive */
@media (max-width: 1000px) {
  .hub-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-nav { gap: 0.9rem; font-size: 0.72rem; }
  .hero { padding: 4rem 0 3rem; }
  .hub-cards { grid-template-columns: repeat(2, 1fr); }
  .section-title .rule { width: 40px; }
}

/* ---- Quizzes ---- */
.quiz-app { margin: 2rem 0 1rem; }
.quiz-start { text-align: center; padding: 2.5rem 1.5rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; }
.quiz-start p { max-width: 34rem; margin: 0 auto 1.5rem; }
.quiz-progress { height: 6px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; margin-bottom: 1.25rem; }
.quiz-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--bronze)); transition: width 0.45s ease; }
.quiz-count { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 0.5rem; }
.quiz-q { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.7rem; font-weight: 500; margin: 0 0 1.25rem; }
.quiz-options { display: grid; gap: 0.7rem; }
.quiz-opt { text-align: left; padding: 1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px; font-size: 1rem; color: var(--ink); cursor: pointer; transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s; font-family: inherit; line-height: 1.45; }
.quiz-opt:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 4px 14px var(--shadow); }
.quiz-result { background: var(--bg-card); border: 1px solid var(--gold); border-radius: 6px; padding: 2.5rem 2rem; text-align: center; }
.quiz-result-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2.1rem; font-weight: 500; margin: 0.4rem 0 0.25rem; }
.quiz-result-tag { font-style: italic; color: var(--gold-deep); margin-bottom: 1rem; }
.quiz-result .btn { margin: 0.9rem 0.4rem 0; }
.quiz-retake { display: inline-block; }
.quiz-after { margin-top: 2.5rem; }
button.btn { font-family: inherit; cursor: pointer; }

/* ---- Tarot ---- */
.tarot-app { margin: 2rem 0 1rem; }
.tarot-controls { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; margin: 1.5rem 0 2rem; }
.tarot-table { text-align: center; }
.tarot-hint { color: var(--ink-dim); font-style: italic; }
.tarot-table .btn-ghost { margin-top: 1rem; }
.tarot-row { display: flex; gap: 1.25rem; justify-content: center; align-items: flex-start; flex-wrap: wrap; margin: 1.5rem 0; }
.tarot-row.three .tarot-card { flex: 1 1 200px; max-width: 260px; }
.tarot-card { width: 220px; cursor: pointer; perspective: 900px; }
.tarot-inner { position: relative; width: 100%; height: 360px; transition: transform 0.7s; transform-style: preserve-3d; }
.tarot-card.revealed .tarot-inner { transform: rotateY(180deg); }
.tarot-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.25rem; }
.tarot-back { background: #2b1f14; border: 1px solid var(--gold); }
.tarot-moon { font-size: 3rem; color: var(--gold); line-height: 1; }
.tarot-front { background: var(--bg-card); border: 1px solid var(--gold); transform: rotateY(180deg); text-align: center; overflow-y: auto; justify-content: flex-start; padding-top: 1.75rem; }
.tarot-card-img { display: block; width: auto; max-width: 100%; height: 210px; object-fit: contain; border-radius: 4px; margin: 0.5rem auto 0.85rem; box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
@media (max-width: 480px) { .tarot-card-img { height: 170px; } }
.tarot-numeral { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--gold-deep); margin: 0 0 0.35rem; }
.tarot-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.45rem; font-weight: 600; margin: 0 0 0.75rem; }
.tarot-meaning { font-size: 0.92rem; line-height: 1.55; margin: 0 0 0.9rem; }
.tarot-pairing { font-size: 0.82rem; color: var(--ink-dim); line-height: 1.5; margin: 0; }
.tarot-position { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); margin-top: 0.6rem; }

/* Article body images */
.prose img { max-width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); margin: 0.4rem 0 0.2rem; }

/* Shop */
.product-price {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  color: var(--gold-soft);
  margin: 0 0 0.5em;
}
.shop-note {
  text-align: center;
  color: var(--ink-dim);
  font-style: italic;
  font-size: 0.92rem;
  margin-bottom: 3rem;
}
.product-page { padding: 3rem 0; }
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.product-hero-image img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: block;
}
.product-title { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0.3em 0; }
.product-price-lg {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.2rem;
  color: var(--gold-soft);
  margin: 0 0 0.6em;
}
.product-hero-info .lede { color: var(--ink-dim); margin-bottom: 1.6rem; }
.btn-disabled,
.btn-disabled:hover {
  background: var(--bg-soft);
  border-color: var(--line);
  color: var(--ink-dim);
  cursor: not-allowed;
}
.product-note {
  font-size: 0.9rem;
  color: var(--ink-dim);
  font-style: italic;
  margin-top: 0.9rem;
}
.product-body { max-width: 46em; margin-bottom: 2rem; }
.product-back { margin-bottom: 3rem; }
.product-back a { color: var(--gold-soft); }
@media (max-width: 700px) {
  .product-hero { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Shop checkout */
#checkout-container { margin: 0 auto 2.5rem; max-width: 560px; width: 100%; }
.checkout-error { color: #9c3d2e; margin-top: 1rem; font-size: 0.95rem; }
.btn-buy[disabled] { opacity: 0.65; cursor: wait; }
.success-page { text-align: center; padding: 4rem 0 3rem; }
.success-page .kicker { margin-bottom: 0.75rem; }
.success-page .lede { max-width: 34em; margin-left: auto; margin-right: auto; }
.success-page .btn { margin: 1.25rem 0 0.5rem; }
.success-page .product-back { margin-top: 2.5rem; }

/* ---- Site search ---- */
.search-toggle {
  background: none;
  border: 0;
  padding: 0.2rem;
  cursor: pointer;
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
}
.search-toggle:hover { color: var(--gold-deep); }

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(36, 26, 16, 0.45);
  padding-top: 84px;
}
.search-overlay[hidden] { display: none; }

.search-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 60px var(--shadow);
  max-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.search-bar > svg { color: var(--gold); flex: none; }
#search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--ink);
  outline: none;
}
#search-input::placeholder { color: var(--ink-dim); opacity: 0.8; }
.search-close {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-dim);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-close:hover { color: var(--gold-deep); border-color: var(--gold); }

.search-results { overflow-y: auto; padding: 0.4rem 0; }
.search-hit {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.7rem 1.25rem;
}
.search-hit:hover { background: var(--bg-soft); }
.search-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.search-hit-body { min-width: 0; }
.search-hit-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.search-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}
.search-badge {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  white-space: nowrap;
  font-weight: 400;
}
.search-snippet {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-dim);
  line-height: 1.5;
  margin-top: 0.15rem;
}
.search-empty {
  padding: 2.2rem 1.5rem;
  text-align: center;
  color: var(--ink-dim);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  margin: 0;
}

body.search-open { overflow: hidden; }

@media (max-width: 640px) {
  .search-overlay { padding: 0; }
  .search-panel {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    max-height: none;
    height: 100%;
  }
  #search-input { font-size: 1.05rem; }
  .search-thumb { width: 48px; height: 48px; }
}

/* BuzzFeed-style quiz visuals */
.quiz-options { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.quiz-opt { padding: 0; overflow: hidden; text-align: center; display: flex; flex-direction: column; }
.quiz-opt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg-soft); }
.quiz-opt-text { display: block; padding: 0.85rem 1rem; font-size: 0.97rem; line-height: 1.4; }
.quiz-result-figure { margin: 0 0 1.25rem; }
.quiz-result-figure img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 4px; display: block; }
@media (max-width: 560px) {
  .quiz-options { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .quiz-opt img { aspect-ratio: 1 / 1; }
  .quiz-opt-text { padding: 0.6rem 0.65rem; font-size: 0.86rem; line-height: 1.35; }
}
