:root {
  color-scheme: light;
  --ink-deep: #02011b;
  --ink-saturated: #04006c;
  --deep-indigo: #003ab8;
  --indigo: #015cfe;
  --violet: #7b4cff;
  --magenta: #c010e8;
  --aqua: #0a786b;
  --success: #038566;
  --ink: #0b0a24;
  --ink-dim: rgba(11, 10, 36, 0.62);
  --ink-faint: rgba(11, 10, 36, 0.48);
  --line: rgba(11, 10, 36, 0.1);
  --line-hover: rgba(11, 10, 36, 0.24);
  --focus-ring: rgba(1, 92, 254, 0.32);
  --page-background:
    radial-gradient(900px 650px at 92% 95%, rgba(0, 58, 184, 0.05), transparent 64%),
    radial-gradient(820px 620px at 8% 0%, rgba(1, 92, 254, 0.07), transparent 62%),
    linear-gradient(180deg, #f0f4ff 0%, #f7faff 48%, #ffffff 100%);
  --header-background: rgba(244, 248, 255, 0.78);
  --menu-background: #f1f5ff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.72);
  --control-background: rgba(255, 255, 255, 0.72);
  --control-hover: #ffffff;
  --field-background: rgba(255, 255, 255, 0.84);
  --card-shadow: 0 18px 42px rgba(11, 10, 36, 0.08);
  --control-shadow: 0 8px 20px rgba(11, 10, 36, 0.08);
  --logo-color: var(--ink);
  --aqua-border: rgba(10, 120, 107, 0.3);
  --aqua-bloom: rgba(10, 120, 107, 0.08);
  --aqua-fill: rgba(10, 120, 107, 0.12);
  --violet-border: rgba(123, 76, 255, 0.26);
  --violet-bloom: rgba(123, 76, 255, 0.1);
  --modal-backdrop: rgba(11, 10, 36, 0.56);
  --error: #b42318;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --aqua: #29f5d5;
  --ink: #ffffff;
  --ink-dim: rgba(255, 255, 255, 0.72);
  --ink-faint: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.16);
  --line-hover: rgba(255, 255, 255, 0.28);
  --page-background:
    radial-gradient(900px 650px at 92% 95%, rgba(123, 76, 255, 0.28), transparent 62%),
    radial-gradient(800px 600px at 8% 0%, rgba(0, 58, 184, 0.32), transparent 60%),
    linear-gradient(180deg, #04006c 0%, #02022a 45%, #02011b 100%);
  --header-background: rgba(2, 1, 27, 0.42);
  --menu-background: #1a1840;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-soft: rgba(255, 255, 255, 0.04);
  --control-background: rgba(255, 255, 255, 0.06);
  --control-hover: rgba(255, 255, 255, 0.1);
  --field-background: rgba(2, 1, 27, 0.35);
  --card-shadow: 0 18px 42px rgba(2, 1, 27, 0.28);
  --control-shadow: none;
  --aqua-border: rgba(41, 245, 213, 0.28);
  --aqua-bloom: rgba(41, 245, 213, 0.1);
  --aqua-fill: rgba(41, 245, 213, 0.14);
  --violet-border: rgba(123, 76, 255, 0.34);
  --violet-bloom: rgba(123, 76, 255, 0.16);
  --modal-backdrop: rgba(2, 1, 27, 0.72);
  --error: #ff8a8a;
}

/* Stop full-bleed 100vw elements (e.g. the homepage marquee) from pushing a
   horizontal scrollbar. `clip` doesn't create a scroll container, so it leaves
   position:sticky working — unlike overflow:hidden. */
html {
  overflow-x: clip;
}

body {
  background: var(--page-background);
  background-attachment: fixed;
}

.site-header {
  background: var(--header-background);
}

.brand,
.marketing-footer__logo {
  position: relative;
  width: 186px;
  height: 17px;
  flex: none;
}

.brand::before,
.marketing-footer__logo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--logo-color);
  -webkit-mask: url("/attend-logo.png") center / contain no-repeat;
  mask: url("/attend-logo.png") center / contain no-repeat;
}

.brand img,
.marketing-footer__logo img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--control-background);
  box-shadow: var(--control-shadow);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-hover);
  background: var(--control-hover);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .theme-icon-sun,
:root[data-theme="dark"] .theme-toggle .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .theme-icon-sun {
  display: block;
}

.theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--control-background);
  box-shadow: var(--control-shadow);
}

.theme-picker button {
  min-width: 58px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-dim);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.theme-picker button:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.theme-picker button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.theme-picker button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--control-hover);
}

.agent-view {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 0 28px;
}

.agent-view__link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: color 120ms ease;
}

.agent-view__link svg {
  width: 14px;
  height: 14px;
}

.agent-view__link:hover {
  color: var(--ink);
}

.agent-view__link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 6px;
}

