/* ==========================================================================
   TrueLuckPlay — The Cabinet of Chance
   Design: "cabinet de curiosités" — felt green / gold / parchment, classic serif
   ========================================================================== */

:root {
  --felt:        #10382a;
  --felt-deep:   #0a251c;
  --felt-soft:   #1a4a38;
  --parchment:   #f4ecd9;
  --parchment-2: #efe4c8;
  --paper:       #faf5e8;
  --ink:         #242a22;
  --ink-soft:    #4c5347;
  --gold:        #c9a227;
  --gold-soft:   #d9bc63;
  --gold-pale:   #e8d8a8;
  --wine:        #6e2b2b;
  --serif-display: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --serif-body:    "Lora", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --measure: 72ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif-body);
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    repeating-linear-gradient(0deg,  rgba(16,56,42,.022) 0 2px, transparent 2px 4px),
    radial-gradient(1200px 500px at 50% -10%, #f8f1df 0%, var(--parchment) 60%);
  font-size: clamp(1rem, .92rem + .35vw, 1.125rem);
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

/* ---------- Header ---------- */

.masthead {
  background:
    radial-gradient(900px 320px at 50% -60px, var(--felt-soft) 0%, var(--felt) 55%, var(--felt-deep) 100%);
  color: var(--gold-pale);
  border-bottom: 3px double var(--gold);
  box-shadow: 0 1px 0 rgba(201,162,39,.35), 0 12px 30px -18px rgba(10,37,28,.65);
}

.masthead-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.1rem 1.4rem .95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 2rem;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark { flex: 0 0 auto; display: block; }

.brand-name {
  font-family: var(--serif-display);
  font-size: 1.5rem;
  letter-spacing: .04em;
  line-height: 1.1;
  margin: 0;
  color: var(--gold-pale);
}
.brand-name .amp { color: var(--gold-soft); font-style: italic; }

.brand-tag {
  margin: 0;
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(232,216,168,.82);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .1rem;
  font-size: .86rem;
  letter-spacing: .02em;
}

.nav a {
  color: var(--gold-pale);
  text-decoration: none;
  padding: .38rem .62rem;
  border-radius: 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav a:hover, .nav a:focus-visible {
  color: #fff;
  border-bottom-color: var(--gold-soft);
  background: rgba(201,162,39,.12);
}

/* ---------- Hero (CSS gradient only — no photo) ---------- */

.hero {
  background:
    radial-gradient(1100px 460px at 50% -120px, rgba(217,188,99,.28) 0%, rgba(217,188,99,0) 55%),
    radial-gradient(800px 420px at 12% 110%, rgba(26,74,56,.95) 0%, rgba(26,74,56,0) 60%),
    radial-gradient(800px 420px at 88% -30%, rgba(26,74,56,.9) 0%, rgba(26,74,56,0) 60%),
    linear-gradient(168deg, var(--felt) 0%, var(--felt-deep) 78%);
  color: var(--parchment);
  text-align: center;
  padding: clamp(3.2rem, 8vw, 6rem) 1.4rem clamp(2.8rem, 6vw, 4.4rem);
  border-bottom: 1px solid rgba(201,162,39,.4);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg,  rgba(201,162,39,.05) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(-45deg, rgba(201,162,39,.05) 0 1px, transparent 1px 14px);
  pointer-events: none;
}

.hero > .hero-inner { position: relative; max-width: 860px; margin: 0 auto; }

.hero-kicker {
  font-size: .78rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 1.1rem;
}

.hero h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
  color: #f6efdc;
  text-wrap: balance;
}

.hero p {
  font-size: clamp(1rem, .95rem + .5vw, 1.18rem);
  line-height: 1.65;
  color: rgba(244,236,217,.92);
  max-width: 62ch;
  margin: 0 auto 1.8rem;
}

.hero-rule {
  display: flex; align-items: center; justify-content: center;
  gap: .9rem; margin: 0 0 1.8rem; color: var(--gold-soft);
}
.hero-rule::before, .hero-rule::after {
  content: ""; height: 1px; width: min(140px, 22vw);
  background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.hero-rule::after { background: linear-gradient(90deg, var(--gold-soft), transparent); }

.btn {
  display: inline-block;
  font-family: var(--serif-display);
  font-size: .95rem;
  letter-spacing: .06em;
  color: var(--felt-deep);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: 1px solid #a8871f;
  border-radius: 3px;
  padding: .68rem 1.5rem;
  text-decoration: none;
  box-shadow: 0 2px 0 #8a6d15, 0 10px 22px -12px rgba(0,0,0,.55);
}
.btn:hover, .btn:focus-visible { filter: brightness(1.06); outline: 2px solid var(--gold-pale); outline-offset: 2px; }
.btn-ghost {
  background: transparent; color: var(--gold-pale);
  border: 1px solid rgba(217,188,99,.6); box-shadow: none;
}
.btn-ghost:hover { background: rgba(201,162,39,.14); }

/* ---------- Layout ---------- */

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.4rem; }

.section { padding: clamp(2.4rem, 5vw, 4rem) 0; }

.section-head { text-align: center; margin-bottom: 2.2rem; }

.section-head h2 {
  font-family: var(--serif-display);
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  margin: 0 0 .5rem;
  color: var(--felt-deep);
}

.section-head p {
  margin: 0 auto; max-width: 60ch; color: var(--ink-soft); font-size: .98rem;
}

.ornament {
  display: flex; align-items: center; justify-content: center;
  gap: .8rem; color: var(--gold); margin-top: .8rem;
}
.ornament::before, .ornament::after {
  content: ""; height: 1px; width: 64px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------- Cabinet grid (vitrines) ---------- */

.cabinet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.4rem;
}

.vitrine {
  position: relative;
  background: linear-gradient(180deg, var(--paper), var(--parchment-2));
  border: 1px solid rgba(201,162,39,.55);
  outline: 1px solid rgba(36,42,34,.16);
  outline-offset: 3px;
  border-radius: 4px;
  padding: 1.5rem 1.4rem 1.3rem;
  box-shadow: 0 14px 26px -20px rgba(10,37,28,.5);
  transition: transform .18s ease, box-shadow .18s ease;
}

.vitrine:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 34px -22px rgba(10,37,28,.55);
}

