/* =============================================================
   Paperchase Case Study — Page-Specific Styles
   ============================================================= */

/* ─── Page-level overflow guard ────────────────────────────── */

.pc-case-study {
  overflow-x: hidden;
}

/* ─── Hero ─────────────────────────────────────────────────── */

.pc-case-study .cs-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Light overlay matching Debenhams hero treatment */
.pc-case-study .hero-overlay {
  background: linear-gradient(65deg, #ffffff 10%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.15) 100%);
}

/* Hero system mesh hidden (Paperchase uses plain bg image) */
.pc-case-study .hero-system-mesh {
  display: none;
}

/* Text inherits dark colour from hero-alignment.css on light hero */

/* ─── Platform bar (pinned to hero bottom) ─────────────────── */

.pc-hero-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  background: linear-gradient(
    to right,
    rgba(15, 15, 15, 0.72) 0%,
    rgba(15, 15, 15, 0.60) 50%,
    rgba(0, 30, 24, 0.68) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pc-hero-bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.pc-hb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pc-hb-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.pc-hb-logo {
  max-height: 22px;
  max-width: 100px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.pc-hb-divider {
  color: #00F1AA;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.8;
}

/* Samsung fix — matches Debenhams pattern exactly */
@media (max-width: 768px) {
  .is-samsung-device .pc-case-study .cs-hero-content {
    margin-top: var(--pc-samsung-hero-shift, 0px);
    zoom: var(--pc-samsung-hero-zoom, 1);
    /* Zero out padding so JS measures true content height, not inflated value */
    padding-bottom: 0 !important;
  }
}

/* ─── Sections ──────────────────────────────────────────────── */

.pc-section {
  padding: 100px 20px;
}

.pc-band-light {
  background: #ffffff;
}

/* Section labels, headings and text: centered */
.pc-section .section-label,
.pc-section .section-heading,
.pc-section .section-text {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.pc-section .section-label {
  text-transform: uppercase;
  font-size: 12px;
}

.pc-section .section-text {
  margin-bottom: 24px;
}

.pc-section .section-text:last-of-type {
  margin-bottom: 56px;
}

/* ─── Work list (Section 2) ─────────────────────────────────── */

.pc-work-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 72px;
}

/* Row 1: items 1–3 each span 2 of 6 columns */
.pc-work-item {
  grid-column: span 2;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pc-work-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

/* Row 2: items 4–5 each span 3 of 6 columns, filling the row */
.pc-work-item:nth-child(4),
.pc-work-item:nth-child(5) {
  grid-column: span 3;
}

/* Icon chip — matches Topshop ctx-card-icon style */
.pc-work-num {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 241, 170, 0.12);
  color: #329a99;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 16px;
}

.pc-work-body {
  display: flex;
  flex-direction: column;
}

.pc-work-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f0f0f;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.pc-work-body p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(15, 15, 15, 0.55);
  margin: 0;
}

/* ─── Browser window visual (Context section) ───────────────── */

.pc-visual-container {
  background: #f0f0ee;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid rgba(0, 0, 0, 0.07);
}

.pc-browser-window {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.pc-bw-chrome {
  background: #e8e8e6;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.pc-bw-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.pc-bw-dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
}

.pc-bw-address {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  max-width: 280px;
}

.pc-bw-address-modern {
  background: rgba(255, 255, 255, 0.9);
}

.pc-bw-screen {
  background: #f8f8f6;
  padding: 0;
}

.pc-bw-screen-light {
  background: #ffffff;
}

.pc-bw-nav {
  height: 40px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  margin-bottom: 0;
}

.pc-nav-clean {
  height: 44px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.pc-bw-hero-block {
  height: 180px;
  background: linear-gradient(135deg, #e8e8e6 0%, #d8d8d5 100%);
  margin-bottom: 16px;
}

.pc-bw-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
}

.pc-product-grid-desktop {
  grid-template-columns: repeat(4, 1fr);
}

.pc-product-grid-2col {
  grid-template-columns: repeat(2, 1fr);
}

.pc-bw-product {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pc-bw-prod-img {
  height: 100px;
  background: linear-gradient(135deg, #e4e4e2 0%, #d8d8d5 100%);
  border-radius: 4px;
}

.pc-bw-prod-name {
  height: 10px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
  width: 80%;
}

.pc-bw-prod-price {
  height: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
  width: 50%;
}

/* ─── Device showcase (Transformation section) ──────────────── */

.pc-desktop-visual {
  padding: 40px;
}

.pc-device-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.pc-showcase-top {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
}

.pc-showcase-bottom {
  display: flex;
  justify-content: center;
  width: 100%;
}

.pc-device-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pc-device-tablet {
  width: 160px;
  flex-shrink: 0;
}

.pc-device-phone {
  width: 96px;
  flex-shrink: 0;
}

.pc-device-laptop {
  width: 480px;
  max-width: 100%;
}

.pc-device-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.22));
}

.pc-device-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #999;
}

@media (max-width: 600px) {
  .pc-showcase-top {
    flex-direction: column;
    align-items: center;
  }

  .pc-device-tablet { width: 160px; }
  .pc-device-phone  { width: 100px; }
}

.pc-laptop {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.pc-laptop-screen {
  background: #1a1a1a;
  border-radius: 10px 10px 0 0;
  padding: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
}

.pc-laptop-chrome {
  background: #2a2a2a;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px 4px 0 0;
  margin-bottom: 2px;
}

.pc-magento-badge {
  max-height: 16px;
  max-width: 64px;
  object-fit: contain;
  margin-left: auto;
  opacity: 0.8;
}

.pc-laptop-screen-inner {
  background: #fff;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}

.pc-laptop-hero {
  height: 160px;
  background: linear-gradient(135deg, rgba(0, 241, 170, 0.15) 0%, rgba(50, 154, 153, 0.12) 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 0;
}

.pc-laptop-categories {
  display: flex;
  gap: 0;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafaf8;
}

.pc-laptop-categories span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(15, 15, 15, 0.5);
  padding: 4px 14px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  text-transform: uppercase;
}

.pc-laptop-categories span:first-child {
  color: #00a98b;
}

.pc-laptop-categories span:last-child {
  border-right: none;
}

.pc-laptop-base {
  height: 10px;
  background: #2a2a2a;
  border-radius: 0 0 4px 4px;
}

.pc-laptop-foot {
  height: 4px;
  background: #1a1a1a;
  border-radius: 0 0 4px 4px;
  margin: 0 40px;
}

.pc-platform-badge-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.pc-platform-logo {
  height: 24px;
  width: auto;
  opacity: 0.7;
}

.pc-platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 241, 170, 0.08);
  border: 1px solid rgba(0, 241, 170, 0.3);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00a98b;
}

/* ─── Migration framework diagram (Delivery section) ───────── */

.pc-migration-diagram {
  margin: 48px 0 0;
  width: 100%;
}

.pc-migration-svg {
  width: 100%;
  display: block;
}

.pc-migration-mobile { display: none; }

@media (max-width: 768px) {
  .pc-migration-desktop { display: none; }
  .pc-migration-mobile { display: block; }
}

/* ─── Dual device (Delivery section) ───────────────────────── */

.pc-dual-device-container {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  justify-content: center;
  background: #f0f0ee;
  border-radius: 16px;
  padding: 40px 40px 32px;
  border: 1px solid rgba(0, 0, 0, 0.07);
}

.pc-dual-desktop {
  flex: 1;
  max-width: 560px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.pc-dual-hero-block {
  height: 120px;
  background: linear-gradient(135deg, #e4e4e2 0%, #d8d8d5 100%);
}

.pc-device-caption {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(15, 15, 15, 0.4);
  margin-top: 12px;
}

/* Mobile device */
.pc-dual-mobile {
  flex-shrink: 0;
}

.pc-mobile-shell {
  width: 120px;
  background: #1a1a1a;
  border-radius: 18px;
  padding: 10px 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.pc-mobile-notch {
  width: 36px;
  height: 8px;
  background: #000;
  border-radius: 4px;
  margin: 0 auto 8px;
}

.pc-mobile-screen {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.pc-mobile-nav {
  height: 22px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.pc-mobile-hero {
  height: 70px;
  background: linear-gradient(135deg, rgba(0, 241, 170, 0.2) 0%, rgba(50, 154, 153, 0.15) 100%);
}

.pc-mobile-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 6px;
}

.pc-mobile-product {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pc-mobile-prod-img {
  height: 44px;
  background: #e8e8e6;
  border-radius: 3px;
}

.pc-mobile-prod-name {
  height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  width: 70%;
}

/* ─── Platform before/after cards (Impact section) ─────────── */

.pc-platform-visual {
  margin-top: 0;
}

.pc-platform-cards {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.pc-platform-card {
  flex: 1;
  border-radius: 12px;
  padding: 28px 28px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pc-card-before {
  background: #f5f5f3;
  border-color: rgba(0, 0, 0, 0.1);
}

.pc-card-after {
  background: rgba(0, 241, 170, 0.04);
  border-color: rgba(0, 241, 170, 0.25);
}

.pc-card-eyebrow {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(15, 15, 15, 0.45);
  margin-bottom: 10px;
}

.pc-card-after .pc-card-eyebrow {
  color: #00a98b;
}

.pc-card-logo {
  max-height: 24px;
  max-width: 90px;
  object-fit: contain;
  opacity: 0.8;
  display: block;
  margin-bottom: 16px;
}

.pc-card-attrs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pc-card-attrs li {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgba(15, 15, 15, 0.65);
  padding-left: 14px;
  position: relative;
}

.pc-card-before .pc-card-attrs li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 1px;
  background: rgba(15, 15, 15, 0.3);
}

.pc-card-after .pc-card-attrs li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.65rem;
  color: #00F1AA;
}

.pc-platform-arrow {
  padding: 0 20px;
  flex-shrink: 0;
  margin-bottom: 16px;
}

/* ─── Results section — dark treatment (Topshop pattern) ─────── */

.pc-case-study .cs-results {
  background: linear-gradient(180deg, #0f1113 0%, #15181c 100%);
  color: #f5f5f3;
}

.pc-case-study .cs-results .section-label {
  display: block;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #00F1AA;
}

.pc-case-study .cs-results .section-title2 {
  text-align: center;
  color: #ffffff;
}

.pc-case-study .cs-results .results-intro p {
  color: rgba(245, 245, 243, 0.72);
}

.pc-case-study .cs-results .result-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
  text-align: left;
}

.pc-case-study .cs-results .result-card.major {
  background: linear-gradient(135deg, rgba(0, 241, 170, 0.24) 0%, rgba(50, 154, 153, 0.24) 100%);
  border: 1px solid rgba(0, 241, 170, 0.45);
}

.pc-case-study .cs-results .result-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.pc-case-study .cs-results .result-number {
  color: #ffffff;
}

.pc-case-study .cs-results .result-card:not(.major) .result-number {
  opacity: 0.82;
}

.pc-case-study .cs-results .result-symbol {
  color: #00F1AA;
}

.pc-case-study .cs-results .result-label {
  color: #ffffff;
}

.pc-case-study .cs-results .result-detail {
  color: rgba(245, 245, 243, 0.58);
}

.pc-case-study .cs-results .result-card.major .result-detail {
  color: rgba(245, 245, 243, 0.82);
}

/* ─── Responsive ────────────────────────────────────────────── */

@media (max-width: 900px) {
  .pc-hero-bar-inner {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* Hero viewport fix — matches Debenhams pattern.
     Override base case-study-styles padding (120px 20px 80px) to a smaller
     value so content has more room to fit on small screens. */
  .pc-case-study .cs-hero {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 88px 20px 56px;
    justify-content: center;
  }

  /* Ensure hero content and bar fill full width */
  .pc-case-study .cs-hero-content,
  .pc-case-study .pc-hero-bar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* padding-bottom on content = bar height so the bar sits over empty space,
     not over text. Text ends visually above the bar. */
  .pc-case-study .cs-hero-content {
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  }

  .pc-section {
    padding: 72px 20px;
  }

  .pc-desktop-visual {
    padding: 20px;
  }

  .pc-work-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .pc-work-item,
  .pc-work-item:nth-child(4),
  .pc-work-item:nth-child(5) {
    grid-column: span 1;
  }

  .pc-work-item {
    padding: 20px;
  }

  .pc-dual-device-container {
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 24px;
  }

  .pc-dual-desktop {
    max-width: 100%;
  }

  .pc-platform-cards {
    flex-direction: column;
    max-width: 340px;
    gap: 16px;
  }

  .pc-platform-arrow {
    transform: rotate(90deg);
    padding: 8px 0;
    margin-bottom: 0;
  }

  .pc-bw-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pc-laptop-categories {
    flex-wrap: wrap;
    gap: 0;
  }

  .pc-hero-bar-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .pc-hb-divider {
    transform: rotate(90deg);
  }
}

/* ─── Placeholder images ─────────────────────────────────────
   Applied to every skeleton element that represents an image.
   Replace with real assets when available.
   ─────────────────────────────────────────────────────────── */

/* Browser window hero banner (Context section) */
.pc-bw-hero-block {
  background-image: url('../assets/paperchase/paperchase-showcase-1.jpg');
  background-size: cover;
  background-position: center;
}

/* Browser window product images */
.pc-bw-prod-img {
  background-image: url('../assets/paperchase/product-1.jpg');
  background-size: contain;
  background-position: left center;
  background-repeat: no-repeat;
}

.pc-bw-product:nth-child(2) .pc-bw-prod-img { background-image: url('../assets/paperchase/product-2.jpg'); }
.pc-bw-product:nth-child(3) .pc-bw-prod-img { background-image: url('../assets/paperchase/product-3.jpg'); }
.pc-bw-product:nth-child(4) .pc-bw-prod-img { background-image: url('../assets/paperchase/product-4.jpg'); }

/* Laptop hero banner (Transformation section) */
.pc-laptop-hero {
  background-image: url('https://picsum.photos/seed/pc-laptop-hero/900/260');
  background-size: cover;
  background-position: center top;
}

/* Dual-device desktop hero banner (Delivery section) */
.pc-dual-hero-block {
  background-image: url('https://picsum.photos/seed/pc-dual-banner/800/200');
  background-size: cover;
  background-position: center;
}

/* Mobile device hero area (Delivery section) */
.pc-mobile-hero {
  background-image: url('https://picsum.photos/seed/pc-mobile-hero/200/140');
  background-size: cover;
  background-position: center;
}

/* Mobile product thumbnails */
.pc-mobile-prod-img {
  background-image: url('https://picsum.photos/seed/pc-mprod1/120/88');
  background-size: cover;
  background-position: center;
}

.pc-mobile-product:nth-child(2) .pc-mobile-prod-img {
  background-image: url('https://picsum.photos/seed/pc-mprod2/120/88');
}

@media (max-width: 480px) {
  .pc-desktop-visual {
    padding: 20px;
  }
}
