:root {
  --bg: #06090f;
  --fg: #e8edf4;
  --muted: #93a1b5;
  --accent: #4fd1c5;
  --accent-2: #7c9bff;
  --card-bg: rgba(9, 13, 21, 0.97);
  --card-border: rgba(255, 255, 255, 0.12);
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  z-index: 0;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

header.site-header,
main,
footer.site-footer {
  position: relative;
  z-index: 1;
}

header.site-header {
  z-index: 10;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--fg);
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand .re,
.brand-display .re {
  color: var(--accent);
}

.brand .colon,
.brand-display .colon {
  color: #ef4444;
}

nav.site-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

nav.site-nav a:hover,
nav.site-nav a.active { color: var(--fg); }

main { padding-bottom: 4rem; }

.hero {
  padding: 6rem 0 4rem;
  text-align: left;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1.2rem;
  font-weight: 700;
}

h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.cta-row .btn {
  flex: 1 1 0;
  min-width: 220px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #04141f;
}

.btn-ghost {
  border: 1px solid var(--card-border);
  color: var(--fg);
  background: var(--card-bg);
}

/* Subpage-themed highlight on links/buttons pointing to a service subpage */
a[href$="services-offline.html"]:hover,
a[href$="services-offline.html"]:focus-visible,
a[href$="services-offline.html"]:active {
  color: #4fe389;
}

a.btn[href$="services-offline.html"]:hover,
a.btn[href$="services-offline.html"]:focus-visible,
a.btn[href$="services-offline.html"]:active {
  border-color: #3cdc78;
  color: #eafff2;
  box-shadow: 0 0 0 1px rgba(60, 220, 120, 0.4), 0 8px 24px rgba(60, 220, 120, 0.25);
}

a.btn-primary[href$="services-offline.html"]:hover,
a.btn-primary[href$="services-offline.html"]:focus-visible,
a.btn-primary[href$="services-offline.html"]:active {
  background: linear-gradient(100deg, #3cdc78, #1d9c5a);
  color: #04140a;
}

a[href$="services-analytics.html"]:hover,
a[href$="services-analytics.html"]:focus-visible,
a[href$="services-analytics.html"]:active {
  color: #c39bff;
}

a.btn[href$="services-analytics.html"]:hover,
a.btn[href$="services-analytics.html"]:focus-visible,
a.btn[href$="services-analytics.html"]:active {
  border-color: #b27cff;
  color: #f3ecff;
  box-shadow: 0 0 0 1px rgba(178, 124, 255, 0.4), 0 8px 24px rgba(178, 124, 255, 0.25);
}

a.btn-primary[href$="services-analytics.html"]:hover,
a.btn-primary[href$="services-analytics.html"]:focus-visible,
a.btn-primary[href$="services-analytics.html"]:active {
  background: linear-gradient(100deg, #7c9bff, #b27cff);
  color: #0a0c1f;
}

nav.site-nav a[href$="services-offline.html"]:hover,
nav.site-nav a[href$="services-offline.html"]:focus-visible,
nav.site-nav a[href$="services-offline.html"]:active {
  color: #4fe389;
}

nav.site-nav a[href$="services-analytics.html"]:hover,
nav.site-nav a[href$="services-analytics.html"]:focus-visible,
nav.site-nav a[href$="services-analytics.html"]:active {
  color: #c39bff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0;
}

section.block {
  padding: 3.5rem 0;
}

section.block h2 {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

section.block .sub {
  color: var(--muted);
  margin-top: 0;
  max-width: 620px;
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.list-check li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.5;
}

.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.list-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.list-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.5;
}

.list-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #000;
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  margin-top: 1.5rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.hero-panel {
  margin-top: 0;
}

.brand-display {
  position: relative;
  z-index: 6;
  font-weight: 700;
  font-size: clamp(1.6rem, 7vw, 4.6rem);
  letter-spacing: 0.02em;
  color: var(--fg);
  margin: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.overview-stage {
  position: relative;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.overview-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.overview-card:hover,
.overview-card:focus-visible,
body.curtain-scrolling .overview-card {
  z-index: 6;
  transform: translateY(-3px);
  border-color: var(--accent);
}

.overview-card .eyebrow {
  margin-bottom: 0.8rem;
}

.overview-card h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.25;
  margin: 0 0 0.8rem;
  font-weight: 700;
}

.overview-card h2 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.overview-card .more {
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.overview-card-wide {
  grid-column: 1 / -1;
}

.overview-card-wide .eyebrow {
  color: #ff9a4d;
}

.overview-card-wide h2 .grad {
  background: linear-gradient(100deg, #ff6b6b, #ffae42);
  -webkit-background-clip: text;
  background-clip: text;
}

.overview-card-wide:hover,
.overview-card-wide:focus-visible,
body.curtain-scrolling .overview-card-wide {
  border-color: #ff9a4d;
}

#curtain-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  display: block;
}

body[data-theme-page="landing"] footer.site-footer {
  border-top: none;
}

footer.site-footer {
  border-top: 1px solid var(--card-border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

footer.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

footer.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.2rem;
}

footer.site-footer a:hover { color: var(--fg); }

.footer-links a:first-child { margin-left: 0; }

.legal h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.6rem;
}

.legal p, .legal li { color: var(--muted); line-height: 1.6; }

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 480px;
  margin-top: 1.5rem;
}

.contact-form label {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: rgba(8, 11, 18, 0.97);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 640px) {
  header.site-header { flex-wrap: nowrap; }
  .nav-toggle { display: flex; }

  nav.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    z-index: 5;
    box-sizing: border-box;
  }

  nav.site-nav.open { display: flex; }

  nav.site-nav a {
    margin-left: 0;
    margin-right: 0;
    padding: 0.7rem 0.25rem;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  nav.site-nav a:last-child { border-bottom: none; }

  .hero { padding: 3.5rem 0 2.5rem; }

  body[data-theme-page="landing"] header.site-header { justify-content: flex-end; }
  body[data-theme-page="landing"] .brand { display: none; }
}
