/* ============================================================
   COMVEX — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* VARIABLES */
:root {
  --blue: #213BA8;
  --blue-light: #2F4FD4;
  --blue-dark: #162878;
  --cream: #F7F4EF;
  --warm-white: #FDFCFA;
  --charcoal: #1A1A1A;
  --mid-grey: #6B6B6B;
  --light-grey: #E8E5DF;
  --accent-gold: #C9A84C;
}

/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: rgba(253,252,250,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--light-grey);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0px;
  font-family: 'Libre Baskerville', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.5px;
  text-decoration: none;
  line-height: 1;
}
.nav-logo:hover { color: var(--blue); }
.nav-logo span { color: var(--charcoal); letter-spacing: -0.5px; }
.nav-logo-icon {
  height: 32px;
  width: auto;
  display: block;
  fill: var(--blue);
}
nav a {
  text-decoration: none; color: var(--mid-grey);
  font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
nav a:hover { color: var(--charcoal); }
.nav-links { display: flex; gap: 36px; align-items: center; }
.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: 10px 22px; border-radius: 4px;
  font-size: 14px; font-weight: 600;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; color: #fff !important; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px 48px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 55%; height: 100%;
  background: var(--blue);
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 80px; align-items: center;
}
.hero-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--blue);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 28px; height: 2px; background: var(--blue);
}
.hero h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -1.5px;
  color: var(--charcoal);
  margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--blue); }
.hero-sub {
  font-size: 17px; line-height: 1.65;
  color: var(--mid-grey); max-width: 480px;
  margin-bottom: 40px;
  font-weight: 400;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--blue); color: #fff;
  padding: 15px 32px; border-radius: 4px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-ghost {
  color: var(--charcoal);
  padding: 15px 0;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  border-bottom: 1.5px solid var(--charcoal);
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--blue); border-color: var(--blue); }
.hero-right { color: #fff; }
.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px; overflow: hidden;
}
.stat-card {
  background: rgba(255,255,255,0.06);
  padding: 30px 26px;
  border: 1px solid rgba(255,255,255,0.1);
}
.stat-num {
  font-family: 'Libre Baskerville', serif;
  font-size: 36px; font-weight: 700;
  color: #fff; letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 13px; color: rgba(255,255,255,0.65);
  line-height: 1.45; font-weight: 400;
}
.hero-foot {
  margin-top: 18px;
  font-size: 13px; color: rgba(255,255,255,0.55);
  line-height: 1.5;
  display: flex; align-items: center; gap: 10px;
}
.hero-foot::before { content: ''; width: 18px; height: 1.5px; background: rgba(255,255,255,0.4); display: block; flex-shrink: 0; }

/* TICKER */
.ticker { background: var(--charcoal); padding: 16px 0; overflow: hidden; }
.ticker-inner {
  display: flex; gap: 60px;
  animation: ticker 38s linear infinite;
  white-space: nowrap; width: max-content;
}
.ticker-item {
  font-size: 13px; font-weight: 500; letter-spacing: 1px;
  text-transform: uppercase; color: rgba(255,255,255,0.5);
  display: flex; align-items: center; gap: 60px;
}
.ticker-item::after { content: '·'; color: var(--accent-gold); font-size: 20px; font-weight: 700; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SECTION BASE */
section { padding: 100px 48px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--blue); font-weight: 600; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before { content: ''; width: 24px; height: 2px; background: var(--blue); display: block; }
.section-title {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.18; letter-spacing: -1.2px;
  color: var(--charcoal); margin-bottom: 20px;
}
.section-title em { font-style: italic; color: var(--blue); }
.section-body { font-size: 17px; line-height: 1.65; color: var(--mid-grey); max-width: 560px; }

/* FADE-UP ANIMATION */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* FOOTER */
footer { background: var(--charcoal); padding: 48px; display: flex; align-items: center; justify-content: space-between; }
.footer-logo { font-family: 'Libre Baskerville', serif; font-size: 18px; font-weight: 700; color: #fff; }
footer p { font-size: 13px; color: rgba(255,255,255,0.35); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s; cursor: pointer; }
.footer-links a:hover { color: #fff; }

/* LEGAL MODALS */
.legal-modal { position: fixed; inset: 0; z-index: 200; background: rgba(26,26,26,0.6); backdrop-filter: blur(4px); display: none; overflow-y: auto; padding: 40px 20px; }
.legal-modal.open { display: block; }
.legal-box { max-width: 780px; margin: 20px auto; background: var(--warm-white); border-radius: 8px; padding: 48px 48px 56px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.legal-close { position: absolute; top: 18px; right: 22px; background: none; border: none; font-size: 30px; color: var(--mid-grey); cursor: pointer; line-height: 1; }
.legal-close:hover { color: var(--charcoal); }
.legal-box h2 { font-family: 'Libre Baskerville', serif; font-size: 32px; color: var(--charcoal); margin-bottom: 6px; letter-spacing: -1px; }
.legal-date { font-size: 13px; color: var(--mid-grey); margin-bottom: 28px; }
.legal-box h3 { font-family: 'Libre Baskerville', serif; font-size: 18px; color: var(--charcoal); margin: 28px 0 10px; letter-spacing: -0.3px; }
.legal-box p { font-size: 14px; line-height: 1.7; color: var(--mid-grey); margin-bottom: 14px; }
.legal-box ul { margin: 0 0 14px 20px; }
.legal-box li { font-size: 14px; line-height: 1.7; color: var(--mid-grey); margin-bottom: 6px; }
.legal-box a { color: var(--blue); }

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { gap: 0; }
  .nav-links a:not(.nav-cta) { display: none; }
  section { padding: 64px 24px; }
  .hero { padding: 120px 24px 64px; }
  .hero::before { width: 100%; clip-path: none; opacity: 0.04; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 34px; }
  .hero-right { display: block; background: var(--blue); border-radius: 8px; padding: 22px; }
  .hero-stats { grid-template-columns: 1fr; background: rgba(255,255,255,0.12); }
  .hero-stats .stat-card { padding: 22px 24px; }
  .hero-stats .stat-num { font-size: 30px; }
  .hero-foot { color: rgba(255,255,255,0.72); }
  footer { flex-direction: column; gap: 20px; text-align: center; padding: 40px 24px; }
  .footer-links { justify-content: center; }
  .legal-box { padding: 36px 24px 44px; }
}