/*
Theme Name: Spades Table Guide
Version: 1.0.2
Description: A focused strategy publication and entry point for Spades Tourneys.
*/
:root {
  --felt: #0d493b;
  --felt-dark: #07342b;
  --paper: #fbfcf7;
  --paper-deep: #edf1e8;
  --ink: #14231d;
  --muted: #596861;
  --rule: #b9c7be;
  --red: #b3343b;
  --gold: #e1bd57;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--felt); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.screen-reader-text:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 12px; background: #fff; z-index: 100; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 52px; background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--gold); font-family: Georgia, serif; font-size: 1.65rem; line-height: 1; }
.brand strong { display: block; font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif; font-size: 1.2rem; letter-spacing: -.01em; }
.brand small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 750; }
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.site-nav .nav-cta { padding: 11px 17px; background: var(--felt); color: #fff; border: 2px solid var(--felt); }
.site-nav .nav-cta:hover { background: var(--felt-dark); text-decoration: none; }
.menu-toggle { display: none; padding: 9px 12px; background: transparent; border: 2px solid var(--ink); color: var(--ink); font: inherit; font-weight: 800; }

.hero { overflow: hidden; background: var(--felt); color: #fff; }
.hero-grid { min-height: 650px; display: grid; grid-template-columns: 1.02fr .98fr; gap: 54px; align-items: center; padding-block: 74px; }
.hero-copy { position: relative; z-index: 2; }
.hero-kicker { margin: 0 0 14px; color: var(--gold); font-size: .86rem; font-weight: 850; }
.hero h1, .article-head h1, .section-head h2, .format-copy h2, .final-cta h2 {
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .94;
}
.hero h1 { max-width: 10ch; margin: 0; font-size: clamp(4rem, 8vw, 7.7rem); }
.hero-copy > p:not(.hero-kicker) { max-width: 52ch; margin: 25px 0 0; color: #dcece6; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; background: var(--gold); border: 2px solid var(--gold); color: var(--ink) !important; text-decoration: none; font-weight: 900; }
.button:hover { background: #f0ce68; border-color: #f0ce68; }
.button-secondary { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.68); }
.button-secondary:hover { background: #fff; color: var(--ink) !important; border-color: #fff; }

.table-scene { position: relative; min-height: 475px; }
.felt-ring { position: absolute; inset: 25px 0 18px; border: 2px solid rgba(255,255,255,.24); border-radius: 48% 48% 44% 44%; }
.score-slip { position: absolute; right: 8px; top: 0; width: 210px; padding: 18px; background: #f4f0df; color: var(--ink); box-shadow: 12px 14px 0 rgba(0,0,0,.18); transform: rotate(3deg); }
.score-slip strong { display: block; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font-size: .78rem; }
.score-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0 2px; border-bottom: 1px solid #b7b09a; font-family: Georgia, serif; }
.score-row.winning b { color: var(--red); }
.deal { position: absolute; left: 4%; bottom: 28px; width: 420px; height: 280px; }
.playing-card { position: absolute; display: flex; flex-direction: column; justify-content: space-between; width: 142px; height: 205px; padding: 12px; background: #fff; border: 3px solid var(--ink); color: #111; box-shadow: 8px 10px 0 rgba(0,0,0,.2); font-family: Georgia, serif; font-size: 2rem; line-height: 1; }
.playing-card i { align-self: flex-end; font-size: 4rem; font-style: normal; }
.card-one { left: 25px; top: 55px; transform: rotate(-12deg); }
.card-two { left: 132px; top: 18px; z-index: 2; transform: rotate(1deg); color: var(--red); }
.card-three { left: 245px; top: 62px; transform: rotate(13deg); }
.turn-chip { position: absolute; left: 50%; bottom: 0; z-index: 4; transform: translateX(-50%); padding: 8px 14px; background: var(--gold); color: var(--ink); font-size: .82rem; font-weight: 850; }

.table-rules { background: var(--ink); color: #fff; }
.rule-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.rule-grid > div { padding: 27px 28px; border-left: 1px solid #516158; }
.rule-grid > div:last-child { border-right: 1px solid #516158; }
.rule-grid b { display: block; color: var(--gold); font-size: 1.4rem; font-family: Georgia, serif; }
.rule-grid span { display: block; margin-top: 3px; color: #ced8d2; font-size: .88rem; line-height: 1.4; }

.section { padding: 94px 0; }
.section-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: end; margin-bottom: 42px; }
.section-head h2 { max-width: 11ch; margin: 0; font-size: clamp(3rem, 6vw, 5.7rem); }
.section-head p { max-width: 50ch; margin: 0 0 5px; color: var(--muted); font-size: 1.1rem; }
.guide-list { border-top: 3px solid var(--ink); }
.guide { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 28px; align-items: start; padding: 29px 4px; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.guide-no { font-family: Georgia, serif; color: var(--red); font-size: 1.35rem; }
.guide h3 { margin: 0; font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif; font-size: 1.55rem; line-height: 1.15; }
.guide p { margin: 0; color: var(--muted); }
.guide:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

.format-section { background: var(--paper-deep); border-block: 1px solid var(--rule); }
.format-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; padding-block: 84px; }
.format-copy h2 { margin: 0; font-size: clamp(3.2rem, 6vw, 6rem); }
.format-copy p { max-width: 55ch; }
.format-copy ul { padding-left: 1.1em; }
.format-copy li { margin-bottom: 8px; }
.scoreboard { background: var(--felt-dark); color: #fff; border: 7px solid var(--ink); box-shadow: 12px 12px 0 var(--gold); }
.board-head { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #6d8a80; color: #cfe0da; font-size: .8rem; font-weight: 800; }
.team-score { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 23px 20px; border-bottom: 1px solid #6d8a80; }
.team-score p { margin: 0; }
.team-score small { display: block; color: #aac4bb; }
.team-score strong { font-family: Georgia, serif; font-size: 3.1rem; line-height: 1; }
.team-score.winning strong { color: var(--gold); }
.board-note { margin: 0; padding: 15px 18px; color: #cfe0da; font-size: .88rem; }

.final-cta { padding: 82px 0; background: var(--red); color: #fff; }
.final-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
.final-cta h2 { max-width: 13ch; margin: 0; font-size: clamp(3rem, 6vw, 5.8rem); }
.final-cta p { max-width: 48ch; }
.final-cta .button { background: #fff; border-color: #fff; }
.final-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.final-actions .button { min-width: 145px; }

.article-head { padding: 68px 0 58px; background: var(--felt); color: #fff; }
.article-label { margin: 0 0 13px; color: var(--gold); font-size: .84rem; font-weight: 850; }
.article-head h1 { max-width: 14ch; margin: 0; font-size: clamp(3.2rem, 7vw, 6.8rem); }
.article-head .dek { max-width: 65ch; margin: 22px 0 0; color: #dcece6; font-size: 1.12rem; }
.article-layout { display: grid; grid-template-columns: minmax(0, 760px) 270px; gap: 75px; align-items: start; padding-top: 65px; padding-bottom: 80px; }
.entry-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.06rem; }
.entry-content > * { max-width: 72ch; }
.entry-content h2, .entry-content h3 { font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif; line-height: 1.1; }
.entry-content h2 { margin-top: 2.2em; font-size: 2.35rem; letter-spacing: -.025em; }
.entry-content h3 { margin-top: 1.8em; font-size: 1.45rem; }
.entry-content li { margin-bottom: .55em; }
.entry-content .table-note, .entry-content .quick-rule { margin-block: 28px; padding: 20px 23px; background: var(--paper-deep); border-left: 7px solid var(--red); }
.entry-content .table-note strong, .entry-content .quick-rule strong { display: block; margin-bottom: 5px; font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif; }
.article-aside { position: sticky; top: 25px; padding-top: 18px; border-top: 7px solid var(--gold); }
.article-aside .pip { font-family: Georgia, serif; color: var(--red); font-size: 3rem; line-height: 1; }
.article-aside h2 { margin: 12px 0 8px; font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif; font-size: 1.35rem; line-height: 1.15; }
.article-aside p { color: var(--muted); font-size: .93rem; }
.article-aside .button { width: 100%; }

.site-footer { padding: 54px 0; background: var(--ink); color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; }
.footer-grid small { display: block; max-width: 70ch; margin-top: 8px; color: #bfcac4; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; align-content: start; }
.footer-links a { color: #fff; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; z-index: 20; top: 82px; left: 0; right: 0; padding: 23px 20px; background: var(--paper); border-bottom: 2px solid var(--ink); flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .hero-grid, .section-head, .format-grid, .final-grid, .article-layout { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 62px 28px; gap: 25px; }
  .hero h1 { font-size: clamp(4rem, 15vw, 7rem); }
  .table-scene { min-height: 430px; }
  .deal { left: 50%; transform: translateX(-50%); }
  .rule-grid { grid-template-columns: 1fr 1fr; }
  .section-head { gap: 22px; }
  .guide { grid-template-columns: 55px 1fr; }
  .guide p { grid-column: 2; }
  .article-aside { position: static; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: min(var(--max), calc(100% - 28px)); }
  .brand small { display: none; }
  .hero-grid { min-height: auto; }
  .hero h1 { font-size: clamp(3.5rem, 18vw, 5.3rem); }
  .table-scene { min-height: 355px; transform: scale(.82); transform-origin: center top; margin-bottom: -55px; }
  .score-slip { right: -40px; }
  .deal { left: 43%; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-grid > div { border-right: 1px solid #516158; }
  .section { padding: 68px 0; }
  .guide { grid-template-columns: 42px 1fr; gap: 12px; }
  .format-grid { padding-block: 62px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-links { justify-content: flex-start; }
  .final-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
