.home-hero {
  width: calc(100% - 88px);
  max-width: none;
  min-height: 0;
  padding: clamp(72px, 8vw, 126px) 0 clamp(96px, 10vw, 150px);
  display: block;
}

.home-hero-top {
  display: grid;
  grid-template-columns: minmax(420px, 0.78fr) minmax(150px, 0.24fr) minmax(0, 1.22fr);
  gap: clamp(28px, 3vw, 52px);
  align-items: center;
  margin-bottom: 18px;
}

.home-hero-copy {
  max-width: 620px;
}

.hero-side-actions {
  width: min(190px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: center;
  justify-self: center;
}

.hero-side-button {
  min-height: 54px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  text-decoration: none;
  text-align: center;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.35;
  text-transform: uppercase;
  transition: color 0.2s ease, background 0.2s ease;
}

.hero-side-button:hover {
  color: var(--paper);
  background: var(--ink);
}

.hero-side-button--filled {
  color: var(--paper);
  background: var(--ink);
}

.hero-side-button--filled:hover {
  color: var(--ink);
  background: transparent;
}

.lifecycle-preview {
  color: inherit;
  text-decoration: none;
}

.lifecycle-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 24px);
  align-items: stretch;
}

.lifecycle-preview-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1.45;
  object-fit: contain;
  display: block;
  transition: transform 0.55s cubic-bezier(.2,.75,.2,1);
}

.lifecycle-preview:hover .lifecycle-preview-grid img:nth-child(1) {
  transform: translateY(-5px);
}

.lifecycle-preview:hover .lifecycle-preview-grid img:nth-child(2) {
  transform: translateY(-8px);
}

.lifecycle-preview:hover .lifecycle-preview-grid img:nth-child(3) {
  transform: translateY(-5px);
}

.lifecycle-preview-meta {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lifecycle-preview-meta span:last-child {
  color: var(--ink);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.lifecycle-preview:hover .lifecycle-preview-meta span:last-child {
  transform: translate(3px, -3px);
}

.hero-feature {
  width: 100%;
  justify-self: stretch;
}

.hero-feature-image {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 0;
  background: transparent;
  display: block;
  overflow: visible;
}

.hero-feature-image img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.hero-feature-meta {
  margin-top: 20px;
}

/* Keep every project that shares a row aligned to the same image height. */
@media (min-width: 681px) {
  .work-grid .work-card:not(.work-card--full) .work-image {
    height: clamp(360px, 36vw, 560px);
    aspect-ratio: auto;
  }
}

/* Eragon is a panoramic triptych: let the artwork itself define the row. */
.work-card--eragon .work-image {
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  padding: 0 !important;
  background: transparent !important;
  overflow: visible;
}

.work-card--eragon .work-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 1260px) {
  .home-hero-top {
    grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: center;
  }

  .home-hero-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .hero-side-actions {
    grid-column: 1;
    grid-row: 2;
    width: 190px;
    justify-self: start;
    align-self: start;
    margin-top: -20px;
  }

  .lifecycle-preview {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 1100px) {
  .lifecycle-preview-grid {
    gap: 12px;
  }
}

@media (max-width: 980px) {
  .home-hero {
    width: calc(100% - 40px);
    padding-top: 64px;
  }

  .home-hero-top {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-bottom: 18px;
  }

  .home-hero-copy,
  .hero-side-actions,
  .lifecycle-preview {
    grid-column: auto;
    grid-row: auto;
  }

  .home-hero-copy {
    max-width: 760px;
  }

  .hero-side-actions {
    width: min(220px, 100%);
    max-width: none;
    margin-top: 0;
    flex-direction: column;
    justify-self: start;
  }

  .lifecycle-preview {
    max-width: 820px;
  }

  .hero-feature {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .hero-feature-image {
    min-height: 0;
    height: auto;
  }

  .hero-feature-image img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 640px) {
  .lifecycle-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-side-actions {
    max-width: 100%;
    flex-direction: column;
  }
}
