/* =========================================================================
   NIF Landing Page — production styles
   Recreated from the design prototype (NIF-Landing.dc.html). Design tokens
   and measurements are lifted from the prototype and the handoff README.
   ========================================================================= */

:root {
  /* Navy family */
  --navy: #1B3E7A;
  --navy-deep: #20264F;
  --navy-mid: #2E3577;
  --navy-hover: #12305F;
  /* Accent */
  --orange: #D9772B;
  --orange-hero: #b25920;      /* hero overlay tint = rgba(178,89,32,.4) */
  /* State */
  --error: #D02B2B;
  /* Neutral / text */
  --muted: #7A7F9A;
  --text-body: #4A5080;
  --field-border: #C9CBDD;
  --card-border: #A7B2D2;
  --rule: #E2E1DC;
  /* Backgrounds */
  --bg-1: #FFFFFF;
  --bg-2: #F4F3F0;
  --bg-3: #EDECE8;
  /* Layout */
  --maxw: 1280px;
  --gutter: clamp(22px, 4vw, 52px);
  --scrim: rgba(11, 38, 80, .55);
  /* Fonts */
  --font-en: Questrial, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ar: "Tajawal", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg-1); }

body {
  font-family: var(--font-en);
  color: var(--navy-deep);
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body,
body[dir="rtl"],
.page[dir="rtl"] { font-family: var(--font-ar); }

a { color: #17407F; text-decoration: none; }
a:hover { color: #0B2650; }

img { max-width: 100%; }

[hidden] { display: none !important; }

@keyframes nifFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes nifZoom { from { transform: scale(1); } to { transform: scale(1.1); } }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; }

/* ------------------------------------------------------------------ Hero */
.hero {
  position: relative;
  width: 100%;
  height: clamp(520px, 74vh, 700px);
  overflow: hidden;
  background: #8E7A63;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: var(--orange-hero);
  opacity: .4;
}

.header {
  position: absolute; top: 0; left: 0; right: 0;
  max-width: var(--maxw); margin: 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2.6vw, 32px) var(--gutter);
}
.header__logo {
  display: block; height: clamp(30px, 3.4vw, 42px); width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35));
}
.header__actions { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: none; border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  font-family: inherit; color: #fff;
  font-size: clamp(13px, 1.4vw, 15px); letter-spacing: .2px;
  min-height: 44px;
  transition: background 200ms, border-color 200ms;
}
.lang-toggle:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.lang-toggle svg { display: block; }

.header__contact {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-family: inherit; color: #fff;
  font-size: clamp(14px, 1.6vw, 17px); letter-spacing: .4px;
  min-height: 44px;
  transition: opacity 200ms;
}
.header__contact:hover { opacity: .7; }

/* Hero copy (crossfading slides) */
.hero__copy {
  position: absolute; left: 0; right: 0;
  max-width: var(--maxw); margin: 0 auto; z-index: 4;
  top: clamp(96px, 15vh, 150px); bottom: clamp(120px, 20vh, 170px);
  padding: 0 var(--gutter);
}
.hero__copy-inner { position: relative; height: 100%; max-width: min(560px, 92%); }
.hero__slide {
  position: absolute; top: 0; left: 0; right: 0;
  transition: opacity 620ms ease, transform 620ms ease;
  opacity: 0; transform: translateY(14px);
  pointer-events: none;
}
.hero__slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.hero__slide h1 {
  margin: 0 0 18px; color: #fff;
  font-size: clamp(24px, 3.2vw, 36px); font-weight: 400;
  line-height: 1.24; text-wrap: pretty;
}
.hero__slide p {
  margin: 0; color: rgba(255, 255, 255, .92);
  font-size: clamp(15px, 1.8vw, 19px); line-height: 1.6; text-wrap: pretty;
}
.hero__bullets { display: flex; flex-direction: column; gap: 12px; }
.hero__bullet {
  display: flex; gap: 14px; align-items: baseline;
  color: #fff; font-size: clamp(15px, 1.8vw, 19px); line-height: 1.5;
}
.hero__bullet .dash { opacity: .6; }

