:root {
  --mint: #9fdacb;
  --sage: #dce9b6;
  --peach: #ffd3b6;
  --blush: #ffa9a9;
  --rose: #ff7a8c;
  --ink: #0d1b24;
  --ink-soft: #344047;
  --sand: #fdf8f5;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 30px 80px rgba(13, 27, 36, 0.18);
  --shadow-card: 0 18px 50px rgba(13, 27, 36, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, var(--mint), var(--sand));
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: 0;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 60px,
      rgba(159, 218, 203, 0.08) 60px,
      rgba(159, 218, 203, 0.08) 120px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 60px,
      rgba(255, 122, 140, 0.06) 60px,
      rgba(255, 122, 140, 0.06) 120px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 100px,
      rgba(255, 211, 182, 0.04) 100px,
      rgba(255, 211, 182, 0.04) 200px
    );
  pointer-events: none;
  will-change: transform;
  transform: translateY(calc(var(--scroll-y, 0px) * -0.5)) rotate(0.5deg);
}

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

canvas#orbitalCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.3;
  will-change: contents;
}

@media (max-width: 768px) {
  canvas#orbitalCanvas {
    display: none;
  }
}

.page-shell {
  position: relative;
  z-index: 1;
  padding: clamp(16px, 3vw, 32px);
  padding-bottom: 80px;
}

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-xl);
  padding: 16px clamp(16px, 4vw, 32px);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand:hover .brand-name {
  opacity: 0.85;
}

.brand-logo {
  width: 64px;
  height: 64px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(159, 218, 203, 0.3));
}

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

.brand-name {
  margin: 0;
  font-weight: 800;
  font-size: 1.85rem;
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-shadow: 0 1px 3px rgba(13, 27, 36, 0.1);
}

.brand-tag {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(13, 27, 36, 0.6);
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  font-weight: 500;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--rose);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

.cta {
  display: flex;
  gap: 10px;
}

.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.btn:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--rose), var(--blush));
  color: white;
  box-shadow: 0 18px 30px rgba(255, 122, 140, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  border: 1px solid rgba(13, 27, 36, 0.08);
}

.btn.outline {
  border: 1px solid rgba(13, 27, 36, 0.2);
  background: transparent;
  color: var(--ink);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(13, 27, 36, 0.05);
}

.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  transform: translateY(-7.5px) rotate(-45deg);
}

section {
  margin-top: clamp(60px, 8vw, 110px);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 5vw, 60px);
  align-items: center;
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: rgba(13, 27, 36, 0.7);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin-bottom: 18px;
}

.lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.flow-panel {
  position: relative;
  --flow-primary: rgba(255, 211, 182, 0.85);
  --flow-secondary: rgba(159, 218, 203, 0.75);
  --flow-accent: rgba(255, 122, 140, 0.7);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(13, 27, 36, 0.7), rgba(13, 27, 36, 0.5));
  box-shadow: var(--shadow-soft);
  min-height: 200px;
  width: 100%;
}

.flow-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 20px
    );
  mix-blend-mode: screen;
  pointer-events: none;
}

.flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

@media (max-width: 480px) {
  .flow-svg {
    transform: scale(1.1);
  }
}

.flow-line {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2.5;
  stroke-dasharray: 200 250;
  opacity: 0.7;
  animation: dashFlow 15s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -450;
  }
}

.line-1 {
  stroke: var(--flow-primary);
  animation-duration: 12s;
}

.line-2 {
  stroke: var(--flow-secondary);
  animation-duration: 18s;
  animation-delay: -4s;
}

.line-3 {
  stroke: var(--flow-accent);
  animation-duration: 22s;
  animation-delay: -8s;
}

.flow-node {
  fill: var(--flow-accent);
  opacity: 0.85;
  animation: nodePulse 4s ease-in-out infinite;
}

