/* pokerspiel.de – Stylesheet */

@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("../fonts/literata-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --felt: #1e5b44;
  --felt-deep: #123a2b;
  --felt-light: #2a7458;
  --paper: #ffffff;
  --surface: #eff3f1;
  --ink: #18212b;
  --muted: #4c5965;
  --line: #d3dbd7;
  --link: #1a6247;
  --link-hover: #0f4431;
  --suit-red: #bf2a30;
  --suit-black: #18212b;
  --focus: #e0a526;

  --measure: 40rem;
  --wide: 68rem;
  --gutter: clamp(1rem, 4vw, 2rem);

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.375rem);
  --step-4: clamp(2.125rem, 1.3rem + 3.6vw, 3.5rem);

  color-scheme: light;
}

:root:not([data-theme="light"]) {
  --paper: #101814;
  --surface: #18231e;
  --ink: #e5ece8;
  --muted: #a8b6ae;
  --line: #2c3b34;
  --link: #8ed1b1;
  --link-hover: #b9e6cf;
  --felt: #1a4f3b;
  --felt-deep: #0d2a1f;
  --felt-light: #246650;
  color-scheme: dark;
}


*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Literata", Georgia, "Times New Roman", serif;
  font-size: var(--step-0);
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--paper); color: var(--ink); padding: 0.5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--felt-deep);
  color: #f3f6f4;
}
.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.7rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: #fff; }
.brand__mark { width: 1.6rem; height: 1.6rem; flex: none; }
.brand__tld { font-weight: 400; opacity: 0.75; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.45);
  color: #fff;
  font: inherit;
  font-size: var(--step--1);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.2rem;
}
.site-nav a {
  color: #dfe9e4;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.5); }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--focus); }
.site-nav a.is-pending { opacity: 0.55; }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-block; }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav { flex-basis: 100%; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.3rem 0 0.6rem; }
  .site-nav a { display: block; padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--focus); }
}
/* without JavaScript the menu stays visible */
.no-js .site-nav { display: block; }
.no-js .nav-toggle { display: none; }

/* ---------- Felt band (start page hero and page headers) ---------- */

.felt {
  background:
    radial-gradient(ellipse 90% 120% at 70% 40%, var(--felt-light) 0%, var(--felt) 45%, var(--felt-deep) 100%);
  color: #f3f6f4;
}
.felt a { color: #fff; }

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}
.hero h1, .page-head h1, .content h2 { hyphens: manual; -webkit-hyphens: manual; }
.hero h1 {
  font-size: var(--step-4);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin: 0 0 1.1rem;
  max-width: 14ch;
}
.hero p {
  font-size: var(--step-1);
  line-height: 1.55;
  margin: 0;
  max-width: 34rem;
  color: #dbe7e1;
}
@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}

