/*
  BackDoorAds — Shared Stylesheet
  styles.css · Back Door Ads Ltd · 2026

  This file replaces the duplicated CSS across all pages.
  Replace each page's inline <style> block with:
    <link rel="stylesheet" href="styles.css">
  and keep only page-specific styles in a small <style> block.
*/

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── DESIGN TOKENS ── */
:root {
  color-scheme: light;

  /* Palette */
  --white:   #FFFFFF;
  --off:     #F7F5F2;
  --cream:   #FDF9F3;
  --ink:     #1A1A1A;
  --ink2:    #3D3D3D;
  --muted:   #7A7A7A;
  --border:  #E4E0D8;
  --yellow:  #F5C800;
  --yellow2: #E6B800;
  --radius:  6px;

  /* Dashboard alias tokens (used by sidebar-based pages) */
  --black:      var(--white);
  --grey:       var(--off);
  --mid:        var(--off);
  --dark:       var(--ink);
  --purple:     var(--yellow2);
  --purple-dim: rgba(230, 184, 0, 0.10);

  /* Dashboard sidebar width */
  --sidebar: 240px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  background: var(--white);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

/* ── GOOGLE FONTS (import in HTML <head>, not here, for performance) ──
   Required link tag in every page <head>:
   <link href="https://fonts.googleapis.com/css2?family=Bebas+Neue
               &family=Manrope:wght@300;400;500;600;700;800
               &family=DM+Mono:wght@400;500&display=swap"
         rel="stylesheet">
*/

/* ═══════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════ */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s;
  border: none;
  letter-spacing: 0.01em;
}
.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
}
.btn-yellow:hover {
  background: var(--yellow2);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(230, 184, 0, 0.35);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn-outline-white:hover { background: rgba(255, 255, 255, 0.1); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}
.btn-lg  { padding: 0.875rem 2rem;   font-size: 0.95rem; }
.btn-xl  { padding: 1rem 2.25rem;    font-size: 1rem; }

/* ── LOGO ── */
.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
}
.logo .D { color: var(--yellow2); }

/* ═══════════════════════════════════════════════
   PUBLIC NAV (index, fleet, about, contact, pricing)
   ═══════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 5vw;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  z-index: 199;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), padding 0.35s ease;
}
.mobile-drawer.open { max-height: 600px; padding: 1rem 0 1.5rem; }

/* Mobile search inside drawer */
.mob-search { margin: 0 5vw 1rem; position: relative; }
.mob-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s;
}
.mob-search input:focus {
  border-color: rgba(245, 200, 0, 0.6);
  background: var(--white);
}
.mob-search input::placeholder { color: var(--muted); }
.mob-search-icon {
  position: absolute; left: 0.85rem; top: 50%;
  transform: translateY(-50%);
  pointer-events: none; color: var(--muted);
}
.mob-search-results {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: none;
  z-index: 300;
}
.mob-search-results.show { display: block; }
.mob-result {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none; color: var(--ink);
  font-size: 0.85rem; font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.mob-result:last-child { border-bottom: none; }
.mob-result:hover { background: var(--off); }
.mob-result-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius);
  background: rgba(245, 200, 0, 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mob-result-icon svg {
  width: 14px; height: 14px;
  stroke: var(--yellow2); fill: none; stroke-width: 2;
}
.mob-result-label { flex: 1; }
.mob-result-path {
  font-size: 0.72rem; color: var(--muted);
  font-family: 'DM Mono', monospace; margin-top: 1px;
}

/* Nav links in drawer */
.mob-nav { list-style: none; padding: 0 5vw; margin-bottom: 1rem; }
.mob-nav li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0;
  color: var(--ink); text-decoration: none;
  font-size: 0.95rem; font-weight: 600;
  border-bottom: 1px solid var(--border);
  transition: color 0.18s;
}
.mob-nav li:last-child a { border-bottom: none; }
.mob-nav li a:hover { color: var(--yellow2); }
.mob-nav li a svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2; }

