:root {
  --bg: #070c1a;
  --panel: #0c1426;
  --panel-2: #0f1c32;
  --stroke: #1f2a44;
  --accent: #10b981;
  --accent-2: #f97316;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --pill: #13233c;
  --card: #0e1a2f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.12), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(249, 115, 22, 0.18), transparent 28%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 20, 0.72);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: min(520px, 92vw);
  background: rgba(12, 20, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  padding: 22px 22px 26px;
  z-index: 1;
}

.modal-dialog.compact {
  width: min(380px, 92vw);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-1px); }

.modal-header h3 {
  margin: 8px 0 6px;
  font-size: 22px;
}

.lede.small {
  font-size: 14px;
  margin: 0;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.field {
  display: flex;
  z-index: 2;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
}

.field span {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  pointer-events: none;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.field textarea { resize: vertical; }

.field.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.option:hover {
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.08);
  transform: translateY(-1px);
}

.option input {
  accent-color: #10b981;
  width: 16px;
  height: 16px;
}

.w-full { width: 100%; }

.form-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.call-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 14px 16px;
  margin-top: 10px;
}

.call-number {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cloud-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.cloud {
  position: absolute;
  width: 380px;
  height: 180px;
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.12), transparent 50%),
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.14), transparent 55%),
    radial-gradient(circle at 50% 70%, rgba(255, 255, 255, 0.1), transparent 60%),
    rgba(255, 255, 255, 0.05);
  filter: blur(18px);
  border-radius: 160px;
  animation: cloud-drift 36s linear infinite;
}

.cloud-1 { top: 14%; left: -22%; animation-duration: 42s; animation-delay: -6s; }
.cloud-2 { top: 38%; left: -32%; animation-duration: 36s; animation-delay: -14s; }
.cloud-3 { top: 62%; left: -26%; animation-duration: 48s; animation-delay: -22s; }

@keyframes cloud-drift {
  0% { transform: translateX(0); }
  50% { transform: translateX(55vw); }
  100% { transform: translateX(110vw); }
}

.ambient {
  position: fixed;
  top: 8vh;
  right: -40px;
  width: 180px;
  height: 70vh;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.28), transparent 35%),
    radial-gradient(circle at 70% 40%, rgba(14, 165, 233, 0.25), transparent 30%),
    linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(14, 165, 233, 0.05));
  filter: blur(22px);
  opacity: 0.9;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
  animation: drift 12s ease-in-out infinite alternate;
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate3d(-12px, 16px, 0) scale(1.08);
    opacity: 0.75;
  }
  100% {
    transform: translate3d(12px, -14px, 0) scale(1.05);
    opacity: 0.9;
  }
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: absolute;
  filter: blur(90px);
  opacity: 0.25;
  z-index: 0;
}

.page-shell::before {
  width: 420px;
  height: 420px;
  background: #10b981;
  top: 10%;
  left: -120px;
}

.page-shell::after {
  width: 520px;
  height: 520px;
  background: #f97316;
  bottom: -120px;
  right: -180px;
}

.page-shell {
  position: relative;
  z-index: 2;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
  background: rgba(7, 12, 26, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  padding: 6px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 600;
  font-size: 16px;
}

.brand-tagline {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  color: #f8fafc;
  transform: translateY(-1px);
}

.nav .pill {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.hero {
  padding: 96px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  margin: 12px 0 16px;
}

.lede {
  color: var(--muted);
  max-width: 720px;
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
}

.cta-row {
  display: flex;
  gap: 14px;
  margin: 28px 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #04101b;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.signal-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 14px;
  border-radius: 12px;
}

.signal-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signal-value {
  display: block;
  font-weight: 700;
  font-size: 16px;
}

.hero-visual {
  position: relative;
}

.typing-card {
  position: absolute;
  bottom: -22px;
  right: -22px;
  width: min(360px, 90vw);
  background: rgba(10, 17, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.12), rgba(14, 165, 233, 0.08));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}

.led-green { color: #10b981; background: #10b981; }
.led-amber { color: #f59e0b; background: #f59e0b; }
.led-blue { color: #3b82f6; background: #3b82f6; }

.code-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.code-body {
  margin: 0;
  padding: 14px 14px 16px;
  background: rgba(6, 12, 22, 0.9);
  color: #c7d2fe;
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.code-body code { display: block; }

.line {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid rgba(59, 130, 246, 0.8);
  padding-right: 4px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.08), transparent);
}

.type1 { width: 0; animation: type-1 6s steps(26) infinite; }
.type2 { width: 0; animation: type-2 6s steps(30) infinite; animation-delay: 0.6s; }
.type3 { width: 0; animation: type-3 6s steps(28) infinite; animation-delay: 1.2s; }
.type4 { width: 0; animation: type-4 6s steps(2) infinite; animation-delay: 1.8s; }

@keyframes type-1 {
  0%,10% { width: 0; }
  35%,65% { width: 26ch; }
  90%,100% { width: 0; }
}

@keyframes type-2 {
  0%,10% { width: 0; }
  35%,65% { width: 30ch; }
  90%,100% { width: 0; }
}

@keyframes type-3 {
  0%,10% { width: 0; }
  35%,65% { width: 28ch; }
  90%,100% { width: 0; }
}

@keyframes type-4 {
  0%,10% { width: 0; }
  35%,65% { width: 2ch; }
  90%,100% { width: 0; }
}

.glass-panel {
  background: rgba(14, 26, 47, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), rgba(14, 165, 233, 0.08));
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.8;
}

.dot:nth-child(2) {
  background: #f59e0b;
}

.dot:nth-child(3) {
  background: #6366f1;
}

.panel-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.panel-body {
  padding: 20px 22px 24px;
}

.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.flow-node {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-weight: 600;
}

.flow-node.hot {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.15));
  border-color: rgba(16, 185, 129, 0.5);
}

.flow-rail {
  flex: 1;
  min-width: 30px;
  height: 2px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.7), rgba(14, 165, 233, 0.4));
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 88px 0;
}

.section.alt {
  background: rgba(255, 255, 255, 0.02);
  border-block: 1px solid rgba(255, 255, 255, 0.04);
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 12px 0;
  line-height: 1.2;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.card ul {
  padding-left: 18px;
  margin: 0;
  color: var(--text);
}

.process-grid {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 16px 18px;
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #04101b;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #0a1120;
}

.project-card figcaption {
  padding: 16px 18px 18px;
}

.project-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pill {
  background: var(--pill);
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-weight: 600;
  font-size: 12px;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.contact-cta {
  display: flex;
  gap: 12px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 32px 0 46px;
  background: rgba(7, 12, 26, 0.85);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

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

@media (max-width: 960px) {
  .header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .signal-row,
  .stat-cards,
  .contact,
  .footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .contact-cta {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cta-row {
    flex-wrap: wrap;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .panel-body {
    padding: 16px;
  }

  .process-step {
    grid-template-columns: 1fr;
  }
}
