/* Modern project page header: centered title and tag chips above a rounded
   banner image in normal flow (replaces the fixed full-screen banner), plus
   a clean "Project Overview" section with a bordered meta column. */

/* one body-copy colour for every project page (this sheet loads after the
   per-page stylesheets, which still carry their own, slightly different
   greys and in one case a brand blue) */
p {
  color: #a0a0a0;
}

/* same for the section headings: some page sheets still tint .item-h2 /
   .item-heading in the client's brand colour */
.item-h2,
.item-heading,
.item-subheading,
.container .item-h2,
.container .item-heading,
.container .item-subheading {
  color: #292b2c;
}

.project-hero {
  padding: 160px 30px 0 30px;
  text-align: center;
  background: #fff;
}

/* extra specificity: page stylesheets carry a legacy
   ":-webkit-any(section) h1" rule that would override a single class */
.project-hero .project-hero-title {
  font-family: "Nunito Sans", sans-serif;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: #000;
  margin-block-start: 0;
  margin-block-end: 0;
  margin-bottom: 10px;
}

.project-hero-subtitle {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 32px;
}

.project-hero-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.project-tag {
  display: inline-block;
  background: #f1f2f4;
  color: #3e3e40;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* same content width as the home "About Me" container (1510px incl. 30px padding) */
.project-hero-image {
  max-width: 1450px;
  margin: 56px auto 0 auto;
}

/* lift Bootstrap's 1140px cap so the overview matches the home container */
.project-container {
  width: 100%;
  max-width: 1510px;
}

/* wide screens: content column may grow by 40% */
@media only screen and (min-width: 1800px) {
  .project-hero-image {
    max-width: 2030px;
  }
  .project-container {
    max-width: 2114px;
  }
  .hmi-featured {
    max-width: 1400px;
  }
}

.project-hero-image img {
  display: block;
  width: 100%;
  border-radius: 24px;
}

/* project overview meta column */
.project-meta {
  text-align: left;
  border-left: 1px solid #e4e6ea;
  padding-left: 40px;
  margin-left: 20px;
}

.project-meta h3 {
  font-family: "Nunito Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  margin: 22px 0 6px 0;
}

.project-meta h3:first-child {
  margin-top: 0;
}

.project-meta p {
  color: #a5aab2;
  font-size: 1.6rem;
  line-height: 1.6;
  margin: 0;
  font-weight: 400;
}


/* ---- design process cards ---- */
.design-process {
  background: #f7f7f8;
  padding: 90px 0 110px 0;
  margin-top: 60px;
}

.process-cards {
  display: flex;
  gap: 32px;
  margin-top: 40px;
}

.process-card {
  flex: 1 1 0;
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: 28px;
  padding: 36px 32px 46px 32px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.05);
}

/* flowing aurora gradient at the top of each card (two blurred layers
   drifting in opposite directions) */
.process-card::before,
.process-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.process-card::before {
  top: -45%;
  left: -10%;
  width: 130%;
  height: 90%;
  background:
    radial-gradient(40% 55% at 62% 58%, rgba(246, 199, 86, 0.6), rgba(246, 199, 86, 0) 70%),
    radial-gradient(35% 45% at 38% 62%, rgba(255, 168, 118, 0.4), rgba(255, 168, 118, 0) 70%),
    radial-gradient(28% 40% at 80% 52%, rgba(178, 224, 198, 0.45), rgba(178, 224, 198, 0) 70%);
  filter: blur(18px);
  animation: card-aurora 9s ease-in-out infinite alternate;
}

.process-card::after {
  top: -55%;
  right: -15%;
  width: 90%;
  height: 100%;
  background: radial-gradient(45% 40% at 50% 58%, rgba(255, 216, 150, 0.5), rgba(255, 216, 150, 0) 70%);
  filter: blur(24px);
  animation: card-aurora-alt 13s ease-in-out infinite alternate;
}