.vitrine .gem {
  font-family: var(--serif-display);
  font-size: 1.05rem; color: var(--wine);
  letter-spacing: .16em; text-transform: uppercase;
  margin: 0 0 .55rem; font-weight: 600;
}

.vitrine h3 { margin: 0 0 .55rem; font-family: var(--serif-display); font-size: 1.28rem; line-height: 1.25; color: var(--felt-deep); }
.vitrine h3 a { color: inherit; text-decoration: none; }
.vitrine h3 a:hover { color: var(--wine); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

.vitrine p { margin: 0 0 .8rem; color: var(--ink-soft); font-size: .93rem; line-height: 1.62; }

.more {
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--felt); text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 1px;
}
.more:hover { color: var(--wine); }

/* ---------- Article pages ---------- */

.article { max-width: var(--measure); margin: 0 auto; }

.crumbs { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 1.2rem; }
.crumbs a { color: var(--felt); text-decoration: none; border-bottom: 1px dotted var(--gold); }

.article h1 {
  font-family: var(--serif-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  color: var(--felt-deep);
  margin: 0 0 .8rem;
  text-wrap: balance;
}

.standfirst {
  font-size: 1.12rem; line-height: 1.6; color: var(--ink-soft);
  font-style: italic; margin: 0 0 1.6rem; padding-left: 1.1rem;
  border-left: 3px solid var(--gold);
}

.article h2 {
  font-family: var(--serif-display);
  font-size: 1.45rem; color: var(--felt); margin: 2.4rem 0 .8rem;
}

.article h3 { font-family: var(--serif-display); font-size: 1.15rem; color: var(--wine); margin: 1.8rem 0 .5rem; }

.article p { margin: 0 0 1.15rem; }

.article a { color: var(--felt); text-decoration-color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.article a:hover { color: var(--wine); }

.dropcap::first-letter {
  font-family: var(--serif-display);
  float: left; font-size: 3.6em; line-height: .82;
  padding: .08em .12em 0 0; color: var(--gold);
}

blockquote {
  margin: 1.6rem 0; padding: .8rem 1.4rem;
  border-left: 3px solid var(--gold);
  background: rgba(201,162,39,.07);
  font-style: italic; color: var(--ink-soft);
}
blockquote p { margin: 0; }

figure.plaque {
  margin: 2rem 0; padding: 1.4rem 1.5rem;
  background: linear-gradient(180deg, var(--felt-soft), var(--felt));
  color: var(--gold-pale);
  border: 1px solid rgba(201,162,39,.5);
  border-radius: 4px;
  text-align: center;
}
figure.plaque .big-symbol { font-size: 2rem; letter-spacing: .5em; color: var(--gold-soft); }
figure.plaque figcaption { font-size: .9rem; margin-top: .6rem; font-style: italic; color: rgba(244,236,217,.85); }

ul.cards { list-style: none; padding-left: 0; }
ul.cards li { padding-left: 1.6rem; position: relative; margin-bottom: .5rem; }
ul.cards li::before { content: "◆"; position: absolute; left: 0; color: var(--gold); font-size: .8rem; top: .3em; }

/* Key-facts table (museum label) */

.facts {
  width: 100%; border-collapse: collapse; margin: 1.8rem 0;
  font-size: .95rem; background: var(--paper);
  border: 1px solid rgba(201,162,39,.55);
}
.facts caption {
  caption-side: top; text-align: left; font-family: var(--serif-display);
  letter-spacing: .14em; text-transform: uppercase; font-size: .8rem;
  color: var(--wine); padding-bottom: .5rem;
}
.facts th, .facts td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid rgba(36,42,34,.12); vertical-align: top; }
.facts th { font-weight: 600; color: var(--felt); white-space: nowrap; }
.facts tr:last-child td { border-bottom: none; }

/* Further reading / mesh */

.mesh {
  margin-top: 3rem; padding: 1.4rem 1.5rem;
  background: linear-gradient(180deg, var(--paper), var(--parchment-2));
  border: 1px solid rgba(201,162,39,.5); border-radius: 4px;
}
.mesh h2 { margin: 0 0 .7rem; font-size: 1.15rem; color: var(--felt-deep); }
.mesh ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .45rem; }
.mesh a { color: var(--felt); text-decoration: none; border-bottom: 1px solid var(--gold); }
.mesh a:hover { color: var(--wine); }

