/* =========================================================
   فناجيل — Doodle / Scrapbook design system
   ========================================================= */

@font-face{
  font-family: 'Boutros News H1';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/BoutrosNewsH1-Bold.ttf') format('truetype');
}
@font-face{
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/tajawal-400.woff2') format('woff2');
}
@font-face{
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/tajawal-500.woff2') format('woff2');
}
@font-face{
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/tajawal-700.woff2') format('woff2');
}
@font-face{
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/tajawal-800.woff2') format('woff2');
}
@font-face{
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../assets/fonts/tajawal-900.woff2') format('woff2');
}

:root{
  --bg: #f0ead9;
  --bg-dot: #d9cfb3;
  --surface: #fbf7ec;
  --surface-2: #ffffff;
  --ink: #17140f;
  --ink-soft: #4a4436;
  --orange: #ee6c4d;
  --orange-ink: #17140f;
  --yellow: #f4c95d;
  --blue: #7fc4e0;
  --pink: #f0a3c1;
  --green: #6fbf9b;
  --brown: #a9673f;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);
  --radius: 22px;
  --radius-sm: 14px;
  --border: 3px solid var(--ink);
  --border-thick: 4px solid var(--ink);
  --font-display: 'Boutros News H1', 'Tajawal', sans-serif;
  --font-body: 'Tajawal', sans-serif;
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  min-width: 320px;
  background-color: var(--bg);
  background-image:
    radial-gradient(var(--bg-dot) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}

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

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

.wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

::selection{ background: var(--orange); color: #fff; }

/* ---------- Buttons ---------- */
.btn{
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  padding: 12px 30px;
  background: var(--orange);
  color: var(--orange-ink);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active{ transform: translate(1px,1px); box-shadow: 2px 2px 0 var(--ink); }
.btn.btn-outline{ background: var(--surface); color: var(--ink); }
.btn.btn-block{ width: 100%; justify-content: center; }

/* ---------- Navbar ---------- */
.navbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: var(--border-thick);
}
.navbar .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
}
.logo{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.8rem;
}
.logo-mark{
  width: 42px; height: 42px;
  background: var(--orange);
  border: var(--border);
  border-radius: 12px 12px 12px 4px;
  display: flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow-sm);
  transform: rotate(-6deg);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--orange-ink);
  overflow: hidden;
}
.logo-mark img{ width: 100%; height: 100%; object-fit: cover; }

/* decorative logo stickers, replace star doodles */
.sticker{
  position: absolute;
  width: 74px;
  filter: drop-shadow(3px 3px 0 var(--ink));
}
.sticker img{ width: 100%; display:block; }
.sticker.sm{ width: 46px; }
.sticker.lg{ width: 110px; }

.nav-links{
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0; padding: 0;
  background: var(--surface);
  border: var(--border);
  border-radius: 999px;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}
.nav-links a{
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .96rem;
  transition: background .2s ease, color .2s ease;
}
.nav-links a:hover{ background: var(--yellow); }
.nav-links a.active{ background: var(--ink); color: var(--bg); }

.nav-right{ display:flex; align-items:center; gap: 14px; }

.nav-toggle{
  -webkit-appearance: none;
  appearance: none;
  display: none;
  width: 46px; height: 46px;
  border: var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:''; display:block; width: 20px; height: 3px; background: var(--ink); border-radius: 2px;
  position: relative;
}
.nav-toggle span::before{ position:absolute; top:-7px; }
.nav-toggle span::after{ position:absolute; top:7px; }

