/* =========================================================
   JABAL AL AMAAN — Shared Design System
   ========================================================= */

/* ---------- Google Fonts ---------- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@400;700;800;900&family=Manrope:wght@700;800;900&family=JetBrains+Mono:wght@500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0&display=swap");

/* ---------- CSS Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background-color: #121415;
  color: #e2e2e3;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
ul,
ol {
  list-style: none;
}
button {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Brand palette — derived from logo (warm amber/orange) */
  --gold-primary: #e8963c;
  --gold-primary-container: #c97a34;
  --gold-on-primary: #1a0f02;
  --gold-glow: rgba(232, 150, 60, 0.3);
  --gold-glow-hover: rgba(232, 150, 60, 0.5);

  /* Primary brand accent (same amber, used site-wide for CTAs, links, stats) */
  --green-primary: #e8963c;
  --green-primary-container: #c97a34;
  --green-on-primary: #1a0f02;
  --green-glow: rgba(232, 150, 60, 0.3);
  --green-glow-hover: rgba(232, 150, 60, 0.5);

  /* Shared surface tokens */
  --surface: #121415;
  --surface-low: #1a1c1d;
  --surface-container: #1e2021;
  --surface-container-high: #282a2b;
  --surface-highest: #333536;
  --surface-lowest: #0c0e0f;
  --surface-bright: #38393a;
  --on-surface: #e2e2e3;
  --on-surface-variant: #d0c5af;
  --outline-variant: #4d4635;
  /* Neutral secondary accent (replaces old cyan — keeps a single brand hue) */
  --secondary-container: #b8b2a6;

  /* Spacing */
  --gap: 24px;
  --section-margin: 66px;
  --container-padding: 40px;

  /* Border radius */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-full: 12px;
}

/* ---------- Utility Classes ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.section {
  margin-bottom: var(--section-margin);
}

.label-mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* =========================================================
   Typography scale — consolidated to 4 consistent sizes:
   1. Headline (display-xl / display-lg)
   2. Sub-headline (headline-lg / headline-md)
   3. Body (body-lg / body-md)
   4. Label (label-mono)
   ========================================================= */

.display-xl,
.display-lg {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(36px, 5.5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 900;
}

.headline-lg,
.headline-md {
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.body-lg,
.body-md {
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Grid Background ---------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---------- Glass Panel ---------- */
.glass-panel {
  background: rgba(26, 26, 30, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---------- Bento Card ---------- */
.bento-card {
  background: rgba(28, 32, 36, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.5s ease,
    box-shadow 0.3s ease;
}
.bento-card:hover {
  transform: translateY(-8px);
}

.glow-border {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(232, 150, 60, 0.5),
    transparent 50%,
    rgba(198, 201, 211, 0.2)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Top Navigation ---------- */
.topnav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1280px;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(18, 20, 21, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.topnav .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topnav .nav-brand img {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.topnav .brand-name {
  font-family: "Montserrat", sans-serif;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.topnav .nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.topnav .nav-links a {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  transition:
    color 0.2s,
    transform 0.3s;
}
.topnav .nav-links a:hover {
  transform: scale(1.05);
}
.topnav .nav-links a.active {
  border-bottom: 2px solid;
  padding-bottom: 4px;
}

.topnav .nav-cta {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.topnav .nav-cta:hover {
  transform: scale(1.05);
}
.topnav .nav-cta:active {
  transform: scale(0.95);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* Mobile nav drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 20, 21, 0.97);
  backdrop-filter: blur(24px);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.mobile-nav-drawer.open {
  display: flex;
}
.mobile-nav-drawer a {
  font-family: "Montserrat", sans-serif;
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--on-surface-variant);
  transition: color 0.2s;
}
.mobile-nav-drawer .close-btn {
  position: absolute;
  top: 32px;
  right: 32px;
  background: none;
  border: none;
  color: var(--on-surface-variant);
  font-size: 32px;
  cursor: pointer;
}

/* ---------- Footer ---------- */
footer {
  position: relative;
  overflow: hidden;
  background: var(--surface-lowest);
  border-top: 1px solid rgba(77, 70, 53, 0.3);
  padding: var(--section-margin) var(--container-padding)
    var(--container-padding);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: var(--gap);
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.footer-watermark {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(40px, 10vw, 80px);
  font-weight: 900;
  text-transform: uppercase;
  color: rgba(109, 113, 116, 0.2);
  position: absolute;
  bottom: -20px;
  left: -20px;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
}

.footer-logo-col {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-nav-col {
  grid-column: span 2;
  display: flex;
  gap: 48px;
  justify-content: center;
}
.footer-copy-col {
  grid-column: span 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.footer-nav-col ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-nav-col a {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  display: block;
  transition:
    color 0.2s,
    transform 0.3s;
}
.footer-nav-col a:hover {
  transform: translateX(8px);
}

.footer-copy {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ---------- Image Placeholder ---------- */
.img-placeholder {
  background: linear-gradient(135deg, #1e2021, #282a2b);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.3);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.img-placeholder .material-symbols-outlined {
  font-size: 32px;
  opacity: 0.4;
}

/* ---------- Page-top padding (below fixed nav) ---------- */
.page-content {
  padding-top: 120px;
}

/* ---------- Animations ---------- */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}
@keyframes drawPath {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
}
.fade-up.delay-1 {
  animation-delay: 0.15s;
}
.fade-up.delay-2 {
  animation-delay: 0.3s;
}
.fade-up.delay-3 {
  animation-delay: 0.45s;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --container-padding: 20px;
    --section-margin: 48px;
  }

  .topnav .nav-links,
  .topnav .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: block;
  }

  .headline-lg,
  .headline-md {
    font-size: 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-nav-col {
    grid-column: span 1;
    justify-content: flex-start;
  }
  .footer-copy-col {
    grid-column: span 1;
    justify-content: flex-start;
  }
}