/* Buttons in drawer */
.mob-btns { display: flex; gap: 0.75rem; padding: 0 5vw; margin-top: 0.5rem; }
.mob-btns a {
  flex: 1; text-align: center;
  padding: 0.85rem;
  border-radius: var(--radius);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem; font-weight: 700;
  text-decoration: none; transition: all 0.18s;
}
.mob-btns .mb-login {
  background: var(--off); color: var(--ink);
  border: 1.5px solid var(--border);
}
.mob-btns .mb-login:hover { border-color: var(--ink); }
.mob-btns .mb-signup { background: var(--yellow); color: var(--ink); }
.mob-btns .mb-signup:hover { background: var(--yellow2); }

/* ═══════════════════════════════════════════════
   DASHBOARD SIDEBAR (fleet-dashboard, advertiser-dashboard, ad-designer)
   ═══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar);
  background: var(--off);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar-logo {
  padding: 1.4rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem; letter-spacing: 0.04em;
  text-decoration: none; color: var(--ink);
  display: block;
}
.sidebar-logo .D { color: var(--yellow); }
.sidebar-section {
  padding: 1.25rem 1rem 0.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: #B0A898;
}
.nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin: 0.1rem 0.5rem;
  border-radius: var(--radius);
  text-decoration: none; color: var(--muted);
  font-size: 0.875rem; font-weight: 500;
  transition: all 0.18s;
  cursor: pointer; border: none; background: none;
  width: calc(100% - 1rem); text-align: left;
}
.nav-item:hover { background: rgba(0, 0, 0, 0.04); color: var(--ink); }
.nav-item.active { background: var(--purple-dim); color: var(--purple); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--yellow); color: var(--ink);
  font-size: 0.65rem; font-weight: 700;
  padding: 0.15rem 0.45rem; border-radius: 2px;
  font-family: 'DM Mono', monospace;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 1rem 0.5rem;
  border-top: 1px solid var(--border);
}
.user-chip {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s;
}
.user-chip:hover { background: rgba(0, 0, 0, 0.04); }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #2a2aff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}
.user-name { font-size: 0.825rem; font-weight: 600; line-height: 1.2; }
.user-role { font-size: 0.7rem; color: var(--muted); font-family: 'DM Mono', monospace; }
.user-logout {
  margin-left: auto; font-size: 0.75rem; color: #444;
  cursor: pointer; transition: color 0.2s;
}
.user-logout:hover { color: #e55; }

/* Dashboard main area */
.main {
  margin-left: var(--sidebar);
  flex: 1; display: flex; flex-direction: column;
  min-height: 100vh; background: var(--white);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-left h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 0.03em; line-height: 1;
}
.topbar-left p { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; font-weight: 300; }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.notif-btn {
  position: relative; width: 36px; height: 36px;
  background: var(--mid); border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem;
  transition: border-color 0.2s;
}
.notif-btn:hover { border-color: rgba(255, 255, 255, 0.2); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--yellow); border: 1.5px solid var(--grey);
}
.content { padding: 2rem 2.5rem; flex: 1; }

/* ═══════════════════════════════════════════════
   PUBLIC PAGE LAYOUT UTILITIES
   ═══════════════════════════════════════════════ */
section { padding: 6rem 5vw; }
.section-alt   { background: var(--off); }
.section-cream { background: var(--cream); }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--yellow2);
  margin-bottom: 0.75rem; font-weight: 600;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1; color: var(--ink); margin-bottom: 0.85rem;
}
.section-sub {
  font-size: 0.975rem; color: var(--muted);
  max-width: 500px; line-height: 1.75;
}

