﻿/* Nebrex Automations - Consolidated Dark Theme
   Single source of truth for all site styling. */

:root {
  /* Core palette - Dark Theme */
  --ink: #F0EDE8;
  --slate: #c8c2b9;
  --muted: #9d978f;
  --paper: #0A0A0F;
  --sand: #0f1628;
  --accent: #F0EDE8;
  --accent-dark: #d9d5cf;
  --electric: #F0EDE8;
  --shadow: rgba(0, 0, 0, 0.45);
  --ring: rgba(240, 237, 232, 0.35);

  /* Surface colors */
  --card-bg: #0f172a;
  --section-bg: #0d1424;
  --header-bg: rgba(11, 16, 32, 0.85);
  --border: rgba(240, 237, 232, 0.14);
  --border-light: rgba(240, 237, 232, 0.12);
  --border-medium: rgba(240, 237, 232, 0.28);
}

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 80% -10%, #151735 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #1b1428 0%, transparent 55%),
    var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(45% 40% at 20% 25%, rgba(255, 255, 255, 0.11), transparent 70%),
    radial-gradient(35% 35% at 75% 15%, rgba(240, 237, 232, 0.16), transparent 72%),
    radial-gradient(45% 45% at 70% 75%, rgba(244, 246, 251, 0.08), transparent 70%);
  animation: nebrexDrift 16s ease-in-out infinite alternate;
}

a { color: inherit; text-decoration: none; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
details:focus-visible summary {
  outline: 2px solid var(--electric);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: 0;
  left: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 16px;
  z-index: 100;
  border-radius: 8px;
  transform: translateY(-140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(12px);
  opacity: 1;
  pointer-events: auto;
}

/* Visually hidden (accessible to screen readers) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 24px); }

section[id] { scroll-margin-top: 94px; }

/* Speed up first render by deferring off-screen section paint */
main > section:not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: 760px;
}


/* -- Header & Navigation -- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.45s ease, border-color 0.45s ease;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 2vw, 16px) 0;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: "Michroma", "Space Grotesk", system-ui, sans-serif;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.logo-mark {
  display: inline-flex;
  align-items: baseline;
  flex-shrink: 0;
  font-family: "Michroma", "Space Grotesk", system-ui, sans-serif;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.logo-mark .mark-n {
  font-size: 21px;
  letter-spacing: -0.5px;
}

.logo-mark .mark-x {
  font-size: 28px;
  display: inline-block;
  transform: scaleX(1.18);
  transform-origin: left center;
  margin-left: -1px;
}

.logo-word {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.logo-word .logo-x {
  font-weight: 800;
  display: inline-block;
  transform: scaleX(1.18);
  transform-origin: left center;
  font-size: 1.22em;
  line-height: 0.92;
  vertical-align: -0.03em;
  margin-left: 0.012em;
}

.logo-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
}

.logo-sub {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 237, 232, 0.72);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: var(--slate);
  align-items: center;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
}
.nav-links a:hover { color: var(--ink); }

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 0;
}

.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -12px;
  right: -12px;
  height: 14px;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 4px;
  background: none;
  border: none;
  color: var(--slate);
  font: inherit;
  cursor: pointer;
}

.nav-dropdown-toggle:hover { color: var(--ink); }

.nav-dropdown-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -8px;
  min-width: 220px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px var(--shadow);
  padding: 8px;
  display: none;
  z-index: 90;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: grid;
  gap: 4px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: grid;
  gap: 4px;
}

.nav-dropdown-menu a {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-solutions-menu {
  min-width: 312px;
  max-width: 360px;
}

.solution-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px;
  border-radius: 10px;
}

.solution-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.solution-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.solution-copy strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
}

.solution-copy small {
  color: var(--slate);
  font-size: 12px;
  line-height: 1.25;
}

.nav-cta {
  padding: 9px 16px;
  font-size: 13px;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 14px;
}

.nav-secondary {
  padding: 9px 14px;
  font-size: 13px;
}

.nav-mobile-only {
  display: none;
}

.nav-mobile-secondary,
.nav-mobile-primary {
  border-radius: 10px;
  justify-content: center;
  font-weight: 600;
}


/* -- Hero -- */
.hero {
  padding: clamp(56px, 8vw, 90px) 0 clamp(48px, 7vw, 70px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -12%;
  width: 42%;
  height: 140%;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.1) 48%, transparent 64%);
  transform: translateX(40%) rotate(8deg);
  filter: blur(10px);
  animation: heroSweep 8.5s cubic-bezier(.4, 0, .2, 1) infinite;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  margin: 16px 0 18px;
  color: var(--ink);
}

h2 {
  font-size: clamp(26px, 4.4vw, 34px);
  margin-top: 10px;
  color: var(--ink);
}

