/* ==========================================================================
   PAGE: MEDIA CORNER

   Fifth layout system: an editorial one. A lead story over a news grid,
   event blocks with photo galleries, and a project grid with overlay
   captions. Shares nothing with solutions / services / industries.
   ========================================================================== */

/* --------------------------------------------------------------------------
   SECTION JUMP BAR  (reuses .sector-nav from industries.css conceptually,
   but this one is not sticky and carries no icons)
   -------------------------------------------------------------------------- */
.media-jump {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--c-border);
}

.media-jump__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-border-mid);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-ink-800);
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}

.media-jump__link:hover {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}

.media-jump__count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.65;
}

/* --------------------------------------------------------------------------
   LEAD STORY  →  <LeadStory />
   -------------------------------------------------------------------------- */
.lead-story {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(340px, 34vw, 480px);
  border-radius: var(--r-xl);
  overflow: hidden;
  isolation: isolate;
  color: inherit;
}

.lead-story__date {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-accent);
}

.lead-story__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform var(--t-slow);
}

.lead-story:hover .lead-story__img {
  transform: scale(1.04);
}

.lead-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--g-media-overlay);
}

.lead-story__body {
  padding: clamp(1.5rem, 1rem + 2vw, 2.15rem);
  color: var(--c-white);
}

.lead-story__title {
  font-family: var(--font-body);
  font-size: var(--fs-featured);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  letter-spacing: -0.7px;
  color: var(--c-white);
  margin-block: 0.9rem 0.9rem;
}

.lead-story__excerpt {
  max-width: 44rem;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--c-mist);
  margin-bottom: 1.2rem;
}

/* --------------------------------------------------------------------------
   NEWS CARD  →  <NewsCard />
   -------------------------------------------------------------------------- */
/* The whole card is the link now — no "read more" to aim at, so the target
   is the card itself. */
.news {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: inherit;
  background: var(--c-white);
  border: 1px solid var(--c-border-mid);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.news:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: var(--sh-card-hover);
}

.news__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(140deg, var(--c-tint-indigo), var(--c-tint-cyan));
}

.news__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.news:hover .news__media img {
  transform: scale(1.05);
}

/* Slot with no photograph yet — a mark rather than a broken frame. */
.news__media--empty {
  display: grid;
  place-items: center;
  color: var(--c-primary);
  opacity: 0.4;
}

.news__media--empty svg {
  width: 40px;
  height: 40px;
}

.news__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.4rem 1.4rem 1.5rem;
}

.news__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.news__tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--c-primary);
  background: var(--c-tint-indigo);
  border-radius: var(--r-sm);
  padding: 0.24rem 0.55rem;
}

.news__tag--announcement {
  color: #7a5a12;
  background: #fdf3e0;
}

.news__tag--update {
  color: #1b6b3a;
  background: #e6f6ec;
}

.news__date {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--c-slate-600);
}

.news__title {
  font-family: var(--font-body);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: var(--c-ink-700);
  margin-bottom: 0.6rem;
}

.news__excerpt {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--c-ink-500);
  margin-bottom: 1.1rem;
}

.news__foot {
  margin-top: auto;
}

/* --------------------------------------------------------------------------
   EVENT BLOCK  →  <EventBlock />
   -------------------------------------------------------------------------- */
.event {
  padding-block: clamp(2rem, 1.5rem + 2vw, 2.34rem);
  border-bottom: 1px solid var(--c-border-mid);
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.event:last-of-type {
  border-bottom: 0;
}

.event__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.event__title {
  font-family: var(--font-body);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  letter-spacing: -0.44px;
  color: var(--c-ink-900);
  margin-bottom: 0.5rem;
}

.event__meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--c-ink-500);
}

.event__meta svg {
  width: 15px;
  height: 15px;
  color: var(--c-primary);
}

.event__tags {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.event__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--c-primary);
  background: var(--c-tint-indigo);
  border-radius: var(--r-sm);
  padding: 0.3rem 0.6rem;
}

