:root {
  --rv-blue: #21318f;
  --rv-red: #e30613;
  --rv-ink: #111827;
  --rv-muted: #5f6675;
  --rv-line: #d8deea;
  --rv-soft: #f4f7fb;
  --rv-white: #ffffff;
  --rv-dark: #071126;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--rv-ink);
  background: var(--rv-white);
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(216, 222, 234, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 92px;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: 92px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--rv-muted);
  font-size: 16px;
  font-weight: 600;
}

.nav a,
.header-cta,
.button,
.contact-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.nav a {
  padding: 0 8px;
}

.nav a:hover {
  color: var(--rv-blue);
}

.header-cta {
  padding: 0 16px;
  background: var(--rv-blue);
  color: var(--rv-white);
  font-weight: 700;
  font-size: 14px;
}

.header-cta:hover,
.button:hover,
.contact-actions a:hover {
  transform: translateY(-2px);
}

.hero {
  position: relative;
  min-height: min(540px, 66svh);
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding: 52px clamp(20px, 5vw, 72px) 62px;
  color: var(--rv-white);
  background:
    linear-gradient(90deg, rgba(7, 17, 38, .94), rgba(8, 16, 44, .82) 55%, rgba(227, 6, 19, .2)),
    linear-gradient(135deg, #071126 0%, #12205a 62%, #e30613 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background: linear-gradient(90deg, var(--rv-blue) 0 48%, var(--rv-white) 48% 52%, var(--rv-red) 52% 60%, var(--rv-blue) 60% 100%);
  opacity: .95;
}

.motion-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .72;
}

.motion-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 38, .98) 0%, rgba(7, 17, 38, .92) 33%, rgba(7, 17, 38, .46) 58%, rgba(7, 17, 38, .08) 100%),
    linear-gradient(180deg, rgba(7, 17, 38, .24), rgba(7, 17, 38, .12));
}

.circuit {
  width: 100%;
  height: 100%;
}

.grid-line {
  stroke: rgba(255, 255, 255, .12);
  stroke-width: 1;
  fill: none;
}

.main-trace {
  stroke: url(#pulse-gradient);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  filter: url(#soft-glow);
  stroke-dasharray: 120 28;
  stroke-dashoffset: 0;
  animation: dash-flow-right 6.8s linear infinite;
}

.trace-delay {
  animation-delay: -2.4s;
  opacity: .68;
}

.trace-soft {
  opacity: .48;
  animation-duration: 5.4s;
}

.thin-trace {
  stroke: rgba(255, 255, 255, .38);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.flow-balls {
  filter: url(#soft-glow);
}

.flow-ball {
  fill: #ffffff;
  stroke: var(--rv-blue);
  stroke-width: 6;
  opacity: 0;
}

.flow-ball.red {
  stroke: var(--rv-red);
}

.flow-ball.blue {
  stroke: var(--rv-blue);
}

.sparks {
  fill: none;
  stroke: var(--rv-red);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#soft-glow);
  opacity: .82;
}

.hero-content {
  max-width: 710px;
}

.hero-kicker {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  max-width: 620px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 16px;
  font-size: 52px;
  line-height: 1.02;
}

.hero-copy {
  max-width: 640px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, .88);
  font-size: 19px;
  line-height: 1.5;
}

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

.button {
  min-width: 150px;
  padding: 0 20px;
  border: 1px solid transparent;
  font-weight: 800;
}

.button.primary {
  background: var(--rv-red);
  color: var(--rv-white);
}

.button.ghost {
  border-color: rgba(255, 255, 255, .48);
  color: var(--rv-white);
  background: rgba(255, 255, 255, .08);
}

.section {
  padding: 64px clamp(20px, 5vw, 72px);
}

.section-head {
  max-width: 830px;
  margin-bottom: 30px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.14;
  color: var(--rv-ink);
}

.section-head p:not(.eyebrow) {
  color: var(--rv-muted);
  font-size: 17px;
  line-height: 1.6;
}

.services {
  background: var(--rv-soft);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-card,
.contact-card {
  border: 1px solid var(--rv-line);
  border-radius: 8px;
  background: var(--rv-white);
}

.service-card {
  padding: 24px;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.service-card:hover,
.project-card:hover,
.contact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(33, 49, 143, .28);
  box-shadow: 0 16px 36px rgba(7, 17, 38, .08);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border-radius: 8px;
  color: var(--rv-blue);
  background: rgba(33, 49, 143, .09);
}

.service-icon.red {
  color: var(--rv-red);
  background: rgba(227, 6, 19, .08);
}

.service-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 19px;
}

.service-card p {
  margin-bottom: 0;
  color: var(--rv-muted);
  font-size: 15px;
  line-height: 1.55;
}

.projects {
  background: var(--rv-white);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--rv-line);
  border-radius: 8px;
  background: #ffffff;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.project-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--rv-line);
}

.project-card div {
  padding: 18px;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.project-card p {
  margin-bottom: 0;
  color: var(--rv-muted);
  font-size: 15px;
  line-height: 1.5;
}

.contact {
  background:
    linear-gradient(180deg, #f8fafc, #ffffff);
  border-top: 1px solid var(--rv-line);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 8px;
  background: var(--rv-blue);
  color: var(--rv-white);
  font-size: 22px;
  font-weight: 900;
}

.avatar.red {
  background: var(--rv-red);
}

.contact-copy h3 {
  margin-bottom: 4px;
  color: var(--rv-blue);
  font-size: 24px;
}

.contact-copy p {
  margin-bottom: 10px;
  color: var(--rv-ink);
}

.contact-copy a {
  display: block;
  width: fit-content;
  margin-top: 5px;
  color: var(--rv-muted);
  text-decoration: none;
}

.contact-copy a:hover {
  color: var(--rv-blue);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-actions a {
  min-width: 112px;
  padding: 0 14px;
  border: 1px solid var(--rv-line);
  color: var(--rv-blue);
  font-size: 14px;
  font-weight: 800;
  background: #ffffff;
}

.contact-actions a:last-child {
  color: var(--rv-white);
  border-color: var(--rv-blue);
  background: var(--rv-blue);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5vw, 72px);
  color: #ffffff;
  background: var(--rv-dark);
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.site-footer span {
  color: rgba(255, 255, 255, .72);
}

.site-footer a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.hero-content > * {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-appear .72s ease forwards;
}

.hero-content > *:nth-child(2) {
  animation-delay: .09s;
}

.hero-content > *:nth-child(3) {
  animation-delay: .18s;
}

.hero-content > *:nth-child(4) {
  animation-delay: .27s;
}

@keyframes dash-flow-right {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: 148;
  }
}

@keyframes hero-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .service-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card {
    grid-template-columns: auto 1fr;
  }

  .contact-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

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

  .header-cta {
    min-height: 38px;
  }

  .hero {
    min-height: auto;
    padding: 44px 20px 54px;
  }

  h1 {
    font-size: 39px;
    line-height: 1.08;
  }

  .hero-copy {
    font-size: 18px;
  }

  .hero-kicker {
    font-size: 12px;
    max-width: 330px;
  }

  .service-grid,
  .project-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 50px 20px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
