/* Future Health — Design Tokens, Fonts, Atmospheric Utilities & Motion Primitives */

@font-face {
  font-family: 'Plex';
  src: url('assets/arabic-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plex';
  src: url('assets/arabic-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plex';
  src: url('assets/arabic-semibold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Zain';
  src: url('assets/zain-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Zain';
  src: url('assets/zain-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sora';
  src: url('assets/fonts/sora-latin-ext.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Sora';
  src: url('assets/fonts/sora-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif-italic-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif-regular-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif-regular-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy-950: #06183b;
  --navy-900: #0b265c;
  --navy-800: #124aaf;
  --royal: #124aaf;
  --royal-500: #1d63dc;
  --cyan-300: #8ed8ef;
  --cyan-400: #65c4e2;
  --amber: #e69a45;
  --sand: #f2f6fb;
  --mint: #e6f3fa;
  --ink: #102a52;
  --steel: #52657c;
  --line: #d6e4f2;

  /* Compatibility aliases */
  --night: var(--navy-950);
  --teal: var(--royal);
  --paper: #ffffff;
  --soft: var(--sand);
  --muted: var(--steel);

  --radius: 20px;
  --radius-small: 10px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 8px 24px rgba(6, 24, 59, 0.06);
  --shadow-card: 0 10px 28px rgba(6, 24, 59, 0.06), 0 24px 60px rgba(18, 74, 175, 0.04);
  --shadow-feature: 0 16px 42px rgba(6, 24, 59, 0.1);
  --shadow-raised: 0 20px 48px rgba(6, 24, 59, 0.14), 0 36px 80px rgba(18, 74, 175, 0.08);
  --section-space: clamp(72px, 7.5vw, 118px);
  --content-width: 1240px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Plex', 'Sora', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="ltr"] body {
  font-family: 'Sora', 'Plex', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
}

::selection {
  background: var(--cyan-300);
  color: var(--navy-950);
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
summary {
  cursor: pointer;
}

p {
  margin: 0 0 18px;
  color: var(--steel);
}

h1,
h2,
h3,
h4 {
  font-family: 'Plex', 'Zain', 'Sora', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
}

[dir="ltr"] h1,
[dir="ltr"] h2,
[dir="ltr"] h3,
[dir="ltr"] h4 {
  font-family: 'Sora', 'Plex', system-ui, sans-serif;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(38px, 4.6vw, 66px);
}

h2 {
  font-size: clamp(30px, 3.4vw, 48px);
}

h3 {
  font-size: clamp(20px, 1.8vw, 26px);
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--cyan-400);
  outline-offset: 3px;
}

:where(a, button, summary) {
  scroll-margin-top: 112px;
}

.font-serif-accent {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

[dir="rtl"] .font-serif-accent {
  font-family: inherit;
  font-style: normal;
  font-weight: 700;
}

/* Kicker / Section labels with strict RTL vs LTR tracking */
.kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--royal);
  margin-bottom: 14px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}

[dir="rtl"] .kicker,
[dir="rtl"] .section-label {
  letter-spacing: 0;
}

[dir="ltr"] .kicker,
[dir="ltr"] .section-label {
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 11px;
}

/* Core layout container */
.section {
  padding: var(--section-space) max(5%, calc((100% - var(--content-width)) / 2));
  scroll-margin-top: 84px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 44px;
}

.section-heading > p {
  max-width: 360px;
  margin: 0;
  font-size: 16px;
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--cyan-400), var(--royal), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 999;
  pointer-events: none;
  will-change: transform;
}

[dir="rtl"] .progress-bar {
  transform-origin: right;
  background: linear-gradient(270deg, var(--cyan-400), var(--royal), var(--amber));
}

/* Atmospheric Noise Overlay */
.noise {
  position: relative;
}

.noise::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 56px Architectural Grids */
.bg-grid-dark {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
}

.bg-grid-light {
  background-image:
    linear-gradient(to right, rgba(16, 42, 82, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 42, 82, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Hero grid mask & background grid layer */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
}

div.grid-mask-hero,
.hero-grid-bg.grid-mask-hero {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 35%, transparent 100%);
}

/* Frosted Glass Surface */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: rgba(11, 38, 92, 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Gradient & Outlined Typography */
.text-grad {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--royal) 52%, var(--cyan-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-grad-light {
  background: linear-gradient(135deg, #ffffff 12%, var(--cyan-300) 58%, var(--cyan-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.outline-word {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.14);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  user-select: none;
  pointer-events: none;
}

.outline-word-dark {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(18, 74, 175, 0.14);
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  user-select: none;
  pointer-events: none;
}

/* Buttons & Diagonal Glare Sweep */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--royal);
  color: #ffffff;
  border: 1px solid var(--royal);
  padding: 13px 24px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(18, 74, 175, 0.24);
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
}

.button:hover {
  background: var(--royal-500);
  border-color: var(--royal-500);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(29, 99, 220, 0.34);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--cyan-400);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(6, 24, 59, 0.25);
}

.modal-body .button.ghost,
.company-closing .button.ghost {
  background: var(--sand);
  color: var(--ink);
  border: 1px solid var(--line);
}

.modal-body .button.ghost:hover,
.company-closing .button.ghost:hover {
  background: var(--mint);
  border-color: var(--royal);
  color: var(--royal);
}

.button.light {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan-300);
  border: 1px solid rgba(142, 216, 239, 0.42);
  box-shadow: none;
}

.button.light:hover {
  background: var(--cyan-400);
  border-color: var(--cyan-400);
  color: var(--navy-950);
  box-shadow: 0 12px 28px rgba(101, 196, 226, 0.28);
}

html.modal-open,
html.modal-open body {
  overflow: hidden;
}

.button.white-shine {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: var(--navy-900);
  border-color: #ffffff;
  box-shadow: 0 12px 32px rgba(6, 24, 59, 0.28);
}

.button.white-shine:hover {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--navy-950);
  box-shadow: 0 16px 38px rgba(6, 24, 59, 0.34);
}

.btn-shine,
.button.white-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after,
.button.white-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 56%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.38) 50%, transparent 80%);
  transform: translateX(-170%) skewX(-22deg);
  transition: transform 0.8s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

.btn-shine:hover::after,
.btn-shine:focus-visible::after,
.button.white-shine:hover::after,
.button.white-shine:focus-visible::after {
  transform: translateX(270%) skewX(-22deg);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--royal);
  padding: 8px 0;
  border-bottom: 1.5px solid currentColor;
  font-size: 15px;
  font-weight: 600;
  transition: color .2s var(--ease), gap .2s var(--ease);
}

.text-link:hover {
  color: var(--royal-500);
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

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

.skip {
  position: fixed;
  top: -100px;
  inset-inline-start: 16px;
  z-index: 1000;
  background: #ffffff;
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-feature);
  font-weight: 600;
}

.skip:focus {
  top: 14px;
}

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

/* Scroll Reveal */
.reveal-pending {
  opacity: 0;
  transform: translate3d(var(--reveal-x, 0px), var(--reveal-y, 24px), 0) scale(var(--reveal-scale, 1));
  clip-path: var(--reveal-clip, none);
  transition: opacity .7s var(--reveal-ease, var(--ease)), transform .75s var(--reveal-ease, var(--ease)), clip-path .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-pending.is-visible {
  opacity: 1;
  transform: none;
  clip-path: none;
  will-change: auto;
}

@media (max-width: 1024px) {
  :root {
    --section-space: 72px;
  }
  .section-heading {
    gap: 24px;
    margin-bottom: 34px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-space: 58px;
  }
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
  }
  .section-heading > p {
    max-width: none;
  }
}

@media (max-width: 480px) {
  :root {
    --section-space: 48px;
  }
  .section {
    padding-inline: 5%;
  }
  .button {
    padding: 12px 18px;
    font-size: 14px;
  }
}

@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;
  }
  .reveal-pending {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .btn-shine::after,
  .button.white-shine::after {
    display: none !important;
  }
}