/* ---------- Footer ---------- */

.footer {
  margin-top: 3rem;
  background: linear-gradient(180deg, var(--felt) 0%, var(--felt-deep) 100%);
  color: rgba(244,236,217,.85);
  border-top: 3px double var(--gold);
  font-size: .88rem;
}

.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 2.2rem 1.4rem 2rem;
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer h4 {
  font-family: var(--serif-display); color: var(--gold-soft);
  margin: 0 0 .6rem; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.footer a { color: rgba(244,236,217,.85); text-decoration: none; border-bottom: 1px dotted rgba(217,188,99,.5); }
.footer a:hover { color: #fff; border-bottom-color: var(--gold-soft); }

.footer-note {
  border-top: 1px solid rgba(201,162,39,.3);
  text-align: center; padding: 1.1rem 1.4rem;
  font-size: .8rem; color: rgba(244,236,217,.6);
}

/* ---------- Utilities & responsive ---------- */

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--felt-deep);
  padding: .6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 720px) {
  .masthead-inner { flex-direction: column; align-items: center; text-align: center; }
  .nav { justify-content: center; }
  .article { font-size: 1.02rem; }
  .facts th, .facts td { display: block; width: 100%; }
  .facts th { padding-bottom: 0; }
  .facts td { padding-top: .15rem; border-bottom: 1px solid rgba(36,42,34,.12); }
  .facts tr { display: block; margin-bottom: .8rem; }
}

@media print {
  .masthead, .nav, .footer, .hero .btn { display: none; }
  body { background: #fff; }
}

/* ---- Photo pipeline ---- */
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,37,28,.78) 0%, rgba(10,37,28,.62) 45%, rgba(10,37,28,.82) 100%); }
.hero-inner { position: relative; z-index: 1; }
figure.exhibit { margin: 2.4rem 0; }
figure.exhibit img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid rgba(16,56,42,.35); border-radius: 4px; box-shadow: 0 10px 30px rgba(10,37,28,.18); }
figure.exhibit figcaption { font-size: .88rem; margin-top: .6rem; font-style: italic; color: #5c6657; }