h3 { color: var(--ink); }
h4 { color: var(--ink); }

.hero p { font-size: 18px; color: var(--slate); margin-bottom: 28px; }
p { color: var(--slate); }
li { color: var(--slate); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-family: inherit;
  font-size: inherit;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 44px;
}

.btn-primary {
  background: #F0EDE8;
  color: #0A0A0F;
  box-shadow: 0 10px 30px rgba(240, 237, 232, 0.18);
}
.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--border-medium);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.btn-outline:hover { transform: translateY(-2px); }

button.btn { cursor: pointer; }

/* Hero card */
.hero-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 50px var(--shadow);
  border: 1px solid var(--border);
  color: var(--ink);
}

.hero-card h3 { font-size: 18px; margin-bottom: 10px; }
.hero-list { list-style: none; display: grid; gap: 10px; font-size: 15px; color: var(--slate); }
.hero-list li::before { content: "+"; color: var(--accent); font-weight: 700; margin-right: 8px; }

.signal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.signal div { font-size: 12px; color: var(--muted); }
.signal span { display: block; font-size: 20px; color: var(--ink); font-weight: 700; }


/* -- Sections -- */
section { padding: clamp(48px, 7vw, 70px) 0; }

.section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.section-sub { color: var(--slate); margin-top: 12px; max-width: 700px; }


/* -- Grids & Cards -- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 36px; }

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
  color: var(--ink);
}

.card h4 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--slate); font-size: 15px; }
.card-cta { margin-top: 14px; }
.card-featured { border: 2px solid var(--accent); }


/* -- Offer -- */
.offer {
  background: var(--section-bg);
  border-radius: 24px;
  padding: 36px;
  margin-top: 30px;
  border: 1px solid var(--border);
}

.offer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; }
.offer ul { list-style: none; display: grid; gap: 10px; }
.offer li::before { content: "-"; margin-right: 8px; color: var(--accent); font-weight: 700; }


/* -- Packages -- */
.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 32px; }
.package-list { margin-top: 14px; }
.price { font-size: 28px; font-weight: 700; margin: 12px 0; color: var(--ink); }
.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 6px 10px;
  border-radius: 999px;
}
.badge-accent { background: var(--accent); color: var(--paper); }


/* -- Steps -- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.step {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
  color: var(--ink);
}
.step-number {
  display: block;
  font-weight: 700;
  color: var(--accent);
  font-size: 24px;
  margin-bottom: 8px;
}
.step-text { display: block; }


/* -- Proof & Testimonials -- */
.proof {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.proof-box {
  background: var(--card-bg);
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
  color: var(--ink);
}
.proof-box h4 { margin-bottom: 8px; color: var(--ink); }
.proof-stat { font-size: 48px; font-weight: 700; color: var(--accent); line-height: 1; }
.proof-label { font-size: 14px; color: var(--muted); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.proof-box strong { color: var(--ink); }

.testimonial-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 30px;
}

.testimonial {
  background: linear-gradient(135deg, #0f1a35 0%, #17264a 100%);
  border: 1px solid var(--border-light);
  color: #f5f8ff;
  padding: 28px;
  border-radius: 16px;
}

.testimonial blockquote { margin: 0; }
.testimonial p {
  font-size: 16px;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 16px;
  color: #f5f8ff;
}
.testimonial footer { text-align: left; background: none; padding: 0; border: none; }
.testimonial cite {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-style: normal;
}


/* -- FAQ -- */
.faq { display: grid; gap: 14px; margin-top: 24px; }

.faq details {
  background: var(--card-bg);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
  color: var(--ink);
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { content: ""; }

.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq details[open] summary::after {
  content: "\2212"; /* minus sign */
}

.faq details p {
  margin-top: 10px;
  color: var(--slate);
}


/* -- ROI Calculator -- */
.calculator-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 40px;
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 40px);
  box-shadow: 0 20px 50px var(--shadow);
  border: 1px solid var(--border);
}

.calc-input-group { margin-bottom: 24px; }

.calc-input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}

.calc-input-group input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--sand);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* Webkit (Chrome, Safari, Edge) */
.calc-input-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(240, 237, 232, 0.3);
}

/* Firefox */
.calc-input-group input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 12px rgba(240, 237, 232, 0.3);
}

.calc-input-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--ink);
  cursor: pointer;
}

