/* Design system variables */
:root {
  --bg: #0b0f12;
  --bg-2: #121820;
  --text: #e9eef5;
  --muted: #9aa7b5;
  --accent: #2ee8d4;
  --grid: rgba(46, 232, 212, 0.08);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --maxw: 1200px;
  --header-h: 72px;
  --footer-glow-x: 50%;
  --footer-glow-y: 50%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(46, 232, 212, 0.04) 0,
      rgba(46, 232, 212, 0.04) 1px,
      transparent 1px,
      transparent 120px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(46, 232, 212, 0.04) 0,
      rgba(46, 232, 212, 0.04) 1px,
      transparent 1px,
      transparent 120px
    );
}

body[data-theme="light"] {
  --bg: #f7fafc;
  --bg-2: #ffffff;
  --text: #0b0f12;
  --muted: #4b5563;
  --grid: rgba(12, 74, 110, 0.08);
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  background-color: var(--bg);
  color: var(--text);
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(12, 74, 110, 0.06) 0,
      rgba(12, 74, 110, 0.06) 1px,
      transparent 1px,
      transparent 120px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(12, 74, 110, 0.06) 0,
      rgba(12, 74, 110, 0.06) 1px,
      transparent 1px,
      transparent 120px
    );
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(46, 232, 212, 0.6);
  outline-offset: 2px;
}

p {
  color: var(--muted);
  margin: 0 0 1rem;
}

strong {
  color: var(--text);
}

ul {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 1rem;
  line-height: 1.1;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: 1.4rem;
}

small,
.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
}

.container {
  width: min(100% - 3rem, var(--maxw));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
  position: relative;
}

.section + .section {
  border-top: 1px solid rgba(46, 232, 212, 0.12);
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.muted {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: start;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--accent);
  color: #041013;
  padding: 8px 12px;
  border-radius: 999px;
  z-index: 2000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 12px;
}

.site-banner {
  position: relative;
  z-index: 1001;
  border-bottom: 1px solid rgba(46, 232, 212, 0.2);
  background: linear-gradient(90deg, rgba(18, 24, 32, 0.96), rgba(8, 25, 28, 0.96));
}

.site-banner__inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.45rem 0;
}

.site-banner__inner p {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
}

.site-banner__cta {
  border: 1px solid rgba(46, 232, 212, 0.45);
  border-radius: 999px;
  padding: 0.33rem 0.8rem;
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.site-banner__cta:hover,
.site-banner__cta:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(46, 232, 212, 0.75);
  background: rgba(46, 232, 212, 0.12);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  background: rgba(11, 15, 18, 0.75);
  border-bottom: 1px solid rgba(46, 232, 212, 0.18);
}

