@font-face {
  font-family: Cairo;
  src: url("../fonts/cairo-arabic.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  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: Cairo;
  src: url("../fonts/cairo-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-200B, U+2012-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Cairo;
  src: url("../fonts/cairo-latin-ext.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@property --page-progress {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  color-scheme: dark;
  --bg: light-dark(#EEF1F6, #0B0E14);
  --bg-raised: light-dark(#F7F9FC, #10141C);
  --surface: light-dark(#FFFFFF, #161D29);
  --surface-2: light-dark(#F1F4F9, #1D2635);
  --line: light-dark(#D9DFE9, #2A3342);
  --ink: light-dark(#10141C, #F2F4F8);
  --muted: light-dark(#505A6A, #A6AFBE);
  --accent: light-dark(#2559C4, #85C8FD);
  --accent-soft: light-dark(#E3EBFB, #1A2C47);
  --chalk: #2F6BE4;
  --chalk-deep: #2356C2;
  --ice: #85C8FD;
  --cream: #F2EBCB;
  --felt: light-dark(#0F7A58, #3FC18F);
  --felt-soft: light-dark(#DDF0E8, #123328);
  --gold: light-dark(#8A6712, #F2C14E);
  --gold-soft: light-dark(#FBF1D6, #33290F);
  --red: light-dark(#BC3D2A, #F28472);
  --red-soft: light-dark(#FAE6E2, #3A1C18);
  --shadow: light-dark(0 18px 44px -18px rgb(22 29 41 / .28), 0 24px 60px -20px rgb(0 0 0 / .7));
  --shadow-lift: light-dark(0 26px 60px -20px rgb(22 29 41 / .36), 0 34px 80px -22px rgb(0 0 0 / .85));
  --radius: 20px;
  --radius-small: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-height: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --section-space: clamp(72px, 10vw, 148px);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Cairo, system-ui, "Segoe UI", Tahoma, sans-serif;
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 800; text-wrap: balance; }

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

.wrap {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon-sprite { position: absolute; }
.icon { width: 22px; height: 22px; flex: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--chalk);
  color: #fff;
  font-weight: 700;
  translate: 0 -200%;
  transition: translate .2s ease;
}

.skip-link:focus { translate: 0 0; }

.eyebrow {
  color: var(--accent);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .02em;
}

:lang(en) .eyebrow { letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }

.lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + .45vw, 1.3rem);
  max-width: 62ch;
}

.btn {
  --pull-x: 0px;
  --pull-y: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 28px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  transform: translate(var(--pull-x), var(--pull-y));
  transition: transform .25s var(--ease), box-shadow .25s ease, background-color .2s ease, border-color .2s ease;
}

.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: translate(var(--pull-x), var(--pull-y)) scale(.97); }

.btn-primary {
  background: linear-gradient(180deg, var(--chalk), var(--chalk-deep));
  color: #fff;
  box-shadow: 0 10px 26px -10px rgb(47 107 228 / .8), inset 0 1px 0 rgb(255 255 255 / .22);
}

.btn-ghost {
  border: 1.5px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover { border-color: var(--accent); }
.btn-small { min-height: 42px; padding: 6px 20px; font-size: .92rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding-inline: 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: background-color .2s ease;
}

.icon-btn:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }

.site-header {
  position: fixed;
  inset-inline: 0;
  inset-block-start: 0;
  z-index: 50;
  transition: background-color .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(100%, 1400px);
  height: var(--header-height);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand img { border-radius: 10px; }

@media (max-width: 359px) {
  .header-inner .brand span { display: none; }
}

.primary-nav {
  display: none;
  gap: 4px;
  margin-inline: auto;
}

.primary-nav a {
  position: relative;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 700;
  transition: color .2s ease;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  inset-block-end: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}

.primary-nav a:hover, .primary-nav a[aria-current] { color: var(--ink); }
.primary-nav a:hover::after, .primary-nav a[aria-current]::after { transform: scaleX(1); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
}

.header-cta { display: none; margin-inline-start: 6px; }

.theme-toggle .icon-moon { display: none; }

:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

html:not(.js) .theme-toggle { display: none; }

.mobile-menu summary { list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }

.mobile-nav {
  position: absolute;
  inset-inline: 12px;
  inset-block-start: calc(var(--header-height) - 4px);
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.mobile-nav a:not(.btn) {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
}

.mobile-nav a:not(.btn):hover { background: var(--surface-2); }
.mobile-nav .btn { margin-block-start: 8px; }

@media (min-width: 620px) {
  .header-cta { display: inline-flex; }
}

@media (min-width: 1120px) {
  .primary-nav { display: flex; }
  .mobile-menu { display: none; }
  .header-actions { margin-inline-start: 0; }
}

.travel-rail {
  position: fixed;
  z-index: 40;
  inset-inline: 0;
  inset-block-start: 0;
  height: 2px;
  pointer-events: none;
  animation: page-progress linear both;
  animation-timeline: scroll(root);
}

.travel-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--chalk), var(--ice));
  transform: scaleX(var(--page-progress));
  transform-origin: left;
}

[dir="rtl"] .travel-fill { transform-origin: right; }
.travel-ball { display: none; }

@keyframes page-progress {
  to { --page-progress: 1; }
}

@media (min-width: 1360px) {
  .travel-rail {
    inset-inline: 22px auto;
    inset-block-start: 22vh;
    width: 2px;
    height: 56vh;
    border-radius: 2px;
    background: color-mix(in srgb, var(--ink) 12%, transparent);
  }

  .travel-fill {
    background: linear-gradient(180deg, var(--chalk), var(--ice));
    transform: scaleY(var(--page-progress));
    transform-origin: top;
  }

  [dir="rtl"] .travel-fill { transform-origin: top; }

  .travel-ball {
    display: block;
    position: absolute;
    inset-inline-start: -7px;
    inset-block-start: calc(var(--page-progress) * 100% - 8px);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, var(--cream) 55%, #B9B08A);
    box-shadow: 0 0 14px 2px rgb(133 200 253 / .65);
  }
}

.section { padding-block: var(--section-space); }

.section-head {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin-block-end: clamp(36px, 5vw, 64px);
}

.section-head h2 {
  font-size: clamp(1.8rem, 1.3rem + 2.6vw, 3.4rem);
  font-weight: 900;
}

.section-lead {
  color: var(--muted);
  font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem);
  max-width: 64ch;
}

.js [data-reveal] {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .8s var(--ease), translate .8s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  translate: 0 0;
}

.site-footer {
  border-block-start: 1px solid var(--line);
  padding-block: 40px;
  background: var(--bg-raised);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  color: var(--muted);
  font-size: .94rem;
}

.footer-inner .brand { color: var(--ink); }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-inline-start: auto;
}

.footer-nav a:hover { color: var(--ink); }
.footer-copy { width: 100%; font-size: .85rem; }

.error-page {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 24px 16px;
  background: radial-gradient(70% 50% at 50% 0%, color-mix(in srgb, var(--ice) 18%, transparent), transparent), var(--bg);
}

.error-card {
  display: grid;
  gap: 32px;
  width: min(100%, 860px);
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
}

.error-table {
  position: relative;
  height: 150px;
  border: 12px solid #2C1B11;
  border-radius: 18px;
  background: radial-gradient(70% 90% at 50% 50%, #17886A, #0B5A44);
  overflow: hidden;
}

.error-pocket {
  position: absolute;
  inset-block-start: -34px;
  inset-inline-start: calc(50% - 34px);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #05070A;
}

.error-ball {
  position: absolute;
  inset-block-end: 22px;
  inset-inline-start: calc(50% - 32px);
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff, var(--cream) 48%, #B5AB83);
  color: #10141C;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 0 8px 14px rgb(0 0 0 / .45);
  animation: error-roll 2.6s var(--ease) infinite alternate;
}

@keyframes error-roll {
  from { translate: -90px 0; }
  to { translate: 90px 0; }
}

.error-copy { display: grid; gap: 28px; }
.error-copy section { display: grid; gap: 10px; justify-items: start; }
.error-copy h1, .error-copy h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); font-weight: 900; }
.error-copy p { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] { opacity: 1; translate: none; }
  .travel-rail { display: none; }
  .btn { transform: none; }
}
