/* ============================================================
   GO-UP — Landing page (pages/home.html) only.
   Concept: «بهو البنك» — Egyptian heritage-bank hall:
   navy hall + brass/gold keylines + a live price board as the
   page's soul object, warmed by a conversational Fahim layer.

   Doctrine:
   - words = Cairo (headings) / Tajawal (body)
   - actionable digits = DM Mono, Western numerals, tabular-nums,
     always wrapped in <bdi dir="ltr"> (never Arabic-Indic in mono)
   - Arabic-Indic numerals (٠١ ٠٢ …) only as Cairo folio ornaments
   - gold on cream is STRUCTURAL (rules/borders); small gold text
     on cream uses the AA ink token --gu-gold-ink instead
   All classes are namespaced .gu-* to avoid legacy hp-* styles.
   ============================================================ */

:root {
  --gu-navy: #0D2545;
  --gu-navy-2: #1A3F70;
  --gu-navy-deep: #0a192f;
  --gu-gold: #C9A84C;
  --gu-gold-soft: #DFBC5C;
  --gu-gold-ink: #7d682d;   /* AA-compliant "gold" ink: 5.0:1 on cream #F8F6F1 and on the kicker chip background */
  --gu-cream: #F8F6F1;
  --gu-ink: #1A1A2E;
  --gu-up: #5DCAA5;
  --gu-down: #F0997B;
  --gu-flat: #9CA3AF;
  --gu-border-cream: #E2D9CC;
}

/* ---------- shared primitives ---------- */

.gu-mono {
  font-family: 'DM Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Double gold masthead rule under section titles */
.gu-rule {
  position: relative;
  height: 5px;
  border-top: 1px solid rgba(201, 168, 76, 0.55);
}
.gu-rule::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 0;
  width: 88px;
  height: 2px;
  background: var(--gu-gold);
  border-radius: 2px;
}

/* Section header with Arabic-Indic folio numeral */
.gu-folio {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1;
  color: rgba(201, 168, 76, 0.38);
  user-select: none;
}

/* Hairline divider interrupted by an 8-point star */
.gu-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--gu-gold);
}
.gu-divider::before,
.gu-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(13, 37, 69, 0.12);
}

/* Kicker chip: 3px gold border on the RTL-start edge */
.gu-kicker {
  display: inline-block;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-right: 3px solid var(--gu-gold);
  background: rgba(201, 168, 76, 0.10);
  color: var(--gu-gold-ink);
  border-radius: 4px 2px 2px 4px;
}
.gu-kicker--ondark {
  color: var(--gu-gold-soft);
  background: rgba(223, 188, 92, 0.12);
}

/* Buttons */
.gu-btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: var(--gu-gold);
  color: var(--gu-navy);
  padding: 13px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.28);
  transition: transform 0.25s cubic-bezier(0.2, 1, 0.3, 1), background 0.2s, box-shadow 0.25s;
}
.gu-btn-gold:hover { background: var(--gu-gold-soft); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(201, 168, 76, 0.36); }
.gu-btn-gold:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.gu-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  background: transparent;
  color: var(--gu-gold-soft);
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid rgba(223, 188, 92, 0.55);
  cursor: pointer;
  transition: background 0.2s, transform 0.25s cubic-bezier(0.2, 1, 0.3, 1);
}
.gu-btn-ghost:hover { background: rgba(223, 188, 92, 0.12); transform: translateY(-2px); }
.gu-btn-ghost:focus-visible { outline: 3px solid var(--gu-gold-soft); outline-offset: 2px; }

/* ---------- breaking wire ---------- */

.gu-wire {
  background: var(--gu-navy-deep);
  border-bottom: 1px solid rgba(201, 168, 76, 0.35);
  overflow: hidden;
}
.gu-wire-stamp {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  color: #fff;
  background: #C0392B;
  padding: 3px 12px;
  border-radius: 4px;
  transform: rotate(-1.5deg);
  box-shadow: 0 0 0 1px rgba(223, 188, 92, 0.6);
  white-space: nowrap;
}
.gu-wire-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
  animation: gu-wire-scroll 36s linear infinite;
  will-change: transform;
}
.gu-wire:hover .gu-wire-track,
.gu-wire:focus-within .gu-wire-track,
.gu-wire.is-paused .gu-wire-track { animation-play-state: paused; }

.gu-wire-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(223, 188, 92, 0.4);
  background: transparent;
  color: var(--gu-gold-soft);
  cursor: pointer;
  flex-shrink: 0;
}
.gu-wire-pause:hover { background: rgba(223, 188, 92, 0.12); }
.gu-wire-pause:focus-visible { outline: 2px solid var(--gu-gold-soft); outline-offset: 2px; }
@keyframes gu-wire-scroll {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100vw); }
}

/* ---------- hero hall ---------- */