/* iOS Safari: increase header opacity to avoid overlap feel */
@supports (-webkit-touch-callout: none) {
  .site-header {
    background: rgba(11, 15, 18, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  }

  body[data-theme="light"] .site-header {
    background: rgba(248, 250, 252, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  }
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo img {
  height: 28px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.35);
  background: rgba(18, 24, 32, 0.6);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 0.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(46, 232, 212, 0.7);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.theme-toggle__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(46, 232, 212, 0.5);
}

.theme-toggle__label {
  letter-spacing: 0.02em;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

body.page-home .nav a[href="index.html"],
body.page-software .nav a[href="software-services.html"],
body.page-hardware .nav a[href="hardware-services.html"],
body.page-ai-agents .nav a[href="ai-agents.html"],
body.page-research .nav a[href="case-studies.php"],
body.page-case-studies .nav a[href="case-studies.php"],
body.page-case .nav a[href="case-studies.php"],
body.page-blog .nav a[href="blog.php"],
body.page-white .nav a[href="blog.php"],
body.page-white-papers .nav a[href="blog.php"],
body.page-portfolio .nav a[href="portfolio.php"],
body.page-about .nav a[href="about.html"],
body.page-contact .nav a[href="contact.html"] {
  color: var(--accent);
}

.founder-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.founder-photo {
  width: 100%;
  max-width: 320px;
  border-radius: 18px;
  border: 1px solid rgba(46, 232, 212, 0.2);
  object-fit: cover;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.5);
  color: var(--text);
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #041013;
  box-shadow: 0 12px 25px rgba(46, 232, 212, 0.3);
}

.btn-secondary {
  background: transparent;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.hero {
  position: relative;
  padding: 120px 0 96px;
  overflow: hidden;
}

/* Hero animated grid + mesh layers (parallax via JS) */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(46, 232, 212, 0.2) 1px, transparent 1px),
    linear-gradient(120deg, rgba(46, 232, 212, 0.12), transparent 40%);
  background-size: 48px 48px, 100% 100%;
  opacity: 0.45;
  transform: translateZ(0);
  pointer-events: none;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(46, 232, 212, 0.18), transparent 60%),
    radial-gradient(circle at 70% 40%, rgba(46, 232, 212, 0.12), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 3rem;
  align-items: center;
}

.hero-copy p {
  max-width: 520px;
  font-size: 1.1rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-panel {
  background: rgba(18, 24, 32, 0.8);
  border: 1px solid rgba(46, 232, 212, 0.16);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46, 232, 212, 0.2), transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

.hero-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-panel li {
  margin-bottom: 0.8rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.hero-panel li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
  position: relative;
  z-index: 2;
}

.content-card {
  border-radius: var(--radius);
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(18, 24, 32, 0.8);
  padding: 22px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.content-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.content-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.content-cover {
  width: 100%;
  height: 180px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(46, 232, 212, 0.25), rgba(11, 15, 18, 0.2));
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
}

.content-cover.large {
  height: 260px;
}

.content-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-media {
  width: 100%;
  height: 130px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(46, 232, 212, 0.22);
  background: rgba(11, 15, 18, 0.4);
}

.card-media.is-compact {
  height: 96px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content-body {
  max-width: 760px;
}

.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.3);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.stat {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(18, 24, 32, 0.75);
}

.stat h3 {
  margin-bottom: 0.4rem;
  font-size: 2rem;
}

.panel-light {
  background: #f2f6f8;
  color: #0b0f12;
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid rgba(11, 15, 18, 0.12);
  position: relative;
  overflow: hidden;
}

.panel-light::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(46, 232, 212, 0.25), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

.panel-light h2,
.panel-light h3,
.panel-light p,
.panel-light small,
.panel-light .mono {
  color: #0b0f12;
}

.panel-light li {
  color: #0b0f12;
}

.panel-light strong {
  color: #0b0f12;
}

.panel-light .btn-secondary {
  border-color: rgba(11, 15, 18, 0.3);
}

.panel-light .btn {
  color: #0b0f12;
}

.panel-light .btn-primary {
  color: #041013;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  justify-content: space-between;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-inline {
  margin-top: 20px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.25);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card {
  background: rgba(18, 24, 32, 0.8);
  border: 1px solid rgba(46, 232, 212, 0.14);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(46, 232, 212, 0.4);
}

.card .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.3);
  font-size: 0.7rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.funnel-section {
  position: relative;
}

/* Software funnel animation container */
.funnel-canvas {
  position: relative;
  height: 420px;
  border-radius: 24px;
  background: rgba(9, 12, 15, 0.6);
  border: 1px solid rgba(46, 232, 212, 0.2);
  overflow: hidden;
}

.funnel-body {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.funnel-shape {
  width: 180px;
  height: 280px;
  background: linear-gradient(180deg, rgba(46, 232, 212, 0.18), rgba(46, 232, 212, 0.02));
  clip-path: polygon(0% 0%, 100% 0%, 70% 100%, 30% 100%);
  border: 1px solid rgba(46, 232, 212, 0.4);
  box-shadow: inset 0 0 30px rgba(46, 232, 212, 0.2);
}

.funnel-stage-labels {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.funnel-stage-labels span {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(9, 12, 15, 0.7);
}

/* Cards are animated via GSAP to flow into the funnel */
.funnel-card {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(18, 24, 32, 0.9);
  border: 1px solid rgba(46, 232, 212, 0.35);
  font-size: 0.78rem;
  color: var(--text);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.funnel-card.best {
  background: var(--accent);
  color: #041013;
  font-weight: 600;
}

.counter {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 2.5rem;
  font-weight: 600;
}

.counter-value {
  font-variant-numeric: tabular-nums;
}

.counter span {
  font-size: 0.9rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.flow-step {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(18, 24, 32, 0.75);
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.flow-step:hover,
.flow-step.is-open {
  border-color: rgba(46, 232, 212, 0.6);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.flow-step p {
  max-height: none;
  overflow: visible;
  margin-top: 0.35rem;
  opacity: 0.94;
  transition: opacity 0.2s ease;
}

.flow-step:hover p,
.flow-step.is-open p {
  opacity: 1;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.services-list .card ul {
  padding-left: 1rem;
  color: var(--muted);
}

.hardware-diagram {
  border-radius: var(--radius);
  border: 1px solid rgba(46, 232, 212, 0.2);
  padding: 32px;
  background: rgba(18, 24, 32, 0.65);
  position: relative;
  overflow: hidden;
}

.hardware-diagram svg {
  width: 100%;
  height: auto;
}

.diagram-node {
  fill: rgba(18, 24, 32, 0.95);
  stroke: rgba(46, 232, 212, 0.5);
  stroke-width: 1;
}

.diagram-label {
  fill: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hardware diagram data flow animation */
.flow-line {
  fill: none;
  stroke: rgba(46, 232, 212, 0.8);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: flow 4s linear infinite;
}

@keyframes flow {
  to {
    stroke-dashoffset: -48;
  }
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(18, 24, 32, 0.8);
  position: relative;
}

.testimonial-quote {
  font-size: 1.05rem;
  color: var(--text);
}

.testimonial-meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-status {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.case-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid rgba(46, 232, 212, 0.18);
  background: rgba(18, 24, 32, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.case-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.case-card .insight {
  position: absolute;
  inset: 0;
  background: rgba(46, 232, 212, 0.12);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 22px;
}

.case-card:hover .insight {
  transform: translateY(0%);
}

.case-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2rem;
}

.case-sidebar {
  position: sticky;
  top: 120px;
  align-self: flex-start;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(18, 24, 32, 0.85);
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.filter-btn {
  font-size: 0.85rem;
  padding: 8px 18px;
}

.portfolio-card {
  border-radius: var(--radius);
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(18, 24, 32, 0.75);
  padding: 20px;
  transition: transform 0.3s ease, border 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 232, 212, 0.5);
  box-shadow: var(--shadow);
}

.portfolio-card.is-open {
  border-color: rgba(46, 232, 212, 0.5);
  box-shadow: var(--shadow);
}

.portfolio-card button {
  width: 100%;
  background: none;
  border: none;
  color: inherit;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}

.portfolio-card button .card-media {
  margin-bottom: 12px;
}

.portfolio-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.portfolio-card.is-open .portfolio-content {
  max-height: 400px;
}

.mini-diagram {
  margin-top: 1rem;
  width: 100%;
  height: 90px;
}

.mini-diagram rect {
  fill: rgba(18, 24, 32, 0.9);
  stroke: rgba(46, 232, 212, 0.4);
  stroke-width: 1;
}

.mini-diagram path {
  stroke: rgba(46, 232, 212, 0.8);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 6 6;
  animation: flow 5s linear infinite;
}

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

#contact-form {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.contact-form label {
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(11, 15, 18, 0.9);
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(46, 232, 212, 0.5);
  border-color: rgba(46, 232, 212, 0.6);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  margin-top: 16px;
  color: var(--muted);
}

.site-footer {
  position: relative;
  padding: 80px 0 40px;
  background: rgba(9, 12, 15, 0.92);
  border-top: 1px solid rgba(46, 232, 212, 0.2);
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.footer-grid h4 {
  margin-bottom: 0.8rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.6rem;
  color: var(--muted);
}

.footer-legal {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(46, 232, 212, 0.05) 0,
      rgba(46, 232, 212, 0.05) 1px,
      transparent 1px,
      transparent 100px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(46, 232, 212, 0.05) 0,
      rgba(46, 232, 212, 0.05) 1px,
      transparent 1px,
      transparent 100px
    );
  opacity: 0.4;
  animation: footer-drift 16s linear infinite;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--footer-glow-x) var(--footer-glow-y), rgba(46, 232, 212, 0.22), transparent 55%);
  opacity: 0.6;
}

@keyframes footer-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 120px 120px, -120px -120px;
  }
}

/* Custom cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(46, 232, 212, 0.6);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2000;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: transform 0.2s ease, width 0.2s ease, height 0.2s ease, opacity 0.3s ease;
  background: rgba(4, 16, 19, 0.4);
  backdrop-filter: blur(6px);
}

.cursor.is-active {
  opacity: 1;
}

.cursor.is-large {
  width: 92px;
  height: 92px;
}

.cursor-text {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cursor.is-large .cursor-text {
  opacity: 1;
}

/* Page transition overlay (controlled via JS) */
.page-transition {
  position: fixed;
  inset: 0;
  background: #050708;
  z-index: 1500;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px);
}

/* Light theme overrides */
body[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

body[data-theme="light"] .site-banner {
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.96), rgba(236, 253, 250, 0.96));
}

body[data-theme="light"] .nav a {
  color: var(--muted);
}

body[data-theme="light"] .nav a:hover {
  color: var(--text);
}

body[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.16);
  color: var(--text);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .theme-toggle__dot {
  background: #0b0f12;
  box-shadow: none;
}

body[data-theme="light"] .hero-grid {
  opacity: 0.18;
}

body[data-theme="light"] .hero-mesh {
  opacity: 0.22;
  mix-blend-mode: normal;
}

body[data-theme="light"] .hero-panel,
body[data-theme="light"] .card,
body[data-theme="light"] .content-card,
body[data-theme="light"] .stat,
body[data-theme="light"] .flow-step,
body[data-theme="light"] .hardware-diagram,
body[data-theme="light"] .testimonial-card,
body[data-theme="light"] .case-card,
body[data-theme="light"] .case-sidebar,
body[data-theme="light"] .portfolio-card,
body[data-theme="light"] .funnel-card,
body[data-theme="light"] .funnel-canvas,
body[data-theme="light"] .content-cover,
body[data-theme="light"] .contact-form input,
body[data-theme="light"] .contact-form textarea {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .card-media {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(241, 245, 249, 0.85);
}

body[data-theme="light"] .funnel-stage-labels span {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .funnel-shape {
  background: linear-gradient(180deg, rgba(46, 232, 212, 0.2), rgba(46, 232, 212, 0.05));
}

body[data-theme="light"] .funnel-card.best {
  background: var(--accent);
  color: #041013;
}

body[data-theme="light"] .diagram-node,
body[data-theme="light"] .mini-diagram rect {
  fill: rgba(255, 255, 255, 0.95);
  stroke: rgba(15, 23, 42, 0.18);
}

body[data-theme="light"] .site-footer {
  background: rgba(248, 250, 252, 0.95);
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

body[data-theme="light"] .site-footer::before {
  background-image:
    repeating-linear-gradient(
      to right,
      rgba(15, 23, 42, 0.06) 0,
      rgba(15, 23, 42, 0.06) 1px,
      transparent 1px,
      transparent 100px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.06) 0,
      rgba(15, 23, 42, 0.06) 1px,
      transparent 1px,
      transparent 100px
    );
  opacity: 0.35;
}

body[data-theme="light"] .site-footer::after {
  background: radial-gradient(circle at var(--footer-glow-x) var(--footer-glow-y), rgba(46, 232, 212, 0.18), transparent 55%);
  opacity: 0.4;
}

body[data-theme="light"] .page-transition {
  background: #f7fafc;
}

body[data-theme="light"] .murphy-chat__launcher {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.16);
  color: var(--text);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

body[data-theme="light"] .murphy-chat__panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="light"] .murphy-chat__header,
body[data-theme="light"] .murphy-chat__form {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="light"] .murphy-chat__bubble {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text);
}

body[data-theme="light"] .murphy-chat__example-btn {
  background: rgba(46, 232, 212, 0.1);
  border-color: rgba(12, 74, 110, 0.18);
}

body[data-theme="light"] .murphy-chat__message--user .murphy-chat__bubble {
  background: rgba(46, 232, 212, 0.18);
  border-color: rgba(46, 232, 212, 0.45);
}

body[data-theme="light"] .murphy-chat__input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  color: var(--text);
}

body[data-theme="light"] .murphy-chat__close {
  background: rgba(15, 23, 42, 0.08);
  color: #0b0f12;
}

/* Section reveal base state (animated via JS) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
}

body.page-blog .content-grid.reveal {
  opacity: 1;
  transform: none;
}

body.page-blog .section {
  position: relative;
  z-index: 2;
}

body.page-blog .content-grid {
  opacity: 1 !important;
  transform: none !important;
}

.content-card {
  display: block;
}

/* Murphy chat widget */
.murphy-chat {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 1900;
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
}

.murphy-chat__launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem 0.65rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.45);
  background: rgba(7, 12, 16, 0.92);
  color: var(--text);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.murphy-chat__launcher:hover {
  transform: translateY(-2px);
  border-color: rgba(46, 232, 212, 0.8);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

.murphy-chat__launcher-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.25);
  opacity: 0.8;
}

