:root {
  color-scheme: dark;
  --bg: #050b13;
  --bg-alt: #081522;
  --panel: #0c1825;
  --panel-strong: #101f2e;
  --text: #f7fbff;
  --muted: #b7c5d2;
  --subtle: #7f91a3;
  --line: rgba(173, 202, 229, 0.2);
  --accent: #1683ff;
  --accent-strong: #006cea;
  --accent-soft: rgba(22, 131, 255, 0.16);
  --white: #ffffff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --max: 1180px;
  --header-height: 76px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(8, 21, 34, 0.96), var(--bg) 480px),
    radial-gradient(circle at 58% 0%, rgba(22, 131, 255, 0.18), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: inherit;
  line-height: 1.5;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  background: var(--white);
  color: #04101c;
  left: 1rem;
  padding: 0.65rem 0.9rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-160%);
  z-index: 30;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 11, 19, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell,
.page-grid {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.nav-shell {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand strong {
  font-size: 0.95rem;
  font-weight: 800;
}

.brand small {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  margin-top: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.45rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  padding-block: 0.4rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--white);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

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

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  width: 18px;
  height: 2px;
  background: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-section {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  min-height: min(560px, calc(100svh - 170px));
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2.5rem, 4vw, 3.8rem);
}

.hero-copy {
  max-width: 560px;
}

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

h1 {
  margin-bottom: 1.15rem;
  font-size: clamp(2.65rem, 5vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(22, 131, 255, 0.24);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(22, 131, 255, 0.7);
}

.button-light {
  background: var(--white);
  color: #04101c;
}

.hero-media {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: clamp(300px, 34vw, 470px);
  object-fit: cover;
}

.section-head {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 2rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.section-head p {
  max-width: 440px;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.services-section,
.portfolio-section,
.contact-section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.services-section {
  padding-block: clamp(2.5rem, 4vw, 3.5rem) clamp(4rem, 8vw, 7rem);
}

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

.service-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.service-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.service-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1.35rem;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(22, 131, 255, 0.35);
  border-radius: var(--radius);
}

.service-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.why-section {
  padding-block: clamp(3rem, 6vw, 5rem);
  background:
    linear-gradient(90deg, rgba(22, 131, 255, 0.2), rgba(22, 131, 255, 0.02)),
    var(--panel);
  border-block: 1px solid var(--line);
}

.why-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.lead {
  color: var(--white);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  margin-bottom: 0;
}

.why-copy {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  margin-bottom: 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.portfolio-copy {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.portfolio-copy p,
.about-grid p,
.contact-copy p {
  color: var(--muted);
  font-size: 1.08rem;
}

.work-list {
  display: grid;
  gap: 1rem;
}

.work-list article {
  display: grid;
  grid-template-columns: 64px minmax(0, 0.52fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}

.work-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.work-list span {
  color: var(--accent);
  font-weight: 900;
}

.work-list p {
  color: var(--muted);
  margin-bottom: 0;
}

.about-section {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cta-section {
  padding-block: clamp(2.4rem, 5vw, 4rem);
  background: linear-gradient(135deg, #006cea, #1683ff);
}

.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.56fr);
  gap: 2rem;
  align-items: center;
}

.cta-section h2 {
  margin-bottom: 0;
  max-width: 760px;
}

.cta-section p {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact-list {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.contact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
}

.contact-list svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  color: var(--white);
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-form label:nth-child(3),
.contact-form label:nth-child(4),
.contact-form button,
.form-status {
  grid-column: 1 / -1;
}

.hp-field {
  display: none !important;
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(173, 202, 229, 0.3);
  border-radius: 6px;
  background: rgba(5, 11, 19, 0.72);
  color: var(--text);
  padding: 0.85rem 0.9rem;
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 131, 255, 0.18);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form button {
  justify-self: start;
  min-width: 170px;
}

.form-status {
  min-height: 1.5rem;
  color: var(--muted);
  margin: 0;
}

.form-status[data-state="success"] {
  color: #b7f7d0;
}

.form-status[data-state="error"] {
  color: #ffb8b8;
}

.site-footer {
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  background: #040914;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--subtle);
  font-size: 0.92rem;
}

.footer-grid p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .why-grid,
  .portfolio-grid,
  .about-grid,
  .cta-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
    padding-block: 3rem;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-media img {
    height: clamp(300px, 58vw, 500px);
  }

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

  .portfolio-copy {
    position: static;
  }

  .work-list article {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .work-list p {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
  }

  .nav-shell,
  .page-grid,
  .section-head {
    width: min(100% - 28px, var(--max));
  }

  .menu-toggle {
    display: grid;
  }

  .nav-links {
    position: absolute;
    left: 14px;
    right: 14px;
    top: calc(100% + 8px);
    display: grid;
    gap: 0;
    padding: 0.45rem;
    background: rgba(5, 11, 19, 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 0.85rem;
  }

  .nav-links a::after {
    display: none;
  }

  h1 {
    font-size: clamp(2.2rem, 10.4vw, 3rem);
  }

  .hero-section {
    overflow: visible;
  }

  .hero-grid {
    padding-block: 2rem;
    gap: 2rem;
  }

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

  .hero-actions {
    align-items: stretch;
    margin-top: 1.45rem;
  }

  .button {
    width: 100%;
  }

  .hero-media img {
    height: 210px;
  }

  .section-head {
    display: block;
  }

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

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

  .contact-form {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .footer-grid {
    display: grid;
  }
}

@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;
  }
}