@keyframes card-aurora {
  from {
    transform: translate3d(-6%, 0, 0) rotate(-6deg) scale(1);
  }
  to {
    transform: translate3d(8%, 8%, 0) rotate(8deg) scale(1.18);
  }
}

@keyframes card-aurora-alt {
  from {
    transform: translate3d(4%, -4%, 0) rotate(10deg) scale(1.1);
  }
  to {
    transform: translate3d(-12%, 8%, 0) rotate(-8deg) scale(0.92);
  }
}

/* desync the three cards: different phase offsets and durations so the
   gradients never move in lockstep */
.process-card:nth-child(2)::before {
  animation-delay: -3.5s;
  animation-duration: 11s;
}

.process-card:nth-child(2)::after {
  animation-delay: -6s;
  animation-duration: 15s;
}

.process-card:nth-child(3)::before {
  animation-delay: -7s;
  animation-duration: 10s;
}

.process-card:nth-child(3)::after {
  animation-delay: -10s;
  animation-duration: 12s;
}

@media (prefers-reduced-motion: reduce) {
  .process-card::before,
  .process-card::after {
    animation: none;
  }
}

.process-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border: 1.5px solid #222;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
  background: transparent;
}

.process-title {
  position: relative;
  z-index: 1;
  font-family: "Nunito Sans", sans-serif;
  font-size: 3.4rem;
  font-weight: 700;
  color: #4d4d4f;
  margin: 110px 0 30px 0;
}