.calc-value {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.calculator-results {
  background: var(--section-bg);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.calc-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.calc-result:last-child { border-bottom: none; }

.calc-result-label { font-size: 14px; color: var(--slate); }
.calc-result-value { font-size: 18px; font-weight: 700; color: var(--ink); }

.calc-result-highlight {
  background: var(--ink);
  margin: 8px -28px;
  padding: 20px 28px;
  border-radius: 12px;
  border-bottom: none;
}

.calc-result-highlight .calc-result-label,
.calc-result-highlight .calc-result-value {
  color: var(--paper);
}

.calc-result-highlight .calc-result-value { font-size: 28px; }

.calc-warning {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 8px;
  display: none;
}
.calc-warning.visible { display: block; }


/* -- Video -- */
.video-container { margin-top: 30px; }

.video-embed {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px var(--shadow);
}

.video-placeholder {
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px var(--shadow);
  color: var(--ink);
  border-radius: 14px;
  padding: 60px 24px;
  display: grid;
  place-items: center;
  min-height: 320px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.video-placeholder:hover { transform: scale(1.01); }

.video-play-btn {
  margin-bottom: 20px;
  transition: transform 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.video-placeholder:hover .video-play-btn { transform: scale(1.1); }

.video-placeholder-text { text-align: center; }
.video-placeholder-title { font-size: 20px; font-weight: 600; color: var(--ink); }
.video-placeholder-subtitle { font-size: 14px; color: var(--muted); margin-top: 6px; }
.video-placeholder-notice { font-size: 12px; color: var(--muted); margin-top: 12px; }


/* -- Contact -- */
.contact {
  background: var(--section-bg);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 24px;
  padding: 40px;
  margin-top: 30px;
}

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact a { color: var(--ink); text-decoration: underline; }
.phone-number { font-size: 20px; font-weight: 700; margin: 10px 0; }
.phone-number a { text-decoration: none; }
.contact-note { margin-top: 12px; }
.contact address { font-style: normal; }

form { display: grid; gap: 12px; }

/* Scoped form inputs to contact section */
.contact input,
.contact textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-family: inherit;
}

.contact input::placeholder,
.contact textarea::placeholder {
  color: var(--muted);
}

.contact input:invalid:not(:placeholder-shown) {
  border-color: #ff6b6b;
}

.contact small { color: var(--muted); }

.mobile-cta-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 980;
  display: none;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(10, 10, 15, 0.92);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.mobile-cta-bar.hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.mobile-cta-btn {
  flex: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
}

.mobile-cta-call {
  background: var(--ink);
  color: var(--paper);
}

.mobile-cta-demo {
  border: 1px solid var(--border-medium);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.form-status {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  display: none;
}

.form-status.visible { display: block; }

.form-status.success {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.form-status.error {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}


/* -- Footer -- */
footer {
  text-align: center;
  padding: 30px 0 40px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.2);
}

.footer-note { color: var(--muted); }
.footer-nav { margin-top: 8px; }
.footer-nav a { margin: 0 8px; color: var(--slate); }
.footer-nav a:hover { color: var(--ink); }


/* -- Ambient Grid Lines -- */
.ambient-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.78;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 64px 64px;
  mask-image: radial-gradient(circle at 50% 15%, black 22%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 15%, black 22%, transparent 75%);
  animation: gridFloat 18s linear infinite;
  transform-origin: center;
}


/* -- Reveal Animations -- */
.preload .hero > div:first-child,
.preload .hero-card {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(8px);
}

.is-ready .hero > div:first-child,
.is-ready .hero-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition: transform 0.95s cubic-bezier(.22, .61, .36, 1), opacity 0.85s ease, filter 0.9s ease;
}

.is-ready .hero-card { transition-delay: 0.12s; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: transform 0.72s cubic-bezier(.22, .61, .36, 1), opacity 0.62s ease, filter 0.62s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}


/* -- Chat Widget -- */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(240, 237, 232, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.chat-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(240, 237, 232, 0.3);
}

.chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #3aa0ff;
  color: white;
  font-size: 12px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--paper);
}

.chat-box {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-box.open { display: flex; }

.chat-header {
  background: var(--section-bg);
  color: var(--ink);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink), var(--slate));
}

.chat-header-title { font-weight: 600; font-size: 15px; }
.chat-header-status { font-size: 12px; color: var(--muted); }

.chat-close {
  background: none;
  border: none;
  color: var(--ink);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.chat-close:hover { opacity: 1; }

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-message.bot {
  background: var(--section-bg);
  color: var(--slate);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message.user {
  background: var(--ink);
  color: var(--paper);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-message p { margin: 0; color: inherit; }

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chat-quick-btn {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-medium);
  background: var(--card-bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-quick-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.chat-cta { margin-top: 12px; }
.chat-cta .btn { width: 100%; font-size: 14px; padding: 12px 20px; }

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  background: var(--card-bg);
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--section-bg);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}

.chat-input::placeholder { color: var(--muted); }

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.chat-send:hover { transform: scale(1.05); }


/* -- Keyframes -- */
@keyframes nebrexDrift {
  0% { transform: translate3d(-2.2%, -1.8%, 0) scale(1); }
  100% { transform: translate3d(2.1%, 2.2%, 0) scale(1.05); }
}

@keyframes gridFloat {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-32px, -32px, 0); }
}

