/* =====================================================================
   Harf & Esem — Pitch Landing Page  ·  APPLE-STYLE EDITION
   stylebook-apple.css
   Clean white canvas, oversized tight type, centered compositions,
   bento tiles, slim translucent nav. RTL-aware. Sand Dunes Studio.
   ===================================================================== */

:root {
  --ink:    #1d1d1f;   /* near-black text          */
  --sub:    #6e6e73;   /* secondary text           */
  --bg:     #ffffff;
  --bg2:    #f5f5f7;   /* Apple light gray         */
  --line:   #d2d2d7;
  --blue:   #0071e3;   /* Apple action blue        */
  --blue-d: #0058b9;
  --dark:   #101012;   /* dark full-bleed sections */
  --accent: #bf8b2e;   /* warm gold for the brand  */

  --maxw:   1024px;
  --maxw-wide: 1280px;
  --radius: 22px;
  --ease:   cubic-bezier(.28,.11,.32,1);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display",
          "Helvetica Neue", "Segoe UI", "Cairo", sans-serif;

  /* Lock the UI to light on every device — never follow the OS dark mode.
     Stops the browser from auto-darkening form fields, scrollbars and
     controls on phones set to dark mode. */
  color-scheme: light;
}
html, body { color-scheme: light; background: var(--bg); }
input, select, textarea, button { color-scheme: light; }
html[lang="ar"] { --font: "Cairo", -apple-system, "Segoe UI", sans-serif; }

* , *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  font-size: 17px;
  letter-spacing: -.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ---------- Typography scale (Apple-ish) ---------- */
h1, h2, h3 { font-weight: 600; line-height: 1.06; letter-spacing: -.022em; color: var(--ink); }
.t-hero    { font-size: clamp(40px, 7.5vw, 88px); font-weight: 700; }
.t-display { font-size: clamp(32px, 5.5vw, 56px); font-weight: 600; }
.t-section { font-size: clamp(28px, 4.6vw, 48px); font-weight: 600; }
.t-card    { font-size: clamp(22px, 3vw, 32px); font-weight: 600; }

