/* =============================================
   CourierApp – main.css
   Custom properties + Tailwind @layer extensions
   ============================================= */

:root {
  --brand-900: #21221d;
  --brand-700: #363030;
  --brand-500: rgb(66, 62, 62);
  --brand-400: #504d4d;
  --brand-300: #b1aaaa;
  --accent:    #ea3c3e;
  --accent-lt: #f08284;
  --gray-900:  #0F172A;
  --gray-700:  #334155;
  --gray-500:  #64748B;
  --gray-200:  #E2E8F0;
  --gray-50:   #F8FAFC;
  --white:     #FFFFFF;

  --fs-xs:  0.75rem;
  --fs-sm:  0.875rem;
  --fs-base:1rem;
  --fs-lg:  1.125rem;
  --fs-xl:  1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;
  --fs-6xl: 3.75rem;

  --radius-sm: 0.375rem;
  --radius:    0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 16px rgba(12,20,69,.12);
  --shadow-lg: 0 12px 40px rgba(12,20,69,.18);
  --shadow-xl: 0 24px 64px rgba(12,20,69,.22);

  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb { background: var(--brand-400); border-radius: 99px; }

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  padding: 1.25rem 0;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow);
  padding: 0.75rem 0;
  backdrop-filter: blur(8px);
}
#navbar.scrolled .nav-logo { color: var(--brand-700); }
#navbar.scrolled .nav-link { color: var(--gray-700); }
#navbar.scrolled .nav-link:hover { color: var(--brand-500); }
#navbar.scrolled .hamburger span { background: var(--gray-700); }

.nav-logo { font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.03em; }
.nav-link {
  font-size: var(--fs-sm); font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: width var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--accent-lt); }

/* ---- Mobile menu ---- */
#mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--brand-900);
  z-index: 1001; /* must be above navbar's 1000 */
  padding: 1.5rem 2rem 2rem;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}
#mobile-menu.open { display: flex; }
.mobile-menu-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white !important;
  text-decoration: none !important;
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  pointer-events: none;
}
.mobile-menu-logo img { height: 40px; }

.mobile-menu-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 2px solid rgba(255,255,255,0.15);
  padding-left: 1rem;
}
.mobile-menu-group-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.25rem;
}
.mobile-menu-group a {
  font-size: var(--fs-base) !important;
  color: rgba(255,255,255,0.8) !important;
}

#mobile-menu a { color: white; font-size: var(--fs-xl); font-weight: 600; text-decoration: none; }

/* Close button — explicit styles so it's always visible */
#mobile-close {
  position: absolute;
  top: 1.35rem;
  right: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: white !important;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition);
  z-index: 10;
}
#mobile-close:hover { background: rgba(255,255,255,0.25); }

.hamburger { cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: white; border-radius: 99px; transition: all var(--transition); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: var(--fs-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer; border: none; outline: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: #ea3c3e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 0, 0, 0.35);
  color: white;
}
.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: white;
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--brand-700);
  border: 2px solid var(--brand-500);
}
.btn-outline:hover {
  background: var(--brand-700);
  color: white;
  transform: translateY(-2px);
}
.btn-lg { padding: 1rem 2.25rem; font-size: var(--fs-base); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: var(--fs-xs); }

/* =============================================
   SECTION UTILITIES
   ============================================= */
.section-pad { padding: 5rem 0; }
.section-pad-sm { padding: 3rem 0; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

.section-label {
  display: inline-block;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl));
  font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}
.section-title.light { color: white; }
.section-subtitle {
  font-size: var(--fs-lg); color: var(--gray-500); line-height: 1.7;
  max-width: 640px;
}
.section-subtitle.light { color: rgba(255,255,255,0.75); }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 3rem; height: 3rem;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: white;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.card-icon.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-lt));
}

/* =============================================
   BADGE
   ============================================= */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: var(--fs-xs); font-weight: 600;
}
.badge-primary { background: rgba(57,73,171,.12); color: var(--brand-700); }
.badge-accent  { background: rgba(255,111,0,.12); color: var(--accent); }
.badge-green   { background: rgba(22,163,74,.12); color: #16A34A; }

/* =============================================
   STATS
   ============================================= */
.stat-number {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, white, rgba(255,255,255,.7));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-label { font-size: var(--fs-sm); color: rgba(255,255,255,0.65); margin-top: 0.35rem; }

/* =============================================
   SOCIAL PROOF TICKER
   ============================================= */
.ticker-wrap { overflow: hidden; }
.ticker-track {
  display: flex; gap: 3rem; align-items: center;
  animation: ticker 28s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: var(--fs-sm);
  color: var(--gray-500);
  white-space: nowrap;
  transition: color var(--transition);
}
.ticker-item:hover { color: var(--brand-700); }
.text-accent { color: #ea3c3e; font-weight: 700; }
/* =============================================
   HERO BLOB
   ============================================= */
.hero-blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}

/* =============================================
   FOOTER BANNER
   ============================================= */
#footer-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: linear-gradient(90deg, var(--brand-900), var(--brand-700));
  color: white;
  padding: 0.6rem 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  font-size: var(--fs-sm);
  box-shadow: 0 -4px 20px rgba(0,0,0,.2);
  transition: transform var(--transition);
}
#footer-banner.hidden { transform: translateY(100%); }
#footer-banner a { color: var(--accent-lt); font-weight: 600; text-decoration: none; }
#footer-banner a:hover { text-decoration: underline; }
#banner-close {
  position: absolute; right: 1rem;
  background: none; border: none; color: rgba(255,255,255,.6);
  cursor: pointer; font-size: 1.1rem; line-height: 1;
  transition: color var(--transition);
}
#banner-close:hover { color: white; }

