.featured-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.featured-project {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.featured-project:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 42px rgba(21, 21, 21, 0.1);
}

.featured-project-image {
  position: relative;
  padding: 26px 26px 0;
  overflow: hidden;
  background: #162334;
}

.featured-project-score .featured-project-image {
  background: #e4e9ef;
}

.featured-project-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px 6px 0 0;
}

.featured-project-type {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 9px 12px;
  color: white;
  background: var(--ink);
  border: 1px solid #ffffff2e;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
}

.featured-project-copy {
  padding: 28px;
}

.featured-project-copy h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 12px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.featured-project-copy h3 span {
  color: var(--red);
  font-size: 2rem;
}

.featured-project-copy p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.featured-project-link {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.project-page {
  zoom: 1;
}

.project-page section[id] {
  scroll-margin-top: 110px;
}

.project-page .menu-toggle i {
  display: none;
}

.project-page .menu-toggle::before {
  content: "☰";
  font-size: 1.35rem;
  line-height: 1;
}

.project-page .is-menu-open .menu-toggle::before {
  content: "×";
  font-size: 1.8rem;
}

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

.case-hero {
  padding: 134px 0 56px;
  color: var(--white);
  background:
    radial-gradient(ellipse at 95% 35%, #e21a5917, transparent 50%),
    linear-gradient(120deg, #1e1b1d, #11151b);
}

.project-score .case-hero {
  background:
    radial-gradient(ellipse at 95% 35%, #e25d1f1c, transparent 50%),
    linear-gradient(120deg, #1e1b1d, #181513);
}

.case-back {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  margin-bottom: 38px;
  color: #c1bdbb;
  font-size: 0.82rem;
}

.case-back:hover {
  color: white;
}

.case-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 52px;
  align-items: center;
}

.case-hero .eyebrow {
  color: #ff779c;
  letter-spacing: 0.12em;
}

.case-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(4.5rem, 8vw, 7.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.case-tagline {
  margin: 0 0 20px;
  max-width: 520px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.case-lead {
  max-width: 520px;
  margin: 0;
  color: #c1bdbb;
  font-size: 1rem;
  line-height: 1.8;
}

.case-hero .hero-actions {
  gap: 10px;
  margin-top: 26px;
}

.case-hero .button-ghost {
  color: white;
  background: #ffffff08;
  border-color: #ffffff38;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.case-tags li {
  padding: 7px 10px;
  color: #c1bdbb;
  border: 1px solid #ffffff24;
  border-radius: 4px;
  font-size: 0.7rem;
}

.case-hero-visual {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #ffffff29;
  border-radius: 10px;
  background: #1f242c;
  box-shadow: 0 30px 90px #00000040;
  transform: rotate(-2deg);
}

.case-window-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 34px;
  padding: 8px 44px;
  color: #b9bec6;
  font-size: 0.66rem;
}

.case-window-bar > span {
  position: absolute;
  left: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e21a59;
  box-shadow: 10px 0 #e25d1f, 20px 0 #69645f;
}

.case-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.case-hero-visual figcaption {
  padding: 12px 16px;
  color: #b9bec6;
  font-size: 0.72rem;
  line-height: 1.5;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 auto;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.case-facts > div {
  padding-left: 18px;
  border-left: 2px solid var(--red);
}

.case-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.case-facts dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.5;
}

.case-section {
  padding-block: 88px;
}

.case-section-heading {
  max-width: 740px;
  margin-bottom: 36px;
}

.case-section-heading h2,
.case-next h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.case-section-heading > p:last-child:not(.eyebrow),
.case-next > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.case-feature {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffffb3;
}

.case-feature-number {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
}

.case-feature h3 {
  margin: 24px 0 12px;
  font-size: 1.14rem;
}

.case-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.case-gallery-section {
  background: #eeebe7;
  border-block: 1px solid var(--line);
}

.case-gallery-note {
  margin: -14px 0 30px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

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

.case-screen {
  min-width: 0;
  margin: 0;
}

.case-screen-link {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: zoom-in;
}

.case-screen-link img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 220ms ease;
}

.case-screen-link:hover img {
  transform: scale(1.02);
}

.case-screen-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  background: var(--ink);
  border: 1px solid #ffffff40;
  border-radius: 50%;
}

.case-screen figcaption {
  padding: 16px 2px 6px;
}

.case-screen h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.case-screen p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.7;
}

.case-mobile-gallery {
  max-width: 680px;
  margin: 48px auto 0;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.case-mobile-gallery .case-screen-link {
  border: 6px solid #242326;
  border-radius: 22px;
}

.case-next {
  padding-block: 80px;
  text-align: center;
}

.case-next .button {
  gap: 10px;
  margin-top: 26px;
}

.is-viewing-screenshot,
.is-viewing-screenshot body {
  overflow: hidden;
}

.screenshot-viewer {
  width: min(1440px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  color: white;
  background: #171a20;
  border: 1px solid #ffffff30;
  border-radius: 10px;
  box-shadow: 0 20px 90px #00000066;
}

.screenshot-viewer::backdrop {
  background: #08090dee;
}

.screenshot-toolbar,
.screenshot-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
}

.screenshot-toolbar p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.screenshot-viewer button {
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 12px;
  color: white;
  background: #ffffff0d;
  border: 1px solid #ffffff33;
  border-radius: 5px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.screenshot-viewer button:hover {
  background: #ffffff20;
}

.screenshot-content {
  max-height: calc(100dvh - 180px);
  overflow: auto;
  background: #0b0e14;
}

.screenshot-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 180px);
  margin: auto;
  object-fit: contain;
}

.screenshot-controls span {
  color: #b9bec6;
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .project-page .nav {
    justify-self: stretch;
  }

  .project-page .nav a i {
    display: none;
  }

  .case-hero-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .case-hero-copy {
    max-width: 650px;
  }

  .case-hero-visual {
    width: 100%;
    transform: none;
  }

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

@media (max-width: 620px) {
  .featured-projects,
  .case-gallery,
  .case-feature-grid {
    grid-template-columns: 1fr;
  }

  .featured-project-copy {
    padding: 24px;
  }

  .case-container {
    width: calc(100% - 36px);
  }

  .case-hero {
    padding-top: 94px;
    padding-bottom: 38px;
  }

  .case-back {
    margin-bottom: 28px;
  }

  .case-hero h1 {
    font-size: 4.75rem;
  }

  .case-facts {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .case-facts dt {
    font-size: 0.78rem;
  }

  .case-section,
  .case-next {
    padding-block: 56px;
  }

  .case-feature {
    padding: 24px;
  }

  .case-mobile-gallery {
    max-width: 320px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .screenshot-viewer {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .screenshot-toolbar,
  .screenshot-controls {
    gap: 8px;
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-project,
  .case-screen-link img {
    transition: none;
  }
}