.page-head {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.2rem) var(--gutter) clamp(2rem, 5vw, 3rem);
}
.page-head h1 {
  font-size: clamp(1.75rem, 1rem + 3.4vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin: 0 0 0.9rem;
  max-width: 22ch;
}
.page-head p { margin: 0; max-width: 38rem; font-size: var(--step-1); line-height: 1.55; color: #dbe7e1; }
.breadcrumb { font-size: var(--step--1); margin: 0 0 1rem; color: #c2d4ca; }
.breadcrumb a { color: #c2d4ca; }

/* ---------- Playing cards ---------- */

.hand {
  display: inline-flex;
  gap: 0.3rem;
  flex-wrap: nowrap;
}
.pc {
  --w: 2.6rem;
  position: relative;
  display: inline-block;
  width: var(--w);
  height: calc(var(--w) * 1.4);
  background: #fff;
  border: 1px solid #c9d1cd;
  border-radius: calc(var(--w) * 0.12);
  box-shadow: 0 1px 2px rgba(10, 30, 20, 0.22);
  color: var(--suit-black);
  font-family: "Literata", Georgia, serif;
  line-height: 1;
  flex: none;
}
.pc--red { color: var(--suit-red); }
.pc__r {
  position: absolute;
  top: calc(var(--w) * 0.08);
  left: calc(var(--w) * 0.1);
  font-weight: 700;
  font-size: calc(var(--w) * 0.36);
  letter-spacing: -0.04em;
}
.pc__s {
  position: absolute;
  right: calc(var(--w) * 0.1);
  bottom: calc(var(--w) * 0.08);
  font-size: calc(var(--w) * 0.5);
}
.pc__r small { font-size: inherit; }

/* hero fan */
.fan {
  position: relative;
  height: clamp(12rem, 26vw, 17rem);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.fan .pc {
  --w: clamp(5.4rem, 11vw, 7.6rem);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform-origin: 50% 120%;
  transform: translateX(-50%) rotate(var(--rot)) ;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  border-color: #e3e8e5;
}
.fan .pc__s { font-size: calc(var(--w) * 0.62); right: auto; left: 50%; bottom: 50%; transform: translate(-50%, 50%); }
.fan .pc__r { font-size: calc(var(--w) * 0.3); display: flex; flex-direction: column; align-items: center; line-height: 1; }
.pc__c { display: none; }
.fan .pc__c { display: block; font-size: 0.8em; margin-top: 0.08em; }
.fan .pc:nth-child(1) { --rot: -24deg; }
.fan .pc:nth-child(2) { --rot: -12deg; }
.fan .pc:nth-child(3) { --rot: 0deg; }
.fan .pc:nth-child(4) { --rot: 12deg; }
.fan .pc:nth-child(5) { --rot: 24deg; }

@media (prefers-reduced-motion: no-preference) {
  .fan .pc { animation: deal 0.7s cubic-bezier(.2,.8,.25,1) both; }
  .fan .pc:nth-child(1) { animation-delay: 0.05s; }
  .fan .pc:nth-child(2) { animation-delay: 0.15s; }
  .fan .pc:nth-child(3) { animation-delay: 0.25s; }
  .fan .pc:nth-child(4) { animation-delay: 0.35s; }
  .fan .pc:nth-child(5) { animation-delay: 0.45s; }
  @keyframes deal {
    from { transform: translateX(-50%) rotate(0deg) translateY(1.5rem); opacity: 0; }
    to   { transform: translateX(-50%) rotate(var(--rot)); opacity: 1; }
  }
}

/* ---------- Content ---------- */

main { display: block; }

.content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3rem) var(--gutter) 3rem;
}
.content--wide { max-width: 50rem; }

.content h2 {
  font-size: var(--step-3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 2.6rem 0 0.9rem;
}
.content h2:first-child { margin-top: 0; }
.content h3 {
  font-size: var(--step-1);
  line-height: 1.3;
  font-weight: 700;
  margin: 1.8rem 0 0.5rem;
}
.content p, .content ul, .content ol { margin: 0 0 1.1rem; }
.content li { margin-bottom: 0.4rem; }
.content strong { font-weight: 700; }

.lead { font-size: var(--step-1); line-height: 1.55; }

/* topic index on the start page */
.topics {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  border-top: 1px solid var(--line);
}
.topics li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.topics a {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.2rem 0.9rem;
  padding: 1rem 0.2rem;
  text-decoration: none;
  color: var(--ink);
}
.topics a:hover { background: var(--surface); }
.topics a:hover .topics__title { text-decoration: underline; text-decoration-thickness: 2px; }
.topics__suit { grid-row: span 2; font-size: 1.6rem; line-height: 1.2; color: var(--suit-black); }
.topics__suit--red { color: var(--suit-red); }
:root:not([data-theme="light"]) .topics__suit:not(.topics__suit--red) { color: var(--ink); }
:root:not([data-theme="light"]) .topics__suit--red { color: #e3595e; }
.topics__title { font-weight: 700; font-size: var(--step-1); color: var(--link); }
.topics__desc { color: var(--muted); }
.topics .is-pending .topics__title::after { content: " (folgt)"; font-weight: 400; color: var(--muted); font-size: var(--step--1); }

/* note box: link to GambSoc and similar */
.aside {
  background: var(--surface);
  border-left: 4px solid var(--felt);
  padding: 1.1rem 1.25rem;
  margin: 2rem 0;
}
.aside p:last-child { margin-bottom: 0; }

/* ---------- Hand ranking ---------- */

.ranking {
  list-style: none;
  counter-reset: rank;
  padding: 0;
  margin: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
}
.ranking > li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  grid-template-areas: "num name cards" "num desc cards";
  column-gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.ranking > li::before {
  content: counter(rank);
  grid-area: num;
  font-size: var(--step-2);
  font-weight: 750;
  line-height: 1.1;
  color: var(--felt);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
:root:not([data-theme="light"]) .ranking > li::before { color: var(--link); }
.content .ranking__name { grid-area: name; font-weight: 700; font-size: var(--step-1); line-height: 1.3; margin: 0; }
.content .ranking__name span { font-weight: 400; color: var(--muted); font-size: var(--step-0); }
.content .ranking__desc { grid-area: desc; margin: 0.2rem 0 0; color: var(--ink); }
.ranking .hand { grid-area: cards; align-self: center; }

@media (max-width: 40rem) {
  .ranking > li {
    grid-template-columns: 2rem minmax(0, 1fr);
    grid-template-areas: "num name" "num cards" "num desc";
  }
  .ranking .hand { margin-top: 0.6rem; }
  .ranking .pc { --w: 2.35rem; }
}

/* hand comparison */
.compare { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem 1rem; align-items: center; margin: 1rem 0 1.2rem; }
.compare__label { font-weight: 700; }
.compare__label--win { color: var(--link); }
@media (max-width: 26rem) {
  .compare { grid-template-columns: 1fr; gap: 0.25rem; }
  .compare .hand { margin-bottom: 0.6rem; }
}

/* glossary */
.letters { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0; margin: 0 0 2rem; list-style: none; }
.letters a { display: inline-block; min-width: 2.2rem; text-align: center; padding: 0.3rem 0.5rem; border: 1px solid var(--line); border-radius: 0.4rem; text-decoration: none; font-weight: 700; }
.letters a:hover { background: var(--surface); }
.glossary dt { font-weight: 700; font-size: var(--step-1); margin-top: 1.1rem; scroll-margin-top: 1rem; }
.glossary dd { margin: 0.2rem 0 0; }
.glossary h2 { scroll-margin-top: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }

/* blind calculator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 0.6rem; padding: 1.25rem; margin: 1.5rem 0 2rem; }
.calc__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.9rem 1.2rem; margin-bottom: 1rem; }
.calc label { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.25rem; }
.calc input, .calc select { width: 100%; font: inherit; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 0.4rem; background: var(--paper); color: var(--ink); }
.calc .hint { font-size: var(--step--1); color: var(--muted); margin: 0.2rem 0 0; }
.br-msg { color: var(--suit-red); font-weight: 700; }
:root:not([data-theme="light"]) .br-msg { color: #e3595e; }
.br-summary { margin: 0.5rem 0 1rem; padding-left: 1.2rem; }
.br-table td:nth-child(1), .br-table th:nth-child(1) { width: 4rem; }
.br-table td:nth-child(4), .br-table th:nth-child(4) { text-align: right; }
.br-overtime td { color: var(--muted); background: var(--surface); }
.br-pause td { font-style: italic; color: var(--muted); text-align: center; }
.calc__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem; }

/* tables */
.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.6rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 420px) {
  .table-compact th, .table-compact td { padding: 0.5rem 0.4rem; font-size: 0.92rem; }
}
th { font-weight: 700; background: var(--surface); }

/* buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  background: var(--felt);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  cursor: pointer;
  text-decoration: none;
}
.button:hover { background: var(--felt-deep); color: #fff; }
.felt .button { background: #fff; color: var(--felt-deep); }
.felt .button:hover { background: #e6efe9; }
.page-head .button { margin-top: 1.4rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 0.2rem 0; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 0.8rem 0; list-style-position: outside; }
.faq details[open] summary { color: var(--link); }
.faq details p { margin: 0 0 1rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.6;
}
.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.5rem 3rem;
}
.site-footer p { margin: 0 0 0.6rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.3rem; }
.age-badge {
  display: inline-block;
  border: 2px solid var(--suit-red);
  color: var(--suit-red);
  font-weight: 750;
  border-radius: 999px;
  padding: 0 0.45rem;
  margin-right: 0.4rem;
  font-size: 0.85rem;
}
.theme-switch {
  font: inherit; font-size: var(--step--1);
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; margin-top: 0.6rem;
}
@media (max-width: 40rem) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

.print-only { display: none; }

/* very small phones: long German words must fit without breaking */
@media (max-width: 22.5rem) { .page-head h1 { font-size: 1.5rem; } .hero h1 { font-size: 1.9rem; } }

/* ---------- Print: hand ranking cheat sheet ---------- */

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  :root, :root:not([data-theme="light"]) { --paper: #fff; --surface: #f2f2f2; --ink: #000; --muted: #333; --line: #bbb; --felt: #1e5b44; --link: #1e5b44; color-scheme: light; }
  body { font-size: 10.5pt; line-height: 1.35; background: #fff; color: #000; }
  .site-header, .site-footer, .no-print, .skip-link, .breadcrumb, .page-head p, .page-head .button { display: none !important; }
  .felt { background: none; color: #000; }
  .page-head { padding: 0 0 4mm; }
  .page-head h1 { font-size: 20pt; max-width: none; margin: 0; }
  .print-only { display: block; }
  .content { max-width: none; padding: 0; }
  .ranking { margin: 2mm 0; }
  .content .ranking__name, .content .ranking__desc { margin: 0; }
  .ranking > li { padding: 2.6mm 0; grid-template-columns: 9mm minmax(0, 1fr) auto; grid-template-areas: "num name cards" "num desc cards"; break-inside: avoid; }
  .ranking > li::before { font-size: 15pt; color: #1e5b44 !important; }
  .content .ranking__name { font-size: 13pt; }
  .content .ranking__desc { font-size: 10pt; }
  .ranking .hand { margin: 0; }
  .ranking .pc { --w: 10mm; box-shadow: none; border-color: #888; }
  .print-sheet-foot { margin-top: 4mm; font-size: 8.5pt; color: #333; }
  a { color: #000; text-decoration: none; }
  .calc { border: 0; padding: 0; background: none; }
  .br-overtime td, .br-pause td { background: none; }
}
.nowrap { white-space: nowrap; }

/* contact form */
.contact-form__fields { grid-template-columns: 1fr 1fr; }
.contact-form__wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .contact-form__fields { grid-template-columns: 1fr; } }
.calc textarea { width: 100%; font: inherit; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 0.4rem; background: var(--paper); color: var(--ink); resize: vertical; min-height: 10rem; }
.calc .optional { font-weight: 400; color: var(--muted); }
.contact-form__note { font-size: var(--step--1); color: var(--muted); margin: 0.9rem 0 0; }
.cf-turnstile { margin-top: 0.4rem; min-height: 65px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 0.9rem 1.1rem; border-radius: 0.5rem; margin: 1.5rem 0 0; border: 1px solid var(--line); background: var(--surface); }
.form-status--ok { border-color: var(--felt-light); }
.form-status--error { border-color: var(--suit-red); }