.sub  { color: var(--sub); }
.lead { font-size: clamp(19px, 2.4vw, 28px); font-weight: 400; line-height: 1.3; color: var(--ink); }
.eyebrow { font-size: clamp(16px, 2vw, 21px); font-weight: 600; color: #92681c; letter-spacing: 0; }

/* ---------- Link chevrons ---------- */
.link { color: var(--blue); font-size: clamp(17px, 2vw, 21px); display: inline-flex; align-items: center; gap: 2px; }
.link::after { content: "›"; font-size: 1.25em; line-height: 0; transform: translateY(.04em); }
.link:hover { text-decoration: underline; }
html[dir="rtl"] .link::after { content: "‹"; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-size: 17px; font-weight: 400;
  padding: 11px 22px; border-radius: 980px; border: none; cursor: pointer;
  transition: background .2s var(--ease);
}
.btn:hover { background: var(--blue-d); }
.btn--light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn--light:hover { background: var(--bg2); }
.btn--onDark { background: #fff; color: var(--ink); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.wrap-wide { max-width: var(--maxw-wide); margin-inline: auto; padding-inline: 22px; }
.sec { padding-block: clamp(70px, 10vw, 130px); }
.sec--gray { background: var(--bg2); }
.sec--dark { background: var(--dark); color: #f5f5f7; }
.sec--tight { padding-block: clamp(40px, 6vw, 70px); }
.center { text-align: center; }
.stack > * + * { margin-top: 18px; }
.sec-head { text-align: center; max-width: 760px; margin-inline: auto; }
.sec-head .lead { margin-top: 14px; color: var(--sub); }
.cta-row { display: flex; gap: 26px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Language visibility ---------- */
[data-ar] { display: none; }
html[lang="ar"] [data-en] { display: none; }
html[lang="ar"] [data-ar] { display: revert; }

/* ---------- Nav ---------- */
.nav-bar {
  position: sticky; top: 0; z-index: 100; height: 48px;
  background: rgba(255,255,255,.72); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 48px; gap: 16px; }
.nav .brand img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav-links a { color: var(--ink); font-size: 12px; font-weight: 400; opacity: .85; transition: opacity .2s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
/* Special "Concept" nav button — red rounded rectangle, white text */
.nav-links a.nav-cta { background: #e0322c; color: #fff; opacity: 1; font-weight: 600; padding: 6px 16px; border-radius: 10px; }
.nav-links a.nav-cta:hover, .nav-links a.nav-cta.active { background: #c41f1a; color: #fff; opacity: 1; }

.nav-tools { display: flex; align-items: center; gap: 14px; }
.lang-toggle { background: none; border: 1px solid var(--line); border-radius: 980px; padding: 8px 14px; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; font-family: inherit; }
.lang-toggle:hover { background: var(--bg2); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { display: block; width: 20px; height: 1.5px; background: var(--ink); margin: 4px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: clamp(54px, 8vw, 92px); background: var(--bg); position: relative; overflow: hidden; }
.hero .eyebrow { display: block; margin-bottom: 10px; }
.hero .t-hero { max-width: 16ch; margin-inline: auto; }
.hero .lead { max-width: 30ch; margin: 18px auto 0; color: var(--ink); }
.hero-cta { margin-top: 22px; }
.hero-media { margin-top: clamp(30px, 5vw, 60px); position: relative; }
.hero-media video { width: 100%; max-width: 1100px; margin-inline: auto; border-radius: var(--radius); display: block; }
.hero-cast { width: auto; max-width: min(900px, 100%); margin: -6% auto 0; position: relative; z-index: 2; }

/* ---------- Concept (text-led, Apple style) ---------- */
.statement { max-width: 900px; margin-inline: auto; text-align: center; }
.statement .big { font-size: clamp(26px, 4vw, 44px); font-weight: 600; line-height: 1.18; letter-spacing: -.02em; }
.statement .big .muted { color: var(--sub); }

/* ---------- Stat row ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1000px; margin: 50px auto 0; text-align: center; }
.stat-row .num { font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -.03em; }
.stat-row .lbl { color: var(--sub); font-size: 15px; margin-top: 6px; }
.stat-card { border-radius: var(--radius); padding: 30px 20px 26px; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.stat-card .lbl { color: #555; }
.stat-note { text-align: center; color: var(--sub); font-size: 14px; margin-top: 30px; }
.why-title-img { display: block; width: 88%; max-width: 450px; height: auto; margin: 0 auto 16px; }
.why-earth-img { display: block; width: 52%; max-width: 261px; height: auto; margin: 18px auto 4px; }

/* ---------- Bento tiles ---------- */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 44px; }
.tile {
  background: #fff; border-radius: var(--radius); overflow: hidden; position: relative;
  min-height: 460px; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 44px 30px 0; box-shadow: 0 4px 20px rgba(0,0,0,.05);
}
.sec--gray .tile { background: #fff; }
.tile .eyebrow { color: var(--accent); font-size: 15px; }
.tile h3 { margin-top: 4px; }
.tile p { color: var(--sub); margin-top: 10px; max-width: 34ch; }
.tile .tile-art { margin-top: auto; padding-top: 26px; }
.tile .tile-art img { max-height: 240px; width: auto; transition: transform .5s var(--ease); }
.tile:hover .tile-art img { transform: scale(1.05) translateY(-6px); }
.tile-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.tile-tags span { font-size: 12px; color: var(--sub); background: var(--bg2); border-radius: 980px; padding: 4px 11px; }
.tile.span2 { grid-column: span 2; flex-direction: row; text-align: start; min-height: 360px; padding: 40px; gap: 30px; align-items: center; }
.tile.span2 .tile-copy { flex: 1; }
.tile.span2 .tile-art { margin: 0; padding: 0; flex: 0 0 42%; }
.tile.span2 .tile-art img { max-height: 300px; margin-inline: auto; }

/* supporting smaller tiles */
.bento-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.tile-sm { background: #fff; border-radius: var(--radius); padding: 30px 24px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.tile-sm img { max-height: 150px; width: auto; margin: 0 auto 14px; }
.tile-sm h4 { font-size: 20px; font-weight: 600; }
.tile-sm p { color: var(--sub); font-size: 14px; margin-top: 6px; }

/* ---------- Film (dark full-bleed) ---------- */
/* ---------- Concept page: prose, pull-quote, bars ---------- */
.prose { max-width: 760px; margin: 30px auto 0; }
.prose p { font-size: 18px; line-height: 1.75; color: var(--sub); }
.prose p + p { margin-top: 16px; }
.prose .accent { color: var(--ink); font-weight: 600; }
.pull { max-width: 860px; margin-inline: auto; text-align: center; font-size: clamp(22px, 3.2vw, 36px); font-weight: 600; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.pull .muted { color: var(--sub); }

.duo-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 720px; margin: 40px auto 0; }
.duo-stats .stat-box { background: var(--bg2); border-radius: var(--radius); padding: 34px 24px; text-align: center; }
.sec--gray .duo-stats .stat-box { background: #fff; }
.duo-stats .num { font-size: clamp(38px, 6vw, 64px); font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.duo-stats .lbl { color: var(--sub); font-size: 15px; margin-top: 8px; }

.bars { max-width: 760px; margin: 44px auto 0; display: grid; gap: 18px; }
.barrow .blabel { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 7px; }
.barrow .blabel b { font-weight: 600; color: var(--ink); }
.barrow .blabel span { color: var(--sub); }
.bartrack { background: #e8e8ed; border-radius: 980px; height: 16px; overflow: hidden; }
.barfill { height: 100%; border-radius: 980px; width: 0; background: var(--c, linear-gradient(90deg, #2a9d8f, #0071e3)); transition: width 1.3s var(--ease); }
.reveal.in .barfill, .barrow.reveal.in .barfill { width: var(--w, 100%); }

.page-hero { text-align: center; padding-top: clamp(40px, 6vw, 72px); }
.page-hero .lead { margin-top: 18px; }
/* Arabic headings need looser line-height so tall glyphs/marks don't overlap the text below */
html[lang="ar"] .t-hero { line-height: 1.3; padding-bottom: .12em; }
html[lang="ar"] .t-display, html[lang="ar"] .t-section, html[lang="ar"] .t-card { line-height: 1.3; }
html[lang="ar"] .page-hero .lead { margin-top: 24px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--sub); margin-bottom: 14px; }
.back-link:hover { color: var(--ink); }

/* ---------- Brand-color accents + character art (concept page) ---------- */
.brand-teal  { color: #2a9d8f; }
.brand-coral { color: #e76f51; }
.brand-gold  { color: #92681c; }
.brand-sky   { color: #4895c9; }
.brand-plum  { color: #6c5ce7; }

/* soft tinted sections */
.hero-tint { background: radial-gradient(1100px 460px at 50% -8%, rgba(233,196,106,.22), transparent 62%), #fff; }
.sec--tint { background: linear-gradient(135deg, rgba(42,157,143,.07), rgba(233,196,106,.12)); }

/* character cutout with a colored blob behind it */
.media-blob { position: relative; display: flex; justify-content: center; align-items: flex-end; }
.media-blob::before {
  content: ""; position: absolute; width: 76%; padding-bottom: 76%; top: 4%; left: 12%;
  background: var(--blob, #e9c46a); opacity: .16; z-index: 0;
  border-radius: 46% 54% 58% 42% / 52% 46% 54% 48%;
}
.media-blob img { position: relative; z-index: 1; max-height: 380px; width: auto; filter: drop-shadow(0 18px 26px rgba(0,0,0,.16)); }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.media-blob.floaty img { animation: floaty 6s ease-in-out infinite; }

.concept-cast { max-width: 760px; margin: clamp(26px,4vw,46px) auto 0; }

/* two-column text + image */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 66px); align-items: center; max-width: var(--maxw-wide); margin-inline: auto; }
.split-copy .eyebrow { display: block; margin-bottom: 8px; }
.split-copy h2 { margin-bottom: 14px; }
.split-copy .prose { margin: 0; max-width: none; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split .media-blob { order: -1; }
  .media-blob img { max-height: 300px; }
}

/* ---------- Meet the Kids carousel ---------- */
.mk-carousel { max-width: 1248px; margin: 44px auto 0; outline: none; direction: ltr; }
.mk-viewport { position: relative; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 12px 44px rgba(0,0,0,.10); border: 1px solid #ececf0; }
.mk-slide { display: none; position: relative; aspect-ratio: 1150 / 381; }
.mk-slide.active { display: block; animation: mkfade .55s var(--ease); }
@keyframes mkfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.mk-visual { position: absolute; inset: 0; z-index: 1; }
.mk-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-bg { z-index: 0; }
.mk-char { z-index: 2; }
/* Arabic mirrors ONLY the character art (in place) — handled by swapping to a
   pre-mirrored *-rtl.png in jsbook so it stays aligned on the colored panel. */

.mk-text { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-inline-start: 7%; padding-inline-end: 49%; }
.mk-eyebrow { color: var(--accent); font-weight: 600; font-size: clamp(12px, 1.5vw, 16px); letter-spacing: 0; }
.mk-name { font-size: clamp(30px, 5.4vw, 58px); font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.mk-desc { color: var(--sub); font-size: clamp(13px, 1.55vw, 17px); line-height: 1.45; max-width: 36ch; }
.mk-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.mk-tags span { font-size: clamp(10px, 1.1vw, 13px); color: var(--sub); background: #f0f0f2; border-radius: 980px; padding: 4px 12px; }

.mk-nav { display: flex; gap: 12px; margin-top: 24px; padding-inline-start: 4px; }
.mk-nav button {
  width: clamp(40px, 3.6vw, 50px); height: clamp(40px, 3.6vw, 50px); border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 22px; line-height: 1; display: grid; place-items: center;
  transition: transform .2s var(--ease), background .2s; box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.mk-nav button:hover { transform: translateY(-2px); background: #0071e3; }

.mk-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.mk-dot { box-sizing: content-box; width: 9px; height: 9px; border-radius: 980px; border: none; background: #d2d2d7; cursor: pointer; padding: 8px; background-clip: content-box; transition: .25s var(--ease); }
.mk-dot:hover { background: #b9b9c0; }
.mk-dot.active { background: var(--accent); width: 24px; }

@media (max-width: 720px) {
  .mk-slide { aspect-ratio: auto; }
  .mk-slide.active { display: flex; flex-direction: column; }
  .mk-visual { position: relative; height: 230px; }
  .mk-visual img { object-fit: cover; object-position: 74% center; }
  .mk-text { position: relative; inset: auto; padding: 22px 24px; max-width: none; gap: 9px; }
  .mk-desc { max-width: none; }
  .mk-nav { margin-top: 18px; justify-content: center; }
  .mk-carousel { margin-top: 32px; }
}

/* ---------- Product / game showcase ---------- */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; align-items: center; }
.showcase--4 { grid-template-columns: repeat(4, 1fr); }
.shot { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.shot img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .6s var(--ease); }
.shot:hover img { transform: scale(1.04); }
.shot figcaption { font-size: 13px; color: var(--sub); padding: 11px 14px; text-align: center; }
.shot--video { box-shadow: none; background: transparent; }
.shot iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,.06); }

/* Cubes Game row: photo + video share the same 16:9 height */
.showcase--video { align-items: stretch; }
.showcase--video .shot img,
.showcase--video .yt-facade,
.showcase--video .shot iframe { aspect-ratio: 16 / 9; }

/* YouTube click-to-play facade */
.yt-facade { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; overflow: hidden; border-radius: var(--radius); background: #000; box-shadow: 0 4px 20px rgba(0,0,0,.10); }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 50px; background: #e62117; border-radius: 14px; transition: transform .2s var(--ease), background .2s; }
.yt-play::after { content: ""; position: absolute; top: 50%; left: 52%; transform: translate(-50%, -50%); border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; }
.yt-facade:hover .yt-play { background: #ff0000; transform: translate(-50%, -50%) scale(1.07); }

/* Standalone music-video player in the "Sing along" section */
.songs-video { max-width: 760px; margin: 10px auto 6px; }
.songs-video .yt-facade { aspect-ratio: 16 / 9; }
@media (max-width: 900px) { .showcase, .showcase--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .showcase, .showcase--4 { grid-template-columns: 1fr; } }

.film-hero { text-align: center; }
.film-hero .eyebrow { color: var(--accent); }
.film-hero .t-display { color: #f5f5f7; margin-top: 8px; }
.film-hero .lead { color: #a1a1a6; max-width: 30ch; margin: 16px auto 0; }
.film-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.film-chips span { border: 1px solid rgba(255,255,255,.25); border-radius: 980px; padding: 6px 15px; font-size: 13px; color: #d6d6da; }
.film-still { margin: 48px auto 0; max-width: 980px; border-radius: var(--radius); overflow: hidden; }
.film-synopsis { max-width: 720px; margin: 44px auto 0; }
.film-synopsis p { color: #c7c7cc; font-size: 19px; line-height: 1.5; }
.film-synopsis p + p { margin-top: 16px; }
.film-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 44px; }
.film-gallery figure { border-radius: 16px; overflow: hidden; background: #1b1b1e; }
.film-gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.film-gallery figure:hover img { transform: scale(1.06); }
.film-gallery figcaption { font-size: 12px; color: #8e8e93; padding: 8px 10px; }

/* ---------- Letters ---------- */
.letters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; margin: 40px auto 0; }
.letter-chip {
  width: 60px; height: 60px; border-radius: 16px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-family: var(--font); font-size: 26px; font-weight: 600;
  display: grid; place-items: center; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
/* each letter lights up in a different brand colour (6-colour cycle) */
.letter-chip:nth-child(6n+1) { --hc: #2a9d8f; }
.letter-chip:nth-child(6n+2) { --hc: #e76f51; }
.letter-chip:nth-child(6n+3) { --hc: #4895c9; }
.letter-chip:nth-child(6n+4) { --hc: #6c5ce7; }
.letter-chip:nth-child(6n+5) { --hc: #e0a32e; }
.letter-chip:nth-child(6n)   { --hc: #d6457f; }
.letter-chip:hover, .letter-chip:focus-visible {
  background: var(--hc, var(--blue)); border-color: var(--hc, var(--blue)); color: #fff;
  transform: translateY(-4px) scale(1.06); box-shadow: 0 10px 20px rgba(0,0,0,.16);
}
.letter-chip.playing { background: var(--hc, var(--blue)); border-color: var(--hc, var(--blue)); color: #fff; animation: pop .5s var(--ease) infinite alternate; }
@keyframes pop { from { transform: scale(1); } to { transform: scale(1.1); } }

/* ---------- Resources ---------- */
.res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.res-card { background: #fff; border-radius: var(--radius); padding: 34px 28px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.sec--gray .res-card { background: #fff; }
.res-card .ic { font-size: 34px; }
.res-card .res-ic { display: block; width: 76px; height: 76px; object-fit: contain; margin: 0 auto 16px; }
.res-tags { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.res-tags span { font-size: 13px; color: var(--sub); background: #f0f0f2; border-radius: 980px; padding: 5px 14px; }
.res-card h3 { font-size: 22px; font-weight: 600; margin-top: 14px; }
.res-card p { color: var(--sub); font-size: 15px; margin: 8px 0 18px; }

/* ---------- Roadmap (horizontal cards) ---------- */
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
.road-card { background: var(--bg2); border-radius: var(--radius); padding: 28px 24px; }
.sec--gray .road-card { background: #fff; }
.road-card .yr { font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.road-card h3 { font-size: 19px; font-weight: 600; margin: 8px 0 6px; }
.road-card p { color: var(--sub); font-size: 14px; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.team-card { background: #fff; border-radius: var(--radius); padding: 36px 28px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.sec--gray .team-card { background: #fff; }
.team-card .av { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 28px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #2a9d8f, #0071e3); }
.team-card h3 { font-size: 21px; font-weight: 600; }
.team-card .role { color: var(--blue); font-size: 14px; font-weight: 600; margin: 4px 0 10px; }
.team-card p { color: var(--sub); font-size: 14px; }
.studio { text-align: center; margin-top: 38px; color: var(--sub); font-size: 18px; }
.studio b { color: var(--ink); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; margin-top: 44px; align-items: start; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.18); }
.form-status { min-height: 1.3em; font-size: 14px; font-weight: 600; margin-top: 8px; }
.form-status.ok { color: #1d7a3e; }
.form-status.err { color: #c0392b; }
.contact-aside h3 { font-size: 24px; font-weight: 600; }
.contact-aside p { color: var(--sub); margin-top: 8px; }
.contact-aside a { color: var(--blue); }
.social { display: flex; gap: 12px; margin-top: 20px; }
.social a { width: 44px; height: 44px; border-radius: 50%; background: var(--bg2); color: var(--ink); display: grid; place-items: center; transition: background .2s, color .2s; }
.social a:hover { background: var(--ink); color: #fff; }
.social svg { width: 19px; height: 19px; }

/* Contact section — brand purple background with readable, on-brand text */
#contact.sec { background: #776dc6; }
#contact .t-section { color: #ffffff; }                 /* white clears AA on the purple panel */
#contact .lead { color: rgba(255,255,255,.92); }
#contact .field label { color: #fff; }
#contact .contact-aside h3 { color: #fff; }
#contact .contact-aside p { color: rgba(255,255,255,.85); }
#contact .contact-aside a { color: #ffffff; text-decoration: underline; }
#contact .contact-aside a:hover { color: #fff; }
#contact .social a { background: rgba(255,255,255,.18); color: #fff; }
#contact .social a:hover { background: #fff; color: #776dc6; }
#contact .btn { background: #fff; color: #6a5fb3; }
#contact .btn:hover { background: #f1eefb; color: #574b9c; }
#contact .contact { grid-template-columns: auto 1.1fr .9fr; align-items: stretch; column-gap: 36px; row-gap: 16px; }
#contact .contact > form { grid-column: 2; grid-row: 1; }
#contact .contact-submit { grid-column: 2; grid-row: 2; }
#contact .contact-aside { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
/* Dama spans only the fields row (Name -> Message), matching the form's field height */
.contact-dama { grid-column: 1; grid-row: 1; align-self: stretch; height: 100%; width: auto; max-width: 340px; object-fit: contain; object-position: center bottom; }
.aside-mail { display: block; width: 175px; max-width: 78%; height: auto; margin: 0 0 14px; }
@media (max-width: 1100px) {
  #contact .contact { grid-template-columns: 1fr; }
  #contact .contact > form, #contact .contact-submit, #contact .contact-aside { grid-column: 1; grid-row: auto; }
  .contact-dama { display: none; }
}

/* ---------- Footer ---------- */
.footer { background: var(--bg2); color: var(--sub); font-size: 12px; padding-block: 36px; border-top: 1px solid var(--line); }
.footer a { color: var(--sub); }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.footer-rule { border-top: 1px solid var(--line); padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Back to top ---------- */
.to-top { position: fixed; inset-block-end: 22px; inset-inline-end: 22px; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .3s; z-index: 90; backdrop-filter: blur(8px); }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .bento { grid-template-columns: 1fr; }
  .tile.span2 { grid-column: auto; flex-direction: column; text-align: center; }
  .tile.span2 .tile-art { flex: none; }
  .bento-3, .res, .team, .road { grid-template-columns: 1fr; }
  .film-gallery { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 740px) {
  .nav-links { position: fixed; inset: 48px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(255,255,255,.96); backdrop-filter: blur(20px); transform: translateY(-130%);
    transition: transform .35s var(--ease); border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { transform: none; }
  .nav-links a { padding: 15px 22px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-burger { display: block; }
}
@media (max-width: 560px) {
  .road, .team, .res, .bento-3 { grid-template-columns: 1fr; }
  .film-gallery { grid-template-columns: 1fr; }
  .letter-chip { width: 52px; height: 52px; font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   ARABIC / RTL + MOBILE FIXES
   Keeps the English/LTR layout untouched; targets the issues that only
   appear when the page is switched to Arabic (dir="rtl"), especially on
   phones.
   ===================================================================== */

/* 1 · Kill any horizontal overflow so the page can't render zoomed-out
        or shifted to one side in RTL on small screens. */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe, svg { max-width: 100%; }

/* Hard guarantee on phones: no image/media may exceed the screen width.
   (Overrides any per-class max-width such as .hero-cast that would
   otherwise render at its intrinsic pixel size and break the layout.) */
@media (max-width: 720px) {
  img, video, picture, iframe, .hero-cast, .why-title-img, .why-earth-img,
  .aside-mail, .res-ic { max-width: 100% !important; height: auto; }
}

/* 2 · Arabic is a connected script: the global negative letter-spacing
        (-.01em / -.022em) squeezes and clips Arabic glyphs and their
        diacritics. Reset tracking to normal in Arabic everywhere. */
html[lang="ar"],
html[lang="ar"] body,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] .t-hero, html[lang="ar"] .t-display,
html[lang="ar"] .t-section, html[lang="ar"] .t-card,
html[lang="ar"] .lead, html[lang="ar"] .eyebrow,
html[lang="ar"] .statement .big, html[lang="ar"] .mk-name,
html[lang="ar"] .num, html[lang="ar"] .pull {
  letter-spacing: normal;
}

/* 3 · The Meet-the-Kids carousel forces direction:ltr for stable
        prev/next controls. On mobile the slide stacks vertically, so the
        Arabic copy must read right-to-left and align to the right. */
@media (max-width: 720px) {
  html[lang="ar"] .mk-text { direction: rtl; text-align: right; }
  html[lang="ar"] .mk-tags { justify-content: flex-end; }
  html[lang="ar"] .mk-nav  { direction: rtl; }
}

/* 4 · General RTL safety on phones: keep centred section heads centred,
        and make sure flex rows wrap instead of pushing width out. */
html[dir="rtl"] .nav,
html[dir="rtl"] .footer-rule,
html[dir="rtl"] .cta-row { flex-wrap: wrap; }
html[dir="rtl"] .sec-head { text-align: center; }
