/* ============================================================
   Midlands Economic Summit — Main Stylesheet
   ============================================================ */

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }
body { background: #080B12; color: #F7F6F2; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100%; }

/* Prevent images and media from ever exceeding their container */
img, video, iframe, svg { max-width: 100%; height: auto; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #080B12; }
::-webkit-scrollbar-thumb { background: #C9973A; border-radius: 2px; }

/* ── Typography ────────────────────────────────────────────── */
.font-display { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ── Gold gradient text ────────────────────────────────────── */
.text-gold-grad {
  background: linear-gradient(135deg, #C9973A 0%, #E8BB62 50%, #C9973A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Grain overlay ─────────────────────────────────────────── */
.grain::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── Navigation ────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#nav.scrolled {
  background: rgba(8,11,18,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(201,151,58,0.15);
}
.nav-link {
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: #8895A7; text-decoration: none; transition: color 0.2s;
}
.nav-link:hover, .nav-active { color: #E8BB62; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-gold {
  display: inline-flex; align-items: center; gap: 8px;
  background: #C9973A; color: #080B12;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 28px; border-radius: 2px; text-decoration: none;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn-gold:hover { background: #E8BB62; transform: translateY(-1px); box-shadow: 0 8px 32px rgba(201,151,58,0.3); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(201,151,58,0.4); color: #E8BB62;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 13px 28px; border-radius: 2px; text-decoration: none;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: #E8BB62; background: rgba(201,151,58,0.08); transform: translateY(-1px); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero-bg {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,151,58,0.07) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(14,35,70,0.6) 0%, transparent 60%), #080B12;
}
.hero-grid {
  background-image: linear-gradient(rgba(201,151,58,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(201,151,58,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Hero video ────────────────────────────────────────────── */
.hero-video-wrapper {
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
}
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.hero-video-overlay {
  position: absolute; inset: 0;
  background: rgba(8,11,18,0.72);
}
.hero-video-grid {
  position: absolute; inset: 0; z-index: 1;
  background-image: linear-gradient(rgba(201,151,58,0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(201,151,58,0.035) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content { position: relative; z-index: 2; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-1 { animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.1s both; }
.anim-2 { animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.25s both; }
.anim-3 { animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.4s both; }
.anim-4 { animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.55s both; }
.anim-5 { animation: fadeUp 0.9s cubic-bezier(0.16,1,0.3,1) 0.7s both; }

/* ── Ticker ────────────────────────────────────────────────── */
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-inner { display: flex; animation: tickerScroll 40s linear infinite; width: max-content; }
.ticker-wrap:hover .ticker-inner { animation-play-state: paused; }

/* ── Dividers ──────────────────────────────────────────────── */
.gold-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(201,151,58,0.5), transparent); }
.gold-line-v { width: 1px; background: linear-gradient(180deg, transparent, rgba(201,151,58,0.5), transparent); }

/* ── Section labels ────────────────────────────────────────── */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #C9973A;
}

/* ── Cards ─────────────────────────────────────────────────── */
.speaker-card {
  background: #111827; border: 1px solid rgba(201,151,58,0.1); border-radius: 2px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s; overflow: hidden;
}
.speaker-card:hover { border-color: rgba(201,151,58,0.35); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.speaker-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; filter: grayscale(20%) contrast(1.05); transition: filter 0.4s; }
.speaker-card:hover img { filter: grayscale(0%) contrast(1.1); }

.why-card {
  padding: 32px 28px; border: 1px solid rgba(201,151,58,0.1); border-radius: 2px; background: #0C1220;
  transition: border-color 0.3s, background 0.3s;
}
.why-card:hover { border-color: rgba(201,151,58,0.3); background: #111827; }

/* ── Stat counters ─────────────────────────────────────────── */
.stat-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(48px, 6vw, 80px); font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, #C9973A 0%, #E8BB62 60%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Agenda ────────────────────────────────────────────────── */
.agenda-row {
  display: grid; grid-template-columns: 80px 1fr; gap: 0 24px;
  padding: 20px 0; border-bottom: 1px solid rgba(201,151,58,0.08); transition: background 0.2s;
}
.agenda-row:hover { background: rgba(201,151,58,0.03); }
.agenda-row:last-child { border-bottom: none; }

/* ── YouTube Shorts embed ──────────────────────────────────── */
.video-shorts-wrapper {
  position: relative;
  width: 360px;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,151,58,0.15);
  background: #000;
}
.video-shorts-wrapper::before {
  content: '';
  display: block;
  padding-top: 177.78%; /* 9:16 ratio */
}
.video-shorts-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Partners ──────────────────────────────────────────────── */
.partner-logo { filter: brightness(0.7) saturate(0); transition: filter 0.3s; max-height: 48px; max-width: 160px; width: auto; object-fit: contain; }
.partner-logo:hover { filter: brightness(1) saturate(1); }

/* ── Testimonials ──────────────────────────────────────────── */
.testimonial-card {
  background: #111827; border: 1px solid rgba(201,151,58,0.1); border-radius: 2px; padding: 32px; position: relative;
}
.testimonial-card::before {
  content: '\201C'; font-family: 'Cormorant Garamond', serif; font-size: 96px; line-height: 0.6;
  color: rgba(201,151,58,0.2); position: absolute; top: 24px; left: 24px; pointer-events: none;
}

/* ── Countdown ─────────────────────────────────────────────── */
.countdown-unit { text-align: center; min-width: 56px; }
.countdown-num { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 36px; font-weight: 700; color: #E8BB62; line-height: 1; display: block; }
.countdown-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8895A7; }
.countdown-sep { font-family: 'Cormorant Garamond', serif; font-size: 32px; color: rgba(201,151,58,0.3); line-height: 1; padding-top: 2px; }

/* ── Pill tag ──────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #E8BB62; border: 1px solid rgba(201,151,58,0.3); padding: 5px 12px; border-radius: 100px;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #C9973A; }

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ── Mobile menu ───────────────────────────────────────────── */
#mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 1050;
  background: rgba(8,11,18,0.97); backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center; gap: 0;
  padding: 80px 32px 48px;
}
#mobile-menu.open { display: flex; }
.mobile-menu-links {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%;
}
.mobile-nav-link {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 17px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  color: #C8D4E3; text-decoration: none;
  padding: 14px 0; width: 100%; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.mobile-nav-link:first-child { border-top: 1px solid rgba(255,255,255,0.06); }
.mobile-nav-link:hover { color: #E8BB62; }
.mobile-menu-cta {
  margin-top: 32px; width: 100%; justify-content: center;
  font-size: 13px; padding: 16px 24px; border: none;
  border-bottom: none !important; border-top: none !important;
}

/* Mobile menu close button */
.mobile-menu-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%; cursor: pointer;
  transition: background 0.2s;
}
.mobile-menu-close:hover { background: rgba(255,255,255,0.12); }

/* Hamburger → X animation */
.hamburger { position: relative; z-index: 1051; }
.hamburger span { transform-origin: center; }
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); width: 24px; margin-left: 0; }

/* ── Progress bar ──────────────────────────────────────────── */
#progress-bar { position: fixed; top: 0; left: 0; height: 2px; z-index: 1001; background: linear-gradient(90deg, #C9973A, #E8BB62); width: 0%; transition: width 0.1s linear; }

/* ── Sticky CTA ────────────────────────────────────────────── */
#sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: rgba(8,11,18,0.97); border-top: 1px solid rgba(201,151,58,0.2);
  backdrop-filter: blur(8px);
  transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
#sticky-cta.visible { transform: translateY(0); }

/* ── Footer helpers ────────────────────────────────────────── */
.footer-link { font-size: 14px; color: #8895A7; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: #E8BB62; }
.footer-social-link {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201,151,58,0.2); border-radius: 2px; text-decoration: none; transition: border-color 0.2s;
}
.footer-social-link:hover { border-color: rgba(201,151,58,0.5); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-input {
  width: 100%; background: #111827; border: 1px solid rgba(201,151,58,0.2);
  color: #F7F6F2; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px;
  padding: 13px 16px; border-radius: 2px; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: rgba(201,151,58,0.5); }
.form-input::placeholder { color: #8895A7; }
.form-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8895A7; margin-bottom: 8px; }
.form-group { margin-bottom: 20px; }
.form-select {
  width: 100%; background: #111827; border: 1px solid rgba(201,151,58,0.2);
  color: #F7F6F2; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px;
  padding: 13px 16px; border-radius: 2px; outline: none; transition: border-color 0.2s;
  -webkit-appearance: none; cursor: pointer;
}
.form-select:focus { border-color: rgba(201,151,58,0.5); }
.form-select option { background: #111827; }
textarea.form-input { resize: vertical; min-height: 120px; }
.form-error { display: none; color: #f87171; font-size: 12px; margin-top: 6px; }
.form-success {
  display: none; padding: 16px 20px; background: rgba(201,151,58,0.08);
  border: 1px solid rgba(201,151,58,0.3); border-radius: 2px;
  color: #E8BB62; font-size: 14px; margin-top: 16px;
}
.honeypot { display: none !important; position: absolute; left: -9999px; }

/* ── Page hero (inner pages) ───────────────────────────────── */
.page-hero {
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201,151,58,0.06) 0%, transparent 70%), #080B12;
  padding-top: 120px; padding-bottom: 64px;
  border-bottom: 1px solid rgba(201,151,58,0.1);
}

/* ── Info cards ────────────────────────────────────────────── */
.info-card {
  background: #111827; border: 1px solid rgba(201,151,58,0.1); border-radius: 2px; padding: 28px;
  transition: border-color 0.3s;
}
.info-card:hover { border-color: rgba(201,151,58,0.25); }

/* ── Ticket cards ──────────────────────────────────────────── */
.ticket-card {
  background: #111827; border: 1px solid rgba(201,151,58,0.1); border-radius: 2px; padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}
.ticket-card.featured { border-color: rgba(201,151,58,0.4); background: #16202F; }
.ticket-card:hover { border-color: rgba(201,151,58,0.35); transform: translateY(-4px); }

/* ── Mobile nav controls ───────────────────────────────────── */
.hamburger { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: none; border: none; cursor: pointer; outline: none; -webkit-appearance: none; appearance: none; }
@media (max-width: 768px) {
  .nav-links        { display: none !important; }
  .mobile-controls  { display: flex !important; }
  /* Scale nav logos down proportionally on mobile */
  #nav .logo-group             { gap: 12px !important; }
  #nav .logo-group .mes-logo   { height: 28px !important; }
  #nav .logo-group .divider    { height: 22px !important; }
  #nav .logo-group .nach-logo  { height: 16px !important; }
  #nav .logo-group .powered-label { font-size: 8px !important; }
}

/* ── Mobile overflow fixes ─────────────────────────────────── */
@media (max-width: 640px) {
  /* Countdown — scale down on small screens so it fits */
  .countdown-unit  { min-width: 42px; }
  .countdown-num   { font-size: 26px; }
  .countdown-sep   { font-size: 22px; padding-top: 0; }

  /* Partner logo rows — tighter gap and smaller logos on mobile */
  .partner-logo    { max-height: 36px; max-width: 120px; }

  /* Speaker modal image — keep it proportional on small screens */
  #sm-header       { flex-direction: column; }
  #sm-img.visible  { width: 100%; height: 200px; display: block; }
  #sm-meta         { padding: 16px 20px 0; }
  #sm-body         { padding: 16px 20px 20px; }
  #sm-name         { font-size: 20px; padding-right: 0; }

  /* Ticket cards — reduce padding and allow button text to wrap */
  .ticket-card     { padding: 20px; }
  .ticket-card .btn-gold { white-space: normal; text-align: center; }
}

/* Mobile "Tickets" pill button */
.btn-mob-tickets {
  display: inline-flex;
  align-items: center;
  background: #C9973A;
  color: #080B12;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 2px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.btn-mob-tickets:hover { opacity: 0.85; }

/* ── Speaker bio modal ─────────────────────────────────────── */
#speaker-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(8,11,18,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-y: auto;
  padding: 40px 20px;
  align-items: flex-start;
  justify-content: center;
}
#speaker-modal.open { display: flex; }
#speaker-modal-inner {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: #0C1220;
  border: 1px solid rgba(201,151,58,0.2);
  border-radius: 4px;
  overflow: hidden;
  margin: auto;
}
#speaker-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: #8895A7;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
  z-index: 2;
}
#speaker-modal-close:hover { color: #F7F6F2; }
#sm-header {
  display: flex;
  gap: 0;
}
#sm-img {
  width: 160px;
  height: 200px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  display: none;
}
#sm-img.visible { display: block; }
#sm-meta {
  padding: 28px 28px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
#sm-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #F7F6F2;
  margin-bottom: 4px;
  padding-right: 36px;
}
#sm-role {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  color: #C9973A;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#sm-org {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 12px;
  color: #8895A7;
}
#sm-body {
  padding: 20px 28px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
#sm-bio {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #C8D4E3;
}
.speaker-clickable:hover { border-color: rgba(201,151,58,0.5) !important; }
@media (max-width: 540px) {
  #sm-img { width: 120px; height: 150px; }
  #sm-name { font-size: 20px; }
}
