/* ---------------------------------------------------------------
   Token system
   Color:
     --void        #171225  deep aubergine-ink background
     --bone        #E9E2D2  warm, slightly grey parchment (card faces)
     --ink         #241A33  near-black plum, all linework + on-card text
     --paper-text  #EDE7DD  soft bone text on dark background
     --brass       #A8813F  muted antique gold accent (upright / links)
     --teal        #3F6B63  muted teal accent (reversed state)
     --void-line   rgba(233,226,210,0.14)  hairline dividers on dark bg
   Type:
     display : 'Newsreader', a soft old-style serif, italic for card names
     utility : 'IBM Plex Mono', card codes / arcana numbering
     body    : 'Inter', everything else
   Signature: the "seal" - a thin compass ring behind every card icon,
   tying tarot/moon/horoscope sites into one family without repeating art.
   ----------------------------------------------------------------*/

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,500;1,400;1,500&family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');

:root {
  --void: #171225;
  --void-2: #1D1730;
  --bone: #E9E2D2;
  --ink: #241A33;
  --paper-text: #EDE7DD;
  --paper-text-dim: #B8AFC7;
  --brass: #A8813F;
  --teal: #3F6B63;
  --void-line: rgba(233,226,210,0.14);
  --ink-line: rgba(36,26,51,0.18);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--paper-text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 20% 0%, var(--void-2), transparent 55%),
    radial-gradient(circle at 85% 100%, var(--void-2), transparent 50%);
  min-height: 100vh;
}

a { color: var(--brass); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* -------- site header -------- */
.site-header {
  padding: 40px 0 28px;
  text-align: center;
  border-bottom: 0.5px solid var(--void-line);
}
.site-header .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--paper-text-dim);
}
.site-header h1 {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(28px, 5vw, 44px);
  margin: 6px 0 0;
}

/* -------- compass seal (signature element) -------- */
.seal {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.seal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 0.5px solid currentColor;
  opacity: 0.35;
}
.seal::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 0.5px dashed currentColor;
  opacity: 0.25;
}
.seal svg { width: 56px; height: 56px; position: relative; z-index: 1; }
.seal.on-bone { color: var(--ink); }
.seal.on-void { color: var(--brass); }
.seal.small { width: 72px; height: 72px; }
.seal.small svg { width: 32px; height: 32px; }
.seal.small::after { inset: 8px; }

/* -------- today's card ritual (home page) -------- */
.ritual {
  padding: 56px 0 48px;
  text-align: center;
}
.ritual .date-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--paper-text-dim);
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.today-card {
  display: inline-block;
  background: var(--bone);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 32px 40px 28px;
  min-width: 260px;
}
.today-card .code-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6b5f80;
}
.today-card h2 {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  margin: 14px 0 0;
}
.today-card .upright-line {
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
  margin: 14px auto 0;
  color: #4a3d5c;
}
.ritual-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  background: transparent;
  border: 0.5px solid var(--void-line);
  color: var(--paper-text);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: var(--brass); background: rgba(168,129,63,0.08); }

/* -------- card grid (index) -------- */
.section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--paper-text-dim);
  margin: 48px 0 16px;
  padding-top: 20px;
  border-top: 0.5px solid var(--void-line);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 14px;
  padding-bottom: 48px;
}
.card-tile {
  display: block;
  background: var(--bone);
  color: var(--ink);
  border-radius: 12px;
  padding: 18px 10px 14px;
  text-align: center;
  text-decoration: none;
}
.card-tile:hover { transform: translateY(-2px); }
.card-tile .seal { width: 76px; height: 76px; margin-bottom: 10px; }
.card-tile .seal svg { width: 34px; height: 34px; }
.card-tile .name {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 13px;
  line-height: 1.3;
}

/* -------- card detail page -------- */
.detail-head { text-align: center; padding: 48px 0 8px; }
.detail-head .code-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--paper-text-dim);
  text-transform: uppercase;
}
.detail-head h1 {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 32px;
  margin: 16px 0 0;
}
.meanings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px 0 24px;
}
@media (max-width: 560px) {
  .meanings { grid-template-columns: 1fr; }
}
.meaning-box {
  background: var(--void-2);
  border: 0.5px solid var(--void-line);
  border-radius: var(--radius);
  padding: 18px;
}
.meaning-box .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.meaning-box.upright .label { color: var(--brass); }
.meaning-box.reversed .label { color: var(--teal); }
.meaning-box p { margin: 0; font-size: 14.5px; line-height: 1.7; }

.desc-block {
  border-top: 0.5px solid var(--void-line);
  padding: 20px 0 32px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--paper-text-dim);
}

.detail-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-bottom: 56px;
}

/* -------- footer -------- */
footer {
  text-align: center;
  padding: 28px 0 48px;
  font-size: 12px;
  color: var(--paper-text-dim);
  border-top: 0.5px solid var(--void-line);
}
footer p { margin: 0; }
footer p + p { margin-top: 8px; }
.copyright {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  opacity: 0.55;
}

/* -------- reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  .card-tile { transition: none; }
}
