/* ==========================================================================
   AI Qatar Summit 2026 - Master Third Pass Premium CSS Design System
   Visual Language: 35% International AI Event, 35% Contemporary Qatar, 20% Executive Institutional, 10% Future Technology
   RTL First | IBM Plex Sans Arabic | Zero-Waste Layout
   ========================================================================== */

:root {
  /* Qatar Sovereign Palette */
  --qatar-maroon: #158a82;
  --qatar-maroon-dark: #0b5d57;
  --qatar-maroon-deep: #073b37;
  --qatar-maroon-light: #20a89e;
  
  /* Luxury Surfaces */
  --white: #ffffff;
  --off-white: #f6fafa;
  --warm-surface: #ebf5f4;
  --surface-border: #dae8e7;
  --surface-border-subtle: #e4f0ef;
  
  /* High-Legibility Typography */
  --charcoal: #171717;
  --text-primary: #151f1e;
  --text-secondary: #5e5257;
  --text-muted: #887c82;
  
  /* Precision Tech Accents */
  --gold-accent: #5bc6bf;
  --gold-subtle: rgba(91,198,191, 0.15);
  --ai-line-glow: rgba(91,198,191, 0.28);
  
  /* System Metrics */
  --font-arabic: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 88px;
  
  /* Solid Institutional Radii (Controlled - not bubbly) */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  
  /* Fluid Curves */
  --ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  background-color: var(--qatar-maroon-deep);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background-color: var(--white);
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-editorial), opacity var(--duration-fast) var(--ease-editorial);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Generous Desktop Container Measure (Item #28) */
.qatar-container {
  width: min(1320px, calc(100% - 64px));
  margin-inline: auto;
  position: relative;
}

.qatar-container-tight {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
  position: relative;
}

@media (max-width: 768px) {
  .qatar-container, .qatar-container-tight {
    width: calc(100% - 36px);
  }
}

/* Typography Hierarchy (Item #2, #9, #27) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-arabic);
  font-weight: 700;
  line-height: 1.22;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(52px, 5vw, 84px);
  font-weight: 800;
  line-height: 1.14;
  color: var(--white);
  letter-spacing: -0.03em;
}

.major-section-title {
  font-size: clamp(34px, 3.8vw, 54px);
  font-weight: 800;
  line-height: 1.22;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: clamp(18px, 1.4vw, 22px);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 720px;
}

.card-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.body-lead {
  font-size: 19px;
  line-height: 1.85;
  color: var(--text-primary);
  max-width: 660px;
}

.body-regular {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.meta-label {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* Eyebrow - Pure Typography With Section Indexing (Item #35) */
.eyebrow-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--qatar-maroon);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
}

.eyebrow-text::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background-color: var(--qatar-maroon);
}

.eyebrow-light {
  color: var(--gold-accent);
}

.eyebrow-light::before {
  background-color: var(--gold-accent);
}

/* Badges & Tags */
.tag-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  background: rgba(255,255,255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255,255,255, 0.2);
  margin-bottom: 16px;
}

.tag-label-accent {
  background: rgba(91,198,191, 0.18);
  color: var(--gold-accent);
  border-color: rgba(91,198,191, 0.4);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  background: var(--qatar-maroon);
  color: var(--white);
}

/* Section Padding Hierarchy */
.section-editorial {
  padding-block: 104px;
  position: relative;
}

.section-storytelling {
  padding-block: 136px;
  position: relative;
}

@media (max-width: 991px) {
  .section-editorial, .section-storytelling {
    padding-block: 76px;
  }
}

/* Subpage Hero Banner */
.bg-burgundy-dark, .page-hero-banner, .page-hero {
  background-color: var(--qatar-maroon-deep);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding: 140px 0 70px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255, 0.08);
}

.bg-burgundy-dark .hero-title, .page-hero-banner .hero-title, .page-hero .hero-title {
  color: var(--white);
}

/* Surface Themes (Item #6) */
.surface-white {
  background-color: var(--white);
}

.surface-off-white {
  background-color: var(--off-white);
}

.surface-warm {
  background-color: var(--warm-surface);
}

.surface-maroon-deep {
  background-color: var(--qatar-maroon-deep);
  color: var(--white);
}

.surface-maroon-deep h1, .surface-maroon-deep h2, .surface-maroon-deep h3, .surface-maroon-deep h4 {
  color: var(--white);
}

.surface-maroon-deep .section-subtitle, .surface-maroon-deep .body-regular {
  color: rgba(255,255,255, 0.88);
}

