/* Manage It — Theme D2 “Dusk and Daylight”
   Default: html[data-theme="dusk"] (cream bands, navy hero and footer)
   Switch to Theme C2 all-navy: set data-theme="navy" on <html>
   Visual layer only. Layout, forms, URLs and copy stay in the existing markup. */
:root,
[data-theme="dusk"] {
  --navy: #020b19;
  --navy-2: #031026;
  --ink: #07142f;
  --muted: #526079;
  --muted-dark: #96a6c2;
  --line: #dfe6f3;
  --line-dark: rgba(234, 240, 250, 0.14);
  --blue: #065be8;
  --blue-2: #2f7cff;
  --cream: #f6f3ec;
  --paper: #fffcf8;
  --fog: #eaf0fa;
  --soft: #f5f8fc;
  --page-bg: var(--cream);
  --section-bg: var(--cream);
  --section-alt-bg: var(--navy);
  --text: var(--ink);
  --text-muted: var(--muted);
  --heading: var(--ink);
  --header-bg: rgba(2, 11, 25, 0.9);
  --header-text: var(--fog);
  --surface: var(--paper);
  --card-bg: var(--paper);
  --card-border: #e4dfd4;
  --footer-bg: var(--navy);
  --footer-text: var(--muted-dark);
  --badge-ring: var(--cream);
  --shadow: 0 18px 40px rgba(2, 11, 25, 0.12);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --img-headland: url("images/headland-1600.webp");
  --img-headland-phone: url("images/headland-phone.webp");
  --img-river: url("images/river-1600.webp");
  --img-verandah: url("images/verandah-1600.webp");
  --img-hinterland: url("images/hinterland-1600.webp");
}

[data-theme="navy"] {
  --ink: #eaf0fa;
  --muted: #96a6c2;
  --line: rgba(234, 240, 250, 0.14);
  --surface: #020b19;
  --soft: #031026;
  --page-bg: var(--navy);
  --section-bg: var(--navy);
  --section-alt-bg: var(--navy-2);
  --text: var(--fog);
  --text-muted: var(--muted-dark);
  --heading: #ffffff;
  --card-bg: var(--navy-2);
  --card-border: var(--line-dark);
  --badge-ring: var(--navy);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

html { scroll-padding-top: 96px; }

body {
  color: var(--text);
  background: var(--page-bg);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
}

/* ——— Header ——— */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(16px);
  color: var(--header-text);
}
.site-header.is-scrolled { background: rgba(2, 11, 25, 0.96); }
.desktop-nav { color: var(--header-text); font-size: 15px; font-weight: 500; }
.desktop-nav a:hover,
.mobile-nav a:hover { color: var(--blue-2); }
.header-cta {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 8px;
  box-shadow: none;
  font-weight: 600;
}
.header-cta:hover,
.button:hover,
.demo-form button:hover { transform: translateY(-1px); }
.menu-toggle {
  border: 1px solid var(--line-dark);
  background: transparent;
  border-radius: 8px;
}
.menu-toggle span { background: var(--fog); }
.mobile-nav {
  background: var(--navy);
  border-bottom: 1px solid var(--line-dark);
  box-shadow: var(--shadow);
  color: var(--fog);
}

/* ——— Buttons ——— */
.button,
.header-cta,
.demo-form button {
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}
.button.primary,
.demo-form button {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: none;
}
.button.ghost {
  color: var(--fog);
  background: transparent;
  border: 1px solid rgba(234, 240, 250, 0.55);
}
.hero .button { min-height: 46px; }

