@import url("./typography.css");

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 16% 2%, #30221c, transparent 58rem), #100d0d;
  color: var(--thread);
  font: 17px/1.8 var(--serif);
  -webkit-font-smoothing: antialiased;
}
:lang(en) { font-family: "TarotLuna Latin", Georgia, serif; }
a { color: inherit; text-underline-offset: .26em; text-decoration-color: #897350; }
a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
h1, h2, p, dl, dd, ul { margin: 0; }
h1, h2, dt { font-weight: 500; }
.mast, .folio { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.mast, .mast nav, .brand, .suits, .crumb, .turns { display: flex; align-items: center; }
.mast { min-height: 76px; justify-content: space-between; gap: 18px; }
.brand { gap: 10px; color: #e8d5ac; font: 500 30px/1 Cormorant, serif; }
.mast nav { gap: 24px; }
.mast a, .cards a, .turns a, .suits a { text-decoration: none; }
.mast nav, .suits, .crumb, .turns small { font-size: 15px; color: #c9bb9f; }
.folio {
  position: relative;
  margin-bottom: 48px;
  padding: clamp(26px, 5vw, 68px);
  border: 1px solid #514335;
  border-radius: 9px;
  background: radial-gradient(ellipse at top left, #272125, transparent 65%), #151419;
  box-shadow: 4px 14px 40px #0006;
}
.folio::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px dashed #8e795b77; border-radius: 4px;
}
h1 { color: #f0e6d3; font-size: clamp(36px, 5vw, 62px); line-height: 1.15; letter-spacing: .045em; }
h2 { color: #e3d1af; font-size: 24px; line-height: 1.5; }
.index-head p { margin-top: 15px; color: #ccc5b8; }
.suits { flex-wrap: wrap; gap: 8px 24px; border-block: 1px solid #685841; padding: 12px 0; margin: 26px 0 32px; }
.suit { scroll-margin-top: 16px; margin-top: 38px; }
.suit h2 { border-bottom: 1px solid #68584180; padding-bottom: 8px; }
.suit small, .number, .keywords { color: #d2b782; }
.suit h2 small { font: 18px Cormorant, serif; margin-left: 7px; }
.cards { list-style: none; padding: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 24px 18px; }
.cards a { display: flex; align-items: center; flex-direction: column; text-align: center; line-height: 1.3; height: 100%; }
.cards img {
  display: block; width: min(100%, 105px); aspect-ratio: 3/5; object-fit: contain; margin-bottom: 10px;
  border-radius: 5px; box-shadow: 0 3px 8px #0009;
}
.cards a:hover img, .cards a:focus-visible img { outline: 1px solid var(--gold); outline-offset: 3px; }
.cards small { margin-top: 3px; color: #c7ba9f; font-style: italic; font-size: 15px; }
.crumb { flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.crumb span { color: #846f52; }
.spread { display: grid; grid-template-columns: minmax(190px, .82fr) minmax(0, 1.3fr); gap: 32px clamp(26px, 5vw, 78px); align-items: start; }
.portrait {
  display: grid; place-items: center; padding: clamp(18px, 2.5vw, 36px);
  border: 1px solid #796241; border-radius: 4px;
  background: radial-gradient(ellipse at 45% 35%, #3e3536, #211d20 65%, #141317);
  box-shadow: inset 0 0 0 5px #191619, inset 0 0 0 6px #86705255;
}
.portrait img { display: block; width: 100%; height: auto; border-radius: 3% / 2%; box-shadow: 3px 6px 15px #000a; }
.number { margin-bottom: 9px; font-size: 15px; letter-spacing: .08em; }
.english { margin-top: 6px; color: #c4b8a1; font-size: 24px; line-height: 1.25; font-style: italic; }
.keywords { margin-top: 14px; font-size: 16px; }
.reading header { border-bottom: 1px solid #756249; padding-bottom: 21px; }
.reading section { margin-top: 18px; }
.reading h2, .notes h2 { font-size: 22px; margin-bottom: 6px; }
.reading p, .notes dd { overflow-wrap: break-word; }
.notes { grid-column: 1 / -1; padding-top: 20px; border-top: 1px dashed #7d705c91; }
.notes dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 16px 32px; margin-top: 12px; }
.notes dt { color: #dfc79b; }
.notes dd { color: #d0c9bd; }
.turns { gap: 22px; justify-content: space-between; border-top: 1px solid #68584180; margin-top: 30px; padding-top: 16px; }
.turns a { display: grid; }
.turns a[rel=next] { margin-left: auto; text-align: right; }
.missing { max-width: 620px; margin-top: 12vh; }
.missing h1, .missing p { margin-bottom: 16px; }
.crumb [aria-current="page"] { color: var(--thread); }
.spread-links { padding: 14px 0 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.spread-reference { margin-top: 24px; }
.spread-guide { max-width: 840px; }
.spread-guide h1 { font-size: clamp(32px, 5vw, 52px); }
.spread-guide h1 + p { margin-top: 15px; }
.spread-guide h2 { margin: 25px 0 8px; }
.positions { padding-inline-start: 1.6em; margin: 0; }
.positions li { padding: 8px 0; }
.positions li::marker, .positions strong { color: #dfc79b; }
.example-card { display: flex; align-items: flex-start; gap: 20px; }
.example-card a { flex: 0 0 78px; text-align: center; line-height: 1.3; }
.example-card img { width: 100%; display: block; margin-bottom: 6px; border-radius: 4px; }
.draw-spread { display: inline-block; margin-top: 26px; color: var(--gold); }
@media (max-width: 640px) {
  .mast, .folio { width: calc(100% - 20px); }
  .mast { padding: 0 8px; min-height: 62px; }
  .brand { font-size: 25px; gap: 6px; }
  .brand img { width: 24px; height: 24px; }
  .mast nav { gap: 14px; }
  .folio { padding: 25px 20px 28px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
  .cards small { font-size: 14px; }
  .suits { gap: 8px 16px; }
  .crumb { margin-bottom: 20px; }
  .spread { grid-template-columns: minmax(0,.8fr) minmax(0,1fr); gap: 18px; align-items: center; }
  .portrait { padding: 9px; }
  .reading { display: contents; }
  .reading header { border: 0; padding-bottom: 0; }
  .reading section, .notes { grid-column: 1 / -1; }
  .reading section { margin: 0; }
  .reading section:first-of-type { border-top: 1px solid #685841; padding-top: 14px; }
  .reading h1 { font-size: clamp(29px, 8vw, 44px); overflow-wrap: break-word; }
  .english { font-size: 19px; }
  .keywords, .number { font-size: 14px; }
}