/* AI Computational Motif & Particle Flow (Item #4, #5) */
.ai-motif-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(91,198,191, 0.3) 0%, transparent 40%),
    linear-gradient(rgba(255,255,255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255, 0.06) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
}

/* Subtle Hero Slow Zoom Animation (Item #33) */
@keyframes heroBgZoom {
  0% { transform: scale(1.0); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1.0); }
}

.hero-bg-zoom {
  animation: heroBgZoom 22s ease-in-out infinite alternate;
}

/* Button CTA System (Item #32, #33) */
.btn-cta-primary, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50px;
  background-color: var(--qatar-maroon);
  color: var(--white) !important;
  font-weight: 700;
  font-size: 16.5px;
  padding: 13px 34px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(21,138,130, 0.25);
  transition: all var(--duration-fast) var(--ease-editorial);
}

.btn-cta-primary:hover, .btn-primary:hover {
  background-color: var(--qatar-maroon-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(21,138,130, 0.35);
}

.btn-cta-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 50px;
  background-color: var(--white);
  color: var(--qatar-maroon) !important;
  font-weight: 700;
  font-size: 16.5px;
  padding: 13px 36px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0, 0.2);
  transition: all var(--duration-fast) var(--ease-editorial);
}

.btn-cta-white:hover {
  background-color: var(--warm-surface);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,0,0, 0.28);
}

.btn-cta-secondary, .btn-outline-burgundy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  background-color: transparent;
  color: var(--qatar-maroon) !important;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--surface-border);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-editorial);
}

.btn-cta-secondary:hover, .btn-outline-burgundy:hover {
  border-color: var(--qatar-maroon);
  background-color: rgba(21,138,130, 0.04);
  transform: translateY(-2px);
}

.btn-cta-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  background-color: transparent;
  color: var(--white) !important;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255,255,255, 0.3);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-editorial);
}

.btn-cta-ghost-light:hover {
  background-color: rgba(255,255,255, 0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-arrow-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255,255,255, 0.2);
  transition: transform var(--duration-fast) var(--ease-editorial);
}

.btn-cta-white .btn-arrow-circle {
  background-color: var(--qatar-maroon);
  color: var(--white);
}

.btn-cta-primary:hover .btn-arrow-circle,
.btn-cta-white:hover .btn-arrow-circle {
  transform: translateX(-4px);
}

/* Header & Scrolled Navigation */
.header-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: transparent;
  transition: all var(--duration-normal) var(--ease-editorial);
}

.header-scrolled {
  position: fixed;
  background-color: rgba(255,255,255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  height: 74px;
  border-bottom: 1px solid var(--surface-border-subtle);
  box-shadow: 0 4px 20px rgba(0,0,0, 0.05);
}

.nav-link {
  color: rgba(255,255,255, 0.92);
  font-size: 15.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-editorial);
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255, 0.08);
}

.header-scrolled .nav-link {
  color: var(--text-primary);
}

.header-scrolled .nav-link:hover {
  color: var(--qatar-maroon);
  background: rgba(21,138,130, 0.04);
}

.header-scrolled .nav-brand-title {
  color: var(--qatar-maroon-dark) !important;
}

.header-scrolled .nav-brand-sub {
  color: var(--text-secondary) !important;
}

.header-scrolled .btn-cta-nav {
  background-color: var(--qatar-maroon) !important;
  color: var(--white) !important;
}

.header-scrolled .btn-cta-nav .btn-arrow-circle {
  background-color: rgba(255,255,255, 0.2) !important;
  color: var(--white) !important;
}

/* Mobile Drawer */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: -320px;
  width: 300px;
  background: var(--qatar-maroon-deep);
  color: var(--white);
  z-index: 1060;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.5);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-drawer.open {
  right: 0;
}

/* Minimal Editorial Stats (Item #10) */
.editorial-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.editorial-stat-cell {
  padding: 48px 36px;
  border-left: 1px solid var(--surface-border);
  text-align: right;
}

.editorial-stat-cell:last-child {
  border-left: none;
}

.stat-number-giant {
  font-size: clamp(48px, 4.2vw, 70px);
  font-weight: 800;
  line-height: 1;
  color: var(--qatar-maroon);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  font-feature-settings: "tnum";
}

@media (max-width: 991px) {
  .editorial-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .editorial-stat-cell:nth-child(2) {
    border-left: none;
  }
  .editorial-stat-cell:nth-child(3), .editorial-stat-cell:nth-child(4) {
    border-top: 1px solid var(--surface-border);
  }
}

