/* Full Deck Solitaire — Strategy Guides
   Palette: felt green table, aged-card cream, card red, brass rail */
:root {
  --felt: #16382b;
  --felt-deep: #0d281e;
  --rail: #0a1f17;
  --card: #f7f1e2;
  --card-shade: #e7ddc6;
  --ink: #22261f;
  --ink-soft: #55584e;
  --red: #a5322b;
  --brass: #c39d52;
  --brass-soft: #8f7440;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--felt);
  background-image: radial-gradient(ellipse 120% 80% at 50% -10%, #1d4736 0%, var(--felt) 55%, var(--felt-deep) 100%);
  color: var(--card);
  font-family: 'Alegreya', Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--brass); }
a:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- Top rail (matches the game page's bar) ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 48px;
  background: rgba(10, 31, 23, 0.85);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid rgba(195, 157, 82, 0.35);
  padding: 0 clamp(0.9rem, 2.5vw, 1.6rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--card);
  text-decoration: none;
  letter-spacing: 0.015em;
  white-space: nowrap;
}
.wordmark .pips { color: var(--card); letter-spacing: 0.1em; margin-right: 0.4rem; font-size: 0.9rem; }
.wordmark .pips b { color: #cf5347; font-weight: 400; }
.play-cta {
  font-family: 'Alegreya', Georgia, serif;
  background: var(--brass);
  color: #1a1208;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.32em 1.1em 0.38em;
  border-radius: 999px;
  transition: background 120ms ease;
  white-space: nowrap;
}
.play-cta:hover { background: #d9b56c; }

/* ---------- Article ---------- */
main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin-bottom: 0.6rem;
}
h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.1rem, 5.5vw, 3.1rem);
  line-height: 1.12;
  margin-bottom: 0.9rem;
}
.lede {
  font-size: 1.25rem;
  color: #e9e3d2;
  font-style: italic;
  margin-bottom: 2rem;
}
h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.65rem;
  margin: 2.6rem 0 0.9rem;
  color: var(--card);
}
h2::after {
  content: "";
  display: block;
  width: 3.2rem;
  height: 2px;
  background: var(--brass-soft);
  margin-top: 0.45rem;
}
p { margin-bottom: 1.1rem; }
p strong { color: #fff; }
ul, ol { margin: 0 0 1.2rem 1.4rem; }
li { margin-bottom: 0.55rem; }

/* ---------- Quick facts strip ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 2.2rem;
}
.fact {
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.8rem 0.9rem 0.7rem;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.35), inset 0 0 0 1px var(--card-shade);
}
.fact .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 0.2rem;
}
.fact .value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}
.fact .value .pip-on { color: var(--red); }
.fact .value .pip-off { color: #cdc3aa; }

/* ---------- Deal diagram (signature) ---------- */
.deal {
  background: var(--felt-deep);
  border: 1px solid var(--brass-soft);
  border-radius: 10px;
  padding: 1.4rem 1rem 1rem;
  margin: 1.4rem 0 2rem;
}
.deal-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: 1rem;
}
.deal-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.3rem, 1.5vw, 0.7rem);
  flex-wrap: wrap;
}
.pile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.pile .stack {
  width: clamp(1.7rem, 5vw, 2.4rem);
  background: var(--card);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--card-shade);
  position: relative;
  /* height set inline per pile: 0.5rem per card + base */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(0.5rem - 1px),
    #d8cdb2 calc(0.5rem - 1px),
    #d8cdb2 0.5rem
  );
}
.pile .stack.facedown {
  background-color: #7a4341;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(0.5rem - 1px),
    #5e302f calc(0.5rem - 1px),
    #5e302f 0.5rem
  );
}
.pile .count {
  font-size: 0.8rem;
  color: #cfc7ae;
  font-variant-numeric: tabular-nums;
}

/* ---------- Tips ---------- */
.tip-list { list-style: none; margin-left: 0; counter-reset: tip; }
.tip-list li {
  counter-increment: tip;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1rem;
}
.tip-list li::before {
  content: counter(tip);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.7rem;
  height: 1.7rem;
  background: var(--card);
  color: var(--red);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 2px 0 rgba(0,0,0,0.35);
}

/* ---------- Play banner ---------- */
.play-banner {
  margin-top: 3rem;
  background: var(--card);
  color: var(--ink);
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.35);
  text-align: center;
}
.play-banner h2 {
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.play-banner h2::after { display: none; }
.play-banner p { color: var(--ink-soft); margin-bottom: 1.1rem; }
.store-links {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.store-links a {
  background: var(--felt);
  color: var(--card);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 1.05rem;
  border-radius: 6px;
}
.store-links a:hover { background: #1d4736; }
.store-links a.primary { background: var(--red); }
.store-links a.primary:hover { background: #b83e36; }

/* ---------- Guide index cards ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.8rem;
}
.guide-card {
  background: var(--card);
  color: var(--ink);
  border-radius: 8px;
  padding: 1.15rem 1.15rem 1rem;
  text-decoration: none;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.35);
  display: block;
  transition: transform 120ms ease;
}
.guide-card:hover { transform: translateY(-3px); }
.guide-card .suit {
  font-size: 1.3rem;
  color: var(--red);
  display: block;
  margin-bottom: 0.3rem;
}
.guide-card .suit.black { color: var(--ink); }
.guide-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}
.guide-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--brass-soft);
  padding: 1.4rem 1.25rem 2.2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #b9b19a;
}
footer a { color: var(--brass); }
footer nav { margin-bottom: 0.6rem; }
footer nav a { margin: 0 0.55rem; }
