/* ============================================================
   DPM Landing — shared theme: light "Draft canvas"
   Linked by EVERY page (index, about, features, store, privacy, 404).
   Single source of truth: edit here and it flips the whole site.

   The base markup ships a dark navy theme inline; this stylesheet is
   layered on top (linked after each page's inline <style>) and flips
   everything below the top zone to a light, Draft-style canvas.

   Top zone (store bar + nav + hero video + scroll hint) stays
   light-on-dark because it sits over the dark reveal video.
   ============================================================ */

/* 0 ── Shared design-system tokens.
        MARK / LOGO SIZING STANDARD — always size the DPM mark with one of these
        tokens, never raw px. The nav mark is bound to --mark-sm below so it can't
        drift per page; focal marks (404, splash, empty states) use --mark-lg. */
:root {
  --mark-sm: 40px;   /* inline / nav */
  --mark-md: 56px;   /* section anchors */
  --mark-lg: 80px;   /* focal page anchors — 404, splash, empty states */
}
.nav-logo img { width: var(--mark-sm); height: var(--mark-sm); }

/* 1 ── Page surface + type tokens → light.
        Dark type then inherits across every section. */
body {
  background-color: #D8E0F2;
  --text:   #14213D;
  --muted:  rgba(20, 33, 61, 0.72);
  --accent: #1A4FD6;
}

/* 1b ── No sideways scroll on mobile.
        body already had overflow-x:hidden, but iOS Safari ignores overflow-x
        on <body> alone — the page still scrolled left/right from full-bleed
        (width:100vw) and absolutely-positioned decorative elements that extend
        past the viewport. Clamp the root instead. `clip` (not hidden) doesn't
        create a scroll container and won't break position:fixed. */
html { overflow-x: clip; }

/* 2 ── Draft grid (matches the app's Draft canvas: soft-blue @ 40px).
        Self-contained so it works even on pages without an inline grid. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(107, 158, 245, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 158, 245, 0.18) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* 3 ── Top zone is over the dark hero video — keep it light-on-dark. */
.store-bar,
nav,
.video-hero-wrap,
.video-hero-scroll {
  --text:   #F0EEF8;
  --muted:  rgba(240, 238, 248, 0.5);
  --accent: #6B9EF5;
}

/* 4 ── Content cards → light panels (were dark / translucent glass that
        went murky on the light canvas). The grid reads through them. */
.feature-card,
.audience-blurb-inner,
.access-right,
.access-card,
.store-card,
.demo-inner {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-color: rgba(20, 33, 61, 0.1);
  box-shadow: 0 8px 28px rgba(20, 33, 61, 0.06);
}
.feature-card:hover { background: rgba(255, 255, 255, 0.8); }

/* feature grid: hairline dividers visible on light */
.features-grid {
  background: rgba(20, 33, 61, 0.1);
  border-color: rgba(20, 33, 61, 0.1);
}

/* Form fields inside light cards (features access cards) — readable on light. */
.access-field {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(20, 33, 61, 0.14);
  color: var(--text);
}
.access-field::placeholder { color: rgba(20, 33, 61, 0.4); }
.access-field:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.75);
}

/* Privacy "last updated" line — was hardcoded light, invisible on the canvas. */
.updated { color: rgba(20, 33, 61, 0.55); }

/* 5 ── The demo MOCKUP is the real (dark) DPM app UI — keep it dark,
        restore light type inside it. */
.demo-preview,
.demo-carousel-viewport {
  --text:  #F0EEF8;
  --muted: rgba(240, 238, 248, 0.5);
}

/* 6 ── Frameless access code input — sits directly on the canvas. */
.code-input {
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
}
.code-input::placeholder { color: rgba(20, 33, 61, 0.3); }
.code-input:focus {
  background: transparent;
  border: none;
  box-shadow: 0 2px 0 rgba(26, 79, 214, 0.55);
}

/* 7 ── Solid nav. The translucent (rgba 0.8) + backdrop-blur nav picked up a
        gradient from the video / blue store-bar behind it, and let the light
        page bleed through when scrolled. Make it a flat, solid bar. */
nav {
  background: #16123A;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 8 ── "Video doesn't sit pinned at the top." On overscroll-up the light page
        bg was revealed ABOVE the dark hero, so the video looked like it lifted
        off the top. Fix: paint the ROOT canvas dark so any overscroll reveal
        matches the hero (video reads as pinned). overscroll-behavior also damps
        the bounce. Safari-safe (works even where overscroll-behavior is ignored
        on the main document). */
html {
  background-color: #16123A;
  overscroll-behavior: none;
}
body {
  overscroll-behavior: none;
}

/* 9 ── Homepage hero (the one that FOLLOWS the video) needs breathing room
        below the dark video. Scoped with `.video-hero-wrap ~` so it does NOT
        leak onto child-page heroes (features/etc.) that share the `.hero` class
        but need their own larger top padding to clear the fixed nav. */
.video-hero-wrap ~ .hero {
  padding-top: 56px;
}

/* 10 ── Footer: the COMPLETE shared "locked" footer component, used on every
         page. Dark full-width band (anchors the light page, bookends the dark
         nav, makes the bottom overscroll seamless). Full-bleed via ::before so
         content stays max-width. Defined fully here so all pages render it
         identically — applying the homepage footer markup is enough. */
footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 48px;
}
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: #16123A;
  z-index: -1;
}
.footer-copy { font-size: 13px; color: rgba(240, 238, 248, 0.5); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-link { font-size: 13px; color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-link:hover { color: #ffffff; }
.store-nudge-text { font-size: 13px; color: rgba(240, 238, 248, 0.5); }
.store-nudge-link { color: rgba(130, 170, 250, 0.95); text-decoration: underline; text-underline-offset: 3px; }
.store-nudge-link:hover { color: #ffffff; }

/* The hairline divider above the footer is redundant against the dark band. */
.divider { display: none; }

@media (max-width: 860px) {
  footer { flex-direction: column; align-items: center; gap: 22px; text-align: center; padding: 44px 28px; }
  /* Structured stack: nav list on top, store nudge, then a divided legal line. */
  .footer-links { order: 1; flex-direction: column; gap: 16px; justify-content: center; width: 100%; }
  .footer-link { font-size: 15px; }
  .store-nudge-text { order: 2; }
  .footer-copy { order: 3; width: 100%; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); line-height: 1.6; }
}

/* 11 ── Shared nav "Get access" button. Child pages used a "← Back" link
         instead of the real nav; this unifies them on the homepage CTA so the
         clickable logo is the way home. Literal colors (no per-page var deps). */
.nav-cta {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #F0EEF8;
  background: #1A4FD6;
  border: none;
  border-radius: 10px;
  padding: 9px 20px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover { background: #1540B8; transform: translateY(-1px); }