/* ——— Home hero ——— */
.hero {
  background: var(--navy);
  color: #fff;
  min-height: 760px;
}
.hero-media picture,
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-media img {
  opacity: 1;
  object-fit: cover;
  object-position: 68% 50%;
}
.hero-media::after {
  background:
    linear-gradient(
      90deg,
      rgba(2, 11, 25, 0.94) 0%,
      rgba(2, 11, 25, 0.88) 28%,
      rgba(2, 11, 25, 0.55) 52%,
      rgba(2, 11, 25, 0.18) 74%,
      rgba(2, 11, 25, 0.08) 100%
    );
}
.hero::after {
  height: 140px;
  background: linear-gradient(0deg, rgba(2, 11, 25, 0.55), transparent);
}
.hero .eyebrow {
  color: var(--blue-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.hero h1.page-title,
.hero h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.hero h1.page-title::after,
.package-hero h1::after,
.contact-hero h1::after,
.legal-page h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 20px;
  background: var(--blue-2);
}
.hero-copy {
  color: var(--muted-dark);
  font-size: 18px;
}
.dashboard-panel {
  transform: none;
  background: rgba(2, 11, 25, 0.55);
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.panel-top { color: var(--fog); }
.panel-top span {
  background: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(47, 124, 255, 0.18);
}
.hero .dashboard-panel .format-list span {
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fog);
  border-radius: 999px;
  font-size: 14px;
}
.hero .dashboard-panel .format-note { color: var(--muted-dark); font-size: 15px; }

/* ——— Sections ——— */
.section,
.demo {
  padding: 88px 56px;
}
.section { background: var(--section-bg); color: var(--text); }
[data-theme="navy"] .section { background: var(--section-bg); color: var(--text); }

.eyebrow {
  color: var(--blue-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-heading { text-align: left; margin-left: 0; margin-right: 0; }
.section-heading h2,
.section-copy h2,
.demo h2,
.security-band h2 {
  color: var(--heading);
  font-weight: 800;
  letter-spacing: -0.025em;
}
[data-theme="dusk"] .demo h2 { color: #fff; }
.section-heading p:not(.eyebrow),
.section-copy p,
.demo p {
  color: var(--text-muted);
  font-size: 18px;
}
[data-theme="dusk"] .demo p { color: var(--muted-dark); }
.section-heading a,
.section-copy a,
.demo a { color: var(--blue); }
[data-theme="dusk"] .demo a { color: var(--blue-2); }

/* Example section: navy band + river photograph */
#example {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0;
  padding: 0;
  background: var(--navy);
  color: #fff;
  align-items: stretch;
}
#example .section-heading {
  padding: 88px 56px;
  margin: 0;
  max-width: none;
}
#example .section-heading h2 { color: #fff; }
#example .section-heading p:not(.eyebrow) { color: var(--muted-dark); }
#example .section-heading a { color: var(--blue-2); }
#example::after {
  content: "";
  display: block;
  min-height: 420px;
  background: var(--navy) var(--img-river) center / cover no-repeat;
}

/* How we work steps */
.mi-step-badge { box-shadow: 0 0 0 6px var(--badge-ring); }
.mi-step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.mi-step h3 { color: var(--heading); font-weight: 700; }
.mi-step p { color: var(--text-muted); }
.mi-step::before { background: rgba(6, 91, 232, 0.28); }

/* Programs / cards */
.review-card,
.package {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: none;
}
.review-card h3,
.implementation-heading h3,
.package h3 { color: var(--heading); }
.package-price { color: var(--heading); }
.review-includes h4,
.review-includes li,
.package li,
.implementation-heading p { color: var(--text-muted); }
.package-link,
.text-link { color: var(--blue); }
.step-label,
.package-kicker { color: var(--blue-2); }
.check-grid p { color: var(--text); }
.package li::before,
.check-grid p::before {
  color: var(--blue);
  border-color: var(--blue);
}

/* Get in touch */
.demo {
  background: var(--navy);
  color: #fff;
}
.demo-card {
  background: var(--navy-2);
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  color: var(--fog);
  box-shadow: none;
}
.demo-card strong { color: #fff; }
.demo-card p { color: var(--muted-dark); }

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--line-dark);
}
.site-footer a:hover { color: #fff; }

/* ——— Inner page heroes ——— */
.package-hero,
.contact-hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  padding: 96px 56px 80px;
  background: var(--navy) var(--img-headland) 68% 50% / cover no-repeat;
}
.package-hero::before,
.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(2, 11, 25, 0.92) 0%,
    rgba(2, 11, 25, 0.82) 42%,
    rgba(2, 11, 25, 0.42) 72%,
    rgba(2, 11, 25, 0.22) 100%
  );
  pointer-events: none;
}
.package-hero > *,
.contact-hero > * { position: relative; z-index: 1; }
.package-hero { max-width: none; }
.package-hero .eyebrow,
.contact-hero .eyebrow { color: var(--blue-2); }
.package-hero h1,
.contact-hero h1 { color: #fff; font-weight: 800; letter-spacing: -0.025em; max-width: 18em; }
.package-hero p,
.contact-hero p { color: var(--muted-dark); max-width: 40em; }
.package-hero .package-price { color: #fff; }
.starter-page .package-hero { background: var(--navy) var(--img-hinterland) 50% 40% / cover no-repeat; }
.growth-page .package-hero { background: var(--navy) var(--img-headland) 68% 50% / cover no-repeat; }
.elite-page .package-hero { background: var(--navy) var(--img-verandah) 60% 50% / cover no-repeat; }
.contact-hero { background: var(--navy) var(--img-river) 60% 50% / cover no-repeat; }
.success-hero { background: var(--navy) var(--img-hinterland) 50% 40% / cover no-repeat; }

/* Replace old Unsplash contact-theme photos, keep a quiet distinction */
.contact-theme-review .contact-hero {
  background: var(--navy) var(--img-river) 60% 50% / cover no-repeat;
}
.contact-theme-starter .contact-hero {
  background: var(--navy) var(--img-hinterland) 50% 40% / cover no-repeat;
}
.contact-theme-growth .contact-hero {
  background: var(--navy) var(--img-headland) 68% 50% / cover no-repeat;
}
.contact-theme-elite .contact-hero {
  background: var(--navy) var(--img-verandah) 60% 50% / cover no-repeat;
}
.contact-theme-review .demo-form button,
.contact-theme-starter .demo-form button,
.contact-theme-growth .demo-form button,
.contact-theme-elite .demo-form button { background: var(--blue); }

.package-page { background: var(--page-bg); }
.package-detail-grid { padding: 48px 56px 88px; }
.package-detail-grid article,
.package-page .section-copy {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text);
}
.package-detail-grid h2,
.package-page .section-copy h2 { color: var(--heading); }
.package-detail-grid p,
.package-detail-grid li,
.package-page .section-copy p { color: var(--text-muted); }
.package-detail-grid a,
.package-page .section-copy a { color: var(--blue); }

/* Contact layout */
.contact-page { background: var(--page-bg); }
.contact-layout { padding: 48px 56px 88px; }
.demo-form {
  background: var(--card-bg);
  color: var(--text);
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid var(--card-border);
}
.demo-form label { color: var(--heading); }
.demo-form input,
.demo-form select,
.demo-form textarea {
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 16px;
}
[data-theme="navy"] .demo-form input,
[data-theme="navy"] .demo-form select,
[data-theme="navy"] .demo-form textarea {
  background: var(--navy);
  color: var(--fog);
  border-color: var(--line-dark);
}

/* Legal + article */
.legal-page {
  background: var(--page-bg);
  padding: 0 24px 82px;
  color: var(--text);
}
.legal-page::before {
  content: "";
  display: block;
  height: 240px;
  margin: 0 -24px 48px;
  background: var(--navy) var(--img-hinterland) center 45% / cover no-repeat;
  box-shadow: inset 0 -80px 80px var(--page-bg);
}
.article-page::before {
  background-image: var(--img-headland);
  background-position: 68% 50%;
  height: 280px;
}
.legal-page section,
.legal-page article {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 40px 40px 48px;
  color: var(--text);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.legal-page h1,
.legal-page h2,
.legal-page h3,
.article-page h1,
.article-page h3,
.article-page .faq p:first-child { color: var(--heading); }
.legal-page p,
.legal-page li,
.article-page ol { color: var(--text-muted); }
.legal-page a,
.article-page a { color: var(--blue); }

/* Misc leftover live-site surfaces */
.soft,
.legal-page.alt { background: var(--page-bg); }

@media (max-width: 980px) {
  .hero {
    min-height: 0;
    display: block;
    padding: 0 0 48px;
    background: var(--navy);
  }
  .hero-media {
    position: relative;
    height: 200px;
    inset: auto;
  }
  .hero-media img { object-position: 70% 45%; }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(2,11,25,0.18), rgba(2,11,25,0.88));
  }
  .hero::after { display: none; }
  .hero-content,
  .dashboard-panel { padding: 0 20px; }
  .dashboard-panel { margin: 24px 20px 0; }
  .section,
  .demo,
  .package-hero,
  .contact-hero,
  .package-detail-grid,
  .contact-layout { padding-left: 20px; padding-right: 20px; }
  #example { grid-template-columns: 1fr; }
  #example .section-heading { padding: 56px 20px 32px; }
  #example::after { min-height: 220px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .legal-page section,
  .legal-page article { padding: 28px 22px 36px; }
}

