:root {
  --accent: #4fa3d1;
  --accent-dark: #3a7da1;
  --text: #e5e7eb;
  --text-soft: #cfd3d7;
  --bg: #1b1d1f;
  --bg-light: #26292c;
  --bg-lighter: #2f3236;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font-family: "Poppins", sans-serif;
}

header {
  background: rgba(28, 30, 32, 0.84);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease;
}

header.hide {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1.25rem;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand-mark {
  justify-self: start;
}

.brand-mark img {
  height: 42px;
}

.header-contact {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.phone-link,
.phone-link:visited,
.phone-link:active,
.phone-link:focus,
.phone-link:hover {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #aad7ff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.phone-link:hover {
  color: #d5ecff;
}

.phone-link .icon {
  width: 1rem;
  height: 1rem;
  color: inherit;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  justify-self: end;
}

nav ul li a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  opacity: 0.9;
  font-weight: 500;
  transition: opacity 0.25s ease, color 0.25s ease;
}

nav ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

nav ul li a:hover,
nav ul li a:focus-visible {
  opacity: 1;
}

nav ul li a:hover::after,
nav ul li a:focus-visible::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.menu-toggle .icon {
  width: 100%;
  height: 100%;
}

.menu-toggle .icon svg {
  width: 20px;
  height: 20px;
}

.menu-toggle:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.12);
}

#hero {
  background: url('img/hero.jpg') center/cover no-repeat;
  text-align: center;
  padding: 7rem 1rem 6rem;
  position: relative;
  color: #fff;
  overflow: hidden;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(79, 163, 209, 0.14), transparent 35%);
  z-index: 0;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.56);
  z-index: 0;
}

#hero .content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  animation: heroEnter 0.9s ease both;
  will-change: transform;
}

.hero-kicker {
  margin-bottom: 1.25rem;
}

.hero-kicker span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 13, 16, 0.34);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  font-size: 0.94rem;
  font-weight: 600;
  animation: fadeUp 0.8s ease 0.12s both;
}

.hero-kicker i {
  color: var(--accent);
}

.hero-logo {
  margin: 0 auto 0.75rem;
  max-width: clamp(180px, 40vw, 320px);
  width: 100%;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.35));
}

.desktop-logo {
  animation: floatLogo 1000s ease-in-out infinite;
}

.mobile-logo {
  display: none;
}

#hero p {
  font-size: 1.1rem;
  margin: 1.25rem auto 2rem;
  max-width: 720px;
  color: #f2f5f7;
  line-height: 1.75;
  animation: fadeUp 0.8s ease 0.25s both;
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  padding: 0.95rem 2.15rem;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(79, 163, 209, 0.22);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  animation: fadeUp 0.8s ease 0.38s both;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: skewX(-18deg);
  animation: buttonSheen 4.6s ease-in-out infinite;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(79, 163, 209, 0.28);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.35rem;
  animation: fadeUp 0.8s ease 0.5s both;
}

.hero-badges span {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  color: #f3f6f8;
  font-size: 0.95rem;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.hero-badges span:hover {
  transform: translateY(-3px);
  background: rgba(79, 163, 209, 0.14);
  border-color: rgba(79, 163, 209, 0.24);
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.8rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: fadeUp 0.8s ease 0.62s both;
}

.scroll-cue .icon {
  width: 1rem;
  height: 1rem;
  animation: bounceDown 1.7s ease-in-out infinite;
}

section {
  padding: 5rem 8%;
  text-align: center;
  background: var(--bg);
}

.section-title {
  position: relative;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 72px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-50%) scaleX(0.55);
  opacity: 0.72;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.section-text {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--text-soft);
  line-height: 1.75;
}

.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.service-card {
  background: linear-gradient(180deg, rgba(47, 50, 54, 0.96), rgba(38, 41, 44, 0.96));
  padding: 2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  flex: 1 1 250px;
  max-width: 320px;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.34);
  border-color: rgba(79, 163, 209, 0.32);
}

#about:hover .section-title::after,
#services:hover .section-title::after,
#portfolio:hover .section-title::after,
#contact:hover .section-title::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.service-card .icon {
  width: 2rem;
  height: 2rem;
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.service-card:hover .icon {
  transform: translateY(-3px) scale(1.03);
  color: #78b9dd;
}

.service-card h3 {
  margin-bottom: 0.8rem;
}

.service-card p {
  color: var(--text-soft);
  line-height: 1.7;
}

.slideshow-container {
  max-width: 900px;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 300px;
  box-shadow: var(--shadow);
}

.slide {
  display: none;
  width: 100%;
  animation: slideFade 0.6s ease;
}

