/* ── Rummy 500 · rummy500game.com · Global Styles ──────────────── */

:root {
  --blue:      #1B6FD4;
  --blue-dark: #1054A8;
  --blue-deep: #0B3A73;
  --gold:      #F5C027;
  --gold-dark: #C9960A;
  --red:       #D93B3B;
  --ink:       #111827;
  --slate:     #374151;
  --muted:     #6B7280;
  --cream:     #F8F6F0;
  --white:     #FFFFFF;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,.14);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

/* ── Typography ───────────────────────────────────────────── */

h1,h2,h3,h4 {
  font-family: 'Lilita One', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: .01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { max-width: 68ch; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────── */

.wrap {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

section { padding: 72px 0; }

/* ── Site Header ─────────────────────────────────────────── */

header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue-deep);
  border-bottom: 3px solid var(--gold);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

header.site img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
}

header.site a.name {
  font-family: 'Lilita One', sans-serif;
  font-size: 1.15rem;
  color: var(--gold);
  white-space: nowrap;
  margin-right: auto;
}
header.site a.name:hover { text-decoration: none; opacity: .85; }

header.site nav { display: flex; gap: 24px; }
header.site nav a {
  color: rgba(255,255,255,.85);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .03em;
  transition: color .15s;
}
header.site nav a:hover { color: var(--gold); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue) 60%, #2980D4 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 20px 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='10' y='40' font-size='32' opacity='.04' fill='white'%3E♠%3C/text%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero .icon {
  width: 130px;
  height: 130px;
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
  margin-bottom: 24px;
}

.hero h1 {
  color: var(--gold);
  text-shadow: 0 3px 12px rgba(0,0,0,.4);
  margin-bottom: 12px;
}

.hero .tag {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 700;
  color: rgba(255,255,255,.9);
  max-width: 55ch;
  margin: 0 auto 20px;
}

.hero .stars {
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 4px;
  margin-bottom: 28px;
}

.hero .sub {
  margin-top: 18px;
  font-size: .95rem;
  color: rgba(255,255,255,.7);
  font-weight: 700;
}

/* ── App Store Badge ─────────────────────────────────────── */

.badges { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.badge-apple img {
  height: 54px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
  transition: transform .15s, filter .15s;
}
.badge-apple:hover img { transform: translateY(-2px); filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }

/* ── Card-fan Divider ────────────────────────────────────── */

.fan-divider {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: -8px;
  height: 52px;
  margin: 0;
  background: var(--cream);
  padding: 8px 0;
}

.fan-divider .pip-card {
  width: 32px;
  height: 44px;
  background: var(--white);
  border: 1.5px solid #d1d5db;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 1px 1px 4px rgba(0,0,0,.12);
  position: relative;
}

.fan-divider .pip-card:nth-child(1) { transform: rotate(-20deg) translateY(4px); }
.fan-divider .pip-card:nth-child(2) { transform: rotate(-10deg) translateY(2px); }
.fan-divider .pip-card:nth-child(3) { transform: rotate(0deg); }
.fan-divider .pip-card:nth-child(4) { transform: rotate(10deg) translateY(2px); }
.fan-divider .pip-card:nth-child(5) { transform: rotate(20deg) translateY(4px); }

.fan-divider .r { color: var(--red); }

/* ── Features ────────────────────────────────────────────── */

#features { background: var(--cream); }

#features .wrap > p.lede,
#screenshots .wrap > p.lede,
.cta .wrap > p.lede {
  color: var(--slate);
  font-size: 1.1rem;
  margin: 8px 0 48px;
  max-width: 58ch;
}

#features h2, #screenshots h2 {
  color: var(--blue-deep);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.fcard {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  box-shadow: var(--shadow);
  position: relative;
  border-top: 4px solid var(--blue);
  transition: transform .2s, box-shadow .2s;
}

.fcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(0,0,0,.16);
}

.fcard .corner {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: 'Lilita One', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  opacity: .2;
}
.fcard .corner.red { color: var(--red); }

.fcard .em { font-size: 2.2rem; margin-bottom: 12px; }
.fcard h3 { color: var(--blue-deep); margin-bottom: 8px; }
.fcard p  { color: var(--slate); font-size: .97rem; max-width: none; }

/* ── Screenshots ─────────────────────────────────────────── */

#screenshots { background: var(--blue-deep); }
#screenshots h2, #screenshots p.lede { color: var(--white); }
#screenshots p.lede { color: rgba(255,255,255,.75); }

.shots {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding-bottom: 8px;
}

.shot {
  flex-shrink: 0;
  width: 200px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.shot img {
  width: 200px;
  height: auto;
  border-radius: 20px;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  border: 3px solid rgba(255,255,255,.12);
}

.shot figcaption {
  color: rgba(255,255,255,.65);
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  max-width: 180px;
}

/* ── CTA ─────────────────────────────────────────────────── */

.cta { background: var(--gold); text-align: center; }
.cta h2 { color: var(--ink); }
.cta p.lede { color: var(--ink); margin-inline: auto; opacity: .75; }
.cta .badges { margin-top: 28px; }
.cta .badge-apple img { filter: none; }

/* ── Footer ──────────────────────────────────────────────── */

footer {
  background: var(--ink);
  padding: 36px 0;
  color: rgba(255,255,255,.5);
  font-size: .88rem;
}

footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

footer .links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
footer .links a { color: rgba(255,255,255,.65); font-weight: 700; }
footer .links a:hover { color: var(--gold); text-decoration: none; }
footer .fine { max-width: 70ch; }

/* ── Legal pages ─────────────────────────────────────────── */

.legal-hero {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 100%);
  padding: 56px 20px 48px;
  text-align: center;
  color: var(--white);
}
.legal-hero h1 { color: var(--gold); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal-hero p { color: rgba(255,255,255,.7); margin: 10px auto 0; font-size: .95rem; }

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.legal-body h2 {
  font-size: 1.25rem;
  color: var(--blue-deep);
  margin: 36px 0 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}

.legal-body h2:first-child { margin-top: 0; }

.legal-body p, .legal-body li {
  color: var(--slate);
  font-size: .97rem;
  line-height: 1.75;
  max-width: none;
}

.legal-body ul {
  padding-left: 20px;
  margin: 8px 0 16px;
}

.legal-body a { color: var(--blue); }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 640px) {
  header.site nav { display: none; }
  .features { grid-template-columns: 1fr; }
  .shot { width: 160px; height: 300px; }
  section { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fcard, .badge-apple img { transition: none; }
}

/* ── Article / How-to-play page ──────────────────────────── */

.article-hero {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue) 65%, #2980D4 100%);
  color: var(--white);
  text-align: center;
  padding: 64px 20px 56px;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='10' y='40' font-size='32' opacity='.04' fill='white'%3E♣%3C/text%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.article-hero h1 { color: var(--gold); text-shadow: 0 3px 12px rgba(0,0,0,.4); max-width: 18ch; margin: 0 auto 14px; }
.article-hero p { color: rgba(255,255,255,.85); font-size: 1.08rem; max-width: 60ch; margin: 0 auto; font-weight: 700; }

.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

.article > p,
.article li { color: var(--slate); font-size: 1.02rem; line-height: 1.8; max-width: none; }

.article h2 {
  font-family: 'Lilita One', sans-serif;
  color: var(--blue-deep);
  font-size: 1.7rem;
  margin: 48px 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--gold);
}
.article h2:first-of-type { margin-top: 0; }

.article h3 {
  color: var(--blue-deep);
  font-size: 1.18rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  margin: 28px 0 8px;
}

.article ul, .article ol { padding-left: 22px; margin: 12px 0 18px; }
.article li { margin-bottom: 8px; }

.article .lead {
  font-size: 1.12rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.7;
}

/* Table of contents */
.toc {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 0 0 40px;
}
.toc h2 {
  border: none;
  font-size: 1.05rem;
  margin: 0 0 12px;
  padding: 0;
  color: var(--blue-deep);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.toc ol { columns: 2; column-gap: 36px; margin: 0; padding-left: 18px; }
.toc li { margin-bottom: 6px; font-size: .95rem; }
.toc a { color: var(--blue); font-weight: 700; }

/* Data tables */
.tbl-wrap { overflow-x: auto; margin: 18px 0 24px; }
.r5-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .97rem;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.r5-table th {
  background: var(--blue-deep);
  color: var(--white);
  text-align: left;
  padding: 12px 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .02em;
}
.r5-table td { padding: 11px 16px; border-top: 1px solid #eef0f3; color: var(--slate); }
.r5-table tr:nth-child(even) td { background: #fafbfc; }
.r5-table td strong { color: var(--ink); }

/* Callout box */
.callout {
  background: #FFF8E6;
  border: 1px solid #F3DFA0;
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}
.callout p { margin: 0; color: #6B5410; font-size: .98rem; }
.callout strong { color: #4A3C09; }

/* Step list */
.steps { counter-reset: step; list-style: none; padding-left: 0; margin: 20px 0; }
.steps > li {
  position: relative;
  padding: 4px 0 16px 56px;
  margin: 0;
  min-height: 44px;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 40px; height: 40px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lilita One', sans-serif;
  font-size: 1.15rem;
}

/* FAQ */
.faq details {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 800;
  color: var(--blue-deep);
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem; color: var(--blue); font-weight: 400;
}
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { border-bottom: 1px solid #eef0f3; }
.faq .faq-body { padding: 14px 20px 18px; }
.faq .faq-body p { margin: 0; color: var(--slate); font-size: .98rem; line-height: 1.75; }

/* In-article CTA */
.article-cta {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  border-radius: 18px;
  padding: 36px 32px;
  text-align: center;
  margin: 48px 0 8px;
  color: var(--white);
}
.article-cta h2 { color: var(--gold); border: none; padding: 0; margin: 0 0 8px; }
.article-cta p { color: rgba(255,255,255,.85); margin: 0 auto 22px; max-width: 48ch; }
.article-cta .badge-apple img { height: 50px; }

/* breadcrumb */
.crumb { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumb a { color: var(--blue); font-weight: 700; }

@media (max-width: 640px) {
  .toc ol { columns: 1; }
  .article h2 { font-size: 1.4rem; }
}

/* ── Coming Soon badge ───────────────────────────────────── */
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #1d1d1f;
  color: #fff;
  border-radius: 12px;
  padding: 13px 26px;
  font-family: 'Nunito', sans-serif;
  cursor: default;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.coming-soon .apple-mark { font-size: 1.5rem; line-height: 1; }
.coming-soon .cs-text { text-align: left; line-height: 1.2; }
.coming-soon .cs-small { display: block; font-size: .68rem; font-weight: 700; opacity: .75; letter-spacing: .02em; }
.coming-soon .cs-big { display: block; font-size: 1.18rem; font-weight: 800; }
.coming-soon-note {
  margin-top: 14px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Contact form ────────────────────────────────────────── */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 30px;
}
.contact-form .field { margin-bottom: 20px; }
.contact-form label {
  display: block;
  font-weight: 800;
  color: var(--blue-deep);
  font-size: .92rem;
  margin-bottom: 7px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 9px;
  background: var(--cream);
  transition: border-color .15s, box-shadow .15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,111,212,.15);
  background: var(--white);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form button {
  width: 100%;
  background: var(--blue);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  border: none;
  border-radius: 999px;
  padding: 15px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(27,111,212,.35);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27,111,212,.45);
}
.contact-form button:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.form-status {
  text-align: center;
  margin-top: 18px;
  font-weight: 700;
  font-size: .98rem;
  min-height: 1.4em;
}
.form-status.success { color: #1a7f37; }
.form-status.error { color: var(--red); }
/* honeypot — hidden from humans, catches bots */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
