/* Look: a fantasy-game UI. Deep indigo night, gold hairlines, parchment item cards with rarity gradients,
   four-point star ornaments. All art and wording are original. Single committed (dark) look. */
:root {
  --night: #121a33; --night-2: #1b2547; --night-3: #26335f; --line: #3a4a7c;
  --gold: #d8b86a; --gold-dim: #8d7640; --ivory: #f4ecd8; --parch: #f1e6c9; --ink: #2b2438; --ink-2: #5b5068; --muted: #b9bfd8;
  --r3: linear-gradient(160deg, #3b4f7a, #7d97c6); --r4: linear-gradient(160deg, #5a3f8f, #b08be0); --r5: linear-gradient(160deg, #9a6b1f, #f3cf78);
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--night); color: var(--ivory); font: 500 1.2rem/1.6 var(--body);
  background-image: radial-gradient(60rem 30rem at 50% -8rem, #2a3a72 0%, transparent 70%); }
a { color: var(--gold); }
.wrap { max-width: 70rem; margin: 0 auto; padding-inline: 1.25rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gold-dim); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.25rem var(--display); letter-spacing: .12em; color: var(--gold); text-decoration: none; text-transform: uppercase; }
.star { width: 1.15rem; height: 1.15rem; fill: var(--gold); }
nav { display: flex; gap: 1.4rem; margin-left: auto; }
nav a { font: 500 .85rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding-block: .3rem; border-bottom: 1px solid transparent; }
nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.basket-btn { display: inline-flex; align-items: center; gap: .4rem; background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); border-radius: 999px; padding: .3rem .8rem; cursor: pointer; font: 700 .95rem var(--display); }
.basket-btn:hover { border-color: var(--gold); background: rgba(216, 184, 106, .1); }
.basket-btn svg { width: 1.2rem; height: 1.2rem; }