@keyframes nodePulse {
  0%, 100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

.flow-panel[data-flow="hero"] {
  --flow-primary: rgba(255, 169, 169, 0.85);
  --flow-secondary: rgba(159, 218, 203, 0.8);
  --flow-accent: rgba(255, 211, 182, 0.8);
}

.flow-panel[data-flow="matching"] {
  --flow-primary: rgba(255, 122, 140, 0.85);
  --flow-secondary: rgba(255, 169, 169, 0.8);
  --flow-accent: rgba(255, 211, 182, 0.75);
}

.flow-panel[data-flow="execution"] {
  --flow-primary: rgba(159, 218, 203, 0.85);
  --flow-secondary: rgba(220, 233, 182, 0.8);
  --flow-accent: rgba(255, 211, 182, 0.75);
}

.flow-panel[data-flow="risk"] {
  --flow-primary: rgba(255, 122, 140, 0.85);
  --flow-secondary: rgba(159, 218, 203, 0.75);
  --flow-accent: rgba(13, 27, 36, 0.5);
}

.flow-panel[data-flow="commerce"] {
  --flow-primary: rgba(220, 233, 182, 0.9);
  --flow-secondary: rgba(255, 211, 182, 0.8);
  --flow-accent: rgba(255, 122, 140, 0.65);
}

.flow-panel[data-flow="attribution"] {
  --flow-primary: rgba(159, 218, 203, 0.85);
  --flow-secondary: rgba(255, 169, 169, 0.8);
  --flow-accent: rgba(255, 211, 182, 0.75);
}

.hero-flow {
  aspect-ratio: 16 / 9;
  min-height: 240px;
  max-height: 400px;
  width: 100%;
}

.card-media.flow-panel {
  min-height: 160px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  width: 100%;
}

@media (max-width: 768px) {
  .hero-flow {
    aspect-ratio: 4 / 3;
    min-height: 200px;
    max-height: 280px;
  }
  
  .card-media.flow-panel {
    min-height: 140px;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .hero-flow {
    aspect-ratio: 1 / 1;
    min-height: 280px;
    max-height: 320px;
  }
  
  .card-media.flow-panel {
    min-height: 180px;
    aspect-ratio: 1 / 1;
  }
}


.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.hero-metrics div {
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-card);
}

.hero-metrics span {
  font-weight: 600;
  color: var(--ink);
}

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

.pillars article {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.section-head h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0.3em 0 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
}

.service-grid,
.approach-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.service-grid article,
.approach-grid article {
  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.service-grid article::after,
.approach-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(255, 122, 140, 0.27),
    transparent 60%
  );
  pointer-events: none;
}

.cta-panel {
  background: linear-gradient(130deg, var(--blush), var(--rose));
  border-radius: var(--radius-xl);
  color: #fff;
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  position: relative;
  overflow: visible;
}

.cta-panel::after {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.4;
  pointer-events: none;
}

.cta-panel .btn.outline {
  border-color: rgba(255, 255, 255, 0.8);
  color: white;
}

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

.contact-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: var(--ink);
  display: grid;
  gap: 20px;
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 2;
}

.contact-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.contact-card input,
.contact-card select,
.contact-card textarea {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(13, 27, 36, 0.2);
  padding: 12px;
  font: inherit;
  background: white;
  color: var(--ink);
  width: 100%;
  pointer-events: auto;
}

.contact-card input:focus,
.contact-card select:focus,
.contact-card textarea:focus {
  outline: 2px solid var(--rose);
  outline-offset: 0;
  border-color: var(--rose);
}

.contact-card button {
  pointer-events: auto;
  cursor: pointer;
}

.site-footer {
  margin-top: 70px;
  text-align: center;
  color: rgba(13, 27, 36, 0.7);
}

.site-footer p {
  margin: 4px 0;
}

.is-visible {
  animation: rise 0.8s ease forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .site-header {
    grid-template-columns: auto auto;
    grid-template-rows: auto auto auto;
    justify-content: space-between;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 12px 20px;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .brand-name {
    font-size: 1.5rem;
  }

  .brand-tag {
    font-size: 0.7rem;
  }

  .nav {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    order: 4;
    grid-column: 1 / -1;
    padding-top: 12px;
    border-top: 1px solid rgba(13, 27, 36, 0.08);
    margin-top: 8px;
  }

  .nav.open {
    display: flex;
  }

  .cta {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    order: 2;
  }

  .nav-toggle {
    display: flex;
    order: 3;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .solution-track {
    grid-auto-columns: minmax(240px, 80vw);
  }
}

@media (max-width: 520px) {
  .site-header {
    position: static;
    padding: 10px 16px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-name {
    font-size: 1.3rem;
  }

  .brand-tag {
    font-size: 0.65rem;
  }

  .brand-text {
    gap: 1px;
  }

  .cta .btn {
    padding: 9px 16px;
    font-size: 0.9rem;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
  }

  .page-shell {
    padding: 10px 12px 60px;
  }

  .cta-panel {
    padding: 24px 16px;
  }

  .pillars {
    gap: 14px;
  }

  .pillars article {
    padding: 18px;
  }
}
