/* =====================================================
   VERTEX HORIZONS — Design System
   ===================================================== */

:root {
  /* Brand colors — classic corporate burgundy */
  --vh-bg: #F5F2EC;
  --vh-bg-alt: #EDEAE3;
  --vh-bg-deep: #E5E1D8;
  --vh-ink: #1A1A1A;
  --vh-ink-2: #2A2A2A;
  --vh-ink-muted: #5C5752;
  --vh-line: #C9C2B5;
  --vh-line-soft: #D8D3C7;

  --vh-accent: #7A2D2D;       /* burgundy */
  --vh-accent-deep: #5C1F1F;
  --vh-accent-soft: #9A4444;
  --vh-gold: #B8985A;         /* subtle gold accent */

  /* Type */
  --vh-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --vh-serif-body: 'Source Serif Pro', 'Lora', Georgia, serif;
  --vh-sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --vh-mono: 'JetBrains Mono', 'Courier New', monospace;
  --vh-arabic: 'Amiri', 'Scheherazade New', 'Noto Naskh Arabic', serif;
  --vh-arabic-sans: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;

  /* Density */
  --vh-density: 1;
  --vh-section-y: calc(120px * var(--vh-density));
  --vh-gap: calc(24px * var(--vh-density));

  /* Layout */
  --vh-max: 1320px;
  --vh-pad: clamp(20px, 4vw, 56px);
}

[data-theme="dark"] {
  --vh-bg: #0F0E0C;
  --vh-bg-alt: #16140F;
  --vh-bg-deep: #1C1A14;
  --vh-ink: #EDEAE3;
  --vh-ink-2: #DCD7CC;
  --vh-ink-muted: #8A847B;
  --vh-line: #2E2A24;
  --vh-line-soft: #24211C;
  --vh-accent: #B85454;
  --vh-accent-deep: #9A3A3A;
  --vh-accent-soft: #D17878;
  --vh-gold: #D4B470;
}

[data-density="compact"] { --vh-density: 0.78; }
[data-density="spacious"] { --vh-density: 1.25; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--vh-bg);
  color: var(--vh-ink);
  font-family: var(--vh-serif-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

[data-lang="ar"] body, body[data-lang="ar"] {
  font-family: var(--vh-arabic);
  direction: rtl;
}

[data-lang="ar"] .vh-mono, [data-lang="ar"] .vh-eyebrow,
[data-lang="ar"] .vh-num { font-family: var(--vh-mono); direction: ltr; display: inline-block; }

img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ===================== Utility ===================== */
.vh-container {
  max-width: var(--vh-max);
  margin: 0 auto;
  padding: 0 var(--vh-pad);
}

.vh-section {
  padding: var(--vh-section-y) 0;
}

.vh-eyebrow {
  font-family: var(--vh-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--vh-accent);
  font-weight: 500;
}

.vh-rule {
  height: 1px;
  background: var(--vh-line);
  border: none;
  margin: 0;
}

.vh-rule-accent {
  width: 48px;
  height: 2px;
  background: var(--vh-accent);
  border: none;
}

/* Display text — serif headlines */
.vh-display {
  font-family: var(--vh-serif);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--vh-ink);
}

[data-lang="ar"] .vh-display { font-family: var(--vh-arabic); line-height: 1.25; letter-spacing: 0; }

.vh-display-xl { font-size: clamp(56px, 9vw, 128px); }
.vh-display-lg { font-size: clamp(44px, 6.5vw, 88px); }
.vh-display-md { font-size: clamp(34px, 4.5vw, 60px); }
.vh-display-sm { font-size: clamp(26px, 3vw, 40px); }

