/* =========================================================
   Chess Kingdoms — Companion Website
   Shared stylesheet (RTL-first, no frameworks, no external deps)
   ========================================================= */

:root {
  --color-wood-dark: #3d2413;
  --color-wood: #7a4a26;
  --color-wood-light: #a9713e;
  --color-parchment: #faf1de;
  --color-parchment-dark: #f0e0bf;
  --color-green: #2f7d4f;
  --color-green-dark: #1f5c38;
  --color-green-light: #e6f2ea;
  --color-gold: #cf9b2b;
  --color-gold-light: #f0d878;
  --color-ink: #2b1d12;
  --color-ink-soft: #5a4630;
  --color-white: #fffaf0;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --shadow-card: 0 10px 30px rgba(61, 36, 19, 0.14);
  --shadow-soft: 0 4px 14px rgba(61, 36, 19, 0.10);

  --font-main: "Segoe UI", Tahoma, Geneva, Verdana, Arial, sans-serif;

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-parchment);
  color: var(--color-ink);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 800;
  color: var(--color-wood-dark);
  line-height: 1.35;
  margin: 0 0 16px;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 16px; color: var(--color-ink-soft); }

.section {
  padding: 72px 0;
}

.section--tight {
  padding: 48px 0;
}

.section--alt {
  background: var(--color-white);
  border-top: 1px solid rgba(122, 74, 38, 0.12);
  border-bottom: 1px solid rgba(122, 74, 38, 0.12);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px;
}

.eyebrow {
  display: inline-block;
  color: var(--color-green-dark);
  background: var(--color-green-light);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-green);
  color: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--color-green-dark);
  box-shadow: var(--shadow-card);
}

.btn-gold {
  background: linear-gradient(180deg, var(--color-gold-light), var(--color-gold));
  color: var(--color-wood-dark);
  box-shadow: var(--shadow-soft);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-wood);
  color: var(--color-wood-dark);
}

.btn-disabled {
  background: #e4d9c5;
  color: #8a7a5f;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-disabled:hover {
  transform: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--color-wood) 0%, var(--color-wood-dark) 100%);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-white);
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  background: var(--color-wood-dark);
  overflow: hidden;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1.15rem;
  color: var(--color-gold-light);
}

.brand-text span {
  font-size: 0.78rem;
  color: rgba(255, 250, 240, 0.75);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-gold-light);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-sm);
  color: var(--color-white);
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 72px;
  background:
    radial-gradient(circle at 15% 20%, rgba(207, 155, 43, 0.18), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(47, 125, 79, 0.16), transparent 45%),
    linear-gradient(180deg, var(--color-parchment) 0%, var(--color-parchment-dark) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-copy .eyebrow {
  background: var(--color-gold-light);
  color: var(--color-wood-dark);
}

.hero h1 {
  margin-bottom: 10px;
}

.hero .tagline {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-green-dark);
  margin-bottom: 18px;
}

.hero .lead {
  font-size: 1.05rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}

.placeholder-frame {
  position: relative;
  border-radius: var(--radius-lg);
  border: 3px dashed var(--color-wood-light);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-ink-soft);
  padding: 20px;
}

.placeholder-frame .ph-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.placeholder-frame .ph-label {
  font-weight: 700;
  color: var(--color-wood-dark);
}

.placeholder-frame .ph-hint {
  font-size: 0.82rem;
  margin-top: 4px;
  color: var(--color-ink-soft);
}

.hero-logo-frame {
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

/* ---------- Feature cards ---------- */

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(122, 74, 38, 0.10);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--color-green-light);
  color: var(--color-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  margin-bottom: 0;
  font-size: 0.96rem;
}

/* ---------- Screenshot gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.shot-frame {
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Play badge / contact ---------- */

.play-cta {
  background: linear-gradient(135deg, var(--color-wood) 0%, var(--color-wood-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  color: var(--color-white);
}

.play-cta h2 {
  color: var(--color-white);
}

.play-cta p {
  color: rgba(255, 250, 240, 0.85);
  max-width: 60ch;
  margin: 0 auto 24px;
}

.play-badge-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px dashed var(--color-gold);
  border-radius: var(--radius-sm);
  padding: 14px 26px;
  color: var(--color-gold-light);
  font-weight: 700;
}

.contact-box {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.contact-email {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-green-dark);
  background: var(--color-green-light);
  padding: 10px 22px;
  border-radius: 999px;
}

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

.site-footer {
  background: var(--color-wood-dark);
  color: rgba(255, 250, 240, 0.78);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  color: var(--color-gold-light);
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 8px;
}

.footer-grid a:hover {
  color: var(--color-gold-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 250, 240, 0.55);
}

/* ---------- Generic content page (privacy / support / about) ---------- */

.page-hero {
  padding: 56px 0 32px;
  background: linear-gradient(180deg, var(--color-parchment-dark), var(--color-parchment));
  text-align: center;
}

.page-hero .eyebrow {
  background: var(--color-gold-light);
  color: var(--color-wood-dark);
}

.content-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 40px;
  border: 1px solid rgba(122, 74, 38, 0.10);
}

.content-card h2 {
  margin-top: 36px;
}

.content-card h2:first-child {
  margin-top: 0;
}

.content-card ul {
  padding-inline-start: 22px;
  color: var(--color-ink-soft);
}

.content-card li {
  margin-bottom: 8px;
}

.note-box {
  background: var(--color-green-light);
  border-inline-start: 4px solid var(--color-green);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.95rem;
  color: var(--color-green-dark);
}

.status-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 10px;
}

.status-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-parchment);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--color-ink);
}

.status-list .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c0392b;
  flex-shrink: 0;
}

.updated-note {
  color: var(--color-ink-soft);
  font-size: 0.88rem;
  margin-top: 8px;
}

/* ---------- FAQ ---------- */

.faq-item {
  border-bottom: 1px solid rgba(122, 74, 38, 0.14);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  width: 100%;
  text-align: start;
  background: none;
  border: none;
  padding: 18px 4px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-wood-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-family: inherit;
}

.faq-q .chevron {
  transition: transform 0.2s ease;
  color: var(--color-green);
  flex-shrink: 0;
}

.faq-item.open .faq-q .chevron {
  transform: rotate(180deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  color: var(--color-ink-soft);
}

.faq-item.open .faq-a {
  max-height: 400px;
}

.faq-a-inner {
  padding: 0 4px 18px;
}

/* ---------- Reveal-on-scroll (subtle) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--color-wood-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 4px;
    display: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .content-card {
    padding: 24px;
  }

  .play-cta {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  body {
    font-size: 16px;
  }
}
