/* ============================================================================
   Jogada — /regras/ "Como jogar Buraco" — shared design system
   Brand Guide v2.4 (Jogada_Guia_de_Marca.pdf) + design-system.md tokens.

   Plane discipline (v2.4 §10.1 / §10.4): page CHROME (header/footer + logo) is
   BRAND palette (petrol); CONTENT is PRODUCT palette (felt table + walnut
   tabletop panels + rendered cards) because the page depicts gameplay. The
   logo never sits on felt. Body text targets WCAG AAA (≥7:1) for the 45+
   reader — textOnPanel #2B2118 on walnut #D5BE96 ≈ 9:1.
   ========================================================================== */
:root {
  /* Brand palette (chrome) */
  --petrol: #203A5B;
  --petrol-deep: #16293F;
  /* Product palette (content) */
  --felt: #0F5B46;
  --felt-deep: #0B4636;
  --walnut: #D5BE96;
  --wood: #654321;
  --wood-deep: #4A3119;
  /* Text */
  --cream: #FFFDF7;
  --ink: #2B2118;          /* textOnPanel — main text on walnut (~9:1 AAA) */
  --ink-muted: #5A4A3A;    /* textOnPanelMuted (~4.6:1 AA) */
  /* Accents (bridge) */
  --amber: #E9A23B;
  --coral: #CC6B49;
  --success: #15803D;
  /* Cards are the real product art (assets/cards/french_cards.png) — no
     invented card colors. See the .rc sprite rules below. */
  /* 8-pt grid */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s8: 48px;
  --display: 'Oswald', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--felt);
  color: var(--cream);
  font-family: var(--body);
  font-size: 18px;          /* ≥16pt floor; 18 for sustained reading at 45+ */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Skip link (a11y) */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--amber); color: var(--petrol);
  padding: var(--s2) var(--s4); border-radius: 0 0 var(--s2) 0;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

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

/* ============================ Chrome — header ============================= */
.site-head {
  background: var(--petrol);
  border-bottom: 3px solid var(--petrol-deep);
}
.site-head .bar {
  max-width: 920px; margin: 0 auto;
  padding: var(--s3) var(--s4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }
.head-cta {
  background: var(--amber); color: var(--petrol);
  font-family: var(--body); font-weight: 700; font-size: 17px;
  text-decoration: none; padding: 10px 20px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.20); min-height: 44px;
  display: inline-flex; align-items: center;
}

/* ============================ Content shell ============================== */
.wrap { max-width: 820px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s8); }

.crumbs { font-size: 15px; color: var(--cream); opacity: 0.85; margin: 0 0 var(--s4); }
.crumbs a { color: var(--cream); }
.crumbs span { opacity: 0.6; padding: 0 6px; }

/* Hero — cream on felt (welcoming "sente à mesa" moment) */
.hero { padding: var(--s4) 0 var(--s6); }
.eyebrow {
  font-family: var(--body); font-weight: 700; font-size: 14px;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--amber);
  margin: 0 0 var(--s2);
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 6vw, 46px); line-height: 1.1;
  margin: 0 0 var(--s3); color: var(--cream);
}
.hero .lead { font-size: 20px; color: var(--cream); max-width: 40ch; margin: 0; }
.hero .lead strong { color: var(--amber); }

/* Walnut tabletop panel — the rules laid on the wood */
.panel {
  background: var(--walnut); color: var(--ink);
  border-radius: var(--s4); padding: var(--s5) var(--s5) var(--s6);
  box-shadow: 0 10px 30px rgba(0,0,0,0.30);
  margin: var(--s5) 0;
}
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

.panel h2 {
  font-family: var(--display); font-weight: 700; font-size: 26px;
  color: var(--ink); margin: var(--s6) 0 var(--s3); line-height: 1.2;
}
.panel h2:first-of-type { margin-top: var(--s2); }
.panel h2::before {           /* brand diamond gem (motif, not amber-as-text) */
  content: ""; display: inline-block; width: 11px; height: 11px;
  background: var(--amber); transform: rotate(45deg); border-radius: 2px;
  margin-right: 12px; vertical-align: middle;
}
.panel h3 {
  font-family: var(--body); font-weight: 700; font-size: 19px;
  color: var(--ink); margin: var(--s4) 0 var(--s2);
}
.panel p { margin: var(--s3) 0; }
.panel ul { padding-left: 22px; margin: var(--s3) 0; }
.panel li { margin: var(--s2) 0; }
.panel strong { color: var(--wood-deep); }
.panel a { color: var(--wood); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.panel a:hover { color: var(--wood-deep); }

.lead-in { font-size: 20px; color: var(--ink); }   /* first-paragraph answer */

/* Numbered "passo a passo" — numbers encode the real turn sequence */
.steps { counter-reset: step; list-style: none; padding: 0; margin: var(--s4) 0; }
.steps li {
  counter-increment: step; position: relative;
  padding-left: 52px; margin: var(--s4) 0; min-height: 36px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; background: var(--amber); color: var(--petrol);
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 19px;
}
.steps li strong { color: var(--wood-deep); }

/* Rule callout */
.rule {
  background: rgba(101,67,33,0.10); border-left: 4px solid var(--amber);
  border-radius: 0 var(--s2) var(--s2) 0; padding: var(--s3) var(--s4);
  margin: var(--s4) 0;
}

/* Cards on the table — feltDeep inset, cream card faces pop (~10:1) */
.table-inset {
  background: var(--felt-deep); border-radius: var(--s4);
  padding: var(--s4); margin: var(--s4) 0;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.30);
}
.table-inset .cap {
  color: var(--cream); font-size: 15px; margin: 0 0 var(--s3); opacity: 0.9;
}
.hand { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; --cw: 46px; }
/* Real card sprite (assets/cards/french_cards.png): 13 cols × 5 rows of
   250×357 tiles. rows: 0 copas, 1 ouros, 2 paus, 3 espadas, 4 versos/curingas.
   cols: rank 2..K = 0..11, Ás = 12. Set --row/--col inline per card. */