.event__summary {
  max-width: 48rem;
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--c-ink-850);
  margin-bottom: 1.6rem;
}

/* --------------------------------------------------------------------------
   GALLERY  →  <Gallery />
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

/* The first tile takes a 2x2 block so the grid is not a flat contact sheet. */
.gallery__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-tint-indigo);
}

.gallery__item:first-child .shot {
  aspect-ratio: 1;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.shot--photo {
  cursor: zoom-in;
}

.shot--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 42, 85, 0.4);
  opacity: 0;
  transition: opacity var(--t-base);
}

.shot--photo:hover::after,
.shot--photo:focus-visible::after {
  opacity: 1;
}

.shot--photo:hover img {
  transform: scale(1.06);
}

.shot__zoom {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--c-white);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--t-base), transform var(--t-base);
  z-index: 1;
}

.shot--photo:hover .shot__zoom,
.shot--photo:focus-visible .shot__zoom {
  opacity: 1;
  transform: none;
}

.shot__zoom svg {
  width: 24px;
  height: 24px;
}

/* Awaiting-upload slot */
.shot--empty {
  display: grid;
  place-items: center;
  gap: 0.4rem;
  background:
    repeating-linear-gradient(
      45deg,
      var(--c-tint-indigo) 0 10px,
      #eef0fb 10px 20px
    );
  border: 1px dashed var(--c-border-mid);
  color: var(--c-slate-400);
}

.shot--empty svg {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}

.shot__slot {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.6px;
}

/* --------------------------------------------------------------------------
   PROJECT CARD  →  <ProjectCard />
   Caption overlays the image rather than sitting beneath it.
   -------------------------------------------------------------------------- */
.project {
  position: relative;
  display: block;
  height: 100%;
  min-height: 260px;
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(150deg, var(--c-navy-700), var(--c-navy-900));
}

.project__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform var(--t-slow);
}

.project:hover .project__img {
  transform: scale(1.05);
}

.project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(6, 10, 16, 0.15) 0%,
    rgba(6, 10, 16, 0.55) 45%,
    rgba(6, 10, 16, 0.92) 100%
  );
}

.project__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1.4rem 1.5rem;
}

.project__sector {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 0.5rem;
}

.project__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: var(--c-white);
  margin-bottom: 0.45rem;
}

.project__text {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  line-height: var(--lh-relaxed);
  color: var(--c-mist);
  margin: 0;
  /* Collapsed until hover so the grid reads as images first. */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--t-slow), opacity var(--t-base);
}

.project:hover .project__text,
.project:focus-within .project__text {
  max-height: 9rem;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   LIGHTBOX  →  <Lightbox />  (see assets/js/lightbox.js)
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: rgba(4, 12, 22, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base), visibility var(--t-base);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  color: var(--c-white);
}

.lightbox__caption {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.78);
}

.lightbox__count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.6);
}

.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 clamp(1rem, 5vw, 4.5rem);
  min-height: 0;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.12);
  color: var(--c-white);
  transition: background var(--t-base);
}

.lightbox__btn:hover {
  background: var(--c-primary);
  color: var(--c-white);
}

.lightbox__btn svg {
  width: 20px;
  height: 20px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: clamp(0.5rem, 2vw, 1.5rem);
}

.lightbox__nav--next {
  right: clamp(0.5rem, 2vw, 1.5rem);
}

.lightbox__nav--next svg {
  transform: scaleX(-1);
}

.lightbox__thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem clamp(1rem, 3vw, 2rem) 1.5rem;
}

.lightbox__thumb {
  width: 54px;
  height: 40px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  overflow: hidden;
  opacity: 0.5;
  transition: opacity var(--t-base), border-color var(--t-base);
}

.lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox__thumb:hover,
.lightbox__thumb.is-current {
  opacity: 1;
  border-color: var(--c-primary);
}

body.lightbox-open {
  overflow: hidden;
}
