/* ============================================================
   CampanaOne — Zapier-style aesthetic
   Warm off-white · Orange accent · Clean Inter type
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg:          #FAF9F7;
  --bg-alt:      #F0EDE7;
  --bg-card:     #FFFFFF;
  --text-primary:#1C1C1C;
  --text-body:   #4A4A4A;
  --text-muted:  #737373;
  --orange:      #FF4A00;
  --orange-dark: #E04200;
  --orange-light:#FFF3EE;
  --orange-mid:  #FF6A2F;
  --border:      #E5E0D8;
  --border-light:#EDE9E3;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
.kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
}
.kicker.orange { color: var(--orange); }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  border: 1.5px solid #C5BFB5;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn-outline:hover { border-color: var(--text-primary); background: rgba(0,0,0,0.03); transform: translateY(-1px); }

.btn-sm { font-size: 0.875rem; padding: 0.5rem 1.25rem; }

/* ── Navbar ── */
#navbar {
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.2s;
}
#navbar.shadow-md { box-shadow: 0 1px 12px rgba(0,0,0,0.08); }

/* Become a Partner Button */
.nav-partner-btn {
  color: var(--orange) !important;
  background: var(--orange-light) !important;
}
/* On other pages, make it look like a normal nav link unless hovered */
body:not(.page-partner) .nav-partner-btn {
  background: transparent !important;
  color: #4B5563 !important; /* text-gray-600 — slightly lighter than 700 to match original feel */
}
body:not(.page-partner) .nav-partner-btn:hover {
  background: #f3f4f6 !important; /* hover:bg-gray-100 */
  color: #111827 !important; /* hover:text-gray-900 */
}

/* Mega menu */
.mega-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 6px);
  z-index: 100;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.10);
}
.nav-group:hover .mega-menu {
  opacity: 1; visibility: visible;
  transform: translateY(0); pointer-events: all;
}
.nav-group:hover .chevron { transform: rotate(180deg); }
.chevron { transition: transform 0.16s ease; }

/* Mobile menu */
#mobile-nav { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
#mobile-nav.open { max-height: 700px; }

/* ── Cards ── */
.ec-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ec-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-2px); }
.ec-card-flat { background: #fff; border: 1px solid var(--border); border-radius: 16px; }

/* ── Channel cards ── */
.channel-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: box-shadow 0.18s, transform 0.18s;
}
.channel-card:hover { box-shadow: 0 10px 36px rgba(255,74,0,0.10); transform: translateY(-3px); border-color: #F5C4A0; }

/* ── Feature mockup window ── */
.app-window {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.04);
}
.app-titlebar {
  background: #F5F4F0;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Pricing cards ── */
.pricing-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(0,0,0,0.08); }
.pricing-card.popular {
  border-color: var(--orange);
  box-shadow: 0 20px 56px rgba(255,74,0,0.15);
  transform: scale(1.03);
}
.pricing-card.popular:hover { transform: scale(1.03) translateY(-3px); }

/* ── Stat numbers ── */
.stat-num {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--orange);
  line-height: 1;
}

/* ── Trust badges ── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-body);
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 99px;
}

/* ── Orange tinted section ── */
.orange-tint { background: var(--orange-light); border-top: 1px solid #F5C4A0; border-bottom: 1px solid #F5C4A0; }

/* ── Dark footer ── */
.footer-dark { background: #1C1C1C; }

/* ── Footer grid ── */
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
}

/* ── CTA section (warm orange gradient) ── */
.cta-section { background: linear-gradient(135deg, #FFF3EE 0%, #FFE8D6 100%); border-top: 1px solid #F5C4A0; }

/* ── Video section (only dark section) ── */
.video-section { background: #1C1C1C; }

/* ── Scroll animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Section divider ── */
.section-divider { height: 1px; background: var(--border); }

/* ── Play button ── */
.play-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  position: relative; z-index: 2;
}
.play-btn:hover { transform: scale(1.1); box-shadow: 0 12px 48px rgba(0,0,0,0.35); }
.play-btn svg { margin-left: 4px; }
.play-btn::before {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  animation: ripple 2s infinite;
}
@keyframes ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ── Input ── */
.email-input {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.email-input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,74,0,0.12); }
.email-input::placeholder { color: var(--text-muted); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #C5BFB5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #A89E93; }

/* ── Language Switcher ── */
.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4A4A4A;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.lang-btn:hover { border-color: var(--orange); background: var(--orange-light); }
.lang-chevron { width: 10px; height: 6px; transition: transform 0.2s; }
.lang-btn[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  min-width: 130px;
  list-style: none;
  padding: 6px;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  z-index: 200;
}
.lang-dropdown.open { display: block; }
.lang-dropdown li {
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #525252;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lang-dropdown li:hover { background: var(--orange-light); color: var(--orange); }
.lang-dropdown li.lang-active { color: var(--orange); font-weight: 700; }
.lang-switcher--mobile {
  padding: 12px 16px 4px;
}
.lang-switcher--mobile .lang-dropdown {
  right: auto;
  left: 0;
}

/* Mobile top-bar placement — sits next to hamburger, dropdown opens downward into page */
.lang-switcher--mobile-topbar {
  display: inline-flex;
  align-items: center;
}
.lang-switcher--mobile-topbar .lang-btn {
  padding: 5px 8px;
  font-size: 0.75rem;
}
.lang-switcher--mobile-topbar .lang-dropdown {
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  z-index: 9999;
  min-width: 120px;
}

/* ── Arabic / RTL ── */
[dir="rtl"] body,
[dir="rtl"] .kicker,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] p,
[dir="rtl"] li,
[dir="rtl"] label,
[dir="rtl"] input,
[dir="rtl"] textarea {
  font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}
[dir="rtl"] .flex { flex-direction: row-reverse; }
[dir="rtl"] .text-center { text-align: center; }
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .mega-menu { left: auto; right: -20px; }
[dir="rtl"] .footer-grid { direction: rtl; }
[dir="rtl"] .nav-cta-group { flex-direction: row-reverse; }
[dir="rtl"] .channel-card .flex { flex-direction: row; }
[dir="rtl"] .trust-badge { flex-direction: row-reverse; }

/* ── Chinese font ── */
:lang(zh) body,
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3,
:lang(zh) p, :lang(zh) li, :lang(zh) label,
:lang(zh) input, :lang(zh) textarea {
  font-family: 'Noto Sans SC', 'Inter', system-ui, sans-serif;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .stat-num { font-size: 2.5rem; }
}