.slide img {
  width: 100%;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  padding: 12px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  transform: translateY(-50%);
  background: rgba(15, 16, 18, 0.45);
  color: white;
  z-index: 5;
  transition: background 0.25s ease, transform 0.25s ease;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

.prev:hover,
.next:hover {
  background: rgba(15, 16, 18, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.dots {
  text-align: center;
  margin-top: 12px;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 4px;
  background: #666;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.dot:hover {
  transform: scale(1.12);
}

.active-dot {
  background: var(--accent);
  transform: scale(1.14);
}

.image-viewer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(7, 9, 12, 0.88);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 2000;
}

.image-viewer.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.viewer-stage {
  width: min(100%, 1040px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.viewer-image {
  width: 100%;
  max-height: min(78vh, 920px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.42);
}

.viewer-caption {
  color: #eef4f8;
  text-align: center;
  font-size: 0.98rem;
}

.viewer-close,
.viewer-nav {
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.viewer-close:hover,
.viewer-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.viewer-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
}

.viewer-nav {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
  flex: 0 0 auto;
}

#contact form {
  max-width: 500px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contact input,
#contact textarea {
  padding: 0.95rem 1rem;
  border-radius: 10px;
  background: var(--bg-lighter);
  color: var(--text);
  border: 1px solid #444;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 163, 209, 0.14);
  transform: translateY(-1px);
}

#contact input::placeholder,
#contact textarea::placeholder {
  color: #999;
}

#contact button {
  background: var(--accent);
  color: #fff;
  padding: 0.95rem;
  border-radius: 10px;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

#contact button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.success-msg,
.error-msg {
  padding: 0.9rem 1rem;
  border-radius: 10px;
}

.success-msg {
  color: #8be28f;
  background: rgba(76, 175, 80, 0.12);
}

.error-msg {
  color: #ff8b8b;
  background: rgba(255, 82, 82, 0.12);
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.sub2 {
  font-size: 0.75em;
  font-weight: 700;
}

footer {
  background: var(--bg-light);
  text-align: center;
  padding: 1.5rem 0;
  color: #ccc;
  border-top: 1px solid #333;
}

footer .footer-credit {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #999;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes heroEnter {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideFade {
  from {
    opacity: 0.45;
    transform: scale(1.01);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatLogo {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes bounceDown {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

@keyframes buttonSheen {
  0%,
  70%,
  100% {
    left: -30%;
  }

  18%,
  32% {
    left: 108%;
  }
}

@media (max-width: 1120px) and (min-width: 769px) {
  nav {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand nav"
      "phone phone";
    row-gap: 0.75rem;
  }

  .brand-mark {
    grid-area: brand;
  }

  .header-contact {
    grid-area: phone;
  }

  nav ul {
    grid-area: nav;
    gap: 1.1rem;
  }

  .phone-link,
  .phone-link:visited,
  .phone-link:active,
  .phone-link:focus,
  .phone-link:hover {
    font-size: 0.98rem;
  }
}

@media (max-width: 768px) {
  nav {
    position: relative;
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .header-contact {
    position: static;
    order: 3;
    width: 100%;
    transform: none;
    margin-top: 0.1rem;
  }

  .phone-link,
  .phone-link:visited,
  .phone-link:active,
  .phone-link:focus,
  .phone-link:hover {
    justify-content: center;
    width: 100%;
    font-size: 0.98rem;
  }

  nav ul {
    position: absolute;
    top: 110px;
    right: 6%;
    background: var(--bg-light);
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.4rem;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease, padding 0.3s ease;
    margin-left: 0;
  }

  nav ul.show {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    padding: 0.4rem;
  }

  nav ul li a {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 8px;
  }

  nav ul li a::after {
    display: none;
  }

  nav ul li a:hover,
  nav ul li a:focus-visible {
    background: rgba(255, 255, 255, 0.05);
  }

  .menu-toggle {
    display: block;
    order: 2;
  }

  .brand-mark {
    order: 1;
  }

  #hero {
    padding: 5.5rem 1rem 4.5rem;
  }

  .hero-badges {
    gap: 0.6rem;
  }

  .hero-badges span {
    font-size: 0.88rem;
  }

  .scroll-cue {
    margin-top: 1.4rem;
  }

  .desktop-logo {
    display: none;
  }

  .mobile-logo {
    display: block;
  }

  .service-card {
    max-width: 100%;
  }

  .image-viewer {
    padding: 1rem 0.8rem 1.4rem;
    gap: 0.7rem;
  }

  .viewer-stage {
    width: 100%;
  }

  .viewer-image {
    max-height: 64vh;
  }

  .viewer-nav {
    position: absolute;
    bottom: 1.4rem;
    width: 46px;
    height: 46px;
  }

  .viewer-prev {
    left: 1rem;
  }

  .viewer-next {
    right: 1rem;
  }

  .viewer-caption {
    padding: 0 3.5rem;
  }

  section {
    padding: 4rem 6%;
  }
}
