:root {
  --ink: #f8f1df;
  --muted: #c2bbad;
  --night: #080b18;
  --night-soft: #101426;
  --panel: #14192b;
  --panel-2: #1b2034;
  --gold: #e1b95e;
  --gold-bright: #f6d783;
  --line: rgba(225, 185, 94, .3);
  --fire: #ee7047;
  --water: #54b8d5;
  --air: #c5d8ef;
  --earth: #8db66c;
  --major: #b895e8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --card-ratio: 897 / 1497;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 4%, rgba(105, 71, 147, .17), transparent 31rem),
    radial-gradient(circle at 90% 16%, rgba(33, 122, 142, .12), transparent 34rem),
    var(--night);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    radial-gradient(circle at 23% 17%, rgba(255,255,255,.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 74% 33%, rgba(255,255,255,.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 54% 82%, rgba(255,255,255,.4) 0 1px, transparent 1.5px);
  background-size: 190px 190px, 270px 270px, 230px 230px;
  z-index: -1;
}

img { display: block; max-width: 100%; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(3rem, 7vw, 6.6rem); letter-spacing: -.045em; }
h2 { margin-bottom: 18px; font-size: clamp(2.35rem, 5vw, 4.7rem); letter-spacing: -.035em; }
h3 { margin-bottom: 10px; font-size: 1.55rem; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px; background: var(--gold-bright); color: #121019; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.section-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow { margin-bottom: 14px; color: var(--gold-bright); font-size: .76rem; font-weight: 800; letter-spacing: .18em; line-height: 1.35; text-transform: uppercase; }
.lede { max-width: 690px; color: #d7d0c3; font-size: clamp(1.05rem, 2vw, 1.28rem); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(225, 185, 94, .18);
  background: rgba(8, 11, 24, .92);
  backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; line-height: 1.12; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; }
.brand small { display: block; margin-top: 4px; color: var(--gold); font-size: .65rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-bright); }
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a { color: #d8d1c4; font-size: .9rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--gold-bright); }
.menu-button { display: none; border: 1px solid var(--line); padding: 8px 12px; color: var(--ink); background: transparent; }

.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr); gap: clamp(40px, 8vw, 110px); align-items: center; min-height: calc(100svh - 72px); padding-block: 76px 92px; }
.hero-copy { position: relative; z-index: 1; }
.hero-search { display: block; max-width: 650px; margin-top: 36px; }
.hero-search > span:first-child { display: block; margin-bottom: 8px; color: #d7d0c3; font-size: .84rem; font-weight: 750; letter-spacing: .06em; }
.search-field { display: flex; gap: 12px; align-items: center; min-height: 58px; padding: 0 18px; border: 1px solid rgba(225, 185, 94, .45); background: rgba(20, 25, 43, .9); box-shadow: 0 12px 40px rgba(0,0,0,.24); }
.search-field > span { color: var(--gold-bright); font-size: 1.6rem; line-height: 1; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 1rem; }
.search-field input::placeholder { color: #918c83; }
.search-field:focus-within { border-color: var(--gold-bright); box-shadow: 0 0 0 3px rgba(225,185,94,.12), 0 12px 40px rgba(0,0,0,.24); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 20px; border: 1px solid var(--gold); font-size: .83rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.button-primary { color: #16111a; background: var(--gold-bright); }
.button-primary:hover { background: #ffe6a5; }
.button-secondary { color: var(--gold-bright); background: transparent; }
.button-secondary:hover { background: rgba(225,185,94,.08); }
.hero-art { position: relative; display: grid; place-items: center; min-height: 560px; }
.hero-art::after { content: ""; position: absolute; bottom: 3%; width: 78%; height: 12%; border-radius: 50%; background: rgba(0,0,0,.5); filter: blur(22px); }
.hero-art img { position: relative; z-index: 2; width: min(330px, 78vw); height: auto; aspect-ratio: var(--card-ratio); object-fit: contain; border-radius: 15px; box-shadow: var(--shadow), 0 0 0 1px rgba(246,215,131,.25); transform: rotate(3deg); }
.orbit { position: absolute; border: 1px solid rgba(225, 185, 94, .24); border-radius: 50%; }
.orbit-one { width: 430px; height: 430px; }
.orbit-two { width: 530px; height: 530px; border-style: dashed; opacity: .45; }

.section-heading { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: end; margin-bottom: 38px; }
.section-heading > p { max-width: 540px; margin-bottom: 6px; color: var(--muted); }
.section-heading.narrow { grid-template-columns: 1fr 1fr; }
.card-library { padding-block: 92px 120px; }
.library-tools { position: sticky; top: 72px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 30px; padding: 15px 0; border-block: 1px solid rgba(225,185,94,.16); background: rgba(8,11,24,.94); backdrop-filter: blur(14px); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { min-height: 39px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: #d7d0c3; background: transparent; font-size: .78rem; font-weight: 800; cursor: pointer; }
.filter:hover, .filter:focus-visible { border-color: var(--gold); color: var(--ink); }
.filter.is-active { border-color: var(--gold-bright); color: #151019; background: var(--gold-bright); }
.filter.fire:not(.is-active) { color: #ff9a77; }
.filter.water:not(.is-active) { color: #76d8ed; }
.filter.air:not(.is-active) { color: #e0edff; }
.filter.earth:not(.is-active) { color: #b4db91; }
.card-count { flex: none; margin: 0; color: var(--muted); font-size: .8rem; font-weight: 700; }
.card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 14px; }
.tarot-card { border: 0; padding: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.tarot-card figure { position: relative; overflow: hidden; margin: 0 0 10px; border: 1px solid rgba(225,185,94,.18); border-radius: 8px; background: var(--panel); box-shadow: 0 12px 30px rgba(0,0,0,.24); aspect-ratio: var(--card-ratio); }
.tarot-card img { width: 100%; height: 100%; aspect-ratio: var(--card-ratio); object-fit: contain; transition: transform .28s ease, filter .28s ease; }
.tarot-card:hover img, .tarot-card:focus-visible img { transform: scale(1.035); filter: saturate(1.08) brightness(1.04); }
.tarot-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 4px; }
.tarot-card h3 { margin: 0 0 2px; font-family: var(--sans); font-size: .9rem; font-weight: 750; line-height: 1.3; }
.tarot-card p { margin: 0; color: #9f9a91; font-size: .7rem; line-height: 1.35; }
.empty-state { padding: 50px 20px; border: 1px solid var(--line); color: var(--muted); text-align: center; }

.reading-section { padding-block: 112px; border-block: 1px solid rgba(225,185,94,.17); background: #0d1120; }
.ritual-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 50px 0 0; padding: 0; border: 1px solid var(--line); list-style: none; }
.ritual-steps li { display: grid; grid-template-columns: auto 1fr; gap: 18px; min-height: 190px; padding: 30px 27px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ritual-steps li:nth-child(3n) { border-right: 0; }
.ritual-steps li:nth-last-child(-n+3) { border-bottom: 0; }
.ritual-steps li > span { color: var(--gold); font-family: var(--serif); font-size: 1rem; }
.ritual-steps h3 { margin-top: 2px; }
.ritual-steps p { margin-bottom: 0; color: var(--muted); font-size: .94rem; }

.elements-section { padding-block: 116px; }
.element-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.element-card { min-height: 345px; padding: 32px 26px; border-right: 1px solid var(--line); background: var(--panel); }
.element-card:last-child { border-right: 0; }
.element-symbol { display: grid; width: 50px; height: 50px; margin-bottom: 44px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 1.4rem; }
.element-label { margin-bottom: 7px; color: var(--gold-bright); font-size: .69rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.element-card h3 { font-size: 2rem; }
.element-card > p:not(.element-label) { color: #c4beb2; font-size: .93rem; }
.element-card .element-prompt { margin-top: 26px; color: var(--ink) !important; font-family: var(--serif); font-style: italic; }
.element-fire { color: var(--fire); box-shadow: inset 0 4px 0 var(--fire); }
.element-water { color: var(--water); box-shadow: inset 0 4px 0 var(--water); }
.element-air { color: var(--air); box-shadow: inset 0 4px 0 var(--air); }
.element-earth { color: var(--earth); box-shadow: inset 0 4px 0 var(--earth); }
.element-card h3 { color: var(--ink); }
.major-note { display: grid; grid-template-columns: 90px 1fr; gap: 30px; align-items: center; margin-top: 24px; padding: 28px 34px; border: 1px solid rgba(184,149,232,.38); background: rgba(89,57,127,.15); }
.major-note p:last-child { max-width: 900px; margin-bottom: 0; color: #d4cdde; }
.major-glyph { display: grid; width: 68px; height: 68px; place-items: center; border: 1px solid var(--major); border-radius: 50%; color: #e5cef9; font-size: 2rem; }

.spreads-section { padding-block: 112px; background: #0d1120; }
.spread-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.spread-card { padding: 30px; border: 1px solid var(--line); background: var(--panel); }
.spread-card.featured { border-color: rgba(225,185,94,.6); background: #19192a; }
.spread-count { margin: 0 0 6px; color: var(--gold-bright); font-size: .7rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.spread-card > p:not(.spread-count) { color: var(--muted); font-size: .93rem; }
.spread-card ol { margin: 22px 0 0; padding-left: 22px; color: #d8d1c5; font-size: .88rem; }
.spread-card li { margin: 5px 0; padding-left: 5px; }
.mini-spread { display: flex; gap: 7px; justify-content: center; align-items: center; height: 104px; margin-bottom: 28px; }
.mini-spread i { display: grid; width: 41px; height: 70px; place-items: center; border: 1px solid var(--gold); color: var(--gold-bright); background: #0e1221; font-family: var(--serif); font-style: normal; font-size: .75rem; box-shadow: 0 8px 18px rgba(0,0,0,.28); }
.mini-spread.five { display: grid; grid-template-columns: repeat(3, 36px); grid-template-rows: repeat(2, 50px); gap: 4px; }
.mini-spread.five i { width: 32px; height: 48px; }
.mini-spread.five i:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.mini-spread.five i:nth-child(2) { grid-column: 2; grid-row: 1; }
.mini-spread.five i:nth-child(3) { grid-column: 2; grid-row: 2; }
.mini-spread.five i:nth-child(4) { grid-column: 3; grid-row: 1; }
.mini-spread.five i:nth-child(5) { grid-column: 3; grid-row: 2; }

.reversals-section { display: grid; grid-template-columns: .35fr 1fr; gap: 60px; align-items: center; padding-block: 116px; }
.reversals-section > div:last-child { max-width: 760px; }
.reversals-section p:last-child { color: var(--muted); font-size: 1.06rem; }
.reversal-mark { position: relative; display: grid; width: min(230px, 100%); aspect-ratio: 1; margin-inline: auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-bright); font-family: var(--serif); font-size: 6rem; }
.reversal-mark span { position: absolute; transform: translate(34px, 25px); color: var(--major); opacity: .62; }

.closing-section { padding-block: 108px 128px; text-align: center; }
.closing-section blockquote { max-width: 900px; margin: 20px auto 38px; color: var(--ink); font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 4rem); font-style: italic; line-height: 1.18; }
footer { display: flex; justify-content: space-between; gap: 30px; padding: 30px max(20px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); color: #9e998f; background: #060812; font-size: .76rem; }
footer p { max-width: 580px; margin: 0; }

.card-dialog { width: min(940px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow: auto; border: 1px solid rgba(225,185,94,.5); padding: 0; color: var(--ink); background: #0d1120; box-shadow: var(--shadow); }
.card-dialog::backdrop { background: rgba(2,4,10,.84); backdrop-filter: blur(8px); }
.dialog-close { position: sticky; top: 14px; z-index: 4; float: right; display: grid; width: 42px; height: 42px; margin: 14px 14px -56px 0; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(8,11,24,.88); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.dialog-layout { display: grid; grid-template-columns: minmax(260px, 38%) 1fr; min-height: 640px; }
.dialog-layout figure { display: grid; align-items: center; margin: 0; padding: 30px; background: #080b16; }
.dialog-layout figure img { width: 100%; height: auto; aspect-ratio: var(--card-ratio); object-fit: contain; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.dialog-copy { padding: 58px 48px 44px; }
.dialog-copy h2 { margin-bottom: 30px; font-size: clamp(2.3rem, 5vw, 4rem); }
.meaning-block { margin-bottom: 23px; }
.meaning-block h3 { margin-bottom: 10px; color: var(--gold-bright); font-family: var(--sans); font-size: .72rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.reversed-block h3 { color: #c6a7ea; }
.keyword-list { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-list span { padding: 6px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: #ded8cd; font-size: .82rem; }
.dragon-message, .reflection { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.dragon-message p:last-child { font-family: var(--serif); font-size: 1.22rem; font-style: italic; line-height: 1.5; }
.reflection p:last-child { margin-bottom: 0; color: #d4cddd; }

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .element-grid { grid-template-columns: repeat(2, 1fr); }
  .element-card { border-bottom: 1px solid var(--line); }
  .element-card:nth-child(2) { border-right: 0; }
  .element-card:nth-last-child(-n+2) { border-bottom: 0; }
  .ritual-steps { grid-template-columns: repeat(2, 1fr); }
  .ritual-steps li:nth-child(3n) { border-right: 1px solid var(--line); }
  .ritual-steps li:nth-child(2n) { border-right: 0; }
  .ritual-steps li:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .ritual-steps li:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section-shell { width: min(100% - 28px, 680px); }
  .site-header { min-height: 64px; padding-inline: 14px; }
  .menu-button { display: block; }
  .site-nav { position: absolute; top: 64px; right: 14px; display: none; min-width: 190px; padding: 12px; border: 1px solid var(--line); background: #0d1120; box-shadow: var(--shadow); }
  .site-nav.is-open { display: grid; }
  .site-nav a { padding: 9px 10px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 58px 76px; }
  .hero-art { grid-row: 1; min-height: auto; }
  .hero-art img { width: min(230px, 68vw); transform: rotate(2deg); }
  .orbit-one { width: 270px; height: 270px; }
  .orbit-two { width: 340px; height: 340px; }
  h1 { font-size: clamp(3.2rem, 15vw, 5.2rem); }
  h2 { font-size: clamp(2.3rem, 11vw, 3.8rem); }
  .section-heading, .section-heading.narrow { grid-template-columns: 1fr; gap: 8px; }
  .library-tools { top: 64px; align-items: flex-start; }
  .filters { flex-wrap: nowrap; max-width: calc(100vw - 80px); overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 9px; }
  .tarot-card h3 { font-size: .76rem; }
  .tarot-card p { display: none; }
  .reading-section, .spreads-section { padding-block: 82px; }
  .ritual-steps { grid-template-columns: 1fr; }
  .ritual-steps li, .ritual-steps li:nth-child(2n), .ritual-steps li:nth-child(3n), .ritual-steps li:nth-last-child(-n+2) { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .ritual-steps li:last-child { border-bottom: 0; }
  .elements-section { padding-block: 88px; }
  .element-grid { grid-template-columns: 1fr; }
  .element-card, .element-card:nth-child(2), .element-card:nth-last-child(-n+2) { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .element-card:last-child { border-bottom: 0; }
  .element-symbol { margin-bottom: 28px; }
  .major-note { grid-template-columns: 1fr; gap: 16px; padding: 26px; }
  .spread-grid { grid-template-columns: 1fr; }
  .reversals-section { grid-template-columns: 1fr; gap: 36px; padding-block: 86px; }
  .reversal-mark { width: 160px; font-size: 4rem; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-layout figure { padding: 28px 50px 20px; }
  .dialog-layout figure img { width: min(300px, 100%); margin-inline: auto; }
  .dialog-copy { padding: 30px 24px 38px; }
  footer { display: grid; }
}

@media (max-width: 390px) {
  .brand strong { font-size: .94rem; }
  .brand small { font-size: .58rem; }
  .brand-mark { width: 30px; height: 30px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* Guide library */
.series-home { min-height: calc(100svh - 72px); padding-block: 86px 116px; }
.series-intro { max-width: 930px; margin-bottom: 86px; }
.series-intro h1 { max-width: 900px; }
.series-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.series-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.series-heading p { margin: 0 0 5px; color: var(--muted); font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.series-entry { display: grid; grid-template-columns: minmax(220px, .56fr) minmax(0, 1.44fr); gap: clamp(36px, 7vw, 90px); align-items: center; padding: clamp(28px, 5vw, 62px); border: 1px solid rgba(225,185,94,.42); background: #111527; }
.series-art { display: block; width: min(300px, 100%); margin-inline: auto; }
.series-art img { width: 100%; height: auto; aspect-ratio: var(--card-ratio); object-fit: contain; border-radius: 12px; box-shadow: var(--shadow), 0 0 0 1px rgba(246,215,131,.22); transition: transform .28s ease, filter .28s ease; }
.series-art:hover img, .series-art:focus-visible img { transform: translateY(-5px) rotate(1deg); filter: saturate(1.08) brightness(1.04); }
.series-copy { max-width: 650px; }
.series-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.04rem; }
.series-facts { display: flex; flex-wrap: wrap; gap: 30px; margin: 34px 0; padding: 24px 0; border-block: 1px solid var(--line); list-style: none; }
.series-facts li { display: grid; gap: 2px; min-width: 100px; }
.series-facts strong { color: var(--gold-bright); font-family: var(--serif); font-size: 1.7rem; font-weight: 500; }
.series-facts span { color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.future-series { display: grid; grid-template-columns: 80px 1fr; gap: 26px; align-items: center; margin-top: 24px; padding: 32px 38px; border: 1px dashed rgba(184,149,232,.38); color: #d6cede; background: rgba(89,57,127,.1); }
.future-series > span { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid var(--major); border-radius: 50%; color: #e5cef9; font-size: 1.8rem; }
.future-series h2 { margin-bottom: 8px; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.future-series p:last-child { margin: 0; color: var(--muted); }

@media (max-width: 760px) {
  .library-nav { position: static; display: flex; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .series-home { padding-block: 62px 86px; }
  .series-intro { margin-bottom: 58px; }
  .series-entry { grid-template-columns: 1fr; }
  .series-art { width: min(230px, 72vw); }
  .future-series { grid-template-columns: 1fr; padding: 28px; }
}