.rc {
  display: inline-block; flex: 0 0 auto;
  width: var(--cw, 46px); height: calc(var(--cw, 46px) * 357 / 250);
  background-image: url(/assets/cards/french_cards.png);
  background-repeat: no-repeat;
  background-size: calc(var(--cw, 46px) * 13) calc(var(--cw, 46px) * 357 / 250 * 5);
  background-position: calc(var(--col, 0) * var(--cw, 46px) * -1)
                       calc(var(--row, 0) * var(--cw, 46px) * 357 / 250 * -1);
  border-radius: calc(var(--cw, 46px) * 0.055);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.rc.curinga { outline: 3px solid var(--amber); outline-offset: -3px; }
.hand .plus { color: var(--cream); font-size: 22px; opacity: 0.7; padding: 0 2px; }

/* Comparison table (hub) */
.cmp { overflow-x: auto; margin: var(--s4) 0; }
table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 460px; }
th, td {
  text-align: left; padding: 10px 12px; vertical-align: top;
  border-bottom: 1px solid rgba(101,67,33,0.30);
}
thead th {
  font-family: var(--display); font-weight: 700; color: var(--ink);
  border-bottom: 2px solid var(--wood);
}
tbody th { font-weight: 700; color: var(--wood-deep); }

/* FAQ — native <details>, no JS, calm */
.faq { margin: var(--s4) 0; }
.faq details {
  border-bottom: 1px solid rgba(101,67,33,0.30); padding: var(--s2) 0;
}
.faq summary {
  font-family: var(--body); font-weight: 700; font-size: 18px; color: var(--ink);
  cursor: pointer; list-style: none; padding: var(--s2) 36px var(--s2) 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: 26px; color: var(--wood); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 var(--s3); color: var(--ink); }

/* Sibling variants — pill chips */
.siblings { margin: var(--s5) 0 0; }
.siblings .lbl { font-size: 15px; color: var(--cream); opacity: 0.85; margin: 0 0 var(--s2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0; list-style: none; }
.chips a {
  display: inline-block; padding: 9px 16px; border-radius: 999px;
  background: rgba(255,253,247,0.12); color: var(--cream);
  border: 1px solid rgba(255,253,247,0.28); text-decoration: none; font-weight: 700; font-size: 16px;
}
.chips a:hover { background: rgba(255,253,247,0.20); }
.chips a[aria-current="page"] { background: var(--amber); color: var(--petrol); border-color: var(--amber); }

/* CTA — honest pre-launch waitlist, warm peak-end */
.cta {
  background: var(--walnut); color: var(--ink); border-radius: var(--s4);
  padding: var(--s6) var(--s5); margin: var(--s6) 0 0; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.30);
}
.cta .kicker {
  font-family: var(--body); font-weight: 700; font-size: 14px; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--wood); margin: 0 0 var(--s2);
}
.cta h2 { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--ink); margin: 0 0 var(--s2); line-height: 1.15; }
.cta h2::before { display: none; }
.cta p { font-size: 18px; color: var(--ink); margin: 0 auto var(--s5); max-width: 44ch; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  font-family: var(--body); font-weight: 700; font-size: 19px; text-decoration: none;
  background: var(--amber); color: var(--petrol); box-shadow: 0 3px 0 rgba(0,0,0,0.20);
}
.btn:hover { background: #d9912f; }
.btn.ghost {
  background: transparent; color: var(--ink); border: 2px solid var(--wood); box-shadow: none;
}
.btn.ghost:hover { background: rgba(101,67,33,0.10); }

/* ============================ Chrome — footer =========================== */
.site-foot {
  background: var(--petrol); color: var(--cream); margin-top: var(--s8);
  border-top: 3px solid var(--petrol-deep);
}
.site-foot .inner {
  max-width: 920px; margin: 0 auto; padding: var(--s6) var(--s4);
  display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: space-between; align-items: center;
}
.site-foot img { height: 30px; width: auto; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--s5); }
.site-foot a { color: var(--cream); text-decoration: none; opacity: 0.9; font-size: 16px; }
.site-foot a:hover { opacity: 1; text-decoration: underline; }
.site-foot .fine { flex-basis: 100%; font-size: 14px; opacity: 0.7; margin: 0; }

/* ============================ Responsive ================================ */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .panel { padding: var(--s4) var(--s4) var(--s5); }
  .hero .lead { font-size: 18px; }
  .panel h2 { font-size: 23px; }
  .head-cta { padding: 9px 16px; font-size: 16px; }
  .hand { --cw: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