.murphy-chat__launcher-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(46, 232, 212, 0.35), rgba(9, 18, 22, 0.9));
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.murphy-chat__launcher-label {
  font-size: 0.9rem;
  color: var(--text);
}

.murphy-chat__launcher-badge {
  margin-left: 0.2rem;
  background: var(--accent);
  color: #051317;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.murphy-chat__launcher-badge.is-hidden {
  opacity: 0;
  transform: scale(0.6);
}

.murphy-chat__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: min(360px, 92vw);
  max-height: min(520px, 70vh);
  background: linear-gradient(160deg, rgba(9, 16, 20, 0.98), rgba(13, 22, 28, 0.95));
  border: 1px solid rgba(46, 232, 212, 0.25);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.murphy-chat__panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.murphy-chat__header {
  padding: 1rem 1.1rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(46, 232, 212, 0.15);
  background: rgba(6, 12, 16, 0.7);
}

.murphy-chat__name {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.murphy-chat__status {
  font-size: 0.75rem;
  color: var(--muted);
}

.murphy-chat__close {
  border: none;
  background: rgba(46, 232, 212, 0.12);
  color: var(--accent);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

.murphy-chat__messages {
  padding: 1rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 232, 212, 0.4) transparent;
}

.murphy-chat__messages::-webkit-scrollbar {
  width: 6px;
}

.murphy-chat__messages::-webkit-scrollbar-thumb {
  background: rgba(46, 232, 212, 0.35);
  border-radius: 999px;
}

.murphy-chat__message {
  display: flex;
  flex-direction: column;
}

.murphy-chat__message--user {
  align-items: flex-end;
}

.murphy-chat__bubble {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  max-width: 85%;
  font-size: 0.9rem;
  background: rgba(9, 16, 20, 0.9);
  border: 1px solid rgba(46, 232, 212, 0.18);
  color: var(--text);
}

.murphy-chat__message--user .murphy-chat__bubble {
  background: rgba(46, 232, 212, 0.15);
  border-color: rgba(46, 232, 212, 0.45);
}

.murphy-chat__bubble ul {
  padding-left: 1.1rem;
  margin: 0.4rem 0 0.8rem;
}

.murphy-chat__bubble p {
  margin: 0 0 0.6rem;
  color: var(--text);
}

.murphy-chat__examples {
  display: grid;
  gap: 0.5rem;
}

.murphy-chat__example-btn {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(46, 232, 212, 0.35);
  background: rgba(46, 232, 212, 0.08);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.murphy-chat__example-btn:hover,
.murphy-chat__example-btn:focus-visible {
  border-color: rgba(46, 232, 212, 0.65);
  background: rgba(46, 232, 212, 0.16);
  transform: translateY(-1px);
}

.murphy-chat__cta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.murphy-chat__link {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: #041013;
  font-size: 0.75rem;
  font-weight: 600;
}

.murphy-chat__link.is-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(46, 232, 212, 0.5);
}

.murphy-chat__typing .murphy-chat__bubble {
  display: flex;
  gap: 6px;
  align-items: center;
}

.murphy-chat__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(46, 232, 212, 0.8);
  animation: murphy-dot 1s infinite ease-in-out;
}

