/* Nobility Games — site styles
   Motif: the blue enamel street signs of Cairo (Arabic above, English below). */

/* Alexandria by Mohamed Gaber, self-hosted (SIL OFL 1.1, see /assets/fonts/OFL.txt) */
@font-face {
  font-family: "Alexandria";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/fonts/alexandria-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Alexandria";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/fonts/alexandria-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Alexandria";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/fonts/alexandria-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --enamel: #1e3e94;
  --enamel-deep: #152d6e;
  --enamel-soft: #e6ecf7;
  --wall: #e9edf4;
  --paper: #ffffff;
  --ink: #1b2340;
  --muted: #535c77;
  --rule: #d5dbe7;
  --brass: #a5731b;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --font: "Alexandria", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-weight: 350;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
html[lang="ar"] body { line-height: 1.85; }

main { flex: 1 0 auto; }

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

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}
html[lang="en"] :is(h1, h2, h3) { letter-spacing: -0.012em; }
html[lang="ar"] :is(h1, h2, h3) { line-height: 1.45; }

p { text-wrap: pretty; }

a {
  color: var(--enamel);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

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

.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand { text-decoration: none; flex-shrink: 0; }

.mini-plate {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--enamel);
  box-shadow: inset 0 0 0 3px var(--enamel), inset 0 0 0 4.5px #fff;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  white-space: nowrap;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--brass); }

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--enamel);
  border-radius: 10px;
  background: var(--enamel);
  color: #fff;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--enamel-deep); border-color: var(--enamel-deep); }

.btn-quiet { background: transparent; color: var(--enamel); }
.btn-quiet:hover { background: var(--enamel-soft); border-color: var(--enamel); }

.btn-soon {
  background: transparent;
  border: 1.5px dashed var(--muted);
  color: var(--muted);
  cursor: default;
}
.btn-soon:hover { background: transparent; border-color: var(--muted); }

/* ---------- The enamel plate ---------- */

.plate {
  position: relative;
  display: inline-block;
  padding: clamp(1.6rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3.5rem);
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgb(255 255 255 / 0.14) 0%, rgb(255 255 255 / 0) 38%),
    linear-gradient(180deg, #2447a3 0%, var(--enamel) 55%, #1a3783 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.35),
    inset 0 -2px 0 rgb(0 0 0 / 0.18),
    0 2px 3px rgb(21 45 110 / 0.25),
    0 24px 40px -22px rgb(21 45 110 / 0.55);
  isolation: isolate;
}

/* white enamel frame */
.plate::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 3px solid #fff;
  border-radius: 11px;
  pointer-events: none;
}

/* four rivets, just inside the frame corners */
.plate::after {
  --r: radial-gradient(circle, #f4f6fb 0 2.6px, #8e9abb 3px 4px, transparent 4.6px);
  content: "";
  position: absolute;
  inset: 17px;
  background:
    var(--r) top left / 10px 10px no-repeat,
    var(--r) top right / 10px 10px no-repeat,
    var(--r) bottom left / 10px 10px no-repeat,
    var(--r) bottom right / 10px 10px no-repeat;
  pointer-events: none;
}

.plate-gloss {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.plate-gloss::before {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -70%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.2), transparent);
  transform: skewX(-14deg);
  animation: gloss 1.8s 0.35s cubic-bezier(0.25, 0.7, 0.2, 1) both;
}
@keyframes gloss { to { left: 135%; } }

.plate-text {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0;
}

.plate-ar {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.35;
  padding-bottom: 0.2em;
}

.plate-en {
  align-self: stretch;
  padding-top: 0.35em;
  border-top: 3px solid #fff;
  font-size: clamp(1.625rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
}

/* ---------- Hero (home) ---------- */

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem);
  background: var(--wall);
  border-bottom: 1px solid var(--rule);
}

.hero-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.lede {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.55;
}
html[lang="ar"] .lede { line-height: 1.8; }

/* ---------- Page bands ---------- */

.band {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--wall);
  border-bottom: 1px solid var(--rule);
}

.band h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
}

.crumbs {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }

.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }

.section-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
}

/* ---------- Game list ---------- */

.game-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.game {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.game-icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 22%;
  outline: 1px solid rgb(27 35 64 / 0.08);
}

.game-name {
  margin: 0;
  font-size: 1.5rem;
}
.game-name a { color: inherit; text-decoration: none; }
.game-name a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.game-blurb {
  margin: 0.3rem 0 0.7rem;
  color: var(--muted);
}

.facts-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin: 0;
  font-size: 0.875rem;
}
.facts-inline div { display: flex; gap: 0.4rem; }
.facts-inline dt { color: var(--muted); }
.facts-inline dd { margin: 0; font-weight: 500; }

.game-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------- Game page ---------- */

.game-hero {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.25rem, 4vw, 2.5rem);
}
.game-hero .game-icon { width: 8rem; height: 8rem; }
.game-hero h1 { margin-top: 0.25rem; }

.facts {
  margin: 0;
  max-width: 48rem;
  border-top: 1px solid var(--rule);
}
.facts div {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); }

