/*!
 * NTA Landing Page — Stylesheet
 * ------------------------------------------------------------------
 * Structure
 *   1. Design tokens (light = default, dark via [data-theme="dark"])
 *   2. Base / reset / typography
 *   3. Utilities & shared components (buttons, eyebrow, section heads)
 *   4. Header & navigation
 *   5. Hero
 *   6. About
 *   7. Services
 *   8. News
 *   9. Partners
 *  10. CTA
 *  11. Footer, back-to-top, toast
 *  12. Motion (reveal, float) + reduced-motion
 *  13. Responsive
 *
 * Brand colors are taken from the NTA platform (common/css/theme.css):
 *   --brand-primary #e63946 · --brand-primary-dark #c1121f
 * Layout uses CSS logical properties so RTL (ar) and LTR (en) both work.
 * Fonts: system font stacks only (no external requests, CSP-friendly).
 * ------------------------------------------------------------------
 */

/* 1. ========================= DESIGN TOKENS ========================= */
:root {
  /* Brand (shared by both themes) */
  --brand-primary: #e63946;
  --brand-primary-dark: #c1121f;
  --brand-deep: #9d0b17;
  --brand-gradient: linear-gradient(135deg, #e63946 0%, #c1121f 55%, #9d0b17 100%);

  /* Light theme (default) */
  --bg: #ffffff;
  --bg-soft: #fbf6f6;
  --surface: #ffffff;
  --surface-2: #f7f1f1;
  --text: #16181d;
  --text-muted: #5a606c;
  --border: #eee5e5;
  --brand-text: #c1121f;             /* AA on white (5.9:1) */
  --brand-tint: rgba(230, 57, 70, 0.08);
  --brand-tint-strong: rgba(230, 57, 70, 0.14);
  --header-bg: rgba(255, 255, 255, 0.82);
  --footer-bg: #faf5f5;
  --shadow-sm: 0 1px 2px rgba(22, 24, 29, 0.05), 0 2px 8px rgba(22, 24, 29, 0.04);
  --shadow-md: 0 10px 30px -12px rgba(22, 24, 29, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(157, 11, 23, 0.28);
  --grid-dot: rgba(193, 18, 31, 0.10);

  /* Typography — system stacks */
  --font-ar: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", "Arabic UI Text", "Dubai", Arial, sans-serif;
  --font-en: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

  /* Scale */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0e1014;
  --bg-soft: #12151a;
  --surface: #171a21;
  --surface-2: #1d2129;
  --text: #f2f3f5;
  --text-muted: #a2a8b4;
  --border: #262b34;
  --brand-text: #ff6b76;             /* AA on #0e1014 */
  --brand-tint: rgba(230, 57, 70, 0.12);
  --brand-tint-strong: rgba(230, 57, 70, 0.2);
  --header-bg: rgba(14, 16, 20, 0.78);
  --footer-bg: #0b0d10;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -20px rgba(230, 57, 70, 0.25);
  --grid-dot: rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

/* 2. ============================== BASE ============================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html[lang="en"] body { font-family: var(--font-en); line-height: 1.65; }

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

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

::selection { background: var(--brand-primary); color: #fff; }

/* Elements that only make sense with JavaScript */
.js-only { display: none !important; }
html.js .js-only { display: inline-flex !important; }

/* Clickjacking fallback (see preferences-init.js) */
html.is-framed body { display: none !important; }

/* Hide Arabic markup briefly while English text is applied — with a safety reveal */
html.i18n-pending body {
  visibility: hidden;
  animation: nta-reveal-body 0s linear 1.2s forwards;
}
@keyframes nta-reveal-body { to { visibility: visible; } }

/* Smooth theme cross-fade only while toggling */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary-dark);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* 3. ===================== UTILITIES & COMPONENTS ===================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.text-brand { color: var(--brand-text); }

.section { padding-block: clamp(72px, 9vw, 120px); position: relative; }

.section-head {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: clamp(40px, 5vw, 64px);
  text-align: center;
}
.section-head .eyebrow { margin-inline: auto; }

.section-title {
  margin-top: 14px;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-lead {
  margin-top: 14px;
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  color: var(--text-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-strong);
  color: var(--brand-text);
  font-size: 0.85rem;
  font-weight: 700;
  width: fit-content;
}
.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 0 4px var(--brand-tint-strong);
}

/* Buttons */
.btn {
  --btn-y: 12px;
  --btn-x: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--btn-y) var(--btn-x);
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn-sm { --btn-y: 9px; --btn-x: 16px; font-size: 0.92rem; }
.btn-lg { --btn-y: 16px; --btn-x: 30px; font-size: 1.05rem; }

.btn-primary {
  color: #fff;
  background: var(--brand-primary-dark);
  background-image: var(--brand-gradient);
  box-shadow: 0 8px 22px -8px rgba(193, 18, 31, 0.6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(193, 18, 31, 0.7);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand-primary); color: var(--brand-text); transform: translateY(-2px); }

.btn-light {
  color: var(--brand-primary-dark);
  background: #fff;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.45); }

.btn-arrow { transition: transform 0.25s var(--ease); }
[dir="rtl"] .btn-arrow { transform: scaleX(-1); }
.btn:hover .btn-arrow { transform: translateX(4px); }
[dir="rtl"] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(4px); }

.js-login.is-disabled,
.js-signup.is-disabled { opacity: 0.55; cursor: not-allowed; }

.icon-btn {
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  height: 42px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { border-color: var(--brand-primary); color: var(--brand-text); transform: translateY(-1px); }

/* Theme icon swap */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 4. ======================== HEADER & NAV ======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 12px;
  background: #fff;               /* logo artwork is designed for white */
  border: 1px solid var(--border);
}
.brand-logo img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-name { font-weight: 800; font-size: 0.98rem; }
.brand-sub { font-size: 0.75rem; color: var(--text-muted); }

.primary-nav { margin-inline-start: auto; flex-shrink: 0; }
.nav-list { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.nav-list > li { flex-shrink: 0; }
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  color: var(--text-muted);
  transition: color 0.2s, background-color 0.2s;
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-primary);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.nav-link:hover,
.nav-link.is-active { color: var(--text); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.primary-nav + .header-actions { margin-inline-start: 8px; }

/* Same specificity as `html.js .js-only` but declared later → wins on desktop */
html.js .menu-toggle,
.menu-toggle { display: none !important; }
.menu-bars { display: grid; gap: 4px; width: 18px; }
.menu-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-open .menu-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-bars span:nth-child(2) { opacity: 0; }
.nav-open .menu-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 5. ============================== HERO ============================== */
.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px) clamp(72px, 9vw, 120px);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 85% 10%, var(--brand-tint-strong), transparent 70%),
    radial-gradient(500px 360px at 10% 90%, var(--brand-tint), transparent 70%),
    radial-gradient(var(--grid-dot) 1.2px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero-title {
  margin-top: 20px;
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-title span { display: block; }
.hero-title .text-brand {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .hero-title .text-brand {
  background: linear-gradient(135deg, #ff7a84, #e63946);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  margin-top: 20px;
  max-width: 560px;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--text-muted);
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.hero-actions .btn-lg { --btn-y: 14px; --btn-x: 22px; font-size: 0.98rem; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust svg { color: var(--brand-text); flex-shrink: 0; }

.hero-visual { position: relative; }
.hero-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--surface);
  aspect-ratio: 4 / 3.4;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 14% -6% -6% 12%;
  z-index: -1;
  border-radius: var(--radius-xl);
  background: var(--brand-gradient);
  opacity: 0.9;
  transform: rotate(-3deg);
}
[dir="rtl"] .hero-visual::before { inset: 14% 12% -6% -6%; transform: rotate(3deg); }

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: nta-float 6s ease-in-out infinite;
}
.float-card--a { inset-inline-start: -28px; bottom: 14%; }
.float-card--b { inset-inline-end: -18px; top: 10%; animation-delay: -3s; }
.float-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: var(--brand-gradient);
}
.float-text { display: flex; flex-direction: column; line-height: 1.3; }
.float-text strong { font-size: 0.95rem; }
.float-text small { font-size: 0.78rem; color: var(--text-muted); }

/* 6. ============================== ABOUT ============================== */
.about { background: var(--bg-soft); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.about-media { position: relative; }
.about-media picture {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.about-media img { width: 100%; aspect-ratio: 4 / 3.6; object-fit: cover; }
.about-badge {
  position: absolute;
  inset-inline-end: -16px;
  bottom: -22px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.about-badge-mark { font-weight: 900; font-size: 1.4rem; letter-spacing: 0.04em; }
.about-badge-text { font-weight: 600; font-size: 0.9rem; opacity: 0.95; }

.about-content .section-title { margin-top: 14px; }
.pillars { display: grid; gap: 14px; margin-top: 30px; }
.pillar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.pillar:hover { border-color: var(--brand-tint-strong); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pillar-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-tint);
  color: var(--brand-text);
}
.pillar-title { font-size: 1.05rem; font-weight: 800; }
.pillar-text { margin-top: 4px; color: var(--text-muted); font-size: 0.95rem; }

/* 7. ============================= SERVICES ============================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.service-card {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.service-card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: var(--origin, left);
  transition: transform 0.45s var(--ease);
}
[dir="rtl"] .service-card::before { --origin: right; }
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-tint-strong);
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--brand-tint);
  color: var(--brand-text);
  transition: background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.service-card:hover .service-icon { background: var(--brand-gradient); color: #fff; transform: rotate(-6deg); }
.service-title { margin-top: 20px; font-size: 1.15rem; font-weight: 800; }
.service-text { margin-top: 8px; color: var(--text-muted); font-size: 0.95rem; }

/* 8. =============================== NEWS =============================== */
.news { background: var(--bg-soft); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.news-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.news-media picture, .news-media img { width: 100%; height: 100%; }
.news-media img { object-fit: cover; transition: transform 0.7s var(--ease); }
.news-card:hover .news-media img { transform: scale(1.06); }
.news-tag {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.news-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.news-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-text);
}
.news-date::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.news-title { font-size: 1.12rem; font-weight: 800; line-height: 1.45; }
.news-text { color: var(--text-muted); font-size: 0.94rem; }

/* 9. ============================= PARTNERS ============================= */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.partner-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 160px;
  padding: 22px 14px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px dashed var(--border);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.partner-tile:hover { border-style: solid; border-color: var(--brand-primary); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.partner-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-text);
}
.partner-name { font-weight: 700; font-size: 0.92rem; line-height: 1.4; }

/* 10. =============================== CTA =============================== */
.cta { padding-top: 0; }
.cta-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(36px, 5vw, 64px);
  border-radius: var(--radius-xl);
  background: var(--brand-gradient);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-lg);
}
.cta-pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(0, 0, 0, 0.18), transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.14) 1.2px, transparent 1.2px) 0 0 / 20px 20px;
}
.cta-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; line-height: 1.3; }
.cta-text { margin-top: 8px; font-size: 1.05rem; opacity: 0.92; max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta-card .btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.cta-card .btn-ghost:hover { background: rgba(255, 255, 255, 0.24); color: #fff; border-color: #fff; }

/* 11. ===================== FOOTER / TOP / TOAST ===================== */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  padding-top: 64px;
  margin-top: clamp(72px, 9vw, 120px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.brand-logo--footer img { height: 52px; }
.footer-about { margin-top: 16px; color: var(--text-muted); max-width: 380px; font-size: 0.95rem; }
.footer-heading { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a,
.footer-col span { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--brand-text); }
.footer-bottom {
  padding-block: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}

.back-to-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 90;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 12px 26px -10px rgba(193, 18, 31, 0.7);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: 24px;
  z-index: 150;
  max-width: 520px;
  margin-inline: auto;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--brand-primary);
  border-inline-start-width: 5px;
  box-shadow: var(--shadow-md);
  font-weight: 600;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }

/* 12. ============================== MOTION ============================== */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* Gentle stagger inside grids */
.cards-grid .reveal:nth-child(2), .news-grid .reveal:nth-child(2), .partners-grid .reveal:nth-child(2), .pillars .reveal:nth-child(2) { transition-delay: 0.08s; }
.cards-grid .reveal:nth-child(3), .news-grid .reveal:nth-child(3), .partners-grid .reveal:nth-child(3), .pillars .reveal:nth-child(3) { transition-delay: 0.16s; }
.cards-grid .reveal:nth-child(4), .partners-grid .reveal:nth-child(4) { transition-delay: 0.08s; }
.cards-grid .reveal:nth-child(5), .partners-grid .reveal:nth-child(5) { transition-delay: 0.16s; }
.cards-grid .reveal:nth-child(6), .partners-grid .reveal:nth-child(6) { transition-delay: 0.24s; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero-content .reveal:nth-child(5) { transition-delay: 0.32s; }
.hero-visual.reveal { transition-delay: 0.2s; }

@keyframes nta-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.i18n-pending body { animation-delay: 0s !important; }
}

/* 13. ============================ RESPONSIVE ============================ */
@media (max-width: 1180px) {
  .header-inner { gap: 14px; }
  .nav-link { padding: 8px 10px; font-size: 0.9rem; }
  .partners-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-sub { display: none; }
}

@media (max-width: 960px) {
  html.js .menu-toggle { display: inline-flex !important; }

  html.js .primary-nav {
    position: absolute;
    inset-inline: 0;
    top: var(--header-h);
    margin: 0;
    padding: 12px 24px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  html.js .nav-open .primary-nav { opacity: 1; visibility: visible; transform: none; }
  html.js .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  html.js .nav-link { display: block; padding: 12px 14px; border-radius: var(--radius-sm); }
  html.js .nav-link::after { display: none; }
  html.js .nav-link:hover, html.js .nav-link.is-active { background: var(--brand-tint); color: var(--brand-text); }
  html.js .header-actions { margin-inline-start: auto; }

  /* Without JS: nav simply wraps under the header */
  html:not(.js) .header-inner { flex-wrap: wrap; height: auto; padding-block: 12px; }
  html:not(.js) .primary-nav { order: 3; width: 100%; }
  html:not(.js) .nav-list { flex-wrap: wrap; }

  .hero-grid,
  .about-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 620px; margin-inline: auto; width: 100%; }
  .hero-content { text-align: center; }
  .hero-content .eyebrow { margin-inline: auto; }
  .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-trust { justify-content: center; }

  .cards-grid,
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-card { flex-direction: column; text-align: center; }
  .cta-text { margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .container { padding-inline: 16px; }
  .brand-text { display: none; }
  .brand-logo img { height: 34px; width: auto; object-fit: contain; }
  .header-actions { gap: 6px; }
  .cards-grid,
  .news-grid { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .float-card--a { inset-inline-start: 8px; bottom: -18px; }
  .float-card--b { inset-inline-end: 8px; top: -14px; }
  .about-badge { inset-inline-end: 12px; bottom: -18px; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .back-to-top, .toast, .hero-bg, .float-card { display: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  body { background: #fff; color: #000; }
}

/* ==========================================================================
 * Portal Entry View (Dedicated 2-Button Centered Portal Landing)
 * ========================================================================== */
.portal-entry-view {
  min-height: calc(100vh - 84px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

.portal-entry-card {
  width: 100%;
  max-width: 580px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

[data-theme="dark"] .portal-entry-card {
  background: rgba(22, 27, 34, 0.85);
  box-shadow: 0 25px 60px -20px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.portal-logo-wrap {
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 10px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.portal-logo-wrap img {
  width: auto;
  height: 68px;
  max-width: 170px;
  object-fit: contain;
}

.portal-entry-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-text, #111827);
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.portal-entry-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 36px 0;
  line-height: 1.5;
}

.portal-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
  margin: 0 auto;
}

.portal-actions .btn {
  width: 100%;
  height: 56px;
  font-size: 1.15rem;
  justify-content: center;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.portal-actions .btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.portal-actions .btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.15);
}

.portal-actions .btn-secondary svg,
.portal-actions .btn-primary svg {
  flex-shrink: 0;
}

.portal-footer-simple {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .portal-entry-view {
    min-height: calc(100dvh - 130px);
    padding: 20px 14px;
  }
  .portal-entry-card {
    padding: 28px 18px;
    border-radius: 20px;
  }
  .portal-logo-wrap {
    margin-bottom: 16px;
    padding: 8px 14px;
  }
  .portal-logo-wrap img {
    height: 54px;
    max-width: 145px;
  }
  .portal-entry-title {
    font-size: 1.45rem;
  }
  .portal-entry-sub {
    font-size: 0.98rem;
    margin-bottom: 24px;
  }
  .portal-actions .btn {
    height: 50px;
    font-size: 1rem;
    padding-inline: 16px;
  }
}

