/* =============================================================
   Judy Games — site stylesheet
   One accent (gold), one neutral family (near-black greens), one
   border colour, one radius. No shadows on static elements, no
   hover lift, no gradients used for decoration.
   ============================================================= */

:root{
  --ink:        #0e1210;
  --panel:      #141c17;
  --panel-2:    #182119;
  --line:       rgba(212,175,55,.18);
  --line-strong:rgba(212,175,55,.4);
  --gold:       #d4af37;
  --gold-dark:  #b6942e;
  --ink-on-gold:#241a05;
  --ivory:      #f3efe3;
  --ivory-dim:  #b3ab9c;
  --tile:       #f3efe3;
  --tile-ink:   #2a2117;

  --font-display: "Rakkas", "Tajawal", serif;
  --font-word:    "Cinzel", serif;
  --font-body:    "Tajawal", "Segoe UI", sans-serif;

  --container: 1200px;
  --radius: 12px;
}

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

html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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

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

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

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

.skip-link{
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--gold);
  color: var(--ink-on-gold);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  z-index: 1000;
  transition: top .15s ease-out;
}
.skip-link:focus{ top: 12px; }

:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ivory);
  margin: 0 0 .5em;
  line-height: 1.3;
}
h2{ font-size: 32px; }
h3{ font-size: 20px; }
p{ margin: 0 0 1em; color: var(--ivory-dim); max-width: 62ch; }

/* ---------- buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding-inline: 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out;
}

.btn-gold{
  background: var(--gold);
  color: var(--ink-on-gold);
}
.btn-gold:hover{ background: var(--gold-dark); }

.btn-ghost{
  background: transparent;
  color: var(--ivory);
  border-color: var(--line-strong);
}
.btn-ghost:hover{ border-color: var(--gold); }

/* =============================================================
   Header
   ============================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 14px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark{ width: 34px; height: 34px; flex: none; object-fit: contain; }
.brand-word{
  font-family: var(--font-word);
  font-size: 19px;
  letter-spacing: .04em;
  color: var(--gold);
}
.brand-word small{
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--ivory-dim);
  margin-top: -2px;
}

.nav{
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links{
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a{
  text-decoration: none;
  color: var(--ivory-dim);
  font-size: 15px;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover{ color: var(--ivory); }
.nav-links a[aria-current="page"]{ color: var(--ivory); border-bottom-color: var(--gold); }

.nav-toggle{
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg{ width: 18px; height: 18px; }

.nav-item--mobile-only{ display: none; }

@media (max-width: 860px){
  .nav-links{
    position: fixed;
    inset-inline: 0;
    top: 61px;
    flex-direction: column;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 16px rgba(0,0,0,.25);
    transform: translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition: transform .15s ease-out, opacity .15s ease-out;
  }
  .nav-links.is-open{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li{ width: 100%; }
  .nav-links a{
    display: block;
    padding: 15px 24px;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta{ display: none; }
  .nav-item--mobile-only{ display: block; }
  .nav-toggle{ display: inline-flex; }
}

/* =============================================================
   Hero
   ============================================================= */
.hero{
  padding-block: 64px;
  border-bottom: 1px solid var(--line);
}
.hero .container{
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy h1{ font-size: 44px; }
.hero-copy p{ font-size: 17px; max-width: 52ch; }
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.trust-strip{
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.trust-item{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ivory-dim);
  font-size: 14px;
}
.trust-item svg{ width: 18px; height: 18px; flex: none; color: var(--gold); }

/* --- hero scene: a few domino tiles and game glyphs, flat, no shadow --- */
.hero-scene{
  position: relative;
  height: 320px;
}
.domino{
  position: absolute;
  width: 84px; height: 156px;
  background: var(--tile);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.2);
}
.domino::before{
  content: "";
  position: absolute;
  inset-inline: 12%;
  top: 50%;
  height: 1px;
  background: rgba(42,33,23,.35);
}
.domino--a{ top: 10%; inset-inline-start: 10%; transform: rotate(-10deg); }
.domino--b{ top: 34%; inset-inline-end: 8%; transform: rotate(8deg); }
.domino--c{ bottom: 10%; inset-inline-start: 32%; transform: rotate(-4deg); }

.pip-half{ position: absolute; inset-inline: 16%; height: 34%; }
.pip-half.is-top{ top: 8%; }
.pip-half.is-bottom{ bottom: 8%; }
.pip-half i{
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--tile-ink);
  transform: translate(-50%, -50%);
}
.highlight-tile .pip-half i{ width: 7px; height: 7px; }

.pip-half.n1 i:nth-child(1){ left: 50%; top: 50%; }
.pip-half.n2 i:nth-child(1){ left: 24%; top: 22%; }
.pip-half.n2 i:nth-child(2){ left: 76%; top: 78%; }
.pip-half.n3 i:nth-child(1){ left: 24%; top: 22%; }
.pip-half.n3 i:nth-child(2){ left: 50%; top: 50%; }
.pip-half.n3 i:nth-child(3){ left: 76%; top: 78%; }
.pip-half.n4 i:nth-child(1){ left: 24%; top: 22%; }
.pip-half.n4 i:nth-child(2){ left: 76%; top: 22%; }
.pip-half.n4 i:nth-child(3){ left: 24%; top: 78%; }
.pip-half.n4 i:nth-child(4){ left: 76%; top: 78%; }
.pip-half.n5 i:nth-child(1){ left: 24%; top: 22%; }
.pip-half.n5 i:nth-child(2){ left: 76%; top: 22%; }
.pip-half.n5 i:nth-child(3){ left: 50%; top: 50%; }
.pip-half.n5 i:nth-child(4){ left: 24%; top: 78%; }
.pip-half.n5 i:nth-child(5){ left: 76%; top: 78%; }
.pip-half.n6 i:nth-child(1){ left: 24%; top: 16%; }
.pip-half.n6 i:nth-child(2){ left: 76%; top: 16%; }
.pip-half.n6 i:nth-child(3){ left: 24%; top: 50%; }
.pip-half.n6 i:nth-child(4){ left: 76%; top: 50%; }
.pip-half.n6 i:nth-child(5){ left: 24%; top: 84%; }
.pip-half.n6 i:nth-child(6){ left: 76%; top: 84%; }

