/* ===============================================
   Learn Poker
   Page-specific additions only. Layout, container
   widths, cards, buttons and the footer/nav come
   from style.css — this file adds the poker-
   teaching components on top.
   =============================================== */

.learnpoker-page {
  --lp-ink: #171719;
  --lp-paper: #f2eee7;
  --lp-red: #8e1730;
  --lp-gold: #d9ae49;
  --lp-line: rgba(22, 22, 22, 0.14);
  --lp-muted: #5f5b59;
  --lp-card-w: 62px;
}

/* The academy hero is an index, not a landing page — keep it short. */
.learnpoker-page .marketers-hero {
  min-height: auto;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Site headings are Big Shoulders; 700 here rather than the 800 used
   elsewhere, to keep the long teaching page calmer. */
.learnpoker-page .user-guide :is(h2, h3) {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* ---------- Playing cards ---------- */
.lp-hand {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-hand--tight {
  gap: 0.25rem;
}

/* 500x726 is the source artwork ratio — never distort it. */
.lp-card {
  display: block;
  width: var(--lp-card-w);
  height: auto;
  aspect-ratio: 500 / 726;
  border-radius: 4px;
  object-fit: contain;
}

/* Text fallback: face-down slots, and any card whose art fails to load. */
.lp-card--face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  color: var(--lp-ink);
  background: #fff;
  border: 1px solid var(--lp-line);
  font-family: "Inter", sans-serif;
  line-height: 1;
}

.lp-card--red {
  color: var(--lp-red);
}

.lp-card__rank {
  font-size: calc(var(--lp-card-w) * 0.3);
  font-weight: 600;
}

.lp-card__suit {
  font-size: calc(var(--lp-card-w) * 0.26);
}

.lp-card--back {
  background:
    repeating-linear-gradient(
      45deg,
      #7a1a2c 0 6px,
      #5e1523 6px 12px
    );
  border-color: rgba(217, 174, 73, 0.5);
}

.lp-cardset {
  margin: 0 0 1.1rem;
}

.lp-cardset__label {
  margin: 0 0 0.4rem;
  color: var(--lp-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Game selector ---------- */
.lp-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.35rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-game {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  background: var(--ug-white, #fff);
  border: 1px solid var(--lp-line);
  border-top: 3px solid var(--lp-red);
  border-radius: var(--ug-radius, 4px);
}

.lp-game__art {
  display: flex;
  gap: 0.3rem;
  --lp-card-w: 46px;
}

.lp-game h3 {
  margin: 0;
}

.lp-game p {
  margin: 0;
  flex: 1 1 auto;
}

.lp-game__link {
  align-self: flex-start;
  margin-top: 0.35rem;
  color: var(--lp-red);
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.lp-game__link:hover,
.lp-game__link:focus-visible {
  text-decoration: underline;
}

/* ---------- Sticky game navigation ---------- */
.lp-gamenav {
  /* style.css has a legacy `nav { width: 100vw }` — opt out of it. */
  width: 100%;
  max-width: 100%;
  position: sticky;
  z-index: 20;
  top: 0;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  padding: 0.5rem 0;
  background: var(--lp-ink);
}

.lp-gamenav__list {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0 0.35rem;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}

.lp-gamenav__list::-webkit-scrollbar {
  display: none;
}

.lp-gamenav a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: rgba(242, 238, 231, 0.72);
  font-family: "Inter", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 3px;
  transition: color 180ms ease, background-color 180ms ease;
}

.lp-gamenav a:hover,
.lp-gamenav a:focus-visible {
  color: var(--lp-paper);
  background: rgba(242, 238, 231, 0.1);
}

/* Active state carries an underline as well as colour. */
.lp-gamenav a.is-active {
  color: var(--lp-paper);
  background: rgba(242, 238, 231, 0.12);
  box-shadow: inset 0 -2px 0 var(--lp-gold);
}

/* ---------- Steps ---------- */
.lp-steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  counter-reset: lp-step;
  list-style: none;
}

.lp-step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  background: var(--ug-white, #fff);
  border: 1px solid var(--lp-line);
  border-radius: var(--ug-radius, 4px);
}

.lp-step::before {
  content: counter(lp-step);
  counter-increment: lp-step;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: #fff;
  background: var(--lp-red);
  border-radius: 50%;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.lp-step h4 {
  margin: 0 0 0.25rem;
  color: var(--lp-ink);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.lp-step p {
  margin: 0;
}

.lp-step .lp-hand {
  margin-top: 0.7rem;
}

/* ---------- Flow / progression ---------- */
.lp-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.lp-flow li {
  padding: 0.4rem 0.75rem;
  color: var(--lp-paper);
  background: var(--lp-ink);
  border-radius: 3px;
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lp-flow li:not(:last-child)::after {
  content: " →";
  color: var(--lp-gold);
}

/* ---------- Hand rankings ---------- */
.lp-rankings {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-ranking {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.95rem;
  background: var(--ug-white, #fff);
  border: 1px solid var(--lp-line);
  border-radius: var(--ug-radius, 4px);
}

.lp-ranking__no {
  color: var(--lp-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
}

.lp-ranking__name {
  margin: 0;
  color: var(--lp-ink);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.lp-ranking__note {
  margin: 0.1rem 0 0;
  color: var(--lp-muted);
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.45;
  text-transform: none;
}

.lp-ranking .lp-hand {
  --lp-card-w: 40px;
  justify-content: flex-end;
}

/* ---------- Chinese poker rows ---------- */
.lp-rows {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-row {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--ug-white, #fff);
  border: 1px solid var(--lp-line);
  border-left: 3px solid var(--lp-gold);
  border-radius: var(--ug-radius, 4px);
}

.lp-row h4 {
  margin: 0;
  color: var(--lp-ink);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.lp-row p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
}

/* ---------- Betting actions ---------- */
.lp-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-action {
  padding: 1rem 1.15rem;
  background: var(--ug-white, #fff);
  border: 1px solid var(--lp-line);
  border-radius: var(--ug-radius, 4px);
}

.lp-action h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.lp-action p {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- Quick summary ---------- */
.lp-summary {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  padding: 1.1rem 1.35rem;
  background: var(--lp-ink);
  border-radius: var(--ug-radius, 4px);
}

.lp-summary h3 {
  margin: 0 0 0.55rem;
  color: var(--lp-gold);
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lp-summary ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-summary li {
  position: relative;
  padding-left: 0.9rem;
  color: var(--lp-paper);
  font-family: "Inter", sans-serif;
  font-size: 0.86rem;
  font-weight: 400;
  text-transform: none;
}

.lp-summary li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--lp-gold);
  border-radius: 50%;
}

/* ---------- Callout ---------- */
.lp-callout {
  margin: 1.25rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--ug-soft, #f7f6f5);
  border-left: 3px solid var(--lp-red);
  border-radius: 0 var(--ug-radius, 4px) var(--ug-radius, 4px) 0;
}

.lp-callout p {
  margin: 0;
  font-size: 0.9rem;
}

.lp-callout strong {
  color: var(--lp-red);
}

/* ---------- Comparison ---------- */
.lp-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.lp-compare > li {
  padding: 1.05rem 1.25rem;
  background: var(--ug-white, #fff);
  border: 1px solid var(--lp-line);
  border-radius: var(--ug-radius, 4px);
}

.lp-compare h4 {
  margin: 0 0 0.35rem;
  color: var(--lp-ink);
  font-family: "Inter", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
}

.lp-compare p {
  margin: 0;
  font-size: 0.88rem;
}

/* ---------- Draw before / after ---------- */
.lp-draw {
  display: grid;
  gap: 0.9rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.lp-draw > li {
  padding: 1rem 1.2rem;
  background: var(--ug-white, #fff);
  border: 1px solid var(--lp-line);
  border-radius: var(--ug-radius, 4px);
}

/* Marks the two cards being exchanged — paired with a text label,
   so the meaning is not carried by colour alone. */
.lp-card--swap {
  outline: 2px solid var(--lp-red);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .lp-games {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lp-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .learnpoker-page {
    --lp-card-w: 52px;
  }

  .lp-ranking {
    grid-template-columns: 1.8rem minmax(0, 1fr);
    row-gap: 0.5rem;
  }

  .lp-ranking .lp-hand {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .lp-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }
}

@media (max-width: 560px) {
  .learnpoker-page {
    --lp-card-w: 44px;
  }

  .lp-compare {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-game__art {
    --lp-card-w: 40px;
  }

  .lp-step {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
  }

  .lp-step::before {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.78rem;
  }
}

/* Two columns stay as long as they are readable, then fall back to one. */
@media (max-width: 430px) {
  .learnpoker-page {
    --lp-card-w: 38px;
  }

  .lp-ranking .lp-hand,
  .lp-hand {
    --lp-card-w: 36px;
  }

  .lp-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-summary ul {
    gap: 0.35rem 1rem;
  }
}

@media (max-width: 380px) {
  .lp-games {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-gamenav a {
    transition: none;
  }
}

/* The shared hero sets weight 900; this page stays at 700 like its
   section headings, per the lighter type brief for the academy. */
.learnpoker-page .marketers-hero h1 {
  font-weight: 700;
}

/* ===============================================
   Dark theme, scoped to this page only.
   The site component tokens are re-pointed here so
   cards, panels and body copy invert together
   rather than being restyled one by one.
   =============================================== */
body.learnpoker-page,
html:has(.learnpoker-page) {
  background: #171719;
}

.learnpoker-page {
  --ug-white: #1f1f22;
  --ug-ink: #f2eee7;
  --ug-muted: #b3afab;
  --ug-soft: #232327;
  --ug-line: rgba(242, 238, 231, 0.14);
  --lp-line: rgba(242, 238, 231, 0.14);
  --lp-muted: #b3afab;
  background: #171719;
}

.learnpoker-page .site-background {
  display: none;
}

.learnpoker-page .site-canvas {
  background: #171719;
}

/* --lp-ink stays dark because it paints surfaces; these four use it
   as a text colour, so they invert. */
.learnpoker-page .lp-step h4,
.learnpoker-page .lp-ranking__name,
.learnpoker-page .lp-row h4,
.learnpoker-page .lp-compare h4 {
  color: #f2eee7;
}

/* Sticky nav and summary sat on --lp-ink, which now matches the page.
   Lift them a step so they still read as separate surfaces. */
.learnpoker-page .lp-gamenav {
  background: #101011;
  border-bottom: 1px solid rgba(242, 238, 231, 0.1);
}

.learnpoker-page .lp-summary {
  background: #101011;
  border-left: 3px solid var(--lp-gold);
}

/* ---------- Type sizes ---------- */
.learnpoker-page .lp-summary h3 {
  font-size: 0.9rem;
}

.learnpoker-page .lp-summary li {
  font-size: 1.18rem;
}

.learnpoker-page .lp-game h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.05;
}

.learnpoker-page .lp-ranking__name {
  font-size: 1.4rem;
}

.learnpoker-page .lp-ranking__note {
  font-size: 0.85rem;
}

/* Gold reads better than the deep red now the page is dark. */
.learnpoker-page .lp-game__link,
.learnpoker-page .lp-callout strong {
  color: #e3c395;
}

/* The page heading rule was catching this label and rendering it as
   condensed caps at 14px. It belongs in the body font. */
.learnpoker-page .lp-summary h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
