/* Corafter Phase 13 — portfolio + service detail hero correction.
   The supplied poster is the hero background, never a framed card or competing illustration. */

.portfolio-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 680px;
  min-height: 100svh;
  max-height: none;
  padding-top: var(--cora-header-offset, 92px);
  padding-bottom: 0;
  overflow: hidden;
  background: #061638;
}

/* The poster fills the entire portfolio hero like the About page reference. */
body.page-portfolio .portfolio-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(4, 17, 49, .99) 0%, rgba(4, 22, 61, .94) 30%, rgba(4, 22, 61, .66) 52%, rgba(4, 22, 61, .13) 100%),
    linear-gradient(0deg, rgba(3, 15, 44, .28), transparent 38%),
    url('../images/hero-posters/website-development.webp');
  background-position: center, center, center right;
  background-repeat: no-repeat;
  background-size: cover, cover, cover;
}

body.page-portfolio .portfolio-hero::before {
  z-index: 1;
  opacity: .4;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000 0%, transparent 95%);
}

.portfolio-hero > .portfolio-hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: min(100% - 48px, 1240px);
  min-height: calc(100svh - var(--cora-header-offset, 92px));
  margin-inline: auto;
  padding-top: clamp(20px, 4vh, 48px);
  padding-bottom: clamp(28px, 5vh, 64px);
}

.portfolio-hero-grid > div:first-child {
  position: relative;
  z-index: 4;
  width: min(58%, 760px);
  min-width: 0;
}

/* Do not merely fade the old illustration: remove it from layout entirely. */
body.page-portfolio .portfolio-hero-art {
  display: none !important;
}

.portfolio-hero .breadcrumb,
.portfolio-hero .eyebrow,
.portfolio-hero h1,
.portfolio-hero p,
.portfolio-hero .hero-actions {
  position: relative;
  z-index: 4;
}

.portfolio-hero h1 {
  max-width: 780px;
  margin-block: clamp(18px, 3vh, 32px);
  font-size: clamp(2.8rem, 5.2vw, 5.8rem);
  line-height: .99;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.portfolio-hero p {
  max-width: 650px;
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.75;
}

/* Service detail heroes: the actual supplied poster fills the complete hero canvas. */
.service-page .service-hero {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  height: 100vh;
  height: 100svh;
  min-height: 680px;
  min-height: 100svh;
  max-height: none;
  padding-top: var(--cora-header-offset, 92px);
  padding-bottom: 0;
  overflow: hidden;
  background: #061638;
}

.service-page .service-hero::before {
  z-index: 0;
  background: linear-gradient(120deg, #061638 0%, #08245b 58%, #07183e 100%);
}

.service-page .service-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4,17,49,.18), transparent 68%),
    linear-gradient(0deg, rgba(3,15,44,.24), transparent 38%);
}

.service-page .service-hero-grid {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: min(100% - 48px, 1240px);
  height: 100%;
  min-height: calc(100svh - var(--cora-header-offset, 92px));
  margin-inline: auto;
  padding-top: clamp(22px, 4vh, 44px);
  padding-bottom: clamp(34px, 6vh, 72px);
}

.service-page .service-hero-copy {
  position: relative;
  z-index: 4;
  width: min(58%, 720px) !important;
  max-width: 720px;
  min-width: 0;
}

.service-page .service-hero-visual {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  pointer-events: none;
}

.service-page .service-poster-frame {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  background: transparent !important;
}

.service-page .service-poster-frame img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: center right;
  filter: none !important;
  animation: none !important;
  background: transparent !important;
}

.service-page .service-poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(4,17,49,.99) 0%, rgba(4,22,61,.93) 31%, rgba(4,22,61,.64) 54%, rgba(4,22,61,.12) 100%), linear-gradient(0deg, rgba(3,15,44,.24), transparent 38%);
}

/* Hide floating chips, mini mockups and SVG overlays that caused the poster-card look. */
.service-page .service-art-backdrop,
.service-page .service-hero-3d-stack,
.service-page .service-main-3d,
.service-page .lottie-shell,
.service-page .hero-mini-3d,
.service-page .service-float {
  display: none !important;
}

.service-page .service-hero .wave {
  z-index: 5;
  pointer-events: none;
}

@media (max-width: 900px) {
  .portfolio-hero { min-height: 100svh; }
  .portfolio-hero > .portfolio-hero-grid,
  .service-page .service-hero-grid {
    width: min(100% - 40px, 760px);
  }
  .portfolio-hero-grid > div:first-child,
  .service-page .service-hero-copy {
    width: min(76%, 680px) !important;
  }
  body.page-portfolio .portfolio-hero::after {
    background-position: center, center, 62% center;
  }
  .service-page .service-poster-frame img { object-position: 62% center; }
}

@media (max-width: 600px) {
  .portfolio-hero {
    min-height: 100svh;
    padding-top: var(--cora-header-offset, 78px);
  }
  .portfolio-hero > .portfolio-hero-grid {
    width: calc(100% - 36px);
    min-height: calc(100svh - var(--cora-header-offset, 78px));
    padding-top: 18px;
    padding-bottom: 36px;
  }
  .portfolio-hero-grid > div:first-child,
  .service-page .service-hero-copy {
    width: 100% !important;
    max-width: 100%;
  }
  .portfolio-hero h1 {
    max-width: 12ch;
    font-size: clamp(2.45rem, 11vw, 3.6rem);
    line-height: 1.02;
  }
  .portfolio-hero p { max-width: 42ch; }
  body.page-portfolio .portfolio-hero::after {
    background-image:
      linear-gradient(90deg, rgba(4,17,49,.96), rgba(4,22,61,.72)),
      linear-gradient(0deg, rgba(3,15,44,.34), transparent 50%),
      url('../images/hero-posters/website-development.webp');
    background-position: center, center, 62% center;
  }
  .service-page .service-hero {
    min-height: 100svh;
    height: auto;
    padding-top: var(--cora-header-offset, 78px);
  }
  .service-page .service-hero-grid {
    width: calc(100% - 36px);
    min-height: calc(100svh - var(--cora-header-offset, 78px));
    height: auto;
    padding-top: 18px;
    padding-bottom: 34px;
  }
  .service-page .service-hero-copy { padding-block: 12px; }
  .service-page .service-hero h1 {
    max-width: 13ch;
    font-size: clamp(2.35rem, 10.8vw, 3.55rem);
    line-height: 1.02;
    text-wrap: balance;
  }
  .service-page .service-poster-frame img { object-position: 64% center; }
  .service-page .service-poster-frame::after {
    background: linear-gradient(90deg, rgba(4,17,49,.94), rgba(4,22,61,.68)), linear-gradient(0deg, rgba(3,15,44,.32), transparent 48%);
  }
  .service-page .service-hero-trust { flex-wrap: wrap; gap: 8px 14px; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .portfolio-hero h1 { font-size: clamp(2.7rem, 4.2vw, 4.5rem); }
  .portfolio-hero > .portfolio-hero-grid,
  .service-page .service-hero-grid { padding-top: 14px; padding-bottom: 28px; }
  .service-page .service-hero-copy { width: min(56%, 680px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .service-page .service-poster-frame img { animation: none !important; transition: none !important; }
}