@keyframes heroSweep {
  0% { transform: translateX(55%) rotate(8deg); opacity: 0; }
  16% { opacity: 0.45; }
  52% { opacity: 0.14; }
  100% { transform: translateX(-130%) rotate(8deg); opacity: 0; }
}


/* -- Responsive: Shared tablet + mobile (<=980px) -- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .calculator-card { grid-template-columns: 1fr; padding: 28px; gap: 28px; }
  .calc-result-highlight { margin: 8px -28px; padding: 16px 28px; }

  .mobile-menu-btn { display: flex; width: 40px; height: 40px; }
  body.menu-open { overflow: hidden; }
  .nav-actions { display: none; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .nav-links a {
    width: 100%;
    min-height: 44px;
    padding: 8px 0;
    font-size: 16px;
  }

  .nav-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0;
  }

  .nav-dropdown::after {
    display: none;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    min-height: 44px;
    padding: 8px 0;
    font-size: 16px;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 100%;
    width: 100%;
    margin-top: 4px;
    box-shadow: none;
    border-radius: 10px;
    border-color: var(--border-light);
    padding: 6px;
  }

  .nav-dropdown-menu a {
    width: 100%;
    min-height: 42px;
  }

  .nav-solutions-menu {
    min-width: 100%;
    max-width: 100%;
  }

  .nav-mobile-only {
    display: inline-flex;
  }

  .nav-mobile-secondary {
    border: 1px solid var(--border-medium);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
  }

  .nav-mobile-primary {
    background: var(--ink);
    color: var(--paper);
    border: 1px solid transparent;
  }

  .nav-links.nav-open { display: flex; }
  nav { position: relative; }

  .chat-box { width: calc(100vw - 24px); right: 0; }
  .chat-messages { max-height: 280px; }
}

/* Tablet: 2-column grids */
@media (max-width: 980px) and (min-width: 641px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: single column */
@media (max-width: 640px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .logo { gap: 12px; }
  .logo-mark .mark-n { font-size: 18px; }
  .logo-mark .mark-x { font-size: 24px; }
  .logo-word { font-size: 12px; }
  .logo-sub { font-size: 8px; }
  .hero::after { display: none; }
  .signal { grid-template-columns: 1fr; gap: 12px; }
  .hero { padding: 60px 0 50px; }
  section { padding: 50px 0; }
  .grid-3, .packages, .steps, .proof, .testimonial-bar { grid-template-columns: 1fr; }
  .calculator-card { padding: 24px; gap: 24px; }
  .calc-result-highlight { margin: 8px -24px; padding: 16px 24px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; text-align: center; }
  .contact input,
  .contact textarea,
  .chat-input { font-size: 16px; }
  .chat-widget {
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .chat-toggle {
    width: 56px;
    height: 56px;
  }
  .mobile-cta-bar {
    display: flex;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
}


/* -- Reduced Motion -- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  body::before,
  .ambient-lines,
  .hero::after {
    animation: none;
  }

  .preload .hero > div:first-child,
  .preload .hero-card,
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .btn, .hamburger-line, .video-placeholder, .video-play-btn,
  .chat-toggle, .chat-send, .chat-close, .faq summary::after {
    transition: none;
  }
}


/* -- Print -- */
@media print {
  header, .mobile-menu-btn, .btn, .cta-row, form,
  .video-container, .chat-widget, .ambient-lines { display: none; }

  body { background: white; color: black; }
  body::before { display: none; }
  .wrap { max-width: 100%; padding: 0; }
  section { padding: 20px 0; page-break-inside: avoid; }

  .grid-3, .packages, .steps, .proof, .offer-grid,
  .contact-grid, .testimonial-bar { grid-template-columns: 1fr; }

  .card, .offer, .contact, .proof-box, .testimonial,
  .calculator-card, .step, .hero-card {
    box-shadow: none;
    border: 1px solid #ddd;
    background: white;
    color: black;
  }

  h1, h2, h3, h4 { color: black; }
  p, li { color: #333; }
  a { text-decoration: underline; color: black; }
  a[href^="tel:"]::after,
  a[href^="mailto:"]::after {
    content: " (" attr(href) ")";
    font-size: 12px;
  }
}


@media (hover: none) {
  .btn:hover,
  .video-placeholder:hover,
  .chat-toggle:hover,
  .chat-send:hover,
  .video-placeholder:hover .video-play-btn {
    transform: none;
    box-shadow: inherit;
  }
}