/* =============================================
   PAGE HERO (inner pages)
   ============================================= */
.page-hero {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 60%, var(--brand-500) 100%);
  padding: 8rem 0 4rem;
  position: relative; overflow: hidden;
}
.page-hero .breadcrumb { font-size: var(--fs-sm); color: rgba(255,255,255,.6); margin-bottom: 1rem; }
.page-hero .breadcrumb a { color: rgba(255,255,255,.6); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: white; }

/* =============================================
   TIMELINE
   ============================================= */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: var(--gray-200); transform: translateX(-50%);
}
.timeline-item { position: relative; display: flex; gap: 2rem; margin-bottom: 3rem; }
.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-content { flex: 1; }
.timeline-dot {
  width: 3rem; height: 3rem; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: white; font-weight: 800; font-size: var(--fs-sm);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  box-shadow: 0 0 0 4px white, 0 0 0 6px var(--brand-300);
  align-self: flex-start; margin-top: 0.5rem;
}

/* =============================================
   ACCORDION / FAQ
   ============================================= */
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 1.25rem 0; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: var(--fs-base); cursor: pointer;
  color: var(--gray-900); transition: color var(--transition);
}
.faq-question:hover { color: var(--brand-700); }
.faq-question .icon { transition: transform var(--transition); flex-shrink: 0; color: var(--brand-500); }
.faq-question.open .icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 1.25rem; color: var(--gray-500); line-height: 1.7; }
.faq-answer.open { display: block; }

/* =============================================
   TABS
   ============================================= */
.tab-nav { display: flex; gap: 0.5rem; border-bottom: 2px solid var(--gray-200); margin-bottom: 2rem; }
.tab-btn {
  padding: 0.75rem 1.25rem; font-weight: 600; font-size: var(--fs-sm);
  background: none; border: none; border-bottom: 3px solid transparent;
  margin-bottom: -2px; cursor: pointer; color: var(--gray-500);
  transition: all var(--transition);
}
.tab-btn.active { color: white; border-bottom-color: var(--brand-700); background-color: #ea3c3e;}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* =============================================
   PAIN POINTS CARD
   ============================================= */
.pain-card {
  border-left: 4px solid var(--accent);
  background: var(--gray-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem;
}
.pain-card .problem { font-weight: 700; color: var(--gray-900); margin-bottom: 0.5rem; }
.pain-card .solution { color: var(--gray-500); font-size: var(--fs-sm); }

/* =============================================
   INTEGRATION CARD
   ============================================= */
.integration-card {
  background: white; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: all var(--transition);
}
.integration-card:hover {
  border-color: var(--brand-400);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.integration-logo {
  height: 2.5rem; display: flex; align-items: center;
  font-weight: 800; font-size: var(--fs-lg); color: var(--brand-700);
}
.integration-status {
  font-size: var(--fs-xs); font-weight: 600;
  color: #16A34A;
}

/* =============================================
   CONTACT FORM
   ============================================= */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: 0.4rem; color: var(--gray-700); }
.form-control {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-size: var(--fs-sm); color: var(--gray-900);
  background: white; transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
.form-control:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(57,73,171,.12);
}
.form-control.error { border-color: #dc2626; }
.form-error { font-size: var(--fs-xs); color: #dc2626; margin-top: 0.25rem; display: none; }
.form-error.show { display: block; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--brand-900);
  color: rgba(255,255,255,.75);
  padding: 4rem 0 2rem;
}
.footer-logo { font-weight: 800; font-size: var(--fs-xl); color: white; margin-bottom: 0.75rem; }
.footer-tagline { font-size: var(--fs-sm); color: rgba(255,255,255,.5); }
.footer-heading { font-weight: 700; color: white; font-size: var(--fs-sm); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-link { display: block; color: rgba(255,255,255,.6); font-size: var(--fs-sm); text-decoration: none; margin-bottom: 0.5rem; transition: color var(--transition); }
.footer-link:hover { color: var(--accent-lt); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 2rem 0 1.5rem; }
.footer-copy { font-size: var(--fs-xs); color: rgba(255,255,255,.35); text-align: center; }

/* =============================================
   SWIPER OVERRIDES
   ============================================= */
.hero-swiper { width: 100%; height: 100%; }
.swiper-pagination-bullet { background: rgba(255,255,255,.5); opacity: 1; width: 8px; height: 8px; }
.swiper-pagination-bullet-active { background: white; width: 24px; border-radius: 99px; }
.swiper-button-next, .swiper-button-prev { color: white; }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 1.25rem; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .section-pad { padding: 3rem 0; }
  .timeline::before { left: 1.5rem; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; padding-left: 3.5rem; }
  .timeline-dot { position: absolute; left: 0; }
  .tab-nav { overflow-x: auto; }
  .tab-btn { white-space: nowrap; }
  #footer-banner { padding: 0.5rem 2.5rem 0.5rem 1rem; text-align: center; font-size: 0.75rem; }
  .max-w-5xl { max-width: 100% !important; overflow-x: hidden; }
  .container-wide { max-width: 100% !important; overflow-x: hidden; }
}