.gu-hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(26, 63, 112, 0.85) 0%, rgba(13, 37, 69, 0) 60%),
    linear-gradient(168deg, var(--gu-navy) 0%, var(--gu-navy-deep) 92%);
  color: #fff;
  overflow: hidden;
}
.gu-hero::before {
  /* the hall's engraved star lattice */
  content: '';
  position: absolute;
  inset: 0;
  background: url('/static/img/pattern.svg');
  background-size: 96px 96px;
  opacity: 0.05;
  pointer-events: none;
}

.gu-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--gu-gold-soft);
}
.gu-eyebrow::before,
.gu-eyebrow::after {
  content: '';
  width: 34px;
  height: 1px;
  background: rgba(223, 188, 92, 0.55);
  box-shadow: 0 3px 0 rgba(223, 188, 92, 0.3);
}

.gu-h1 {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem) !important;
  line-height: 1.25;
  color: #fff;
}
.gu-h1 em {
  font-style: normal;
  color: var(--gu-gold-soft);
}

.gu-trust {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: #9CA3AF;
}

/* story-of-the-day card + index rows */
.gu-story {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top: 2px solid rgba(201, 168, 76, 0.6);
  border-radius: 14px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s cubic-bezier(0.2, 1, 0.3, 1);
}
.gu-story:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(201, 168, 76, 0.45);
  transform: translateY(-2px);
}
.gu-index-num {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: rgba(201, 168, 76, 0.45);
  user-select: none;
}
.gu-index-row {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.gu-index-row a:hover h3 { color: var(--gu-gold-soft); }

/* ---------- the price board (لوحة الأسعار) ---------- */

.gu-board {
  position: relative;
  background: var(--gu-navy-deep);
  border: 1px solid rgba(223, 188, 92, 0.28);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 0 80px rgba(201, 168, 76, 0.07);
}
.gu-board::before {
  /* inner brass keyline */
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(201, 168, 76, 0.16);
  border-radius: 12px;
  pointer-events: none;
}

.gu-board-title {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
}

.gu-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gu-up);
  box-shadow: 0 0 9px rgba(93, 202, 165, 0.7);
  animation: gu-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  flex-shrink: 0;
}
.gu-live-dot--mini {
  width: 6px;
  height: 6px;
}
@keyframes gu-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.gu-board-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.gu-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--gu-navy);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px 12px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}
.gu-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 168, 76, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.gu-tile:focus-visible {
  outline: 2px solid var(--gu-gold-soft);
  outline-offset: 2px;
}
.gu-tile--hero { grid-column: span 2; }
.gu-tile--hero .gu-tile-value { font-size: 1.9rem; }

/* directional ghost-sparkline underline */
.gu-tile::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2px;
}
.gu-tile.gu-dir-up::after   { background: linear-gradient(to left, rgba(93, 202, 165, 0.9), rgba(93, 202, 165, 0)); }
.gu-tile.gu-dir-down::after { background: linear-gradient(to left, rgba(240, 153, 123, 0.9), rgba(240, 153, 123, 0)); }
.gu-tile.gu-dir-flat::after { background: rgba(156, 163, 175, 0.25); }

.gu-tile-label {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--gu-gold-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.gu-tile-value {
  font-family: 'DM Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 1.35rem;
  color: #F5F0E8;
  line-height: 1.1;
  white-space: nowrap;
}
.gu-tile-unit {
  font-family: 'Tajawal', sans-serif;
  font-size: 0.66rem;
  color: var(--gu-flat);
}

.gu-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 999px;
}
.gu-chip--up   { color: var(--gu-up);   background: rgba(93, 202, 165, 0.13); }
.gu-chip--down { color: var(--gu-down); background: rgba(240, 153, 123, 0.13); }
.gu-chip--flat { color: var(--gu-flat); background: rgba(156, 163, 175, 0.13); }

.gu-board-foot {
  font-size: 0.68rem;
  color: var(--gu-flat);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* mobile: snap rail */
@media (max-width: 1023px) {
  .gu-board-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 168, 76, 0.4) transparent;
  }
  .gu-tile {
    flex: 0 0 215px;
    scroll-snap-align: start;
  }
  .gu-tile--hero { flex: 0 0 285px; }
  .gu-tile--hero .gu-tile-value { font-size: 1.5rem; }
}

/* ---------- the inquiries window (شباك الاستعلامات) ---------- */

.gu-askbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: right;
  background: linear-gradient(135deg, #11305a 0%, var(--gu-navy) 100%);
  border: 1px solid rgba(223, 188, 92, 0.45);
  border-radius: 14px;
  padding: 14px 20px;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(10, 25, 47, 0.35);
  transition: border-color 0.25s, transform 0.25s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.25s;
}
.gu-askbar:hover {
  border-color: var(--gu-gold-soft);
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(10, 25, 47, 0.45);
}
.gu-askbar:focus-visible { outline: 3px solid var(--gu-gold-soft); outline-offset: 3px; }

