/* Shared design system for VirtualDispatch's public-facing pages
   (landing, blog, legal). Same color language as the app itself
   (templates/index.html), reused here as its own stylesheet since
   these pages don't share a Jinja base with the app shell. */

:root {
  --face:        #FFFFFF;
  --face-dark:   #F3F4F6;
  --titlebar:    #1D4ED8;
  --titlebar-2:  #2563EB;
  --text:        #101828;
  --text-muted:  #667085;
  --shadow-dk:   #D0D5DD;
  --shadow-md:   #E4E7EC;
  --accent-bg:   #EAF0FB;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow-card: 0 1px 2px rgba(16,24,40,0.06);
  --max-width:   1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--face);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--titlebar); }

img { max-width: 100%; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---- Site nav ---- */

.site-nav {
  border-bottom: 1px solid var(--shadow-md);
  background: var(--face);
  position: sticky; top: 0; z-index: 100;
}
.site-nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.site-nav .brand {
  font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.site-nav .brand img { width: 34px; height: 34px; border-radius: 50%; display: block; }
.site-nav .links { display: flex; align-items: center; gap: 28px; }
.site-nav .links a { color: var(--text-muted); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.site-nav .links a:hover { color: var(--text); }
.site-nav .cta {
  background: var(--titlebar); color: #fff !important; padding: 9px 18px;
  border-radius: var(--radius-sm); font-weight: 600 !important;
  transition: background 0.12s ease;
}
.site-nav .cta:hover { background: var(--titlebar-2); }
.site-nav .menu-toggle { display: none; }

@media (max-width: 720px) {
  .site-nav .links { position: fixed; top: 64px; left: 0; right: 0; background: var(--face);
    flex-direction: column; align-items: flex-start; gap: 0; border-bottom: 1px solid var(--shadow-md);
    box-shadow: 0 8px 16px rgba(16,24,40,0.08);
    max-height: 0; overflow: hidden; transition: max-height 0.2s ease; }
  .site-nav .links.open { max-height: 320px; }
  .site-nav .links a { padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--shadow-md); }
  .site-nav .links .cta { margin: 14px 24px; text-align: center; }
  .site-nav .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid var(--shadow-dk); border-radius: var(--radius-sm);
    background: none; cursor: pointer;
  }
}

/* ---- Hero / sections ---- */

.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 128px 0 96px; color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: 0; background: #0A0E1A; }
.hero-media-asset { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,14,26,0.5) 0%, rgba(10,14,26,0.72) 65%, rgba(10,14,26,0.82) 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 42px; font-weight: 700; line-height: 1.15; margin: 0 0 18px; letter-spacing: -0.01em; }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,0.88); max-width: 620px; margin: 0 auto 32px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 560px) { .hero { padding: 96px 0 72px; } .hero h1 { font-size: 30px; } }

.btn {
  display: inline-block; font-weight: 600; font-size: 15px; padding: 12px 24px;
  border-radius: var(--radius-sm); text-decoration: none; cursor: pointer; border: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.btn-primary { background: var(--titlebar); color: #fff; }
.btn-primary:hover { background: var(--titlebar-2); }
.btn-secondary { background: var(--face); color: var(--text); border: 1px solid var(--shadow-dk); }
.btn-secondary:hover { background: var(--face-dark); }

section { padding: 56px 0; }
section.alt { background: var(--face-dark); }
section h2 { font-size: 28px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
section p.section-lead { color: var(--text-muted); font-size: 16px; max-width: 640px; margin: 0 0 36px; }

.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 820px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--face); border: 1px solid var(--shadow-md); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-card);
}
.feature-card .icon {
  width: 40px; height: 40px; border-radius: 10px; background: var(--accent-bg); color: var(--titlebar);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feature-card h3 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.feature-card p { font-size: 14.5px; color: var(--text-muted); margin: 0; }

.step-list { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.step-list li {
  counter-increment: step; display: flex; gap: 16px; align-items: flex-start;
}
.step-list li::before {
  content: counter(step); flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--titlebar); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.step-list h4 { margin: 0 0 4px; font-size: 15.5px; font-weight: 600; }
.step-list p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

.cta-band {
  background: var(--titlebar); color: #fff; text-align: center; padding: 64px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p.section-lead { color: rgba(255,255,255,0.85); margin: 0 auto 28px; }
.cta-band .btn-secondary { background: #fff; border-color: #fff; }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--shadow-md); background: var(--face-dark);
  padding: 40px 0 28px; font-size: 13.5px; color: var(--text-muted);
}
.site-footer .footer-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.site-footer .footer-col h5 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 10px; }
.site-footer .footer-col a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 7px; font-size: 14px; }
.site-footer .footer-col a:hover { color: var(--text); }
.site-footer .footer-bottom { border-top: 1px solid var(--shadow-md); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---- Blog ---- */

.blog-list { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.blog-card {
  border: 1px solid var(--shadow-md); border-radius: var(--radius); padding: 22px;
  text-decoration: none; color: inherit; display: block; background: var(--face);
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}
.blog-card:hover { box-shadow: var(--shadow-card); border-color: var(--shadow-dk); }
.blog-card .date { font-size: 12.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.blog-card h3 { font-size: 19px; margin: 8px 0 6px; font-weight: 650; color: var(--text); }
.blog-card p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

.blog-post { max-width: 700px; margin: 0 auto; }
.blog-post .date { font-size: 13px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.blog-post h1 { font-size: 32px; margin: 10px 0 24px; letter-spacing: -0.01em; }
.blog-post .post-body { font-size: 16.5px; }
.blog-post .post-body h2 { font-size: 22px; margin: 36px 0 12px; }
.blog-post .post-body h3 { font-size: 18px; margin: 28px 0 10px; }
.blog-post .post-body p { margin: 0 0 16px; }
.blog-post .post-body ul, .blog-post .post-body ol { margin: 0 0 16px; padding-left: 22px; }
.blog-post .post-body code { background: var(--face-dark); padding: 2px 5px; border-radius: 4px; font-size: 14px; }
.blog-post .post-body pre { background: var(--face-dark); padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; }
.blog-post .back-link { display: inline-block; margin-bottom: 24px; font-size: 14px; text-decoration: none; color: var(--text-muted); }
.blog-post .back-link:hover { color: var(--text); }

/* ---- Legal pages ---- */

.legal-page { max-width: 760px; margin: 0 auto; }
.legal-page h1 { font-size: 30px; margin-bottom: 6px; }
.legal-page .updated { color: var(--text-muted); font-size: 13.5px; margin-bottom: 32px; }
.legal-page h2 { font-size: 19px; margin: 32px 0 10px; }
.legal-page p, .legal-page li { font-size: 15px; color: var(--text); }
.legal-page ul { padding-left: 20px; }

/* ---- Cookie consent banner ---- */

#cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9999;
  max-width: 560px; margin: 0 auto;
  background: var(--face); border: 1px solid var(--shadow-dk); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16,24,40,0.18);
  padding: 20px 22px;
  display: none;
}
#cookie-banner.visible { display: block; }
#cookie-banner p { margin: 0 0 14px; font-size: 14px; color: var(--text-muted); }
#cookie-banner p a { color: var(--titlebar); }
#cookie-banner .cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#cookie-banner .btn { padding: 9px 18px; font-size: 13.5px; }