.marketing-footer {
  display: block;
  width: 100%;
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 0 28px 32px;
  color: var(--ink-dim);
  font-size: 13px;
  text-align: left;
}

.agent-view + .marketing-footer {
  margin-top: 18px;
}

.marketing-footer__panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(140px, 0.7fr) minmax(180px, 0.8fr) auto;
  gap: 32px;
  align-items: start;
  padding: 34px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.marketing-footer__brand,
.marketing-footer__column,
.marketing-footer__theme {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.marketing-footer__brand {
  gap: 18px;
  align-self: stretch;
}

/* Copyright lives at the bottom of the logo column, lined up with the bottom
   of the link lists. */
.marketing-footer__copyright {
  margin-top: auto;
  padding-top: 18px;
  color: var(--ink-faint);
  font-size: 13px;
}

.marketing-footer__logo {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.marketing-footer__logo img {
  display: block;
}

.marketing-footer__eyebrow {
  margin: 0 0 12px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.marketing-footer__links {
  display: grid;
  gap: 10px;
}

.marketing-footer a {
  margin-left: 0;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 120ms ease;
}

.marketing-footer a:hover {
  color: var(--ink);
}

.marketing-footer a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 4px;
  border-radius: 6px;
}

.marketing-footer__badges {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.marketing-footer__badges .badge-apple,
.marketing-footer__badges .badge-google {
  display: block;
  width: auto;
  height: 36px;
}

.marketing-footer__theme {
  gap: 12px;
}

.marketing-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  color: var(--ink-faint);
}

.marketing-footer__bottom a {
  color: var(--ink-faint);
}

@media (max-width: 900px) {
  .marketing-footer__panel {
    grid-template-columns: 1fr 1fr;
  }

  .marketing-footer__theme {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .agent-view {
    margin-top: 40px;
    padding: 0 20px;
  }

  .marketing-footer {
    margin-top: 40px;
    padding: 0 20px 28px;
  }

  .marketing-footer__panel {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 0 24px;
  }

  .marketing-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

.phone-control,
.btn-ghost {
  border-color: var(--line);
  background: var(--control-background);
  box-shadow: var(--control-shadow);
}

.phone-control:hover,
.btn-ghost:hover {
  border-color: var(--line-hover);
  background: var(--control-hover);
}

.download-card,
.pillar,
.app-download .card {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.demo-card {
  border-color: var(--aqua-border);
  background:
    radial-gradient(420px 200px at 6% 0%, var(--aqua-bloom), transparent 70%),
    var(--surface);
  box-shadow: var(--card-shadow);
}

.contact-card {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.demo-input,
.contact-input,
.contact-select,
.contact-textarea {
  background: var(--field-background);
  color: var(--ink);
}

.mp-icon,
.pillar {
  background-color: var(--surface-soft);
}

.pillar .icon {
  background: var(--aqua-fill);
}

.section-label::before {
  background: var(--line-hover);
}

.demo-note.is-error,
.contact-note.is-error {
  color: var(--error);
}

.qr-modal {
  background: var(--modal-backdrop);
}

.app-download p {
  color: var(--ink-dim);
}

.app-download {
  color: var(--ink);
}

.app-download .theme-toggle {
  position: fixed;
  z-index: 10;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
}

@media (max-width: 640px) {
  .site-header .brand {
    width: 132px;
    height: 12px;
  }

  .site-header .header-login {
    display: none;
  }

  .site-header .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .theme-picker button {
    min-width: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle {
    transition: none;
  }

  .theme-picker button {
    transition: none;
  }
}

/* ── Segmented, full-height header with audience dropdowns ───────────────
   Restyles the per-page inline header into full-height cells: two dropdown
   triggers (Attendees / Organizers) and a solid "Book a demo" end-cap.
   Loaded after each page's inline <style>, so all pages update at once.
   Behaviour (click + outside-close + mobile hamburger) lives in theme.js. */
/* Lift the whole header (and its dropdowns) above page content like the phone
   mockups — the backdrop-filter traps the panel's z-index inside this context,
   so the header itself must sit on top. */
.site-header { padding: 0; position: sticky; top: 0; z-index: 100; }
.site-header__inner { height: 62px; align-items: stretch; gap: 0; }
.site-header .brand { align-self: center; }
.header-nav { height: 100%; align-items: stretch; gap: 0; }

/* On smaller viewports drop the header's right gutter so the "Book a demo"
   end-cap sits flush to the right edge (gives the nav a little more room too).
   The logo keeps its left margin. */
@media (max-width: 1024px) {
  .site-header__inner { padding-right: 0; }
}
/* Just above the hamburger breakpoint the full desktop nav is tight — compact
   the cells (and the wordmark) so it fits down to ~721px instead of the CTA
   overflowing. Below 720px it collapses to the hamburger. */
@media (min-width: 721px) and (max-width: 920px) {
  .site-header .brand { width: 150px; height: 14px; }
  .menu-trigger { padding: 0 10px; gap: 4px; font-size: 13px; }
  .menu-trigger .chev { width: 11px; height: 11px; }
  .header-navlink { padding: 0 10px; font-size: 13px; }
  .header-cta { padding: 0 13px; font-size: 13px; }
}

.header-menu { position: relative; display: inline-flex; align-items: stretch; height: 100%; }
.menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 20px;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
  white-space: nowrap;
  background: none;
  border: 0;
  border-left: 1px solid var(--line);
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease;
}
.menu-trigger .chev { transition: transform 200ms ease; }
.menu-trigger:hover,
.header-menu[data-open="true"] .menu-trigger { color: var(--ink); background: var(--control-background); }
.header-menu[data-open="true"] .menu-trigger .chev { transform: rotate(180deg); }
/* Highlight the trigger whose menu owns the current page. */
.header-menu:has(.menu-panel a[aria-current="page"]) .menu-trigger { color: var(--ink); }

.menu-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 224px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--menu-background);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 26px 52px rgba(2, 1, 27, 0.42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
  z-index: 60;
}
/* Invisible bridge so hovering across the gap doesn't dismiss the panel. */
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 9px; }
.header-menu[data-open="true"] .menu-panel { opacity: 1; visibility: visible; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  .header-menu:hover .menu-panel { opacity: 1; visibility: visible; transform: translateY(0); }
  .header-menu:hover .menu-trigger { color: var(--ink); background: var(--control-background); }
  .header-menu:hover .menu-trigger .chev { transform: rotate(180deg); }
}
.menu-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.menu-panel a:hover,
.menu-panel a[aria-current="page"] { background: var(--control-background); color: var(--ink); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 6px; }

/* Standalone full-height nav link (e.g. Pricing) — matches the trigger cells. */
.header-navlink {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
  text-decoration: none;
  white-space: nowrap;
  border-left: 1px solid var(--line);
  transition: color 120ms ease, background 120ms ease;
}
.header-navlink:hover,
.header-navlink[aria-current="page"] { color: var(--ink); background: var(--control-background); }

.site-header .header-nav .header-cta {
  /* Astro's migrated pages still carry scoped legacy pill dimensions. Keep
     the shared header contract authoritative after those styles are bundled. */
  height: 100% !important;
  border-radius: 0 !important;
  border-left: 1px solid transparent;
  box-shadow: none;
  transform: none;
  background: linear-gradient(120deg, var(--indigo), var(--deep-indigo, #003ab8));
}
.site-header .header-nav .header-cta:hover { transform: none; filter: brightness(1.08); box-shadow: none; }

/* Hamburger + stacked panel (built by theme.js) — desktop hidden. */
.nav-toggle { display: none; }
.mobile-panel { display: none; }

@media (max-width: 720px) {
  .site-header__inner { height: 56px; }
  .site-header .brand { width: 150px; height: 14px; }
  .header-menu, .header-navlink { display: none; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 100%;
    padding: 0 16px;
    background: none;
    border: 0;
    border-left: 1px solid var(--line);
    cursor: pointer;
  }
  .nav-toggle span { width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 180ms ease, opacity 180ms ease; }
  :root[data-mobile-nav="open"] .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  :root[data-mobile-nav="open"] .nav-toggle span:nth-child(2) { opacity: 0; }
  :root[data-mobile-nav="open"] .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .mobile-panel {
    display: flex;
    flex-direction: column;
    gap: 1px;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
    background: var(--menu-background);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 52px rgba(2, 1, 27, 0.42);
    max-height: calc(100svh - 56px);
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
    z-index: 50;
  }
  :root[data-mobile-nav="open"] .mobile-panel { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .mobile-sec { margin: 14px 4px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
  .mobile-sec:first-child { margin-top: 2px; }
  .mobile-panel a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 8px; border-radius: 9px;
    font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none;
  }
  .mobile-panel a.mobile-child { padding-inline-start: 28px; }
  .mobile-panel a:hover { background: var(--control-background); }
}

/* ── Light-theme CTA glow tamer ──────────────────────────────────────────
   The primary buttons carry a saturated blue drop-shadow (rgba(1,92,254,…))
   that was tuned for the dark site; on the white light theme it reads as the
   button "bleeding" blue onto the page. Swap it for a soft neutral lift in
   light mode only — dark mode keeps the glow via each page's inline styles. */
:root:not([data-theme="dark"]) .btn-primary,
:root:not([data-theme="dark"]) .header-cta {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 6px 16px rgba(2, 1, 27, 0.12);
}
:root:not([data-theme="dark"]) .btn-primary:hover,
:root:not([data-theme="dark"]) .header-cta:hover {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.26) inset, 0 10px 22px rgba(2, 1, 27, 0.16);
}