.chess-piece{
  position: absolute;
  bottom: 6%;
  inset-inline-end: 18%;
  width: 90px; height: 90px;
  color: var(--gold);
}
.cue-ball{
  position: absolute;
  top: 6%;
  inset-inline-end: 4%;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--tile);
  border: 1px solid rgba(0,0,0,.2);
}
.cue-ball::after{
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: #b91c1c;
}

@media (max-width: 980px){
  .hero .container{ grid-template-columns: 1fr; }
  .hero-scene{ height: 260px; order: -1; }
}
@media (max-width: 560px){
  .hero-copy h1{ font-size: 32px; }
  .hero-scene{ height: 220px; }
  .domino{ width: 66px; height: 122px; }
  .chess-piece{ width: 64px; height: 64px; }
}

/* =============================================================
   Section shell
   ============================================================= */
.section{ padding-block: 80px; }
.section-head{ max-width: 640px; margin-bottom: 44px; }
.section-head.is-centered{ margin-inline: auto; text-align: center; }
.section--panel{ background: var(--panel); border-block: 1px solid var(--line); }

/* =============================================================
   Games grid — five cards, sized by content, same treatment
   ============================================================= */
.games-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.game-card{
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.game-card .game-icon{ width: 24px; height: 24px; color: var(--gold); margin-bottom: 14px; display: block; }
.game-card h3{ font-size: 18px; margin-bottom: 6px; }
.game-card p{ font-size: 14.5px; margin: 0 0 16px; }
.game-card .game-links{ display: flex; gap: 8px; font-size: 14px; }
.game-card .game-links a{ color: var(--gold); text-decoration: none; font-weight: 700; }
.game-card .game-links a:hover{ text-decoration: underline; }
.game-card .game-links span{ color: var(--ivory-dim); }

/* =============================================================
   Highlights — compact grid, one visual treatment for every item
   ============================================================= */
.highlight-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.highlight-card{
  padding: 22px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.highlight-tile{
  width: 40px; height: 68px;
  background: var(--tile);
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.2);
  position: relative;
  margin-bottom: 14px;
}
.highlight-tile::before{
  content: "";
  position: absolute;
  inset-inline: 14%;
  top: 50%;
  height: 1px;
  background: rgba(42,33,23,.3);
}
.highlight-card h3{ font-size: 16.5px; margin-bottom: 6px; }
.highlight-card p{ font-size: 14px; margin: 0; }

@media (max-width: 860px){ .highlight-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .highlight-grid{ grid-template-columns: 1fr; } }

/* =============================================================
   Rules teaser (index) + rules page tabs
   ============================================================= */
.rules-teaser{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.rules-teaser-card{
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.rules-teaser-card ul{ margin: 14px 0 0; padding: 0; list-style: none; }
.rules-teaser-card li{
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--ivory-dim);
}
.rules-teaser-card li:first-child{ border-top: none; padding-top: 0; }
.rules-teaser-card li strong{ color: var(--ivory); font-weight: 700; }

@media (max-width: 860px){
  .rules-teaser{ grid-template-columns: 1fr; }
}

/* rules page */
.rules-tabs{
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.rules-tab{
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ivory-dim);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: -1px;
}
.rules-tab:hover{ color: var(--ivory); }
.rules-tab[aria-selected="true"]{ color: var(--ivory); border-bottom-color: var(--gold); }

.rules-panel{ display: none; }
.rules-panel.is-active{ display: block; }

.rules-block{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.rules-block h3{
  display: flex;
  align-items: center;
  gap: 10px;
}
.rules-block h3 .num-pip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 14px;
  flex: none;
}
.rules-block ul{ padding-inline-start: 20px; color: var(--ivory-dim); margin: 0; }
.rules-block li{ margin-bottom: 10px; }
.rules-block li strong{ color: var(--ivory); }

.rules-note{
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ivory-dim);
  font-size: 14.5px;
}
.rules-note strong{ color: var(--ivory); }

@media (max-width: 800px){
  .rules-block{ grid-template-columns: 1fr; gap: 20px; }
}

/* =============================================================
   CTA banner
   ============================================================= */
.cta-banner{
  padding-block: 64px;
  text-align: center;
  background: var(--panel);
  border-block: 1px solid var(--line);
}
.cta-banner h2{ margin-bottom: 12px; }
.cta-banner p{ margin-inline: auto; margin-bottom: 26px; }

/* =============================================================
   Footer
   ============================================================= */
.site-footer{
  background: var(--ink);
  padding-block: 44px 26px;
  border-top: 1px solid var(--line);
}
.footer-top{
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.footer-brand p{ max-width: 34ch; margin-top: 10px; font-size: 14px; }
.footer-links{
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-links h4{
  font-family: var(--font-body);
  color: var(--ivory);
  font-size: 13.5px;
  margin: 0 0 12px;
}
.footer-links ul{ list-style: none; padding: 0; margin: 0; }
.footer-links li{ margin-bottom: 9px; }
.footer-links a{ color: var(--ivory-dim); text-decoration: none; font-size: 14px; }
.footer-links a:hover{ color: var(--gold); }
.footer-bottom{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  font-size: 13px;
  color: var(--ivory-dim);
}
