:root {
  --deep-blue: #071a2f;
  --tech-dark: #111827;
  --red: #b91c1c;
  --red-dark: #7f1d1d;
  --red-soft: rgba(185, 28, 28, 0.18);
  --white: #ffffff;
  --muted: #b8c7d9;
  --border: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.08);
  --shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--deep-blue);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--white);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(185, 28, 28, 0.18), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(127, 29, 29, 0.26), transparent 34%),
    linear-gradient(135deg, #071a2f 0%, #0a1423 48%, #111827 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -5;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(185, 28, 28, 0.08) 42% 43%, transparent 43%),
    radial-gradient(circle at 50% 50%, transparent, rgba(0, 0, 0, 0.32));
}

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

.ambient {
  position: fixed;
  z-index: -4;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.74;
  animation: floatGlow 16s ease-in-out infinite alternate;
}

.ambient-red {
  width: 360px;
  height: 360px;
  left: -110px;
  bottom: 4vh;
  background: rgba(185, 28, 28, 0.32);
}

.ambient-blue {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -90px;
  background: rgba(31, 70, 122, 0.34);
  animation-delay: -6s;
}

.grid-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.18;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.86), transparent 78%);
}

.site-header {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 10;
  width: min(1120px, calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(7, 26, 47, 0.54);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.brand,
.contact-link {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.brand {
  font-size: 0.98rem;
}

.contact-link {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease;
}

.contact-link:hover {
  color: var(--white);
  border-color: rgba(185, 28, 28, 0.48);
  background: var(--red-soft);
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 104px 22px 70px;
}

.hero-card {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  padding: clamp(30px, 5vw, 52px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    radial-gradient(circle at 88% 12%, rgba(185, 28, 28, 0.16), transparent 32%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  text-align: center;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  animation: enterCard 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 35%, rgba(185, 28, 28, 0.4), transparent 78%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffb4b4;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 18px;
  font-size: clamp(3.4rem, 7vw, 6.2rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
}

.subtitle {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--white);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 750;
  line-height: 1.35;
}

.description {
  max-width: 620px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.primary-action {
  position: relative;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 0 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  box-shadow: 0 18px 44px rgba(185, 28, 28, 0.28);
  color: var(--white);
  font-weight: 900;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.primary-action::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -44%;
  width: 36%;
  transform: skewX(-20deg);
  background: rgba(255, 255, 255, 0.26);
  transition: left 520ms ease;
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 58px rgba(185, 28, 28, 0.42);
}

.primary-action:hover::after {
  left: 118%;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 30px;
}

.service-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  text-align: left;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(185, 28, 28, 0.38);
  background: rgba(185, 28, 28, 0.1);
}

.service-card h2 {
  font-size: 0.98rem;
  line-height: 1.25;
}

.service-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.code-stage {
  position: fixed;
  right: max(28px, 6vw);
  top: 50%;
  z-index: 0;
  width: min(480px, 38vw);
  transform: translateY(-50%) rotate(-4deg);
  opacity: 0.33;
  pointer-events: none;
}

.code-window {
  min-height: 360px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(3, 10, 22, 0.78);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(16px);
}

.window-controls {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}

.window-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.window-controls span:first-child {
  background: rgba(185, 28, 28, 0.88);
}

.window-controls span:nth-child(2) {
  background: rgba(184, 199, 217, 0.48);
}

.window-controls span:nth-child(3) {
  background: rgba(91, 140, 255, 0.62);
}

#codeOutput {
  min-height: 292px;
  margin: 0;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.76);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.7;
}

.token-red {
  color: #ff8b8b;
}

.token-blue {
  color: #8ab4ff;
}

.token-purple {
  color: #c4a7ff;
}

.token-soft {
  color: #b8c7d9;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 3px;
  transform: translateY(3px);
  background: #ff8b8b;
  animation: blink 900ms steps(2, start) infinite;
}

.footer {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 8;
  transform: translateX(-50%);
  width: min(100%, 560px);
  padding: 0 18px;
  color: rgba(184, 199, 217, 0.62);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
}

@keyframes enterCard {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(38px, -28px, 0) scale(1.08);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 920px) {
  body {
    overflow-y: auto;
  }

  .hero {
    min-height: 100svh;
    padding: 106px 18px 76px;
  }

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

  .service-card {
    min-height: auto;
  }

  .code-stage {
    right: -90px;
    width: 420px;
    opacity: 0.16;
  }
}

@media (max-width: 560px) {
  .site-header {
    top: 16px;
    width: calc(100% - 28px);
    padding: 11px 12px;
  }

  .brand {
    font-size: 0.92rem;
  }

  .contact-link {
    min-height: 34px;
    padding: 0 13px;
    font-size: 0.88rem;
  }

  .hero {
    padding: 96px 14px 70px;
  }

  .hero-card {
    padding: 26px 18px;
    border-radius: 24px;
  }

  .eyebrow {
    font-size: 0.66rem;
  }

  .eyebrow::before,
  .eyebrow::after {
    width: 18px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4rem);
  }

  .subtitle {
    font-size: 1.02rem;
  }

  .description {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .primary-action {
    width: 100%;
  }

  .service-grid {
    margin-top: 24px;
  }

  .service-card {
    padding: 16px;
    border-radius: 18px;
  }

  .code-stage {
    display: none;
  }

  .footer {
    bottom: 12px;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