/* hero */
.hero { position: relative; overflow: hidden; text-align: center; border-bottom: 1px solid var(--gold-dim); }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-in { position: relative; padding-block: 5rem 5.5rem; animation: rise .9s ease-out backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.eyebrow { font: 500 .8rem var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0; }
h1 { font: 700 clamp(2.4rem, 7vw, 4.6rem)/1.05 var(--display); letter-spacing: .06em; text-transform: uppercase; margin: .7rem 0 0; text-wrap: balance;
  background: linear-gradient(180deg, #fff6dc, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 span { display: block; font-size: .5em; letter-spacing: .3em; }
.lead { max-width: 36rem; margin: 0 auto 1.8rem; font-size: 1.35rem; font-style: italic; color: var(--muted); }
.orn { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1rem auto; max-width: 18rem; }
.orn i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.orn i:last-child { background: linear-gradient(270deg, transparent, var(--gold)); }
.orn svg { width: 1.1rem; height: 1.1rem; fill: var(--gold); flex: none; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.btn { display: inline-block; padding: .65rem 1.7rem; font: 700 .85rem var(--display); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--gold);
  border: 1px solid var(--gold); background: transparent; cursor: pointer; clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%); transition: background .2s; }
.btn:hover { background: rgba(216, 184, 106, .16); }
.btn.solid { background: linear-gradient(180deg, #f3dc9a, var(--gold)); color: #2b2210; border-color: transparent; }
.btn.solid:hover { filter: brightness(1.08); }
.btn.ghost { color: var(--ivory); border-color: var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* sections */
.block { padding-top: 5rem; }
.sec-head { text-align: center; }
h2 { font: 700 clamp(1.7rem, 4vw, 2.4rem)/1.15 var(--display); letter-spacing: .08em; text-transform: uppercase; margin: .4rem 0 0; color: var(--ivory); text-wrap: balance; }
.frame { position: relative; padding: 1.8rem; border: 1px solid var(--gold-dim); background: rgba(27, 37, 71, .6); box-shadow: inset 0 0 0 4px var(--night), inset 0 0 0 5px var(--gold-dim); }
.story { max-width: 46rem; margin: 0 auto; text-align: center; }
.story h2 { margin-bottom: 1rem; }
.story p { margin: 0 0 1rem; color: var(--muted); }
.visit { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1.5rem; }
.visit h3 { font: 700 1rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 .5rem; }
.visit p { margin: 0; color: var(--muted); }

/* menu */
.tabs { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1.6rem 0; }
.tab { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: .45rem 1.2rem; font: 700 .8rem var(--display); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.tab:hover { color: var(--gold); border-color: var(--gold-dim); }
.tab[aria-selected="true"] { color: #2b2210; background: linear-gradient(180deg, #f3dc9a, var(--gold)); border-color: transparent; }
.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--parch); color: var(--ink); border: 1px solid var(--gold); box-shadow: 0 10px 28px -14px #000; transition: transform .2s; }
.card:hover { transform: translateY(-5px); }
.art { position: relative; display: grid; place-items: center; height: 9.5rem; background: var(--g); overflow: hidden; }
.art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, rgba(255, 255, 255, .35), transparent 60%); }
.art svg { width: 6.4rem; height: 6.4rem; position: relative; z-index: 1; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.stars-row { position: absolute; bottom: .4rem; left: 0; right: 0; text-align: center; z-index: 1; color: #fff3c4; font-size: .95rem; letter-spacing: .15em; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.info { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.1rem 1.2rem; flex: 1; }
.card h3 { font: 700 1.05rem/1.25 var(--display); letter-spacing: .04em; margin: 0; }
.card p { margin: 0; color: var(--ink-2); font-size: 1.05rem; line-height: 1.35; flex: 1; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; }
.price { font: 700 1.1rem var(--display); color: #6b4a12; }
.add { background: var(--night); color: var(--gold); border: 1px solid var(--night); padding: .4rem .9rem; font: 700 .72rem var(--display); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.add:hover { background: var(--night-3); }

/* clickable cards + detail page */
a.art { text-decoration: none; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold-dim); text-underline-offset: .2em; }
#detail { padding-top: 2.5rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font: 500 .8rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.6rem; }
.crumbs a { color: var(--gold); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.d-grid { display: grid; gap: 2.2rem; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
.d-art { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-height: 30rem; width: 100%; background: var(--g); border: 1px solid var(--gold); box-shadow: inset 0 0 0 5px rgba(18, 26, 51, .55), inset 0 0 0 6px var(--gold-dim); overflow: hidden; }
.d-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 115%, rgba(255, 255, 255, .4), transparent 60%); }
.d-art svg { width: 52%; height: 52%; position: relative; z-index: 1; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .4)); }
.d-art .stars-row { bottom: 1.1rem; font-size: 1.4rem; }
.d-info h1 { font: 700 clamp(1.9rem, 4.5vw, 2.8rem)/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase; margin: .5rem 0 1rem;
  background: linear-gradient(180deg, #fff6dc, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; text-wrap: balance; }
.d-info h1:focus { outline: none; }
.d-story { font-size: 1.35rem; font-style: italic; color: var(--muted); margin: 0 0 1.1rem; }
.notes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.chip { font: 700 .72rem var(--display); letter-spacing: .12em; text-transform: uppercase; padding: .3rem .8rem; border: 1px solid var(--gold-dim); color: var(--gold); }
.facts { margin: 0 0 1.6rem; display: grid; gap: .9rem; padding: 1rem 0; border-block: 1px solid var(--line); }
.facts dt { font: 700 .72rem var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.facts dd { margin: .15rem 0 0; color: var(--ivory); }
.d-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.price.big { font: 700 1.9rem var(--display); color: var(--gold); }
.d-buy .qty { gap: .7rem; }
.d-buy .qty button { width: 2.1rem; height: 2.1rem; }
.d-buy .qty span { min-width: 1.4rem; text-align: center; font: 700 1.1rem var(--display); }
.pair-h { margin: 3.5rem 0 1.4rem; text-align: center; font-size: 1.3rem; }
.grid.pair { grid-template-columns: repeat(auto-fill, minmax(15.5rem, 18rem)); justify-content: center; }
.nf { max-width: 34rem; margin: 3rem auto; text-align: center; }
.nf h1 { font: 700 1.6rem var(--display); letter-spacing: .06em; text-transform: uppercase; margin: 0 0 .8rem; }

/* basket */
.scrim { position: fixed; inset: 0; background: rgba(5, 8, 20, .6); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(24rem, 100%); z-index: 40; display: flex; flex-direction: column; background: var(--night-2); border-left: 1px solid var(--gold); transform: translateX(100%); transition: transform .3s; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--gold-dim); }
.drawer-head h2 { font-size: 1.15rem; margin: 0; }
.x { background: transparent; color: var(--gold); border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 .4rem; }
.lines { list-style: none; margin: 0; padding: .6rem 1.2rem; overflow-y: auto; flex: 1; }
.line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.line b { font: 700 .95rem var(--display); letter-spacing: .03em; }
.line .sub { color: var(--muted); font-size: 1rem; }
.qty { display: inline-flex; align-items: center; gap: .5rem; grid-column: 1; }
.qty button { width: 1.7rem; height: 1.7rem; background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); cursor: pointer; font: 700 1rem var(--display); }
.qty button:hover { background: rgba(216, 184, 106, .15); }
.rm { grid-column: 2; grid-row: 2; background: transparent; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .95rem; }
.empty { margin: 0; padding: 2rem 1.2rem; color: var(--muted); font-style: italic; text-align: center; }
.drawer-foot { padding: 1rem 1.2rem 1.4rem; border-top: 1px solid var(--gold-dim); display: grid; gap: .9rem; }
.total { display: flex; justify-content: space-between; align-items: baseline; font: 700 1rem var(--display); letter-spacing: .1em; text-transform: uppercase; }
.total strong { font-size: 1.5rem; color: var(--gold); }
dialog { background: var(--night-2); color: var(--ivory); border: 1px solid var(--gold); padding: 1.8rem; max-width: min(28rem, 92vw); text-align: center; box-shadow: inset 0 0 0 4px var(--night-2), inset 0 0 0 5px var(--gold-dim); }
dialog::backdrop { background: rgba(5, 8, 20, .7); }
dialog h2 { font-size: 1.3rem; margin-bottom: .8rem; }
dialog p { color: var(--muted); }

footer { margin-top: 5rem; padding-block: 2rem 3rem; border-top: 1px solid var(--gold-dim); text-align: center; color: var(--muted); font-size: 1rem; }
footer p { max-width: 42rem; margin: 0 auto; }

/* sparkle burst (created by script) */
.spark { position: fixed; z-index: 60; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; }
.spark svg { width: 100%; height: 100%; fill: #ffe9a6; }

@media (max-width: 640px) {
  nav { display: none; }
  .basket-btn { margin-left: auto; }
  .hero-in { padding-block: 3.2rem 3.6rem; }
  .d-grid { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .d-art { max-height: 18rem; }
  .block { padding-top: 3.5rem; }
}