/* ── TICKER ── */
.ticker { background: var(--ink); color: var(--yellow); padding: 0.75rem 0; overflow: hidden; }
.ticker-track { display: flex; animation: ticker 35s linear infinite; white-space: nowrap; }
.ticker-track:hover { animation-play-state: paused; }
.tick {
  display: inline-flex; align-items: center; gap: 1.2rem;
  font-family: 'DM Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0 2.5rem; flex-shrink: 0;
}
.tick-sep { width: 4px; height: 4px; background: var(--yellow); border-radius: 50%; opacity: 0.5; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── TRUST BAR ── */
.trust-bar { padding: 1.75rem 5vw; border-bottom: 1px solid var(--border); background: var(--white); }
.trust-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 2.5rem; flex-wrap: wrap;
}
.trust-item { display: flex; align-items: center; gap: 0.55rem; font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* ── FOOTER ── */
footer { background: var(--off); border-top: 1px solid var(--border); padding: 4rem 5vw 2rem; }
.footer-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-brand p { font-size: 0.82rem; color: var(--muted); line-height: 1.7; max-width: 260px; margin-top: 0.75rem; }
.footer-col h4 {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a { font-size: 0.82rem; color: var(--ink2); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--yellow2); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: 0.75rem; color: var(--muted); font-family: 'DM Mono', monospace; }
.social-links { display: flex; gap: 0.6rem; }
.social-link {
  width: 36px; height: 36px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 0.85rem;
  transition: all 0.18s;
}
.social-link svg { transition: transform 0.18s; }
.social-link:hover svg { transform: scale(1.15); }
.social-link:hover { border-color: var(--yellow2); background: rgba(230, 184, 0, 0.08); }

/* ── LEGAL MODAL ── */
.legal-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(10, 8, 6, 0.65);
  z-index: 9999; align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(4px);
}
.legal-modal-overlay.open { display: flex; }
.legal-modal {
  background: var(--white); border-radius: 16px;
  width: 100%; max-width: 460px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
  animation: modalSlideUp 0.22s ease both;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.legal-modal-header {
  background: var(--ink); padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.legal-modal-logo { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; letter-spacing: 0.04em; color: #fff; }
.legal-modal-logo .D { color: var(--yellow); }
.legal-modal-subtitle {
  font-family: 'DM Mono', monospace; font-size: 0.6rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4); margin-top: 2px;
}
.legal-modal-close {
  background: rgba(255, 255, 255, 0.1); border: none; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.18s;
}
.legal-modal-close:hover { background: rgba(255, 255, 255, 0.2); }
.legal-modal-body { padding: 1.5rem; }
.legal-modal-intro { font-size: 0.8rem; color: var(--muted); margin: 0 0 1.25rem; line-height: 1.6; }
.legal-link {
  display: flex; align-items: center; gap: 12px;
  padding: 1rem;
  border: 1.5px solid var(--border); border-radius: 10px;
  text-decoration: none; margin-bottom: 10px;
  background: var(--off);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.legal-link:last-child { margin-bottom: 0; }
.legal-link:hover { background: #fff; border-color: var(--yellow2); transform: translateX(3px); }
.legal-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.legal-text { flex: 1; }
.legal-text strong { display: block; font-size: 0.875rem; color: var(--ink); font-weight: 700; margin-bottom: 2px; }
.legal-text span { font-size: 0.75rem; color: var(--muted); }
.legal-arrow { font-size: 1.1rem; color: var(--muted); font-weight: 300; line-height: 1; }

/* ── PULSE ANIMATION (hero eyebrow) ── */
.pulse { width: 6px; height: 6px; background: var(--yellow); border-radius: 50%; animation: pulse 2s ease-in-out infinite; display: inline-block; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── FADE-UP (hero content) ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════ */

/* Tablet / small desktop */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 600px) {
  /* Nav */
  .nav-links  { display: none; }
  .nav-right .btn { display: none; }
  .hamburger  { display: flex; }
  .mobile-drawer { display: block; }

  /* Footer: brand full width, 3 nav cols below */
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0 1.5rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
  }
  .footer-col h4   { font-size: 0.6rem; }
  .footer-col ul li a { font-size: 0.75rem; }
}
