/*
 * Rotorfront landing page. Colour chapters: every section is one flat field from the game's own palette
 * (gold accent, night navy, team blue, team red), butted edge to edge. One face family from the game
 * (Orbitron for display, Rajdhani for text); Arabic falls back to the phone's Arabic system face.
 */
@font-face { font-family: "Orbitron"; src: url("/fonts/Orbitron.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("/fonts/Rajdhani-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("/fonts/Rajdhani-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --gold: #f5b700;
  --gold-pale: #fff1bf;
  --gold-deep: #6b4e00;
  --night: #0b1218;
  --panel: #131f29;
  --blue: #3f7de0;
  --red: #e0483f;
  --paper: #eaf2f7;
  --ink: #12100a;
  --text-face: "Rajdhani", "SF Arabic", "Geeza Pro", "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
  --display-face: "Orbitron", "SF Arabic", "Geeza Pro", "Noto Kufi Arabic", Tahoma, system-ui, sans-serif;
  --m: clamp(16px, 3vw, 44px);
  --step-xl: clamp(64px, 14vw, 220px);
  --step-l: clamp(40px, 7vw, 112px);
  --step-m: clamp(24px, 2.6vw, 36px);
  --step-s: clamp(17px, 1.35vw, 20px);
  --step-xs: 15px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--night); color: var(--paper); font-family: var(--text-face); font-size: var(--step-s); line-height: 1.5; font-weight: 500; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
[data-field="gold"] :focus-visible { outline-color: var(--ink); }
::selection { background: var(--gold); color: var(--ink); }
.skip { position: absolute; inset-inline-start: var(--m); top: -60px; background: var(--paper); color: var(--night); padding: 10px 14px; z-index: 50; }
.skip:focus { top: 10px; }

/* Fields: each chapter carries one colour and one ink. */
[data-field="gold"] { background: var(--gold); color: var(--ink); }
[data-field="night"] { background: var(--night); color: var(--paper); }
[data-field="panel"] { background: var(--panel); color: var(--paper); }
[data-field="blue"] { background: var(--blue); color: var(--night); }
[data-field="red"] { background: var(--red); color: var(--night); }
[data-field="pale"] { background: var(--gold-pale); color: var(--ink); }

/* ---- Bar: takes the ink of the chapter under it ---- */
.bar { position: fixed; inset-inline: 0; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 14px var(--m); color: var(--ink); transition: color 300ms var(--ease); pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar[data-ink="paper"] { color: var(--paper); }
.bar__mark { font-family: var(--display-face); font-weight: 800; font-size: var(--step-xs); letter-spacing: 0.02em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.bar__mark img { width: 28px; height: 28px; border-radius: 7px; }
.bar__links { margin-inline-start: auto; display: flex; gap: 22px; align-items: center; font-size: var(--step-xs); font-weight: 700; }
.bar__links a { text-decoration: none; }
.bar__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; font-family: var(--display-face); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-decoration: none; border: 0; cursor: pointer; background: var(--ink); color: var(--gold); transition: transform 150ms var(--ease), background-color 150ms var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--paper { background: var(--paper); color: var(--night); }
.bar .btn { min-height: 44px; padding: 0 16px; font-size: 13px; }
.bar[data-ink="paper"] .btn { background: var(--gold); color: var(--ink); }

/* ---- Hero: one gold field, the name in two inks ---- */
.hero { min-height: 100svh; position: relative; padding: calc(15svh + 40px) var(--m) 40px; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-content: space-between; overflow: hidden; }
.hero h1 { grid-column: 1 / -1; font-family: var(--display-face); font-weight: 900; font-size: var(--step-xl); line-height: 0.86; letter-spacing: -0.03em; text-transform: uppercase; }
.hero h1 span { display: block; }
.hero h1 .pale { color: var(--gold-deep); }
.hero__drone { position: absolute; inset-inline-end: 4vw; top: 46svh; width: min(44vw, 640px); z-index: 0; animation: hover-drift 7s ease-in-out infinite alternate; }
[dir="rtl"] .hero__drone { transform: scaleX(-1); animation-name: hover-drift-rtl; }
.hero h1, .hero__foot { position: relative; z-index: 1; }
.hero__foot { grid-column: 1 / span 6; align-self: end; display: flex; flex-direction: column; gap: 22px; margin-top: 40px; }
.hero__lede { font-size: var(--step-m); line-height: 1.25; font-weight: 700; max-width: 26ch; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 8px 20px; background: var(--ink); color: var(--paper); text-decoration: none; transition: transform 150ms var(--ease); }
.store:hover { transform: translateY(-2px); }
.store small { font-size: 13px; font-weight: 500; line-height: 1.1; }
.store b { font-family: var(--display-face); font-size: 17px; line-height: 1.2; }
[data-field="night"] .store, [data-field="panel"] .store { background: var(--gold); color: var(--ink); }
.hero__facts { font-size: var(--step-xs); font-weight: 700; }
@keyframes hover-drift { from { transform: translate3d(0, -10px, 0) rotate(-3deg); } to { transform: translate3d(-18px, 14px, 0) rotate(2deg); } }
@keyframes hover-drift-rtl { from { transform: scaleX(-1) translate3d(0, -10px, 0) rotate(-3deg); } to { transform: scaleX(-1) translate3d(-18px, 14px, 0) rotate(2deg); } }

/* ---- Hangar: pick a drone (the live thing) ---- */
.hangar { min-height: 88svh; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 120px var(--m); align-items: center; }
.hangar__plate { aspect-ratio: 1; background: var(--blue); display: grid; place-items: center; position: relative; overflow: hidden; transition: background-color 300ms var(--ease); }
.hangar__plate[data-team="red"] { background: var(--red); }
.hangar__plate img { width: 86%; transition: opacity 200ms var(--ease), transform 300ms var(--ease); }
.hangar__plate img.is-swapping { opacity: 0; transform: translateY(12px) scale(0.96); }
.hangar__body { display: flex; flex-direction: column; gap: 32px; min-height: 100%; justify-content: space-between; }
.hangar h2 { font-family: var(--display-face); font-size: var(--step-l); line-height: 0.95; letter-spacing: -0.02em; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { font: inherit; font-size: 17px; font-weight: 700; padding: 10px 16px; min-height: 44px; border: 0; cursor: pointer; background: var(--panel); color: var(--paper); transition: background-color 150ms var(--ease), transform 150ms var(--ease); }
.tab:hover { transform: translateY(-2px); }
.tab[aria-selected="true"] { background: var(--gold); color: var(--ink); }
.drone-card h3 { font-family: var(--display-face); font-size: var(--step-m); line-height: 1.1; margin-bottom: 12px; }
.drone-card p { max-width: 38ch; }
.drone-card .ability { margin-top: 12px; color: var(--gold); font-weight: 700; }
.drone-card[hidden] { display: none; }
.hangar__note { font-size: var(--step-xs); max-width: 44ch; }

/* ---- Moments: a board of screenshot tiles ---- */
.board { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 104px; gap: 8px; padding: 8px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile--shot { color: var(--paper); }
.tile--shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 58%; background: rgba(11, 18, 24, 0.78); }
.tile--shot > div { position: relative; z-index: 1; }
.tile h3 { font-size: 22px; line-height: 1.15; font-weight: 700; }
.tile p { font-size: 17px; line-height: 1.35; margin-top: 4px; }
.tile--head { justify-content: flex-start; }
.tile--head h2 { font-family: var(--display-face); font-size: clamp(32px, 3.6vw, 56px); line-height: 1; letter-spacing: -0.02em; }
.w6h4 { grid-column: span 6; grid-row: span 4; }
.w6h2 { grid-column: span 6; grid-row: span 2; }
.w3h4 { grid-column: span 3; grid-row: span 4; }
.w3h2 { grid-column: span 3; grid-row: span 2; }
.tile--with-drone { padding-inline-end: 44%; }
.tile--with-drone h3, .tile--with-drone p { position: relative; z-index: 1; }
.tile .tile__drone { position: absolute; inset: 10% 4% 10% auto; width: 40%; height: 80%; object-fit: contain; }
[dir="rtl"] .tile .tile__drone { inset: 10% auto 10% 4%; transform: scaleX(-1); }
.tile--drift img { animation: slow-zoom 18s ease-in-out infinite alternate; }
@keyframes slow-zoom { from { transform: scale(1.02); } to { transform: scale(1.12) translateX(-2%); } }

/* ---- A match, in four fields ---- */
.match { display: grid; grid-template-columns: repeat(4, 1fr); }
.match__field { min-height: 84svh; padding: 40px 28px 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; }
.match__field h2 { font-family: var(--display-face); font-size: clamp(26px, 2.4vw, 38px); line-height: 1.05; }
.match__clause { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.15; font-weight: 700; }
.hud { width: 260px; max-width: 100%; align-self: center; background: var(--night); color: var(--paper); padding: 14px 16px; font-family: var(--text-face); transition: transform 150ms var(--ease); }
.match__field:hover .hud { transform: translateY(-6px); }
.hud__time { font-family: var(--display-face); font-size: 30px; font-weight: 800; text-align: center; }
.hud__state { text-align: center; font-size: 14px; font-weight: 700; color: var(--gold); min-height: 20px; }
.hud__teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; font-size: 14px; font-weight: 700; }
.hud__bar { height: 8px; background: #26333d; margin-top: 4px; }
.hud__bar i { display: block; height: 100%; }
.hud__teams div:first-child .hud__bar i { background: var(--blue); }
.hud__teams div:last-child .hud__bar i { background: var(--red); }
.hud__note { margin-top: 10px; font-size: 14px; color: #a7b8c4; }

/* ---- Questions: one band per question ---- */
.faq__head { min-height: 32svh; display: flex; align-items: flex-end; padding: 40px var(--m); }
.faq__head h2 { font-family: var(--display-face); font-size: clamp(44px, 7vw, 112px); line-height: 0.95; letter-spacing: -0.02em; }
.qa { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; padding: 56px var(--m); }
.qa h3 { grid-column: 1 / span 5; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.2; font-weight: 700; }
.qa div { grid-column: 7 / -1; font-size: 18px; line-height: 1.55; }
.qa div p + p { margin-top: 10px; }
.qa a { font-weight: 700; }

/* ---- Close ---- */
.close { min-height: 90svh; padding: 120px var(--m) 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 60px; }
.close h2 { font-family: var(--display-face); font-size: clamp(52px, 10vw, 168px); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; color: var(--gold); max-width: 12ch; }
.close__foot { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; align-items: end; }
.close__foot p { grid-column: 1 / span 5; font-size: 20px; }
.close__foot .stores { grid-column: 8 / -1; justify-content: flex-end; }
.close__shot { width: 100%; max-height: 54svh; object-fit: cover; }

/* ---- Footer: the name built from blocks ---- */
.foot { padding: 60px var(--m) 32px; }
.blocks { display: flex; align-items: flex-end; gap: 4px; height: 34svh; min-height: 180px; direction: ltr; }
.blocks span { flex: 1; display: flex; align-items: flex-end; justify-content: center; font-family: "Orbitron", sans-serif; font-weight: 900; font-size: clamp(22px, 5.4vw, 92px); line-height: 1; padding-bottom: 6px; color: var(--night); }
.blocks span:nth-child(4n+1) { background: var(--gold); height: 100%; }
.blocks span:nth-child(4n+2) { background: var(--blue); height: 72%; }
.blocks span:nth-child(4n+3) { background: var(--paper); height: 86%; }
.blocks span:nth-child(4n+4) { background: var(--red); height: 62%; }
.foot__cols { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 20px; row-gap: 28px; margin-top: 56px; font-size: var(--step-xs); }
.foot__cols nav { grid-column: span 2; display: flex; flex-direction: column; gap: 8px; }
.foot__cols nav b { font-size: 15px; }
.foot__cols a { text-decoration: none; }
.foot__cols a:hover { text-decoration: underline; }
.foot__contact { grid-column: 9 / -1; display: flex; flex-direction: column; gap: 8px; }
.foot__last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 48px; font-size: var(--step-xs); }

/* ---- Entrances: content is visible without script; the script adds the travel. ---- */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__drone, .tile--with-drone { padding-inline-end: 44%; }
.tile--with-drone h3, .tile--with-drone p { position: relative; z-index: 1; }
.tile .tile__drone { position: absolute; inset: 10% 4% 10% auto; width: 40%; height: 80%; object-fit: contain; }
[dir="rtl"] .tile .tile__drone { inset: 10% auto 10% 4%; transform: scaleX(-1); }
.tile--drift img { animation: none; }
  .js [data-rise] { opacity: 1; transform: none; transition: none; }
  .btn, .store, .tab, .hud, .hangar__plate img { transition: none; }
}

/* ---- Tablet ---- */
@media (max-width: 960px) {
  .hangar { grid-template-columns: 1fr; padding: 96px var(--m); }
  .board { grid-template-columns: repeat(6, 1fr); }
  .w6h4, .w6h2 { grid-column: span 6; }
  .w3h4, .w3h2 { grid-column: span 3; }
  .match { grid-template-columns: 1fr 1fr; }
  .qa h3 { grid-column: 1 / -1; margin-bottom: 12px; }
  .qa div { grid-column: 1 / -1; }
  .close__foot p, .close__foot .stores { grid-column: 1 / -1; justify-content: flex-start; }
  .close__foot .stores { margin-top: 24px; }
  .foot__cols nav { grid-column: span 4; }
  .foot__contact { grid-column: 1 / -1; }
}

/* ---- Phone ---- */
@media (max-width: 600px) {
  .bar { position: absolute; }
  .bar__links a:not(.btn) { display: none; }
  .bar__links a[hreflang] { display: inline; }
  .hero { padding-top: calc(16svh + 24px); padding-bottom: 24px; }
  .hero h1 { font-size: 19vw; }
  [lang="ar"] .hero h1 { font-size: 17vw; }
  .hero__drone { width: 62vw; top: 33svh; inset-inline-end: -4vw; }
  .hero__foot { grid-column: 1 / -1; }
  .hero__lede { font-size: 22px; }
  .board { grid-template-columns: 1fr 1fr; grid-auto-rows: 28vw; gap: 6px; padding: 6px; }
  .w6h4 { grid-column: span 2; grid-row: span 3; }
  .w6h2 { grid-column: span 2; grid-row: span 2; }
  .w3h4, .w3h2 { grid-column: span 2; grid-row: span 2; }
  .tile h3 { font-size: 19px; }
  .tile p { font-size: 16px; }
  .match { grid-template-columns: 1fr; }
  .match__field { min-height: 0; padding: 40px 20px 48px; justify-content: flex-start; gap: 24px; }
  .match__field > span:empty { display: none; }
  .match__clause { order: -1; }
  .match__field h2 { order: -2; }
  .hud { align-self: flex-start; }
  .qa { padding: 32px 20px; }
  .qa div { font-size: 17px; }
  .close { min-height: 80svh; padding-top: 88px; }
  .close h2 { font-size: 15vw; }
  .stores { flex-direction: column; }
  .store { width: 100%; }
  .blocks { height: 22svh; min-height: 120px; }
  .blocks span { font-size: 6.6vw; }
  .foot__cols nav { grid-column: span 6; }
}

/* Read by screen readers and search engines, not shown: the rest of the game's name in the h1. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
