:root {
  --bg: #0b1220;
  --panel: #0f1a2e;
  --muted: #99a6bf;
  --text: #e9f0ff;
  --primary: #2f6bff;
  --primary-600: #1e4ed8;
  --accent: #a7c4ff;
  --border: rgba(255, 255, 255, .08);
  --glow: 0 0 0 1px rgba(167, 196, 255, .12), 0 18px 40px rgba(47, 107, 255, .18), inset 0 0 0 1px rgba(255, 255, 255, .04);
  --radius: 16px;
  --container: 1200px;
  --spot: rgba(167, 196, 255, .14);
  --scroll: 0;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 70% -10%, rgba(47, 107, 255, .12), transparent 60%);
}

/* Top scroll progress */
#scrollbar {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 44%, transparent 70%);
  transform-origin: left center;
  transform: scaleX(var(--scroll));
  box-shadow: 0 0 18px rgba(47, 107, 255, .35);
  z-index: 9999;
  pointer-events: none;
}

/* Subtle cursor spotlight */
#spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(120px 120px at var(--mx, -200px) var(--my, -200px), var(--spot), transparent 60%);
  mix-blend-mode: screen;
  opacity: .38;
}

/* full-page animated canvas background */
#page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .7
}

a {
  color: var(--accent);
  text-underline-offset: 3px
}

a:hover {
  color: #fff
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 22px
}

.center {
  text-align: center
}

.grid {
  display: grid;
  gap: 18px
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  padding: .5rem 1rem
}

/* Header / Nav */
.site-header {
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(120%) blur(2px)
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem
}

.brand-text {
  font-weight: 800;
  letter-spacing: .5px
}

.logo svg {
  width: 36px;
  height: 36px
}

.logo-bg {
  fill: #132a4a
}

.logo-stroke {
  fill: none;
  stroke: #a7c4ff;
  stroke-width: 10;
  stroke-linecap: round
}

.logo-dot {
  fill: #a7c4ff
}

.menu {
  display: flex;
  gap: 1rem;
  align-items: center
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: .25rem .45rem;
  border-radius: 8px
}

.menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .04)
}

.menu a[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, .08)
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  padding: .45rem .75rem;
  border-radius: .7rem
}

/* Hero */
.hero {
  position: relative
}

.hero-inner {
  padding: 58px 0 60px
}

/* tighter */
.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.06;
  margin: 0 0 .6rem;
  background: linear-gradient(180deg, #ffffff 0%, #dbe6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 62ch;
  color: var(--muted);
  margin: 0 0 1.1rem
}

.hero-cta {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap
}

.btn {
  display: inline-block;
  border-radius: 12px;
  padding: .78rem 1rem;
  text-decoration: none;
  border: 1px solid var(--border);
  font-weight: 700;
  position: relative;
  overflow: hidden
}

.btn.primary {
  background: var(--primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow)
}

.btn.primary:hover {
  background: var(--primary-600)
}

.btn.ghost {
  background: transparent;
  color: #fff
}

/* Hero media */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  align-items: center
}

.hero-illus {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--glow);
  background: rgba(255, 255, 255, .02)
}

/* Sections — smoother transitions + tighter rhythm */
.section {
  position: relative;
  padding: 54px 0;
  /* was 78px */
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .00) 0%, rgba(255, 255, 255, .02) 100%);
  background-blend-mode: soft-light;
}

.section+.section {
  margin-top: -6px
}

/* overlap to hide hard line */
.section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 18px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
}

/* Contact header needs even less space above */
.contact.section {
  padding-top: 38px
}

.lead {
  color: var(--muted);
  margin: .15rem auto 0;
  max-width: 70ch
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 24px;
  align-items: start
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px
}

.glow {
  box-shadow: var(--glow)
}

.checklist {
  margin: 0;
  padding-left: 1.1rem
}

.checklist li {
  margin: .28rem 0
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px
}

.service-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  transform-style: preserve-3d;
  transition: transform .15s ease, box-shadow .2s ease;
  will-change: transform;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(160px 110px at var(--mx, 50%) var(--my, 50%), rgba(167, 196, 255, .10), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  mix-blend-mode: screen;
}

.service-card h3 {
  margin: .25rem 0
}

.service-card p {
  color: var(--muted)
}

.thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: .6rem;
  background: #0d1526
}

.value-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, .03)
}

.value-card .thumb {
  margin-bottom: .7rem
}

.value-card p {
  color: var(--muted)
}

/* Contact — two-column top row, then textarea full width; compact gutters */
.contact .container {
  min-height: 64vh;
  display: grid;
  align-items: start
}

.contact-form {
  padding: 18px
}

.contact-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "name email"
    "phone phone"
    "msg   msg"
    "send  alt";
}

.field {
  display: flex;
  flex-direction: column;
  gap: .4rem
}

.field>label {
  font-weight: 600;
  color: #cfd9ff
}

#nameFld {
  grid-area: name
}

#emailFld {
  grid-area: email
}

#phoneFld {
  grid-area: phone
}

#msgFld {
  grid-area: msg
}

#sendFld {
  grid-area: send
}

#altFld {
  grid-area: alt
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: .9rem;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .02);
  color: #fff
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--primary)
}

.contact-actions {
  display: flex;
  gap: 14px
}

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

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease
}

.reveal.visible {
  opacity: 1;
  transform: none
}

/* Footer Bubble — smaller + subtler */
.footer-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 6px);
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}

.footer-wrap.visible {
  opacity: 1;
  transform: none
}

.footer-pill {
  pointer-events: auto;
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  color: #c9d6ff;
  background: rgba(15, 26, 46, .55);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
  padding: .45rem .75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .03);
  font-size: .85rem;
  white-space: nowrap;
  backdrop-filter: blur(8px) saturate(130%);
}

.footer-pill a {
  color: #9fb7ff;
  text-decoration: underline
}

.footer-pill a:hover {
  color: #fff
}

/* Larger desktop */
@media (min-width:1280px) {
  :root {
    --container: 1280px;
  }
}

/* Responsive */
@media (max-width:980px) {
  .hero-grid {
    grid-template-columns: 1fr
  }

  .grid-2 {
    grid-template-columns: 1fr
  }

  .grid-3 {
    grid-template-columns: 1fr 1fr
  }

  .cards {
    grid-template-columns: 1fr 1fr
  }

  .hero-inner {
    padding: 46px 0 50px
  }

  .contact .container {
    min-height: unset
  }
}

@media (max-width:640px) {

  /* Site Header tweaks */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav {
    padding: 12px 0;
  }

  /* Hamburger Toggle */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 200;
    /* Above the menu overlay */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Full-screen Mobile Menu Overlay */
  .menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;

    position: fixed;
    inset: 0;
    z-index: 150;

    background: rgba(11, 18, 32, 0.96);
    backdrop-filter: blur(12px) saturate(140%);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  /* Open State */
  .menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Menu Links */
  .menu a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    padding: 0.5rem 1rem;
    text-align: center;
  }

  .menu a:hover,
  .menu a:active {
    color: var(--primary);
    background: transparent;
  }

  /* Layout Adjustments */
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "name" "email" "phone" "msg" "send" "alt";
  }

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

/* Motion safety */
@media (prefers-reduced-motion:reduce) {
  * {
    animation: none !important;
    transition: none !important
  }

  #page-bg,
  #spotlight {
    display: none
  }

  .service-card {
    transform: none !important
  }

  #scrollbar {
    box-shadow: none
  }
}