.murphy-chat__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.murphy-chat__dot:nth-child(3) {
  animation-delay: 0.4s;
}

.murphy-chat__form {
  display: flex;
  gap: 0.6rem;
  padding: 0.9rem 1rem 0.6rem;
  border-top: 1px solid rgba(46, 232, 212, 0.12);
  background: rgba(6, 11, 15, 0.7);
}

.murphy-chat__input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(46, 232, 212, 0.2);
  background: rgba(5, 9, 12, 0.85);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  font-family: inherit;
}

.murphy-chat__send {
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #041013;
  font-weight: 600;
  padding: 0.55rem 1rem;
  cursor: pointer;
}

.murphy-chat__note {
  padding: 0 1rem 0.85rem;
  font-size: 0.7rem;
  color: var(--muted);
}

@keyframes murphy-dot {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 1rem;
    justify-content: flex-start;
  }

  .case-detail {
    grid-template-columns: 1fr;
  }

  .case-sidebar {
    position: relative;
    top: 0;
  }
}

@media (max-width: 600px) {
  .site-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.55rem 0;
  }

  .site-banner__inner p {
    font-size: 0.74rem;
  }

  .header-inner {
    flex-direction: column;
    height: auto;
    padding: 1rem 0;
  }

  .hero {
    padding-top: 160px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel-light {
    padding: 28px;
  }

  .card-media {
    height: 110px;
  }

  .card-media.is-compact {
    height: 88px;
  }

  .murphy-chat {
    left: 16px;
    right: 16px;
    bottom: 20px;
  }

  .murphy-chat__launcher {
    width: 100%;
    justify-content: center;
  }

  .murphy-chat__panel {
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation: none !important;
    transition: none !important;
  }

  .cursor {
    display: none;
  }
}
