@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --ink: #07111f;
  --ink-soft: #0d1b2d;
  --blue: #1687ff;
  --blue-deep: #006ce8;
  --surface: #f4f7fb;
  --white: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #dfe6ef;
}

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

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background: var(--surface);
  font-family: "Poppins", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.lightbox-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

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

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 200;
  padding: 12px 18px;
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 20px;
}

.case-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 76px;
  padding-inline: max(24px, calc((100% - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background: rgba(7, 17, 31, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.case-logo {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 700;
}

.case-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #aab8cb;
  font-size: 13px;
  font-weight: 600;
}

.case-header nav > a:hover {
  color: var(--white);
}

.case-header .header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.case-hero {
  position: relative;
  overflow: hidden;
  padding: 160px 0 0;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 25%, rgba(22, 135, 255, 0.24), transparent 28%),
    var(--ink);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.hero-content {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 50px;
}

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

.case-hero h1,
.overview-section h2,
.features-section h2,
.gallery-section h2,
.project-cta h2 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0;
}

.case-hero h1 {
  font-size: clamp(4rem, 8vw, 7.6rem);
  line-height: 0.95;
}

.case-hero h1 strong {
  color: var(--blue);
}

.hero-description {
  max-width: 690px;
  margin-top: 26px;
  color: #9caec4;
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  min-height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.button-primary {
  color: var(--white);
  background: var(--blue);
  box-shadow: 0 12px 36px rgba(0, 108, 232, 0.28);
}

.button-secondary {
  color: #d8e2ef;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.browser-frame {
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-top: 80px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.38);
}

.browser-bar {
  height: 42px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  color: #7e8da2;
  background: #0d1725;
  font-size: 10px;
}

.browser-bar > div {
  display: flex;
  gap: 6px;
}

.browser-bar span {
  width: 7px;
  height: 7px;
  background: #ff7043;
  border-radius: 50%;
}

.browser-bar span:nth-child(2) { background: #ffd166; }
.browser-bar span:nth-child(3) { background: #35d17c; }

.browser-bar p {
  margin-inline: auto;
  transform: translateX(-20px);
}

.browser-frame > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050b14;
}

.project-meta {
  padding: 28px 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.meta-grid > div {
  padding: 0 26px;
  border-right: 1px solid var(--line);
}

.meta-grid > div:first-child { padding-left: 0; }
.meta-grid > div:last-child { border-right: 0; }

.meta-grid span,
.meta-grid strong {
  display: block;
}

.meta-grid span {
  margin-bottom: 5px;
  color: #8b96a7;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta-grid strong {
  font-size: 13px;
}

.meta-grid .online {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #24784b;
}

.online i {
  width: 7px;
  height: 7px;
  background: #35d17c;
  border-radius: 50%;
}

.overview-section,
.gallery-section {
  padding: 110px 0;
}

.overview-intro {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 90px;
}

.overview-section h2,
.gallery-section h2 {
  max-width: 620px;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 1.03;
}

.overview-copy p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

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

.case-cards article {
  position: relative;
  min-height: 260px;
  padding: 30px;
  background: #edf2f8;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
}

.case-cards article > span {
  color: var(--blue-deep);
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.case-cards article > i {
  position: absolute;
  top: 26px;
  right: 26px;
  color: #9aabc0;
  font-size: 30px;
}

.case-cards h3 {
  margin: 56px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
}

.case-cards p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.features-section {
  padding: 110px 0;
  color: var(--white);
  background: var(--ink);
}

.features-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 100px;
}

.features-copy h2 {
  max-width: 590px;
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  line-height: 1.02;
}

.features-copy > p:last-child {
  max-width: 520px;
  margin-top: 24px;
  color: #8fa2ba;
  font-size: 15px;
  line-height: 1.75;
}

.features-list {
  list-style: none;
}

.features-list li {
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #cbd6e4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 14px;
}

.features-list i {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--blue);
  background: rgba(22, 135, 255, 0.11);
  border-radius: 50%;
  font-size: 19px;
}

.tech-stack {
  margin-top: 70px;
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.tech-stack span {
  padding: 9px 13px;
  color: #9eb0c7;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.gallery-heading {
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.gallery-heading > p {
  max-width: 330px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(7, 17, 31, 0.08);
  cursor: zoom-in;
  text-align: left;
}

.gallery-card.gallery-wide {
  grid-column: auto;
}

.gallery-card::after {
  content: none;
}

.gallery-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  padding: 10px;
  object-fit: contain;
  object-position: top center;
  background: var(--ink);
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.gallery-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  color: var(--text);
  background: var(--white);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}

.gallery-card > span i {
  color: var(--blue);
  font-size: 20px;
}

.gallery-card:hover img {
  opacity: 0.88;
  transform: scale(1.035);
}

.project-cta {
  padding: 0 0 90px;
  background: var(--surface);
}

.cta-card {
  padding: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 50px;
  color: var(--white);
  background: linear-gradient(130deg, #0c2039, var(--ink) 70%);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(7, 17, 31, 0.16);
}

.project-cta h2 {
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  line-height: 1.05;
}

footer {
  color: #75879e;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-content {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  font-size: 11px;
}

.footer-content .case-logo {
  color: var(--white);
  font-size: 19px;
}

.footer-content > a:last-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 70px;
  display: none;
  place-items: center;
  color: var(--white);
  background: rgba(2, 8, 16, 0.95);
  backdrop-filter: blur(14px);
}

.lightbox.active {
  display: grid;
}

.lightbox figure {
  max-width: 1280px;
}

.lightbox figure img {
  max-height: calc(100vh - 155px);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.lightbox figcaption {
  margin-top: 14px;
  color: #a0b0c4;
  font-size: 12px;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.lightbox-close {
  top: 24px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 26px;
}

.lightbox-nav {
  top: 50%;
  width: 50px;
  height: 70px;
  border-radius: 8px;
  font-size: 30px;
  transform: translateY(-50%);
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

@media (max-width: 820px) {
  .hero-content,
  .gallery-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 0;
  }

  .meta-grid > div:nth-child(2) {
    border-right: 0;
  }

  .overview-intro,
  .features-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .case-cards article {
    min-height: auto;
  }

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

@media (max-width: 600px) {
  .container {
    width: min(100% - 32px, 520px);
  }

  .case-header {
    height: 68px;
    padding-inline: 16px;
  }

  .case-header nav > a:first-child {
    display: none;
  }

  .case-header .header-cta {
    padding: 9px 12px;
    font-size: 11px;
  }

  .case-hero {
    padding-top: 120px;
  }

  .case-hero h1 {
    font-size: clamp(3.7rem, 18vw, 5.5rem);
  }

  .hero-description {
    font-size: 15px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .browser-frame {
    margin-top: 55px;
  }

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

  .meta-grid > div {
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .meta-grid > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .overview-section,
  .features-section,
  .gallery-section {
    padding: 78px 0;
  }

  .overview-section h2,
  .features-section h2,
  .gallery-section h2 {
    font-size: 2.8rem;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card.gallery-wide {
    grid-column: auto;
  }

  .cta-card {
    padding: 34px 25px;
  }

  .cta-card .button {
    width: 100%;
  }

  .footer-content {
    padding: 28px 0;
    flex-direction: column;
    text-align: center;
  }

  .lightbox {
    padding: 70px 16px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 16px;
    width: 46px;
    height: 42px;
    transform: none;
  }

  .lightbox-prev { left: calc(50% - 54px); }
  .lightbox-next { right: calc(50% - 54px); }
}

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