:root {
  color-scheme: dark;
  --bg: #04070c;
  --bg-soft: #071016;
  --panel: rgba(8, 18, 24, 0.78);
  --panel-strong: rgba(10, 25, 31, 0.92);
  --text: #eef8f8;
  --muted: #9db2b2;
  --cyan: #33f3ff;
  --green: #77ff8a;
  --amber: #ffbf5a;
  --rose: #ff4d8d;
  --line: rgba(147, 255, 238, 0.18);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(51, 243, 255, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 20%, rgba(119, 255, 138, 0.12), transparent 28rem),
    linear-gradient(180deg, #030508 0%, var(--bg) 38%, #05080d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(51, 243, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 243, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(51, 243, 255, 0.55);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(4, 10, 14, 0.62);
  box-shadow: 0 0 28px rgba(51, 243, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.75rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(3, 7, 10, 0.52);
  backdrop-filter: blur(18px);
}

.nav-links a {
  min-width: 78px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #d8f2f1;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #041014;
  background: var(--cyan);
  box-shadow: 0 0 26px rgba(51, 243, 255, 0.32);
  outline: none;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, 82svh);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  z-index: -3;
  background-image: url("/assets/gaff-network-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.015);
}

.hero-overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 5, 8, 0.95) 0%, rgba(2, 5, 8, 0.8) 36%, rgba(2, 5, 8, 0.28) 76%, rgba(2, 5, 8, 0.84) 100%),
    linear-gradient(180deg, rgba(2, 5, 8, 0.52) 0%, rgba(2, 5, 8, 0.02) 40%, rgba(4, 7, 12, 0.96) 100%);
}

.hero::after {
  position: absolute;
  right: 5%;
  bottom: 10%;
  width: min(32vw, 360px);
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--green), var(--cyan), transparent);
  box-shadow: 0 0 32px rgba(119, 255, 138, 0.6);
}

.hero-content {
  width: min(var(--max), calc(100% - 32px));
  margin: auto;
  padding: 120px 0 72px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 22px;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 32px;
  color: #c2d6d5;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button-primary {
  color: #031014;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 16px 42px rgba(51, 243, 255, 0.24);
}

.button-ghost {
  color: var(--text);
  border-color: rgba(238, 248, 248, 0.18);
  background: rgba(4, 9, 12, 0.58);
  backdrop-filter: blur(14px);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: rgba(51, 243, 255, 0.62);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(var(--max), calc(100% - 32px));
  margin: -34px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 12, 16, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-item {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.signal-item:last-child {
  border-right: 0;
}

.signal-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signal-item strong {
  display: block;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.3;
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.body-copy {
  color: #bed1cf;
  font-size: 1.04rem;
}

.profile-visual {
  position: relative;
  max-width: 320px;
  margin: 32px 0 0;
  overflow: hidden;
  border: 1px solid rgba(51, 243, 255, 0.2);
  border-radius: 8px;
  background: #071016;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

.profile-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, transparent 70%, rgba(4, 7, 12, 0.52)),
    linear-gradient(90deg, rgba(51, 243, 255, 0.18), transparent 28%, transparent 72%, rgba(119, 255, 138, 0.12));
  pointer-events: none;
}

.profile-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: contrast(1.06) brightness(0.92);
}

.body-copy p:last-child,
.contact-section p:last-child {
  margin-bottom: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 28px;
}

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

.service-card {
  position: relative;
  min-height: 260px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(238, 248, 248, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(12, 31, 36, 0.95), rgba(4, 9, 13, 0.9)),
    var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

.service-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber));
}

.service-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.service-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--rose), var(--amber));
}

.service-card:nth-child(4)::before {
  background: linear-gradient(90deg, var(--amber), var(--cyan));
}

.card-index {
  display: block;
  margin-bottom: 44px;
  color: rgba(119, 255, 138, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.service-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  line-height: 1.15;
}

.service-card p {
  margin-bottom: 0;
  color: #a9bfbd;
  font-size: 0.95rem;
}

.stack-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: start;
}

.stack-section .section-heading {
  display: block;
  margin-bottom: 0;
}

.process-list {
  border-top: 1px solid var(--line);
}

.process-step {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.process-step span {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.process-step p {
  margin-bottom: 0;
  color: #bfd4d2;
}

.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 64px;
}

.tech-strip span {
  padding: 10px 14px;
  border: 1px solid rgba(51, 243, 255, 0.2);
  border-radius: 8px;
  color: #d8eeee;
  background: rgba(4, 12, 16, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  margin-top: 88px;
  margin-bottom: 44px;
  padding: 38px;
  border: 1px solid rgba(255, 191, 90, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 191, 90, 0.1), transparent 42%),
    linear-gradient(160deg, rgba(7, 19, 23, 0.96), rgba(6, 9, 14, 0.98));
  box-shadow: var(--shadow);
}

.contact-section h2 {
  margin-bottom: 18px;
}

.contact-section p {
  max-width: 760px;
  color: #bfd4d2;
}

.contact-actions {
  justify-content: flex-end;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 38px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
  outline: none;
}

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

  .service-card {
    min-height: 220px;
  }

  .intro-grid,
  .section-heading,
  .stack-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: relative;
    width: min(var(--max), calc(100% - 24px));
    padding: 14px 0;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 74svh;
  }

  .hero-bg {
    background-position: 62% center;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(2, 5, 8, 0.96) 0%, rgba(2, 5, 8, 0.75) 58%, rgba(2, 5, 8, 0.72) 100%),
      linear-gradient(180deg, rgba(2, 5, 8, 0.18) 0%, rgba(4, 7, 12, 0.96) 100%);
  }

  .hero-content {
    width: min(var(--max), calc(100% - 24px));
    padding: 46px 0 54px;
  }

  h1 {
    font-size: clamp(2.48rem, 14vw, 4.2rem);
  }

  .hero-copy,
  .body-copy {
    font-size: 1rem;
  }

  .button {
    width: 100%;
  }

  .signal-band {
    grid-template-columns: 1fr;
    width: min(var(--max), calc(100% - 24px));
    margin-top: 0;
  }

  .signal-item {
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-item:last-child {
    border-bottom: 0;
  }

  .section {
    width: min(var(--max), calc(100% - 24px));
    padding-top: 62px;
  }

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

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

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

  .card-index {
    margin-bottom: 30px;
  }

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

  .tech-strip {
    padding-top: 50px;
  }

  .tech-strip span {
    flex: 1 1 calc(50% - 10px);
    text-align: center;
  }

  .contact-section {
    margin-top: 62px;
    padding: 24px;
  }

  .site-footer {
    width: min(var(--max), calc(100% - 24px));
  }
}

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