@media (max-width: 800px) {
  .package-page .section-copy,
  .package-page .package-hero .package-price { margin-left: 0; margin-right: 0; }
}


/* On-brand package CTAs and cards */
.package-link,
.review-card .package-link,
.starter .package-link,
.growth .package-link,
.elite .package-link,
.review .package-link {
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
}
.starter .package-icon,
.review .package-icon,
.growth .package-icon,
.elite .package-icon {
  color: var(--blue);
  background: rgba(6, 91, 232, 0.12);
}
#packages .section-heading h2,
#packages .implementation-heading h3,
#packages .review-card h3 { color: var(--heading); }
#packages .section-heading p:not(.eyebrow) { color: var(--text-muted); }
.review-card,
.implementation-heading {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: none;
}

section[id],
.section[id] {
  scroll-margin-top: 96px;
}


/* Digital worker example — 3 steps, same badges as How we work */
#digital-worker { background: var(--section-bg); color: var(--text); }
#digital-worker .section-heading { margin-bottom: 8px; }
.worker-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1120px) {
  .worker-steps { grid-template-columns: 1fr; }
}


/* Tap targets: header and footer nav at least 44px tall. Inline body links stay in the text. */
.desktop-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
}
.mobile-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
}
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}


/* Footer small lines stack */
.site-footer small { display: block; }

/* Keep package CTA arrows on the same line as the label.
   Production uses display:grid, which stacks the text and the arrow. */
.package-link,
.review-card .package-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.3em;
}
.package-link span[aria-hidden="true"] { white-space: nowrap; }

/* Contact fields: avoid mid-word clipping */
.demo-form input,
.demo-form select {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Mobile menu: full-viewport solid panel, close icon */
.menu-toggle span {
  transition: transform 160ms ease, opacity 160ms ease;
}
.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}
@media (max-width: 820px) {
  .mobile-nav.is-open {
    display: block;
    inset: 74px 0 0 0;
    overflow: auto;
    background: var(--navy);
    z-index: 19;
  }
  body.menu-open main,
  body.menu-open .site-footer {
    pointer-events: none;
    user-select: none;
  }
}
@media (max-width: 480px) {
  .mobile-nav.is-open { inset: 68px 0 0 0; }
}