.gu-caret {
  display: inline-block;
  width: 2px;
  height: 1.25em;
  background: var(--gu-gold-soft);
  animation: gu-blink 1.1s step-end infinite;
  vertical-align: middle;
  flex-shrink: 0;
}
@keyframes gu-blink { 50% { opacity: 0; } }

.gu-ask-q {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  color: #E2E8F0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.35s;
}
.gu-ask-cta {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gu-navy);
  background: var(--gu-gold);
  padding: 8px 18px;
  border-radius: 9px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- cream-zone cards ---------- */

.gu-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--gu-border-cream);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.gu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.55);
  box-shadow: 0 14px 34px rgba(13, 37, 69, 0.10);
}
/* press-sheet registration ticks on hover */
.gu-card::before,
.gu-card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--gu-gold);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}
.gu-card::before { top: 7px; right: 7px; border-width: 2px 2px 0 0; }
.gu-card::after  { bottom: 7px; left: 7px; border-width: 0 0 2px 2px; }
.gu-card:hover::before,
.gu-card:hover::after { opacity: 1; }

/* big Arabic-Indic numeral on decision cards */
.gu-decision-num {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  color: rgba(201, 168, 76, 0.4);
  user-select: none;
}

/* sector gateway tiles */
.gu-gate {
  background: #fff;
  border: 1px solid var(--gu-border-cream);
  border-radius: 14px;
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}
.gu-gate:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 168, 76, 0.6);
  box-shadow: 0 12px 28px rgba(13, 37, 69, 0.09);
}
.gu-gate-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(13, 37, 69, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--gu-navy);
  transition: background 0.3s, color 0.3s;
}
.gu-gate:hover .gu-gate-icon {
  background: var(--gu-navy);
  color: var(--gu-gold-soft);
}

/* engraved fallback plate for missing article images (3 variants) */
.gu-plate {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(150deg, var(--gu-navy) 0%, var(--gu-navy-deep) 100%);
}
.gu-plate--b { background: linear-gradient(150deg, var(--gu-navy-2) 0%, var(--gu-navy) 100%); }
.gu-plate--c { background: linear-gradient(150deg, #122e54 0%, #0c1f3c 100%); }
.gu-plate::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
}
.gu-plate svg { opacity: 0.85; }

/* reports ledger rows */
.gu-ledger-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 6px;
  border-top: 1px solid rgba(13, 37, 69, 0.10);
  transition: background 0.2s;
}
.gu-ledger-row:last-child { border-bottom: 1px solid rgba(13, 37, 69, 0.10); }
.gu-ledger-row:hover { background: rgba(201, 168, 76, 0.06); }

/* Fahim band */
.gu-fahim-band {
  position: relative;
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(201, 168, 76, 0.16) 0%, rgba(201, 168, 76, 0) 60%),
    linear-gradient(135deg, var(--gu-navy) 0%, var(--gu-navy-deep) 100%);
  border: 1px solid rgba(223, 188, 92, 0.3);
  border-radius: 22px;
  overflow: hidden;
}
.gu-fahim-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/static/img/pattern.svg');
  background-size: 96px 96px;
  opacity: 0.05;
  pointer-events: none;
}

.gu-pillar {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.gu-pillar-star {
  color: var(--gu-gold);
  flex-shrink: 0;
  margin-top: 3px;
}

/* "ask Fahim about this" mini hook on news cards */
.gu-ask-hook {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--gu-gold-ink);
  background: rgba(201, 168, 76, 0.10);
  border: 1px solid rgba(201, 168, 76, 0.30);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.gu-ask-hook:hover { background: var(--gu-navy); color: var(--gu-gold-soft); border-color: var(--gu-navy); }

@media (pointer: coarse) {
  .gu-ask-hook {
    min-height: 44px;
    padding: 10px 14px;
  }
}

/* ---------- keyboard focus on links (surface-appropriate ring colors) ---------- */

/* dark (navy) surfaces */
.gu-story a:focus-visible,
.gu-index-row a:focus-visible,
.gu-board-foot a:focus-visible {
  outline: 2px solid var(--gu-gold-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

/* light (white/cream) surfaces */
.gu-gate:focus-visible,
.gu-ledger-row a:focus-visible,
.gu-card a:focus-visible,
.gu-ask-hook:focus-visible {
  outline: 2px solid var(--gu-navy);
  outline-offset: 2px;
}

/* ---------- motion safety ---------- */

@media (prefers-reduced-motion: reduce) {
  /* static, fully readable wire: wrap items instead of scrolling them */
  .gu-wire-track { animation: none; transform: none; white-space: normal; flex-wrap: wrap; row-gap: 0.25rem; }
  .gu-wire-pause { display: none; }
  .gu-live-dot { animation: none; }
  .gu-caret { animation: none; }
  .gu-btn-gold, .gu-btn-ghost, .gu-tile, .gu-card, .gu-gate, .gu-story, .gu-askbar { transition: none; }
  /* reveal/scale-in initial states are neutralized globally in main.css */
}