.process-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.process-tag {
  background: #efeff1;
  color: #3e3e40;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: "Nunito Sans", sans-serif;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ---- image + text split (e.g. "The Challenge") ---- */
.media-split {
  display: flex;
  gap: 64px;
  align-items: flex-start;
  padding: 90px 0 40px 0;
}

.media-split-img {
  flex: 0 0 44%;
}

.media-split-img img {
  width: 100%;
  display: block;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

/* natural variant: no 5:4 crop (e.g. device mockups) */
.media-split-img--natural img {
  aspect-ratio: auto;
  object-fit: contain;
}

.media-split-img video {
  width: 100%;
  display: block;
  border-radius: 20px;
}

.media-split-text {
  flex: 1 1 auto;
}

@media only screen and (max-width: 991px) {
  /* horizontal scroll row: one and a half cards visible */
  .process-cards {
    overflow-x: auto;
    gap: 16px;
    margin: 10px -20px 0 -20px;
    padding: 20px 20px 70px 20px;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    scrollbar-width: none;
  }

  .process-cards::-webkit-scrollbar {
    display: none;
  }

  .process-card {
    flex: 0 0 62vw;
    scroll-snap-align: start;
    padding: 28px 24px 34px 24px;
    border-radius: 22px;
  }

  .process-title {
    margin-top: 60px;
    font-size: 2rem;
  }

  .process-tag {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .media-split {
    flex-direction: column;
    gap: 32px;
    padding-top: 60px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .media-split-img {
    flex: 1 1 auto;
    width: 100%;
  }
}


/* ---- HMI gallery: centered featured image + endless two-row marquee ---- */
/* the .hes-gallery container is only the lightbox group here - undo its grid */
.hmi-gallery .hes-gallery {
  display: block;
  columns: auto;
  grid-gap: 0;
  margin-bottom: 0;
}

.hmi-gallery {
  padding-top: 40px;
  padding-bottom: 16px;
}

.hmi-gallery-heading {
  text-align: center;
}

.hmi-featured {
  max-width: 1000px;
  margin: 50px auto 80px auto;
  padding: 0 30px;
}

.hmi-gallery .hmi-featured img,
.hmi-gallery .hmi-featured video {
  display: block;
  width: 100%;
  border-radius: 20px;
}

.hmi-gallery .hmi-featured img {
  cursor: pointer;
}

.hmi-marquee {
  overflow: hidden;
  width: 100%;
  margin-bottom: 32px;
  padding: 16px 0;
}

.hmi-marquee-track {
  display: flex;
  width: max-content;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  padding: 8px 0;
}

.hmi-marquee-track:active {
  cursor: grabbing;
}

.hmi-gallery .hmi-marquee-track img {
  display: block;
  flex: 0 0 auto;
  width: 440px;
  margin-right: 32px;
  border-radius: 16px;
  cursor: pointer;
  -webkit-user-drag: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.hmi-gallery .container-gallery-m {
  margin-top: 60px;
}

@media only screen and (max-width: 780px) {
  .hmi-featured {
    margin: 30px auto 40px auto;
  }

  .hmi-gallery .hmi-marquee-track img {
    width: 260px;
    margin-right: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  }

  .hmi-marquee {
    margin-bottom: 16px;
  }
}

/* ---- "Responsive" section: scrollable row of iPhone mockups ---- */
.responsive-section {
  padding: 90px 0 60px 0;
}

.responsive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.responsive-nav {
  display: flex;
  gap: 10px;
}

.responsive-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #d8dade;
  background: #fff;
  color: #1c1c1e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.responsive-arrow--dark {
  background: #1c1c1e;
  border-color: #1c1c1e;
  color: #fff;
}

.responsive-arrow:hover {
  opacity: 0.75;
}

.responsive-row {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 30px max(calc((100vw - 1450px) / 2), 30px) 110px;
}

.responsive-row::-webkit-scrollbar {
  display: none;
}

/* CSS iPhone 15 Pro (natural titanium) */
.iphone-mockup {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 320px;
  border-radius: 52px;
  background: #0d0d0f;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  padding: 5px;
  position: relative;
}

.iphone-screen {
  width: 100%;
  aspect-ratio: 402 / 874;
  border-radius: 47px;
  overflow: hidden;
  background: #fff;
  position: relative;
  /* status-bar zone the dynamic island floats in */
  padding-top: 44px;
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.iphone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 25px;
  border-radius: 999px;
  background: #000;
  z-index: 2;
}

@media only screen and (max-width: 780px) {
  .responsive-row {
    gap: 24px;
  }

  .iphone-mockup {
    width: 240px;
    border-radius: 44px;
  }

  .iphone-screen {
    border-radius: 39px;
  }
}

/* iOS status bar overlay in the white status zone */
.iphone-screen .iphone-statusbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px;
  object-fit: contain;
  object-position: center;
  z-index: 1;
  pointer-events: none;
}

/* ---- mobile overrides (must stay last so they win the cascade) ---- */
@media only screen and (max-width: 780px) {
  /* readable body copy on small screens (desktop uses 1.6rem) */
  p {
    font-size: 1.15rem;
  }

  /* mobile.css zeroes the container padding - restore it for these blocks */
  .design-process .project-container,
  .responsive-section .project-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .project-meta p {
    font-size: 1.15rem;
  }

  .container .item-heading {
    margin-bottom: 16px;
  }

  .design-process {
    padding: 40px 0 40px 0;
    margin-top: 0;
  }

  .responsive-row {
    padding-bottom: 70px;
  }

  .project-hero {
    padding: 120px 15px 0 15px;
  }

  .project-hero .project-hero-title {
    font-size: 2.4rem;
  }

  .project-hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 22px;
  }

  .project-hero-tags {
    gap: 8px;
  }

  .project-tag {
    padding: 8px 16px;
    font-size: 0.75rem;
  }

  .project-hero-image {
    margin-top: 24px;
  }

  .project-hero-image img {
    border-radius: 14px;
  }

  .project-meta {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 30px;
  }

  /* scale island + status bar with the 240px mockups */
  .iphone-screen {
    padding-top: 33px;
  }

  .iphone-screen .iphone-statusbar {
    height: 33px;
  }

  .iphone-island {
    width: 64px;
    height: 19px;
    top: 8px;
  }
}

/* light screenshots need a subtle shadow so they stay readable on white */
.hmi-gallery--light .hmi-marquee-track img {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}