@media (max-width: 640px) {
  .editorial-stats-row {
    grid-template-columns: 1fr;
  }
  .editorial-stat-cell {
    border-left: none !important;
    border-bottom: 1px solid var(--surface-border);
    padding: 28px 16px;
  }
}

/* 4-Column Themes Grid with Line Expand & Hover (Item #11) */
.editorial-theme-item {
  padding: 38px 32px;
  border-bottom: 1px solid var(--surface-border);
  transition: all var(--duration-normal) var(--ease-editorial);
  position: relative;
  overflow: hidden;
}

.editorial-theme-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2.5px;
  background-color: var(--qatar-maroon);
  transition: width var(--duration-normal) var(--ease-editorial);
}

.editorial-theme-item:hover::after {
  width: 100%;
}

.editorial-theme-item:hover {
  background-color: var(--off-white);
  padding-right: 40px;
}

.theme-num {
  font-size: 34px;
  font-weight: 800;
  color: rgba(21,138,130, 0.20);
  margin-bottom: 14px;
  line-height: 1;
  transition: color var(--duration-fast), opacity var(--duration-fast);
}

.editorial-theme-item:hover .theme-num {
  color: var(--qatar-maroon);
}

/* Speaker Portrait Cards (4:5 Ratio) with Reveal (Item #13, #14) */
.speaker-editorial-card {
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-editorial);
}

.speaker-portrait-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-md);
  background-color: var(--warm-surface);
  position: relative;
  margin-bottom: 18px;
}

.speaker-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-editorial);
}

.speaker-editorial-card:hover .speaker-portrait-wrap img {
  transform: scale(1.035);
}

.speaker-hover-reveal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(7,59,55, 0.85) 100%);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--duration-normal) var(--ease-editorial);
}

.speaker-editorial-card:hover .speaker-hover-reveal {
  opacity: 1;
  transform: translateY(0);
}

.speaker-editorial-card:hover {
  transform: translateY(-3px);
}

/* Partners Grayscale-to-Color Hover (Item #24) */
.partner-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  height: 110px;
  transition: opacity var(--duration-fast) var(--ease-editorial), filter var(--duration-fast) var(--ease-editorial);
  filter: grayscale(100%);
  opacity: 0.70;
}

.partner-logo-box:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Signature Event Marquee Ribbon */
.event-marquee-strip {
  background-color: var(--qatar-maroon);
  color: var(--white);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(255,255,255, 0.12);
  border-bottom: 1px solid rgba(255,255,255, 0.12);
}

.marquee-inner {
  display: inline-flex;
  align-items: center;
  gap: 48px;
  animation: marqueeRtl 26s linear infinite;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@keyframes marqueeRtl {
  0% { transform: translateX(0%); }
  100% { transform: translateX(50%); }
}

/* Forms */
.qatar-form-group {
  margin-bottom: 24px;
}

.qatar-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.qatar-input, .qatar-select, .qatar-textarea {
  width: 100%;
  padding: 14px 18px;
  background-color: var(--white);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15.5px;
  transition: border-color var(--duration-fast) var(--ease-editorial), box-shadow var(--duration-fast) var(--ease-editorial);
  outline: none;
}

.qatar-input:focus, .qatar-select:focus, .qatar-textarea:focus {
  border-color: var(--qatar-maroon);
  box-shadow: 0 0 0 3px rgba(21,138,130, 0.08);
}

.qatar-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   Comprehensive Mobile Friendly Enhancements
   ========================================================================== */
@media (max-width: 768px) {
  .page-hero-banner, .bg-burgundy-dark {
    padding: 100px 0 45px 0 !important;
  }
  
  .hero-title {
    font-size: clamp(28px, 6.5vw, 42px) !important;
    line-height: 1.25 !important;
  }
  
  .major-section-title {
    font-size: clamp(24px, 5.5vw, 36px) !important;
    line-height: 1.3 !important;
  }
  
  .section-editorial, .section-storytelling {
    padding-block: 54px !important;
  }
  
  .btn-cta-primary, .btn-cta-white, .btn-cta-secondary, .btn-cta-ghost-light {
    min-height: 46px;
    padding: 10px 20px;
    font-size: 14.5px;
  }

  .qatar-container, .qatar-container-tight {
    width: calc(100% - 28px) !important;
    padding-inline: 0 !important;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px !important;
  }
  
  .major-section-title {
    font-size: 22px !important;
  }

  .tag-label {
    font-size: 11.5px;
    padding: 4px 12px;
  }

  .eyebrow-text {
    font-size: 12px;
    gap: 8px;
  }

  .qatar-input, .qatar-select, .qatar-textarea {
    padding: 11px 14px;
    font-size: 14px;
  }
}
