:root {
  --bg: #071126;
  --bg-soft: #0d1c37;
  --card: rgba(8, 26, 54, 0.62);
  --stroke: rgba(146, 186, 255, 0.25);
  --text: #eaf2ff;
  --muted: #a9bad8;
  --aqua: #31d8ff;
  --mint: #59ffc9;
  --sun: #ffc067;
  --radius: 22px;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(
    circle at 10% 5%,
    #14284a 0%,
    var(--bg) 45%,
    #050a15 100%
  );
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 2;
}

.ambient-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.mesh {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: drift 18s ease-in-out infinite;
}

.mesh-1 {
  width: 42vw;
  height: 42vw;
  background: #0aa8ff;
  top: -9vw;
  left: -8vw;
}

.mesh-2 {
  width: 30vw;
  height: 30vw;
  background: #33ffd2;
  right: -5vw;
  top: 16vh;
  animation-delay: 3s;
}

.mesh-3 {
  width: 35vw;
  height: 35vw;
  background: #ff9f56;
  bottom: -15vw;
  left: 34vw;
  animation-delay: 7s;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(130, 160, 220, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 160, 220, 0.1) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

.site-header {
  position: sticky;
  top: 0;
  width: min(1180px, calc(100% - 2rem));
  margin: 1.1rem auto 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    130deg,
    rgba(5, 18, 40, 0.88),
    rgba(11, 34, 66, 0.64)
  );
  backdrop-filter: blur(15px);
  box-shadow: 0 16px 36px rgba(1, 9, 23, 0.45);
  z-index: 30;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 203, 255, 0.14);
}

.nav-link {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: linear-gradient(
    135deg,
    rgba(89, 255, 201, 0.2),
    rgba(49, 216, 255, 0.2)
  );
  box-shadow: inset 0 -1px 0 rgba(225, 247, 255, 0.5);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(8, 25, 48, 0.7);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #d8e8ff;
  margin: 6px auto;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.4rem 0 2.4rem;
}

.hero,
.section {
  min-height: 88vh;
  display: grid;
  align-items: center;
  gap: 2.4rem;
  padding: 2.2rem 0;
}

.hero {
  grid-template-columns: 1.1fr 1fr;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 1.2rem;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 4.5rem);
  max-width: 12ch;
}

h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 3.3vw, 3rem);
  max-width: 18ch;
}

.hero-text,
.section p {
  color: var(--muted);
  max-width: 60ch;
  margin-top: 1.2rem;
}

#rotating-word {
  color: var(--sun);
  display: inline-block;
  min-width: 8.5ch;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.word-out {
  opacity: 0;
  transform: translateY(-8px);
}

.word-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-actions,
.contact-buttons {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: #02142f;
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--mint), var(--aqua));
  box-shadow: 0 12px 30px rgba(45, 235, 213, 0.32);
}

.btn-ghost {
  color: var(--text);
  background: rgba(49, 216, 255, 0.08);
  border-color: rgba(49, 216, 255, 0.36);
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.ring {
  position: absolute;
  width: clamp(260px, 30vw, 390px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(184, 222, 255, 0.28);
  animation: orbit 11s linear infinite;
}

.ring:nth-child(2) {
  width: clamp(320px, 36vw, 470px);
  animation-duration: 14s;
  animation-direction: reverse;
}

.panel-card {
  width: min(480px, 100%);
  background: linear-gradient(
    180deg,
    rgba(12, 37, 72, 0.85),
    rgba(8, 25, 48, 0.74)
  );
  border: 1px solid rgba(146, 186, 255, 0.35);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.panel-card img {
  width: 100%;
  height: 340px;
  border-radius: 16px;
  object-fit: cover;
}

.panel-info {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--muted);
}

.panel-info strong {
  color: #fff;
}

.section-top {
  margin-bottom: 1.6rem;
}

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

.service-card,
.contact-card,
.project-focus,
.project-logo {
  background: linear-gradient(
    160deg,
    rgba(15, 37, 70, 0.76),
    rgba(5, 20, 43, 0.68)
  );
  border: 1px solid rgba(154, 194, 255, 0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.service-card {
  padding: 1.4rem;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(95, 233, 255, 0.75);
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #06172f;
  background: linear-gradient(135deg, var(--mint), var(--sun));
  margin-bottom: 1rem;
  box-shadow: 0 10px 24px rgba(89, 255, 201, 0.26);
}

.service-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
}

.projects-shell {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.2rem;
}

.project-logo-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.project-logo {
  min-height: 120px;
  padding: 0.8rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.project-logo img {
  width: 100%;
  max-width: 140px;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.04);
  opacity: 0.75;
  transition:
    filter 0.22s ease,
    opacity 0.22s ease,
    transform 0.22s ease;
}

.project-logo:hover,
.project-logo.active {
  transform: translateY(-4px);
  border-color: rgba(91, 239, 211, 0.68);
  box-shadow: 0 22px 32px rgba(0, 0, 0, 0.36);
}

.project-logo:hover img,
.project-logo.active img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.04);
}

.project-focus {
  padding: 1.4rem;
}

.focus-label {
  color: var(--mint);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.focus-title {
  margin-top: 0.55rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
}

.focus-desc {
  margin-top: 0.85rem;
  color: var(--muted);
}

.focus-link {
  display: inline-flex;
  margin-top: 1.1rem;
  color: var(--mint);
  text-decoration: none;
  font-weight: 700;
}

.focus-link:hover {
  color: #b9ffe7;
}

.contact {
  min-height: 76vh;
}

.contact-card {
  padding: clamp(1.2rem, 3vw, 2.4rem);
}

.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  border-top: 1px solid rgba(169, 198, 235, 0.25);
  color: var(--muted);
  padding-top: 1rem;
  font-size: 0.9rem;
}

.reveal-up {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes orbit {
  from {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.04);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.2rem;
  }

  .hero-visual {
    min-height: 460px;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .site-header {
    margin-top: 0.8rem;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    border-radius: 14px;
    background: rgba(4, 14, 31, 0.92);
    border: 1px solid rgba(146, 186, 255, 0.24);
  }

  .site-nav.open {
    display: flex;
  }

  .hero,
  .section {
    min-height: auto;
    padding: 1.6rem 0;
  }

  .hero-visual {
    min-height: 390px;
  }

  .panel-card img {
    height: 240px;
  }

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

  .project-logo {
    min-height: 100px;
  }
}