.note {
  max-width: 40rem;
  margin: 0;
}

/* ---------- Privacy policy documents ---------- */

.doc-grid {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  grid-template-areas:
    "toc head"
    "toc body";
  column-gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 8vw, 5.5rem);
}
.doc-head { grid-area: head; max-width: 42rem; }
.doc-head .crumbs { margin-bottom: 0.75rem; }
.doc-body { grid-area: body; }

.toc {
  grid-area: toc;
  position: sticky;
  top: 1.5rem;
  align-self: start;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  font-size: 0.875rem;
}
.toc summary {
  font-weight: 600;
  cursor: pointer;
}
.toc-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc a {
  display: flex;
  gap: 0.6rem;
  padding-block: 0.3rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.45;
}
.toc a:hover { color: var(--ink); }
.toc .num { min-width: 1.25rem; color: var(--brass); font-weight: 600; }

.doc-body { max-width: 42rem; }

.doc-head h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

.doc-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.doc-body p,
.doc-body li { font-size: 1.0625rem; line-height: 1.75; }
html[lang="ar"] .doc-body p,
html[lang="ar"] .doc-body li { line-height: 1.95; }

.doc-body ul { padding-inline-start: 1.25rem; }
.doc-body li + li { margin-top: 0.45rem; }
.doc-body li::marker { color: var(--brass); }

.doc-body section { scroll-margin-top: 1.5rem; }

.doc-body h2 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 2.75rem 0 0.75rem;
  font-size: 1.375rem;
}
.doc-body h2 .num {
  flex-shrink: 0;
  min-width: 1.75rem;
  color: var(--brass);
  font-weight: 600;
}

.glance {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem 1rem;
  border-radius: 14px;
  background: var(--enamel-soft);
}
.glance h2 {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
}
.glance ul { margin-top: 0.5rem; }

.ui-path { font-weight: 500; }

/* Keep a bracketed Latin name such as "(Google AdMob)" on one line in Arabic headings. */
.toc bdi,
.doc-body h2 bdi { white-space: nowrap; }

/* ---------- Contact ---------- */

.address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: 2rem;
}

.plate-small {
  padding: 1.1rem 1.75rem;
  border-radius: 14px;
}
.plate-small::before { inset: 6px; border-width: 2.5px; border-radius: 9px; }
.plate-small::after { display: none; }

.plate-small a {
  color: #fff;
  font-size: clamp(1.0625rem, 4.2vw, 1.625rem);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.plate-small a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.address .actions { margin-top: 0; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.checklist {
  margin: 0;
  padding-inline-start: 1.25rem;
}
.checklist li + li { margin-top: 0.4rem; }
.checklist li::marker { color: var(--brass); }

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--enamel);
  border-bottom: 2px solid var(--enamel);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(15%) rotate(225deg); }
.faq details p { margin: 0 0 1.25rem; max-width: 60ch; color: var(--muted); }

.policy-links { margin: 0; padding: 0; list-style: none; }
.policy-links li + li { margin-top: 0.4rem; }

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

.site-footer {
  margin-top: auto;
  background: var(--wall);
  border-top: 1px solid var(--rule);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-block: 3rem 2.25rem;
}

.footer-about p {
  margin: 0.9rem 0 0.35rem;
  max-width: 28ch;
  color: var(--muted);
  font-size: 0.9375rem;
}
.footer-about a { font-size: 0.9375rem; }

.site-footer h2 {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 0.4rem; }
.site-footer nav a {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-footer nav a:hover { color: var(--ink); text-decoration: underline; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
}
.footer-base p { margin: 0; }

/* ---------- Not found ---------- */

.not-found {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}
.not-found h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin: 0 0 0.75rem; }
.not-found ul { padding-inline-start: 1.25rem; }

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

@media (max-width: 59.99rem) {
  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "toc" "body";
    row-gap: 1.5rem;
  }
  .toc {
    position: static;
    max-height: none;
    padding: 0.75rem 1rem;
    border: 1px solid var(--rule);
    border-radius: 12px;
  }
  .toc ol { margin-top: 0.5rem; }
  .toc-title { display: none; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}

@media (min-width: 60rem) {
  .toc summary { display: none; }
}

@media (max-width: 47.99rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .hero-grid .actions { justify-content: center; }
  .game { grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem 1.1rem; align-items: start; }
  .game-icon { width: 4rem; height: 4rem; }
  .game-links {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.25rem;
  }
  .game-hero { grid-template-columns: minmax(0, 1fr); }
  .game-hero .game-icon { width: 5.5rem; height: 5.5rem; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .not-found { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 23.5rem) {
  .mini-plate { font-size: 0.8125rem; padding: 0.35rem 0.6rem; }
  .site-nav ul { gap: 0.75rem; }
  .site-nav a { font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
  .plate-gloss::before { animation: none; display: none; }
  .faq summary::after { transition: none; }
}

@media print {
  .site-header, .site-footer, .toc, .skip-link { display: none; }
  .doc-grid { grid-template-columns: 1fr; grid-template-areas: "head" "body"; padding: 0; }
  a { color: inherit; }
}
