@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Russo+One&display=swap');

:root {
  /* Reference palette — Noguchi gold + treasure refs */
  --bg: #19171b;
  --bg-muted: #252628;
  --bg-card: #2f2921;
  --bg-elevated: #1e1c20;
  --text: #f5f0e6;
  --text-muted: #a89f8a;
  --gold: #d29f22;
  --gold-bright: #f0c040;
  --gold-antique: #9e8123;
  --gold-dark: #563a17;
  --burgundy: #5d0018;
  --border: rgba(210, 159, 34, 0.18);
  --border-strong: rgba(210, 159, 34, 0.42);
  --glow: rgba(210, 159, 34, 0.35);
  --max: 1120px;
  --radius: 16px;
  --radius-sm: 12px;
  --header-h: 72px;
  --transition: 200ms ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Arabic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

html[dir='rtl'] body { text-align: right; }
html[dir='ltr'] body { text-align: left; }

a {
  color: var(--gold-bright);
  transition: color var(--transition);
}
a:hover { color: var(--gold); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 100;
  max-width: calc(var(--max) + 2.5rem);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(25, 23, 27, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Russo One', 'Cairo', sans-serif;
  font-weight: 400;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-antique));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  letter-spacing: 0.06em;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--transition);
}

nav a:hover { color: var(--gold-bright); }
nav a[aria-current="page"] { color: var(--gold); }

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold-bright);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition);
}

.lang-btn:hover {
  background: rgba(210, 159, 34, 0.1);
  border-color: var(--border-strong);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-antique));
  color: #19171b !important;
  text-decoration: none;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  border: 1px solid var(--gold);
  box-shadow: 0 4px 24px var(--glow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px var(--glow);
}

.btn:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.btn-lg { padding: 0.8rem 1.5rem; font-size: 1rem; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--gold-bright) !important;
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(210, 159, 34, 0.08);
  color: var(--gold-bright) !important;
  filter: none;
}

/* ── Hero ── */
.page-offset { padding-top: calc(var(--header-h) + 2.5rem); }

.hero {
  padding: 2rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(210, 159, 34, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(93, 0, 24, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 0%, rgba(86, 58, 23, 0.2) 0%, transparent 45%);
  pointer-events: none;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

html[dir='rtl'] .hero-copy,
html[dir='ltr'] .hero-copy {
  text-align: center;
}

.hero-copy .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
  justify-content: center;
}

.contact-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.contact-label {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.95rem;
  margin-inline-end: 0.15rem;
}

.btn-icon {
  width: 3rem;
  height: 3rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.btn-icon svg {
  display: block;
  flex-shrink: 0;
}

.hero-visual {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(210, 159, 34, 0.08) inset;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(210, 159, 34, 0.06);
}

.hero h1 {
  font-family: 'Russo One', 'Cairo', sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3rem);
  line-height: 1.12;
  margin: 1rem 0;
  color: var(--gold-bright);
  text-shadow: 0 2px 24px rgba(210, 159, 34, 0.25);
}

.lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 42rem;
  margin: 0;
}

.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(25, 23, 27, 0.5) 0%, transparent 40%);
  pointer-events: none;
}

/* ── Bento games ── */
.section {
  padding: 3rem 0;
  position: relative;
}

.section-muted {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: 'Russo One', 'Cairo', sans-serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
  color: var(--gold-bright);
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 36rem;
}

.bento {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
  }
  .bento-featured {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.bento-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.bento-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
  color: inherit;
}

.bento-card:focus-visible {
  border-color: var(--gold);
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

.bento-card h3,
.bento-card p {
  color: inherit;
}

.bento-card h3 {
  color: var(--gold-bright);
}

.bento-card p {
  color: var(--text-muted);
}

.bento-card:focus-within {
  border-color: var(--gold);
  outline: none;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.bento-card:hover::before { opacity: 1; }

.bento-featured {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
}

.bento-featured .bento-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.7;
}

.bento-featured .bento-content {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(25, 23, 27, 0.95) 0%, rgba(25, 23, 27, 0.4) 70%, transparent 100%);
}

.bento-visual {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
}

.bento-visual .bento-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.72;
}

.bento-visual .bento-content {
  position: relative;
  z-index: 1;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(25, 23, 27, 0.97) 0%, rgba(25, 23, 27, 0.55) 55%, transparent 100%);
}

@media (min-width: 900px) {
  .bento-visual {
    grid-column: span 2;
  }
}

.bento-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: rgba(210, 159, 34, 0.12);
  border: 1px solid var(--border);
  color: var(--gold-bright);
  margin-bottom: 0.75rem;
}

.bento-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.bento-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  color: var(--gold-bright);
  font-weight: 700;
}

.bento-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.bento-tag {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}

/* ── Steps ── */
.steps {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.steps article {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  transition: border-color var(--transition);
}

.steps article:hover {
  border-color: var(--border-strong);
}

.step-num {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-dark));
  color: #19171b;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #fff;
  font-weight: 700;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ── Treasure banner ── */
.treasure-banner {
  display: grid;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-muted) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
  overflow: hidden;
  position: relative;
}

@media (min-width: 768px) {
  .treasure-banner { grid-template-columns: 1fr 1fr; }
}

.treasure-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(210, 159, 34, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.treasure-banner img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  object-fit: cover;
  object-position: center top;
}

.treasure-banner h2 {
  font-family: 'Russo One', 'Cairo', sans-serif;
  font-weight: 400;
  color: var(--gold-bright);
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.treasure-banner p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

/* ── Disclaimer ── */
.disclaimer {
  background: rgba(93, 0, 24, 0.15);
  border: 1px solid rgba(93, 0, 24, 0.35);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
}

.disclaimer h2 {
  font-family: 'Russo One', 'Cairo', sans-serif;
  font-weight: 400;
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 1.15rem;
}

.disclaimer p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.disclaimer strong { color: var(--gold-bright); }

/* ── Sticky CTA ── */
.sticky-cta {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: none;
}

@media (max-width: 767px) {
  .sticky-cta.is-visible { display: block; }
}

.sticky-cta .btn {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 4px 24px var(--glow);
}

/* ── Legal pages ── */
.legal { padding: 2.5rem 0 3rem; }

.legal h1 {
  margin-top: 0;
  font-family: 'Russo One', 'Cairo', sans-serif;
  font-weight: 400;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-antique));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.15rem;
  color: var(--gold);
}

.legal .updated { color: var(--text-muted); }

html[dir='rtl'] .legal ul {
  padding-right: 1.25rem;
  padding-left: 0;
}

html[dir='ltr'] .legal ul {
  padding-left: 1.25rem;
  padding-right: 0;
}

.legal ul { margin: 0.5rem 0 1rem; }
.legal li { margin-bottom: 0.35rem; }
.legal strong { color: var(--gold-bright); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: #121014;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.site-footer p { margin: 0; }
.site-footer a { color: var(--gold); }

/* ── Mobile nav ── */
@media (max-width: 640px) {
  .site-header { top: 0.5rem; left: 0.5rem; right: 0.5rem; }
  .site-header .wrap { padding: 0 1rem; min-height: 60px; }
  nav a:not([class]) { display: none; }
  .logo span { font-size: 1.1rem; }
}
