/* CardScaper site styles. Same felt, gold and card faces as the game tables. */
:root {
  --felt-1: #2f7a6c;
  --felt-2: #1d5148;
  --felt-3: #0e2e2a;
  --gold: #e8c35a;
  --cream: #faf6ec;
  --panel: rgba(6, 24, 22, .7);
  --line: rgba(232, 195, 90, .26);
  --red: #d2342a;
  --ink: #1c2430;
  --blue: #1f6fbf;
  --green: #0f7a44;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --sans: 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wide: 1040px;
  --text: 700px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); color: var(--cream); line-height: 1.65; font-size: 17px;
  background: var(--felt-3) radial-gradient(120% 100% at 50% 0%, var(--felt-1) 0%, var(--felt-2) 50%, var(--felt-3) 100%) no-repeat top / 100% 1100px;
  min-height: 100vh;
}
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #f7e09a; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(6, 22, 20, .82); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); }
.header-inner { max-width: var(--wide); margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 22px; color: #fdf4d7; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--gold); margin-right: 5px; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; flex: 1; }
.site-nav a { color: var(--cream); text-decoration: none; font-size: 15px; font-weight: 600; opacity: .85; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { opacity: 1; }
.site-nav a[aria-current] { color: var(--gold); border-bottom-color: var(--gold); opacity: 1; }
.btn {
  display: inline-block; background: linear-gradient(180deg, #f3d87c, #cda23a); color: #3a2a06;
  border: 1px solid #fff3c4; border-radius: 999px; font-weight: 800; text-decoration: none;
  padding: 13px 32px; font-size: 17px; box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .12s;
}
.btn:hover { transform: scale(1.03); color: #3a2a06; }
.btn.small { padding: 7px 18px; font-size: 14.5px; }
.btn.ghost { background: rgba(232,195,90,.08); color: var(--cream); border: 1.5px solid rgba(232,195,90,.55); box-shadow: none; font-weight: 700; }
.btn.ghost:hover { color: #fff; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 22px 0 6px; }

/* Layout */
main { max-width: var(--wide); margin: 0 auto; padding: 30px 18px 70px; }
.prose { max-width: var(--text); }
.crumbs { font-size: 13.5px; opacity: .8; margin-bottom: 18px; }
.crumbs a { color: var(--cream); }
.crumbs span { margin: 0 6px; opacity: .6; }
h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 52px); line-height: 1.08; color: #fdf4d7; margin-bottom: 16px; text-shadow: 0 2px 14px rgba(0,0,0,.3); letter-spacing: -.01em; }
h2 { font-family: var(--serif); font-size: clamp(24px, 3.6vw, 31px); line-height: 1.2; color: #fdf4d7; margin: 44px 0 12px; }
h3 { font-size: 19px; color: #f2e3ae; margin: 26px 0 8px; }
p { margin: 0 0 15px; }
.lead { font-size: clamp(18px, 2.4vw, 20.5px); line-height: 1.55; opacity: .95; }
ul, ol { margin: 0 0 16px 24px; }
li { margin-bottom: 7px; }
strong { color: #fdf0c9; }
table { border-collapse: collapse; width: 100%; margin: 12px 0 22px; font-size: 16px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gold); font-size: 14px; font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin: 20px 0; }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; padding: 0; overflow: hidden; }
.facts div { padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts dt { font-size: 13.5px; opacity: .75; }
.facts dd { font-weight: 700; color: #fdf0c9; font-size: 17px; }
.note { font-size: 14.5px; opacity: .8; }

/* Playing cards drawn in CSS */
.pc {
  --w: 74px; width: var(--w); height: calc(var(--w) * 1.4); display: inline-block; position: relative; flex: none;
  background: linear-gradient(180deg, #fff, #f3efe4); border-radius: calc(var(--w) * .09); border: 1px solid rgba(0,0,0,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.4); color: var(--ink); font-family: var(--serif); font-weight: 700; line-height: 1;
}
.pc.h { color: var(--red); } .pc.d { color: var(--blue); } .pc.c { color: var(--green); }
.pc b { position: absolute; top: 6%; left: 9%; font-size: calc(var(--w) * .27); text-align: center; }
.pc b i { display: block; font-style: normal; font-size: calc(var(--w) * .25); }
.pc u { position: absolute; left: 50%; top: 57%; transform: translate(-50%, -50%); font-size: calc(var(--w) * .58); text-decoration: none; }
.cards { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 18px; }
.cards .eq { font-weight: 800; font-size: 19px; color: #fdf0c9; margin-left: 6px; }

/* Home hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; padding: 26px 0 16px; }
.hero h1 { font-size: clamp(38px, 6.6vw, 62px); }
.fan { position: relative; height: 300px; }
.fan .pc { --w: 150px; position: absolute; left: 50%; top: 34px; transform-origin: 50% 120%; }
.fan .pc:nth-child(1) { transform: translateX(-50%) rotate(-17deg); }
.fan .pc:nth-child(2) { transform: translateX(-50%) rotate(0deg); z-index: 2; }
.fan .pc:nth-child(3) { transform: translateX(-50%) rotate(17deg); z-index: 3; }
.fan .total {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 4; white-space: nowrap;
  background: linear-gradient(180deg, #f7e09a, #cda23a); color: #3a2a06; border: 2px solid #fff3c4; border-radius: 999px;
  font-weight: 800; padding: 6px 20px; box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
@media (prefers-reduced-motion: no-preference) {
  .fan .pc { animation: fan-in .7s cubic-bezier(.2,.8,.2,1) backwards; }
  .fan .pc:nth-child(1) { animation-delay: .05s; --r: -17deg; }
  .fan .pc:nth-child(2) { animation-delay: .15s; --r: 0deg; }
  .fan .pc:nth-child(3) { animation-delay: .25s; --r: 17deg; }
  @keyframes fan-in { from { transform: translateX(-50%) rotate(0deg) translateY(40px); opacity: 0; } to { transform: translateX(-50%) rotate(var(--r)); opacity: 1; } }
}

/* Game list */
.game-list { list-style: none; margin: 14px 0 0; border-top: 1px solid var(--line); }
.game-list li { display: grid; grid-template-columns: 150px 1fr auto; gap: 6px 20px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); margin: 0; }
.game-list .name { font-family: var(--serif); font-size: 27px; color: #fdf4d7; font-weight: 700; text-decoration: none; }
.game-list a.name:hover { color: var(--gold); }
.game-list p { margin: 0; font-size: 15.5px; opacity: .9; }
.game-list .soon { font-size: 14px; opacity: .7; white-space: nowrap; }
.game-list li.later .name { opacity: .7; }

/* Level ladder */
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin: 16px 0 8px; }
.ladder div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ladder b { font-family: var(--serif); font-size: 30px; color: var(--gold); display: block; line-height: 1.1; }
.ladder span { font-size: 14px; opacity: .85; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 2px; }
.faq summary { font-weight: 700; cursor: pointer; color: #fdf0c9; font-size: 18px; }
.faq details p { margin: 10px 0 0; }

/* DevLog */
.entry { border-left: 3px solid var(--gold); padding: 2px 0 2px 20px; margin: 30px 0; }
.entry time { font-size: 14px; opacity: .75; }
.entry h2 { margin: 2px 0 10px; }
.chip { font-size: 11.5px; font-weight: 800; border-radius: 99px; padding: 2px 9px; margin-right: 6px; background: var(--gold); color: #3a2a06; vertical-align: 2px; }
.chip.fix { background: #9fd6c9; }
.chip.imp { background: #f2e3ae; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: rgba(4, 16, 15, .6); }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: 34px 18px 26px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 26px; font-size: 15px; }
.footer-inner h2 { font: 700 14px var(--sans); color: var(--gold); margin: 0 0 8px; }
.footer-inner ul { list-style: none; margin: 0; }
.footer-inner li { margin-bottom: 5px; }
.footer-inner a { color: var(--cream); text-decoration: none; opacity: .88; }
.footer-inner a:hover { opacity: 1; text-decoration: underline; }
.footer-inner .muted { opacity: .55; }
.footer-inner p { font-size: 14.5px; opacity: .8; max-width: 300px; }
.copyright { max-width: var(--wide); margin: 0 auto; padding: 0 18px 26px; font-size: 13.5px; opacity: .6; }

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .hero { grid-template-columns: 1fr; gap: 6px; }
  .fan { height: 236px; order: -1; }
  .fan .pc { --w: 112px; top: 22px; }
  .game-list li { grid-template-columns: 1fr auto; }
  .game-list p { grid-column: 1 / -1; order: 3; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .site-nav { order: 3; flex-basis: 100%; }
  .header-inner .btn { margin-left: auto; }
}
