/* Shared navigation, footer and typography come from the existing site styles.
   Only this detail page adapts the header to its colored first screen. */
.case-detail {
  --case-ink: var(--color-heading);
  --case-muted: var(--color-gray);
  --case-line: var(--color-border);
  /* Saved soft variant: 12% blue / violet / pink on white.
     Set body data-case-background="soft" to restore this background. */
  --case-surface: #fff;
  --case-surface-image: none;
  --case-surface-gradient: linear-gradient(90deg, rgba(28, 153, 254, .12) 20.69%, rgba(118, 68, 255, .12) 50.19%, rgba(253, 71, 102, .12) 79.69%);
}

/* Original contact hero: the same background image, stops and 70% overlay. */
.case-detail[data-case-background="contact-original"] {
  --case-surface-image: url(../images/bg/bg-image-1.jpg);
  --case-surface-gradient: linear-gradient(90deg, rgba(28, 153, 254, .7) 20.69%, rgba(118, 68, 255, .7) 50.19%, rgba(253, 71, 102, .7) 79.69%);
}

.case-detail .case-logo-dark { display: block; }
.case-detail .case-logo-light { display: none; }
.case-detail[data-case-background="contact-original"] > .header-area { position: fixed; inset: 0 0 auto; width: 100%; }
.case-detail[data-case-background="contact-original"] .case-hero {
  --color-heading: #fff;
  --color-gray: rgba(255, 255, 255, .9);
  --color-border: rgba(255, 255, 255, .28);
  padding-top: var(--case-header-height, 112px);
  color: #fff;
}
.case-detail[data-case-background="contact-original"] .case-hero .case-hero-description { color: rgba(255, 255, 255, .94); }
.case-detail[data-case-background="contact-original"] .case-hero .case-explore { border-color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .08); color: #fff; }
.case-detail[data-case-background="contact-original"] .case-hero .case-explore:hover { border-color: #fff; background: #fff; color: #7644ff; }
.case-detail[data-case-background="contact-original"] .case-hero a:focus-visible { outline-color: #fff; }
.case-detail .header-area.case-header--hero {
  overflow: hidden;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
/* Sample the same background geometry as the hero for a continuous surface.
   The opaque background also prevents scrolled text from showing through. */
.case-detail .case-header--hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: var(--case-hero-top, 0px);
  left: 0;
  width: 100%;
  height: var(--case-hero-height, 100vh);
  background: var(--case-surface-gradient), var(--case-surface-image) center / cover no-repeat var(--case-surface);
  pointer-events: none;
}
.case-detail .case-header--hero .case-logo-dark { display: none; }
.case-detail .case-header--hero .case-logo-light { display: block; }
.case-detail .case-header--hero .home-header-nav a,
.case-detail .case-header--hero .site-mobile-nav a,
.case-detail .case-header--hero a[aria-current="page"] { color: #fff; text-decoration: none; }
.case-detail .case-header--hero .home-header-nav a:hover,
.case-detail .case-header--hero .site-mobile-nav a:hover { color: var(--color-primary); }
.case-detail .header-area.case-header--hero a.btn-default.btn-border.btn-opacity { border-color: var(--color-opacity-1); background: transparent; color: #fff; }
.case-detail .header-area.case-header--hero a.btn-default.btn-border.btn-opacity:hover { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.case-detail .case-header--hero .site-mobile-nav { border-color: rgba(255, 255, 255, .12); }
/* Match the contact page's separate pill buttons and slash divider in the hero. */
.case-detail .case-language-divider { display: none; }
.case-detail .case-header--hero .home-header-language { gap: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; }
.case-detail .case-header--hero .home-header-language::before { display: none; }
.case-detail .case-header--hero .case-language-divider { display: inline; margin: 0 8px; color: rgba(255, 255, 255, .5); font-size: 11px; }
.case-detail .case-header--hero .home-header-language .lang-btn {
  width: auto; height: auto; padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px;
  background: rgba(255, 255, 255, .04); color: #fff;
  font-size: 11px; line-height: 1; letter-spacing: .5px;
}
.case-detail .case-header--hero .home-header-language .lang-btn:not(.active) { background: rgba(255, 255, 255, .04); color: #fff; }
.case-detail .case-header--hero .home-header-language .lang-btn:hover { border-color: var(--color-primary); background: rgba(253, 71, 102, .35); color: #fff; box-shadow: 0 0 0 1px rgba(253, 71, 102, .3); }
.case-detail .case-header--hero .home-header-language .lang-btn.active { border-color: var(--color-primary); background: var(--color-primary); color: #fff; box-shadow: 0 8px 18px rgba(253, 71, 102, .45); }
.case-detail .case-header--hero a:focus-visible,
.case-detail .case-header--hero button:focus-visible { outline-color: #fff; }

.case-detail main a:focus-visible,
.case-detail .case-lightbox a:focus-visible,
.case-detail .case-lightbox button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.case-detail .case-skip { position: fixed; top: -80px; left: 20px; z-index: 1000; padding: 12px 20px; background: #fff; color: var(--color-heading); }
.case-detail .case-skip:focus { top: 12px; }
.case-detail .case-arrow { display: inline-block; margin-left: 12px; font-size: 21px; line-height: 1; }
.case-detail .case-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--case-surface-gradient), var(--case-surface-image) center / cover no-repeat var(--case-surface);
}
.case-detail .case-hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 70px; padding: 56px 0 48px; }
.case-detail .case-hero-copy { position: relative; z-index: 1; }
/* Typography matches the contact page's .rn-page-title h2.title. */
.case-detail .case-hero h1 { margin: 0 0 24px; color: var(--color-heading); font-family: "Poppins", sans-serif; font-size: 72px; line-height: 1.4074; font-weight: 700; letter-spacing: normal; }
.case-detail .case-hero .case-hero-lead { max-width: 510px; margin-bottom: 20px; color: var(--color-heading); font-size: 24px; line-height: 1.75; font-weight: 500; }
.case-detail .case-hero .case-hero-description { max-width: 480px; margin-bottom: 28px; color: #626b79; font-size: 16px; line-height: 1.95; }
.case-detail .case-tags { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 32px; color: var(--color-gray); font-size: 14px; }
.case-detail .case-tags span + span { padding-left: 20px; border-left: 1px solid var(--color-border); }
.case-detail .case-explore { display: inline-flex; align-items: center; }
.case-detail .case-cover { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; margin: 0; justify-self: center; }
.case-detail .case-cover-screen {
  position: absolute;
  width: 44%;
  aspect-ratio: 750 / 1624;
  overflow: hidden;
  border: 5px solid #fff;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(39, 55, 84, .14), 0 4px 12px rgba(39, 55, 84, .05), 0 0 0 1px rgba(138, 151, 171, .12);
}
.case-detail .case-cover-screen--home { z-index: 2; top: 8%; left: 4%; transform: rotate(-2deg); }
.case-detail .case-cover-screen--ranking { z-index: 1; top: 0; right: 4%; transform: rotate(3deg); }
.case-detail .case-cover-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-detail .case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 30px 0 40px; border-top: 1px solid var(--color-border); }
.case-detail .case-facts div { padding-left: 28px; border-left: 1px solid var(--color-border); }
.case-detail .case-facts div:first-child { padding-left: 0; border-left: 0; }
.case-detail .case-facts dt { margin-bottom: 8px; color: var(--color-gray); font-size: 14px; font-weight: 400; }
.case-detail .case-facts dd { margin: 0; color: var(--color-heading); font-size: 16px; font-weight: 500; }
.case-detail .case-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 70px; padding: 120px 0; }
.case-detail .case-overview-heading > p:last-child { margin-bottom: 0; }
/* The Fatima name in personal-portfolio.html uses this same brand accent. */
.case-detail .case-overview-accent { color: var(--color-primary); white-space: nowrap; }
.case-detail .case-overview-intro { margin: 0 0 24px; color: var(--color-gray); font-size: 18px; line-height: 30px; }
.case-detail .case-features { margin: 0; padding: 0; list-style: none; }
.case-detail .case-features li { display: flex; gap: 16px; padding-top: 22px; }
.case-detail .case-features svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; color: var(--color-primary); }
.case-detail .case-features h3 { margin: 0 0 8px; font-size: 20px; font-weight: 500; }
.case-detail .case-features p { margin: 0; color: var(--color-gray); font-size: 16px; line-height: 28px; }
.case-detail #case-main,
.case-detail .case-gallery-section { scroll-margin-top: 150px; }
.case-detail .case-gallery-section { padding: 120px 0 0; }
/* The background lettering follows the homepage project-heading treatment. */
.case-detail .case-gallery-heading { display: flex; flex-direction: column; align-items: center; }
.case-detail .case-gallery-title-group {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin-bottom: 20px;
}
.case-detail .case-gallery-title-group h2.title { margin-bottom: 0; }
.case-detail .case-gallery-watermark {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #e8ecf3;
  font-family: Arial, sans-serif;
  font-size: clamp(26px, 8.5vw, 88px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
.case-detail .case-gallery { --case-columns: 3; display: grid; grid-template-columns: repeat(var(--case-columns), minmax(0, 1fr)); align-items: start; gap: 24px; }
.case-detail .case-gallery.is-masonry { display: block; position: relative; }
.case-detail .is-masonry .case-shot { position: absolute; top: 0; left: 0; width: calc((100% - 48px) / 3); }
.case-detail .case-shot { min-width: 0; margin: 0; overflow: hidden; border-radius: var(--radius); background: #fff; }
.case-detail .case-shot-link { position: relative; display: block; overflow: hidden; background: #f1f1f1; }
.case-detail .case-shot img { display: block; width: 100%; height: auto; transition: transform .35s; }
.case-detail .case-shot-link:hover img { transform: scale(1.025); }
.case-detail .case-shot-zoom { position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #ffffffed; color: var(--color-heading); font-size: 20px; transition: background .2s; }
.case-detail .case-shot-link:hover .case-shot-zoom { background: var(--color-primary); color: #fff; }
.case-detail .case-shot figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px; }
.case-detail .case-shot figcaption span { color: var(--color-heading); font-size: 16px; font-weight: 500; }
.case-detail .case-shot figcaption small { color: var(--color-gray); font-size: 12px; }
.case-detail .case-gallery-hint { margin: 0; padding: clamp(40px, 5.5vw, 80px) 0; color: var(--color-gray); font-size: 14px; line-height: 1.8; text-align: center; }
.case-detail .case-lightbox:not([open]) { display: none; }
.case-detail .case-lightbox {
  --case-surface-gradient: linear-gradient(90deg, rgba(28, 153, 254, .18) 20.69%, rgba(118, 68, 255, .18) 50.19%, rgba(253, 71, 102, .18) 79.69%);
  --case-surface-image: none;
  position: fixed; inset: 0; width: 100vw; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--case-surface-gradient), var(--case-surface); color: var(--case-ink);
}
.case-detail .case-lightbox::backdrop { background: #fff; }
.case-detail .case-lightbox-panel { position: relative; display: flex; flex-direction: column; height: 100%; padding: 80px 34px; }
.case-detail .case-lightbox-close { position: absolute; top: 24px; right: 34px; }
.case-detail .case-lightbox button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(31, 31, 37, .14); border-radius: 50%; background: rgba(255, 255, 255, .8); color: var(--case-ink); font: inherit; font-size: 25px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.case-detail .case-lightbox button:hover { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.case-detail .case-lightbox-stage { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 24px; flex: 1; min-height: 0; }
.case-detail .case-lightbox-image-wrap { display: flex; align-items: center; justify-content: center; min-width: 0; height: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.case-detail .case-lightbox-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 6px 24px rgba(31, 31, 37, .08); }
.case-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html.case-lightbox-open { overflow: hidden; scrollbar-gutter: stable; }

@media (min-width: 992px) and (max-width: 1199px) {
  .case-detail .case-hero h1 { font-size: 56px; }
}
@media (max-width: 991px) {
  .case-detail .case-hero-grid { gap: 30px; padding: 48px 0 40px; }
  .case-detail .case-cover-screen { border-width: 4px; border-radius: 18px; }
  .case-detail .case-hero h1 { font-size: 50px; }
  .case-detail .case-hero .case-hero-lead { font-size: 21px; }
  .case-detail .case-hero .case-hero-description { font-size: 16px; line-height: 28px; }
  .case-detail .case-overview { gap: 35px; padding-block: 80px; }
  .case-detail .case-gallery-section { padding-top: 80px; }
  .case-detail .case-gallery { --case-columns: 2; gap: 20px; }
  .case-detail .is-masonry .case-shot { width: calc((100% - 20px) / 2); }
}
@media (max-width: 767px) {
  .case-detail .case-hero-grid { grid-template-columns: 1fr; gap: 35px; padding: 50px 0 35px; }
  .case-detail .case-hero h1 { font-size: 40px; line-height: 59px; }
  .case-detail .case-cover { width: 100%; max-width: 470px; justify-self: center; }
  .case-detail .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .case-detail .case-facts div { padding-left: 16px; }
  .case-detail .case-facts div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .case-detail .case-facts dd { font-size: 14px; }
  .case-detail .case-overview { grid-template-columns: 1fr; gap: 25px; padding-inline: 20px; }
  .case-detail .case-overview-intro { font-size: 16px; line-height: 28px; }
  .case-detail .case-lightbox-panel { padding: 76px 14px; }
  .case-detail .case-lightbox-close { top: 16px; right: 14px; }
  .case-detail .case-lightbox-stage { grid-template-columns: 1fr; }
  .case-detail .case-lightbox-stage > button { position: absolute; bottom: 16px; }
  .case-detail .case-lightbox-prev { left: calc(50% - 58px); }
  .case-detail .case-lightbox-next { right: calc(50% - 58px); }
}
@media (max-width: 575px) {
  .case-detail .case-cover-screen { border-radius: 16px; }
  .case-detail .case-gallery { --case-columns: 1; }
  .case-detail .is-masonry .case-shot { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .case-detail main *, .case-detail .case-lightbox * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
