/* ═══════════════════════════════════════════════════════
   RivalDesk — Shared Stylesheet
   Variables, reset, nav, footer, common components
   ═══════════════════════════════════════════════════════ */

/* === Variables === */
:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --dark: #152536;
  --dark-deep: #0e1b29;
  --dark-muted: #1e3248;
  --accent: #d97706;
  --accent-light: #f59e0b;
  --teal: #3b9eb5;
  --teal-light: #5cc0d5;
  --purple: #6366f1;
  --purple-light: #818cf8;
  --bg: #eef2f7;
  --bg-warm: #f4f6fb;
  --white: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #5a6577;
  --text-muted: #8e99a8;
  --border: rgba(0,0,0,0.07);
  --border-light: rgba(0,0,0,0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text-primary); -webkit-font-smoothing: antialiased; line-height: 1.6; }
::selection { background: rgba(99,102,241,0.18); }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font); }
img { max-width: 100%; display: block; }

/* === Animations === */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-up { animation: fadeUp 0.7s ease-out both; }
.fade-up-d1 { animation: fadeUp 0.7s ease-out 0.15s both; }

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

/* === Announcement Bar === */
.announcement-bar {
  background: var(--bg-warm);
  padding: 10px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.announcement-bar span.badge {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  margin-right: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.announcement-bar p {
  display: inline;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* === Nav === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 64px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.nav-logo-text span { color: #5cc0d5; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text-primary); }

/* === Nav Dropdown === */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; transition: color 0.2s;
  background: none; border: none; padding: 0; font-family: var(--font);
}
.nav-dropdown-trigger:hover { color: var(--text-primary); }
.nav-dropdown-trigger svg { transition: transform 0.2s; }
.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown.dropdown-open .nav-dropdown-trigger svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  min-width: 240px; background: #fff;
  border: 1px solid rgba(0,0,0,0.08); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  padding: 8px; opacity: 0; visibility: hidden;
  transition: all 0.2s ease; pointer-events: none;
}
.nav-dropdown-menu::before {
  content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.dropdown-open .nav-dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.nav-dropdown-menu a {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border-radius: 8px; transition: background 0.15s;
}
.nav-dropdown-menu a:hover { background: rgba(217,119,6,0.05); }
.nav-dropdown-menu .dd-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.nav-dropdown-menu .dd-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.nav-dropdown-menu .dd-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

/* === Nav Buttons === */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-login {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  border: 1px solid var(--border);
  transition: all 0.2s;
  background: var(--white);
}
.btn-login:hover { background: #f0f3f8; border-color: rgba(0,0,0,0.15); }
.btn-cta {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--dark);
  transition: all 0.2s;
}
.btn-cta:hover { background: var(--dark-muted); box-shadow: 0 4px 12px rgba(21,37,54,0.25); }

/* Mobile toggle */
.nav-mobile-toggle {
  display: none;
  padding: 8px;
  color: var(--text-primary);
}

/* Mobile CTA (hidden on desktop, shown inside mobile menu) */
.nav-mobile-cta {
  display: none;
}

/* === CTA Banner === */
.cta-banner-wrapper {
  padding: 80px 48px;
}
.cta-banner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 80px 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--dark) 0%, var(--dark-deep) 100%);
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  bottom: -400px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 1100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,158,181,0.06) 0%, transparent 45%);
  pointer-events: none;
}
.cta-banner-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px; backdrop-filter: blur(8px);
}
.cta-banner h2 { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -1.5px; line-height: 1.15; margin-bottom: 16px; position: relative; }
.cta-banner h2 span { color: var(--teal-light); }
.cta-banner p { font-size: 15px; color: rgba(255,255,255,0.5); line-height: 1.7; max-width: 520px; margin: 0 auto 36px; position: relative; }
.btn-cta-banner {
  padding: 14px 32px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  color: #fff; background: var(--teal); transition: all 0.25s; position: relative; display: inline-block;
}
.btn-cta-banner:hover { background: var(--teal-light); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(59,158,181,0.35); }

/* === Footer === */
.site-footer {
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-deep) 100%);
  padding: 64px 0 32px;
  color: rgba(255,255,255,0.7);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.06) 50%, transparent 90%);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 48px; }
.footer-brand .nav-logo-text { color: #fff; }
.footer-brand .nav-logo-text span { color: #5cc0d5; }
.footer-brand-desc { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6; margin-top: 12px; max-width: 260px; }
.footer-trial { font-size: 14px; font-weight: 600; color: var(--teal-light); margin-top: 16px; display: block; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social-icon {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5);
  transition: all 0.2s; font-size: 14px;
}
.footer-social-icon:hover { background: rgba(255,255,255,0.15); color: #fff; }
.footer-col-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 20px; }
.footer-link { display: block; font-size: 14px; color: rgba(255,255,255,0.5); padding: 4px 0; transition: color 0.2s; }
.footer-link:hover { color: rgba(255,255,255,0.8); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom-text { font-size: 13px; color: rgba(255,255,255,0.35); }
.footer-bottom-links { display: flex; gap: 24px; }
.footer-bottom-links a { font-size: 13px; color: rgba(255,255,255,0.35); transition: color 0.2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.6); }

/* === Scroll Reveal === */
.scroll-reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }
.scroll-reveal-d1 { transition-delay: 0.1s; }
.scroll-reveal-d2 { transition-delay: 0.2s; }

/* === Shared Responsive === */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .site-nav { padding: 0 24px; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .site-nav { padding: 0 16px; height: 56px; }
  .cta-banner-wrapper { padding: 56px 16px; }
  .cta-banner { padding: 60px 24px; border-radius: 16px; }
  .cta-banner h2 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: center; text-align: center; }
  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.mobile-open {
    display: flex; flex-direction: column; align-items: stretch; position: fixed; top: 56px; left: 0; right: 0;
    background: var(--white); padding: 16px 20px; gap: 4px;
    border-bottom: 1px solid var(--border); box-shadow: 0 12px 40px rgba(0,0,0,0.08); z-index: 99;
  }
  .nav-links.mobile-open .nav-link { padding: 10px 0; font-size: 15px; display: block; }
  .nav-links.mobile-open .nav-dropdown { display: block; }
  .nav-links.mobile-open .nav-dropdown-trigger { padding: 10px 0; font-size: 15px; width: 100%; }
  .nav-mobile-cta {
    display: flex; flex-direction: column; gap: 8px;
    padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px;
  }
  .nav-mobile-cta .btn-login,
  .nav-mobile-cta .btn-cta { width: 100%; text-align: center; display: block; }

  /* Mobile dropdown: hide by default, show on tap */
  .nav-dropdown-menu {
    display: none !important;
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 100%;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0 12px;
    margin: 0;
    transition: none;
  }
  .nav-dropdown-menu::before { display: none; }
  .nav-dropdown.dropdown-open .nav-dropdown-menu {
    display: block !important;
  }
  .nav-dropdown.dropdown-open .nav-dropdown-trigger svg {
    transform: rotate(180deg);
  }
  .nav-dropdown-menu a {
    display: block;
    padding: 8px 0;
    border-radius: 0;
  }
  .nav-dropdown-menu a:hover { background: transparent; }
  .nav-dropdown-menu .dd-icon { display: none; }
  .nav-dropdown-menu .dd-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
  }
  .nav-dropdown-menu .dd-desc { display: none; }
  .nav-dropdown-menu > div[style] { display: none; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .cta-banner-wrapper { padding: 40px 12px; }
  .cta-banner { padding: 48px 16px; border-radius: 14px; }
  .cta-banner h2 { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .announcement-bar { display: none; }
}