/* ---------- Doodle bits ---------- */
.doodle{ position:absolute; pointer-events:none; }
.doodle-x{ stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.doodle-circle{ stroke: var(--blue); stroke-width: 4; fill:none; }
.doodle-scribble{ stroke: var(--orange); stroke-width: 4; fill:none; stroke-linecap: round; }

.tape{
  position:absolute;
  background: repeating-linear-gradient(45deg, var(--yellow), var(--yellow) 8px, #00000018 8px, #00000018 16px);
  border: 2px solid var(--ink);
  opacity: .9;
}

/* ---------- Badge / label chips ---------- */
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .04em;
  padding: 8px 18px;
  border-radius: 999px;
  border: var(--border);
  box-shadow: var(--shadow-sm);
}
.chip.chip-orange{ background: var(--orange); color: var(--orange-ink); }

/* ---------- Section basics ---------- */
section{ padding: 90px 0; position: relative; }
.section-head{ max-width: 640px; margin-bottom: 50px; }
.section-head .chip{ margin-bottom: 18px; }
.section-head h2{ font-size: clamp(2.2rem, 4vw, 3.2rem); }
.section-head p{ color: var(--ink-soft); font-size: 1.05rem; margin-top: 14px; }

/* ================= HERO ================= */
.hero{ padding-top: 60px; padding-bottom: 40px; }
.hero-card{
  position: relative;
  background: var(--surface);
  border: var(--border-thick);
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  padding: 56px 56px 44px;
  overflow: hidden;
}
.hero-card::before{
  content:'';
  position:absolute; inset:0;
  background-image:
    linear-gradient(var(--bg-dot) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-dot) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .5;
  pointer-events: none;
}
.hero-top{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.hero-title{
  position: relative;
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  letter-spacing: .01em;
}
.hero-title .line2{
  display: block;
  position: relative;
  color: var(--ink);
  text-shadow:
    3px 0 0 var(--surface), -3px 0 0 var(--surface),
    0 3px 0 var(--surface), 0 -3px 0 var(--surface),
    2px 2px 0 var(--surface), -2px -2px 0 var(--surface),
    2px -2px 0 var(--surface), -2px 2px 0 var(--surface);
}
.hero-title .accent{
  position: relative;
  display: inline-block;
  background: var(--orange);
  color: var(--orange-ink);
  padding: 0 14px;
  border-radius: 10px;
  transform: rotate(-2deg);
}

.hero-lede{
  position: relative;
  max-width: 480px;
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.ribbon{
  position: relative;
  margin: 40px -140px 0;
  background: var(--orange);
  color: var(--orange-ink);
  border-top: var(--border-thick);
  border-bottom: var(--border-thick);
  padding: 14px 0;
  transform: rotate(-2deg);
  overflow: hidden;
  white-space: nowrap;
}
.ribbon-track{
  display: inline-flex;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  animation: marquee 34s linear infinite;
}
.ribbon-track span{ display:inline-block; white-space:nowrap; }
@keyframes marquee{
  from{ transform: translateX(0); }
  to{ transform: translateX(50%); }
}

.hero-foot{
  position: relative;
  display:flex;
  align-items:flex-end;
  justify-content: flex-start;
  gap: 24px;
  margin-top: 34px;
  flex-wrap: wrap;
}
.hero-vol{ text-align: right; }
.hero-vol .num{ font-family: var(--font-display); font-size: 1.1rem; }
.hero-vol p{ margin: 4px 0 0; color: var(--ink-soft); font-size: .92rem; }

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

/* ================= featured strip ================= */
.strip{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card{
  background: var(--surface);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
}
.card:hover{ transform: translate(-4px,-4px); box-shadow: var(--shadow-lg); }
.card .icon-box{
  width: 58px; height: 58px;
  border: var(--border);
  border-radius: 16px 16px 16px 4px;
  display:flex; align-items:center; justify-content:center;
  font-size: 1.6rem;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card h3{ font-size: 1.5rem; margin-bottom: 8px; }
.card p{ color: var(--ink-soft); font-size: .95rem; line-height: 1.7; margin:0; }
.card .chip{ position:absolute; top:-14px; left: 22px; }

.bg-orange{ background: var(--orange); }
.bg-yellow{ background: var(--yellow); }
.bg-blue{ background: var(--blue); }
.bg-pink{ background: var(--pink); }
.bg-green{ background: var(--green); }
.bg-brown{ background: var(--brown); }
.bg-zawwad{ background: #6d8a55; }

/* ================= Values / manifesto list ================= */
.manifesto{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.manifesto li{
  list-style: none;
  display:flex;
  gap: 16px;
  align-items:flex-start;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.manifesto .num{
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--bg);
  background: var(--ink);
  width: 42px; height: 42px;
  min-width:42px;
  border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
}
.manifesto h4{ font-size: 1.15rem; margin-bottom: 6px; }
.manifesto p{ margin:0; color: var(--ink-soft); font-size: .92rem; line-height: 1.7; }

/* ================= CTA band ================= */
.cta-band{
  background: var(--ink);
  color: var(--bg);
  border-radius: 32px;
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  padding: 60px;
  text-align:center;
  position: relative;
  overflow: hidden;
}
.cta-band h2{ font-size: clamp(2rem,4vw,3rem); margin-bottom: 16px; }
.cta-band p{ color: #d8d0ba; max-width: 520px; margin: 0 auto 28px; }

/* ================= GAMES PAGE ================= */
.page-header{
  padding: 60px 0 20px;
  text-align: center;
}
.page-header .chip{ margin: 0 auto 20px; }
.page-header h1{ font-size: clamp(2.6rem, 6vw, 4.4rem); }
.page-header p{ color: var(--ink-soft); max-width: 560px; margin: 16px auto 0; font-size: 1.05rem; }

.filters{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content:center;
  margin: 36px 0 10px;
}
.filter-btn{
  -webkit-appearance: none;
  appearance: none;
  border: var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  border-radius: 999px;
  padding: 9px 22px;
  font-weight: 800;
  font-size: .9rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.filter-btn.is-active{ background: var(--yellow); }

.games-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}
.game-card{
  display: block;
  background: var(--surface);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.game-card:hover{ transform: translate(-5px,-5px); box-shadow: var(--shadow-lg); }
.game-card .thumb{
  height: 190px;
  border-bottom: var(--border-thick);
  display:flex; align-items:center; justify-content:center;
  font-size: 3.2rem;
  position: relative;
}
.game-card .thumb.thumb-sm{
  height: 90px;
}
.game-card .status{
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-display);
  font-size: .8rem;
  background: var(--ink);
  color: var(--bg);
  padding: 5px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}
.game-card .body{ padding: 22px 24px 26px; }
.game-card h3{ font-size: 1.4rem; margin-bottom: 8px; }
.game-card p{ color: var(--ink-soft); font-size: .92rem; line-height: 1.7; margin: 0 0 14px; }
.card-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-row{ display:flex; gap:8px; flex-wrap:wrap; }
.tag{
  font-size: .78rem;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
}
.game-play-link{
  display: inline-flex;
  padding: 6px 16px;
  font-size: .8rem;
}

/* ---------- mystery / coming-soon cards ---------- */
.thumb-mystery{
  background:
    repeating-linear-gradient(-45deg, #d8d2c2, #d8d2c2 10px, #cfc8b6 10px, #cfc8b6 20px);
}
.thumb-mystery .thumb-letter{
  color: var(--ink);
  opacity: .5;
  font-size: 2.6em;
}
.game-card.mystery{ opacity: .82; }
.game-card.mystery .thumb .status{
  background: var(--ink-soft);
  border-color: var(--ink-soft);
}
.game-card.mystery h3{ color: var(--ink-soft); }
.game-card.mystery p{ font-style: italic; }

/* ================= ABOUT PAGE ================= */
.about-hero{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 50px;
  align-items:center;
}
.about-hero h1{ font-size: clamp(2.6rem,5vw,4rem); margin-bottom: 20px; }
.about-hero p{ color: var(--ink-soft); font-size: 1.08rem; line-height: 1.85; margin-bottom: 14px; }
.about-portrait{
  background: var(--yellow);
  border: var(--border-thick);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1/1;
  display:flex; align-items:center; justify-content:center;
  font-size: 6rem;
  position: relative;
  transform: rotate(2deg);
}

.stats-row{
  display:grid;
  grid-template-columns: repeat(4,1fr);
  gap: 20px;
}
.stat-box{
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  text-align:center;
}
.stat-box .n{ font-family: var(--font-display); font-size: 2.4rem; color: var(--orange); }
.stat-box .l{ font-size: .85rem; color: var(--ink-soft); font-weight:700; margin-top:4px; }

.team-grid{
  display:grid;
  grid-template-columns: repeat(4,1fr);
  gap: 24px;
}
.team-grid.team-grid-2{
  grid-template-columns: repeat(2,1fr);
  max-width: 560px;
}
.team-card{
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  text-align:center;
}
.team-card .avatar{
  width: 78px; height:78px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: var(--border);
  display:flex; align-items:center; justify-content:center;
  font-size: 2rem;
}
.team-card h4{ font-size: 1.05rem; margin-bottom: 4px; }
.team-card span{ font-size: .82rem; color: var(--ink-soft); font-weight:700; }

/* ================= CONTACT PAGE ================= */
.contact-layout{
  display:grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 44px;
  align-items:start;
}
.contact-info h1{ font-size: clamp(2.4rem,5vw,3.6rem); margin-bottom: 18px; }
.contact-info p{ color: var(--ink-soft); font-size: 1.05rem; line-height: 1.8; margin-bottom: 30px; }

.info-row{
  display:flex;
  align-items:center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 2px dashed var(--ink);
}
.info-row:last-of-type{ border-bottom:none; }
.info-row .ic{
  width: 46px; height:46px;
  border-radius: 12px;
  border: var(--border);
  display:flex; align-items:center; justify-content:center;
  font-size: 1.2rem;
  flex-shrink:0;
}
.info-row strong{ display:block; font-size:.95rem; }
.info-row span{ color: var(--ink-soft); font-size: .88rem; }

.social-strip{
  display:flex;
  gap: 14px;
  margin-top: 30px;
  background: var(--surface);
  border: var(--border-thick);
  border-radius: 999px;
  padding: 14px 22px;
  box-shadow: var(--shadow);
  width: fit-content;
}
.social-strip a{
  width: 46px; height: 46px;
  border-radius: 50%;
  border: var(--border);
  display:flex; align-items:center; justify-content:center;
  transition: transform .15s ease;
}
.social-strip a:hover{ transform: translateY(-4px) rotate(-6deg); }

.contact-card{
  background: var(--surface);
  border: var(--border-thick);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  position: relative;
}
.contact-card::before{
  content:'';
  position: absolute; inset: 12px;
  border: 2px dashed var(--bg-dot);
  border-radius: 22px;
  pointer-events: none;
}
.contact-card h2{ font-size: 2rem; text-align:center; margin-bottom: 26px; }

.field{ margin-bottom: 18px; }
.field label{ display:block; font-size: .85rem; font-weight: 800; margin-bottom: 8px; }
.field input, .field textarea{
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 18px;
  background: var(--surface-2);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder{ color: var(--ink-soft); opacity:.7; }
.field input:focus, .field textarea:focus{
  outline: none;
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.form-msg{
  margin-top: 16px;
  text-align:center;
  font-weight: 800;
  font-size: .92rem;
  min-height: 1.4em;
  color: var(--green);
}

/* ================= FOOTER ================= */
footer{
  border-top: var(--border-thick);
  background: var(--surface);
  padding: 54px 0 30px;
  margin-top: 60px;
}
.footer-top{
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand p{ color: var(--ink-soft); max-width: 300px; margin-top: 14px; line-height: 1.8; font-size: .92rem; }
.footer-cols{ display:flex; gap: 60px; flex-wrap: wrap; }
.footer-col h4{ font-size: 1rem; margin-bottom: 14px; font-family: var(--font-body); font-weight: 800; }
.footer-col a{ display:block; color: var(--ink-soft); font-size: .92rem; margin-bottom: 10px; font-weight:600; }
.footer-col a:hover{ color: var(--orange); }
.footer-bottom{
  border-top: 2px dashed var(--ink);
  padding-top: 22px;
  display:flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--ink-soft);
}

/* ================= Responsive ================= */
@media (max-width: 980px){
  .strip{ grid-template-columns: 1fr; }
  .manifesto{ grid-template-columns: 1fr; }
  .games-grid{ grid-template-columns: repeat(2,1fr); }
  .about-hero{ grid-template-columns: 1fr; }
  .about-portrait{ max-width: 340px; margin: 0 auto; }
  .stats-row{ grid-template-columns: repeat(2,1fr); }
  .team-grid{ grid-template-columns: repeat(2,1fr); }
  .contact-layout{ grid-template-columns: 1fr; }
}
@media (max-width: 760px){
  .nav-links{ display:none; }
  .nav-toggle{ display:flex; }
  .navbar.is-open .nav-links{
    display:flex;
    position: absolute;
    top: 100%; right: 20px; left: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    margin-top: 10px;
    padding: 10px;
    border-radius: 22px;
  }
  .navbar.is-open .nav-links a{
    padding: 14px 20px;
    border-radius: 14px;
    text-align: center;
  }
  .hero-card{ padding: 34px 22px 30px; }
  .ribbon{ margin: 34px -90px 0; }
  .ribbon-track{ font-size: 1.05rem; }
  .hero-foot{ flex-direction: column; align-items:flex-start; }
  .games-grid{ grid-template-columns: 1fr; }
  .stats-row{ grid-template-columns: repeat(2,1fr); }
  .team-grid{ grid-template-columns: 1fr; }
  .cta-band{ padding: 40px 24px; }
}