/* Year timeline */
.timeline {
  position: absolute; left: 0; right: 0;
  max-width: var(--maxw); margin: 0 auto; z-index: 5;
  bottom: clamp(26px, 4.4vh, 52px);
  display: flex; gap: 4px;
  padding: 0 var(--gutter);
}
.timeline__item {
  flex: 1; min-width: 0;
  background: none; border: 0; padding: 0; cursor: pointer;
  text-align: left; font-family: inherit;
}
[dir="rtl"] .timeline__item { text-align: right; }
.timeline__bar {
  height: 3px; transition: background 400ms;
  background: rgba(255, 255, 255, .3);
}
.timeline__item.is-active .timeline__bar { background: #FFFFFF; }
.timeline__year {
  margin-top: clamp(8px, 1.6vw, 16px);
  font-size: clamp(20px, 3.6vw, 42px);
  transition: color 400ms;
  color: rgba(255, 255, 255, .48);
}
.timeline__item.is-active .timeline__year { color: #FFFFFF; }

/* --------------------------------------------------------------- Intro */
.intro { padding: clamp(48px, 6.5vw, 86px) var(--gutter); display: flex; justify-content: center; }
.intro__inner {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 4vw, 56px);
  width: 100%; max-width: var(--maxw); flex-wrap: wrap;
}
.intro__logo { display: block; height: clamp(52px, 6vw, 78px); width: auto; }
.intro__text {
  margin: 0; flex: 1; min-width: 260px; text-align: center;
  font-size: clamp(15px, 1.8vw, 18px); line-height: 1.65;
  color: var(--text-body); text-wrap: pretty;
}

/* -------------------------------------------------- Economic Objectives */
.impact { display: flex; justify-content: center; padding: 0 clamp(0px, 3vw, 40px); }
.impact__grid {
  width: 100%; max-width: var(--maxw);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  overflow: hidden;
}
.tile {
  position: relative;
  min-height: clamp(200px, 24vw, 300px);
  padding: clamp(30px, 3.4vw, 44px);
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
  cursor: pointer;
  --tileLift: 0px; --tileRule: 0px;
  transition: background-size 800ms ease, filter 400ms ease;
  border: 0; text-align: start; font-family: inherit; color: inherit; width: 100%;
}
.tile:hover { filter: brightness(1.12); --tileLift: -8px; --tileRule: 64px; }
.tile--tall {
  grid-row: span 2;
  min-height: clamp(420px, 48vw, 600px);
  flex-direction: column; justify-content: space-between; gap: 24px;
}
.tile--last { grid-column-end: -1; }
.tile__eyebrow { margin: 0; font-size: clamp(25px, 3.4vw, 34px); font-weight: 400; color: #fff; }
.tile__body {
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(var(--tileLift, 0px));
  transition: transform 520ms ease;
}
.tile__title {
  margin: 0; font-size: clamp(18px, 2.2vw, 23px); font-weight: 400;
  color: #fff; line-height: 1.35; max-width: 260px; text-wrap: pretty;
}
.tile__rule { height: 2px; width: var(--tileRule, 0px); background: var(--orange); transition: width 560ms ease; }

/* --------------------------------------------------- Areas of Support */
.areas { padding: clamp(48px, 6.5vw, 86px) var(--gutter) clamp(54px, 7vw, 92px); display: flex; justify-content: center; }
.areas__inner { width: 100%; max-width: var(--maxw); }
.areas__title { margin: 0 0 clamp(24px, 3.4vw, 40px); font-size: clamp(25px, 3.4vw, 34px); font-weight: 400; color: var(--navy-mid); }
.carousel { display: flex; align-items: stretch; gap: clamp(8px, 1.6vw, 18px); }
.carousel__arrow {
  flex: 0 0 clamp(26px, 3vw, 40px); align-self: center;
  border: 0; background: none; padding: 0; cursor: pointer;
  transition: opacity 250ms;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.carousel__arrow:hover { opacity: .6; }
.carousel__arrow svg { display: block; width: 100%; height: auto; }
[dir="rtl"] .carousel__arrow svg { transform: scaleX(-1); }
.carousel__viewport { flex: 1; min-width: 0; overflow: hidden; }
.carousel__track {
  display: flex; gap: 20px;
  transition: transform 620ms cubic-bezier(.65, .02, .2, 1);
}
.card {
  flex: 0 0 var(--card-basis, calc((100% - 40px) / 3));
  box-sizing: border-box;
  background: var(--bg-1);
  border: 1px solid var(--card-border);
  padding: clamp(26px, 2.8vw, 34px) clamp(22px, 2.4vw, 30px);
  min-height: clamp(360px, 42vw, 440px);
  display: flex; flex-direction: column; cursor: pointer;
  --iconZoom: 1;
  transition: border-color 250ms, box-shadow 250ms;
  text-align: start; font-family: inherit;
}
.card:hover { border-color: var(--navy-mid); box-shadow: inset 0 0 0 1px rgba(46, 53, 119, .55); --iconZoom: 1.14; }
.card__icon {
  display: block;
  width: clamp(78px, 8.4vw, 116px); height: clamp(78px, 8.4vw, 116px);
  margin: 6px auto 0;
  transform: scale(var(--iconZoom, 1));
  transition: transform 450ms ease;
}
.card__title {
  margin: 0 0 14px; font-size: clamp(18px, 2vw, 21px); font-weight: 400;
  line-height: 1.32; min-height: 2.64em; color: var(--navy-mid);
}
.card__text { margin: 0; font-size: clamp(14px, 1.5vw, 16px); line-height: 1.55; color: var(--text-body); text-wrap: pretty; }
.card__copy { padding-top: clamp(26px, 3.4vw, 40px); }

/* ----------------------------------------------------------- Modals */
.scrim {
  position: fixed; inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
#detail-scrim { z-index: 60; padding: clamp(16px, 4vw, 40px); }
#contact-scrim { z-index: 70; padding: clamp(14px, 4vw, 40px); }

.modal-close {
  position: absolute; top: 18px; inset-inline-end: 18px;
  width: 44px; height: 44px;
  border: 1px solid var(--field-border); border-radius: 50%;
  background: #fff; color: var(--navy-mid);
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 200ms, background 200ms;
}
.modal-close:hover { border-color: var(--navy-mid); background: var(--bg-2); }
.modal-close svg { display: block; }

/* Detail modal */
.detail {
  position: relative; width: min(720px, 100%); height: min(660px, 86vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff;
  padding: clamp(38px, 5vw, 54px) clamp(24px, 5vw, 58px) clamp(26px, 3vw, 34px);
  box-shadow: 0 40px 90px rgba(11, 38, 80, .35);
  animation: nifFade 280ms ease both;
}
.detail__scroll { flex: 1; min-height: 0; overflow: auto; }
.detail__media {
  position: relative; margin: 0 0 22px; height: clamp(160px, 26vw, 230px); overflow: hidden;
  -webkit-mask-image: radial-gradient(115% 100% at 50% 45%, #000 58%, rgba(0, 0, 0, .45) 84%, transparent 100%);
  mask-image: radial-gradient(115% 100% at 50% 45%, #000 58%, rgba(0, 0, 0, .45) 84%, transparent 100%);
}
.detail__media-img { position: absolute; inset: 0; background-size: cover; animation: nifZoom 14s ease-out both; }
.detail__media-fade { position: absolute; inset: -1px; background: radial-gradient(120% 100% at 50% 45%, rgba(255, 255, 255, 0) 52%, rgba(255, 255, 255, .65) 82%, #FFFFFF 100%); }
.detail__icon { width: clamp(76px, 9vw, 104px); height: clamp(76px, 9vw, 104px); margin: 0 auto 26px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.detail__kicker { font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase; color: #8A6A45; }
.detail__title { margin: 14px 0 24px; font-size: clamp(23px, 3.6vw, 32px); font-weight: 400; color: var(--navy-mid); text-wrap: pretty; }
.detail__body p { margin: 0 0 18px; font-size: clamp(15px, 1.9vw, 17px); line-height: 1.66; color: var(--text-body); text-wrap: pretty; }
.detail__nav {
  flex: 0 0 auto; display: flex; align-items: center; gap: 20px;
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--rule);
}
.detail__nav-btn {
  flex: 0 0 22px; border: 0; background: none; padding: 0; cursor: pointer;
  transition: opacity 250ms; display: flex; align-items: center;
  min-width: 44px; min-height: 44px; justify-content: center;
}
.detail__nav-btn:hover { opacity: .6; }
.detail__nav-btn svg { display: block; width: 22px; height: auto; }
[dir="rtl"] .detail__nav-btn svg { transform: scaleX(-1); }
.detail__step { margin-inline-start: auto; font-size: 14px; color: var(--muted); }

/* Contact modal */
.contact {
  position: relative; width: min(560px, 100%); max-height: 88vh; overflow: auto;
  background: #fff;
  padding: clamp(30px, 4vw, 44px) clamp(22px, 4vw, 44px) clamp(30px, 4vw, 40px);
  box-shadow: 0 40px 90px rgba(11, 38, 80, .35);
  animation: nifFade 280ms ease both;
}
.contact__title { margin: 0 0 26px; font-size: clamp(23px, 3.4vw, 30px); font-weight: 400; color: var(--navy-deep); }
.contact__form { display: flex; flex-direction: column; gap: 20px; }
.field { display: block; }
.field__label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--navy-deep); }
.field__req { color: var(--error); }
.field__opt { color: var(--muted); }
.field__control {
  width: 100%; box-sizing: border-box;
  padding: 14px 16px;
  border: 1.5px solid var(--navy); border-radius: 10px;
  background: #fff; font-family: inherit; font-size: 15px; color: var(--navy-deep);
  outline: none;
}
textarea.field__control { line-height: 1.5; resize: vertical; }
.field__control:focus { border-color: var(--navy-hover); }
.field__control.is-invalid { border-color: var(--error); }
select.field__control {
  padding-inline-end: 40px; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E3577' stroke-width='2'><path d='M5 9l7 7 7-7'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
[dir="rtl"] select.field__control { background-position: left 14px center; }
.field__count { margin-top: 6px; text-align: right; font-size: 13px; color: var(--muted); }
[dir="rtl"] .field__count { text-align: left; }
.field__error { display: none; margin-top: 6px; font-size: 13px; color: var(--error); }

.form__error { font-size: 14px; color: var(--error); }
.submit-btn {
  align-self: flex-start; margin-top: 6px;
  padding: 14px 34px; border: 0; border-radius: 6px;
  background: var(--navy); color: #fff;
  font-family: inherit; font-size: 16px; cursor: pointer;
  transition: background 220ms; min-height: 44px;
}
.submit-btn:hover { background: var(--navy-hover); }
.submit-btn:disabled { opacity: .6; cursor: default; }

/* Honeypot — visually hidden, off-screen, kept out of tab order in markup */
.hp-field {
  position: absolute !important;
  left: -9999px; top: auto; width: 1px; height: 1px;
  overflow: hidden;
}

/* Success panel */
.thanks { padding: 26px 0 10px; display: flex; align-items: flex-start; gap: clamp(20px, 3vw, 32px); flex-wrap: wrap; }
.thanks__logo { display: block; height: clamp(44px, 5.5vw, 60px); width: auto; flex: 0 0 auto; }
.thanks__body { flex: 1; min-width: 220px; }
.thanks__title { margin: 0 0 14px; font-size: clamp(22px, 3.4vw, 28px); font-weight: 400; color: var(--navy-mid); }
.thanks__text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-body); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