.vh-h-section {
  font-family: var(--vh-serif);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.vh-lede {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.55;
  color: var(--vh-ink-2);
  max-width: 62ch;
}

.vh-body { font-size: 17px; line-height: 1.6; color: var(--vh-ink-2); }
.vh-small { font-size: 14px; color: var(--vh-ink-muted); }

/* Buttons */
.vh-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  font-family: var(--vh-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--vh-ink);
  background: var(--vh-ink);
  color: var(--vh-bg);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.vh-btn:hover { background: var(--vh-accent); border-color: var(--vh-accent); color: #fff; }

.vh-btn-ghost {
  background: transparent;
  color: var(--vh-ink);
}
.vh-btn-ghost:hover { background: var(--vh-ink); color: var(--vh-bg); }

.vh-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--vh-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vh-ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--vh-ink);
  transition: color 0.2s ease, border-color 0.2s ease, gap 0.25s ease;
}
.vh-link:hover { color: var(--vh-accent); border-color: var(--vh-accent); gap: 16px; }
.vh-link .arrow { display: inline-block; transition: transform 0.25s ease; }
[data-lang="ar"] .vh-link .arrow { transform: scaleX(-1); }

/* ============== Header ============== */
.vh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--vh-line-soft);
}
[data-theme="dark"] .vh-header { background: rgba(15, 14, 12, 0.9); }

.vh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 32px;
}

.vh-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--vh-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--vh-ink);
}
.vh-logo-mark {
  width: 28px; height: 28px;
  flex-shrink: 0;
}

.vh-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.vh-nav-link {
  font-family: var(--vh-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--vh-ink-2);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.vh-nav-link:hover, .vh-nav-link.active { color: var(--vh-accent); }
.vh-nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--vh-accent);
}

.vh-header-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vh-mobile-toggle { display: none; }

@media (max-width: 980px) {
  .vh-nav, .vh-header-cta .vh-btn { display: none; }
  .vh-mobile-toggle {
    display: inline-flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border: 1px solid var(--vh-line);
  }
}

/* ============== Footer ============== */
.vh-footer {
  background: var(--vh-ink);
  color: var(--vh-bg);
  padding: 96px 0 32px;
  margin-top: 80px;
}
[data-theme="dark"] .vh-footer { background: #050402; border-top: 1px solid var(--vh-line); }

.vh-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 56px;
  margin-bottom: 80px;
}
@media (max-width: 880px) { .vh-footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }

.vh-footer h4 {
  font-family: var(--vh-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(245, 242, 236, 0.5);
  margin-bottom: 20px;
}
.vh-footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.vh-footer ul a { color: rgba(245, 242, 236, 0.85); font-size: 15px; transition: color 0.2s; }
.vh-footer ul a:hover { color: var(--vh-gold); }

.vh-footer-bottom {
  border-top: 1px solid rgba(245, 242, 236, 0.12);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--vh-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, 0.5);
}

/* ============== Cards & blocks ============== */
.vh-card {
  border: 1px solid var(--vh-line);
  background: var(--vh-bg);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.vh-card:hover { border-color: var(--vh-accent); }
[data-theme="dark"] .vh-card { background: var(--vh-bg-alt); }

.vh-stat-num {
  font-family: var(--vh-serif);
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1;
  font-weight: 500;
  color: var(--vh-accent);
  letter-spacing: -0.02em;
}

/* Image placeholders */
.vh-img-ph {
  background:
    repeating-linear-gradient(
      45deg,
      var(--vh-bg-alt),
      var(--vh-bg-alt) 10px,
      var(--vh-bg-deep) 10px,
      var(--vh-bg-deep) 20px
    );
  border: 1px solid var(--vh-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--vh-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vh-ink-muted);
  text-align: center;
  padding: 24px;
}

/* Reveal on scroll */
.vh-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.vh-reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Page transitions */
.vh-page {
  animation: vh-page-in 0.5s ease;
}
@keyframes vh-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tweaks panel positioning */
.vh-tweaks-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
}
[data-lang="ar"] .vh-tweaks-launcher { right: auto; left: 24px; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--vh-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--vh-line); border: 2px solid var(--vh-bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--vh-accent); }

/* Selection */
::selection { background: var(--vh-accent); color: #fff; }
