/* =========================================================
   STRIM — Industry Pages  v1
   Shared styles for all 5 industry vertical pages
   ========================================================= */

/* ── Industry Hero ───────────────────────────────────────── */
.industry-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-16);
  overflow: hidden;
}

.industry-hero-bg {
  position: absolute;
  inset: -20% 0;          /* extra vertical room for parallax travel */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  will-change: transform;
}

.industry-hero-bg.loaded { transform: translateY(0); }

.industry-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 8, 40, 0.88) 0%,
    rgba(0, 28, 90, 0.72) 55%,
    rgba(0, 50, 249, 0.38) 100%
  );
  z-index: 1;
}

.industry-hero > .container {
  position: relative;
  z-index: 2;
}

.industry-hero-content {
  max-width: 780px;
}

.industry-hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 16px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.80);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: var(--space-7);
  backdrop-filter: blur(10px);
}

.industry-hero-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64b4ff;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(100, 180, 255, 0.8);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.75); }
}

.industry-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 3.2vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: var(--space-8);
  max-width: 680px;
}

.industry-hero-title strong {
  font-weight: 600;
  background: linear-gradient(120deg, #ffffff 0%, #a5c8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.industry-hero-sub {
  font-size: clamp(var(--text-lg), 2vw, var(--text-xl));
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.72;
  margin-bottom: var(--space-10);
  max-width: 620px;
}

.industry-hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* ── Section subtitle ────────────────────────────────────── */
.section-sub {
  font-size: var(--text-lg);
  color: var(--text-body);
  line-height: 1.72;
  margin-top: var(--space-4);
  max-width: 640px;
}

.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin-inline: auto; }

/* ── Challenges grid ─────────────────────────────────────── */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

.challenge-card {
  padding: var(--space-8);
  padding-top: 0;
  overflow: hidden;
}

.challenge-icon {
  width: calc(100% + var(--space-8) + var(--space-8));
  height: 190px;
  margin-left: calc(-1 * var(--space-8));
  margin-right: calc(-1 * var(--space-8));
  margin-bottom: var(--space-6);
  border-radius: 0;
  background: var(--color-surface-subtle);
  border: none;
  overflow: hidden;
  display: block;
}

.challenge-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.challenge-card:hover .challenge-icon img {
  transform: scale(1.04);
}

.challenge-card:hover .challenge-icon {
  background: var(--color-surface-subtle);
}

.challenge-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.challenge-desc {
  font-size: var(--text-sm);
  color: var(--text-body);
  line-height: 1.72;
}

/* ── Context image ───────────────────────────────────────── */
/* ── Context image reveal (pin + scroll expand) ──────────── */
.context-reveal-section {
  padding: 0;
  overflow: hidden;
}

.context-reveal-section .container {
  padding-top: var(--space-32);
  padding-bottom: var(--space-32);
}

.context-image-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* JS sets height from 280px → full via ScrollTrigger scrub */
  will-change: height;
}

.context-image-wrap img:not(.context-strim-logo) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder when no real image yet */
.context-img-placeholder {
  aspect-ratio: 21/8;
  background: linear-gradient(135deg, #0a1a40 0%, #0032F9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-4);
}

/* During JS reveal: placeholder fills wrapper height */
.context-reveal-section .context-img-placeholder {
  aspect-ratio: unset;
  height: 100%;
  min-height: 280px;
}

.context-img-placeholder svg {
  width: 56px;
  height: 56px;
  stroke: rgba(255,255,255,0.25);
  stroke-width: 1;
  fill: none;
}

.context-img-placeholder span {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.30);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Feature row visual override for industry pages */
.ind-feature-img {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  min-height: 320px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.ind-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ind-feature-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #eef2ff 0%, #c7d9ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.ind-feature-placeholder svg {
  width: 44px;
  height: 44px;
  stroke: var(--color-primary);
  stroke-width: 1;
  fill: none;
  opacity: 0.35;
}

.ind-feature-placeholder span {
  font-size: var(--text-xs);
  color: var(--color-primary);
  opacity: 0.45;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Industry stats strip ────────────────────────────────── */
.industry-stats {
  background: var(--bg-navy);
  padding: var(--space-20) 0;
}

.industry-stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}

.ind-stat {
  padding: var(--space-4);
  border-right: 1px solid rgba(255,255,255,0.08);
}

.ind-stat:last-child { border-right: none; }

.ind-stat-num {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-4xl), 4.5vw, var(--text-5xl));
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.04em;
  display: block;
  margin-bottom: var(--space-2);
  line-height: 1;
}

.ind-stat-num em {
  font-style: normal;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 500;
}

.ind-stat-label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.48);
  font-weight: var(--weight-medium);
  line-height: 1.5;
}

/* ── Capabilities grid ───────────────────────────────────── */
.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-12);
}

.capability-card {
  padding: var(--space-8);
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
}

.capability-num {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 300;
  color: var(--color-primary);
  opacity: 0.22;
  flex-shrink: 0;
  line-height: 1;
  min-width: 2rem;
  padding-top: 2px;
}

.capability-content h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-heading);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.capability-content p {
  font-size: var(--text-sm);
  color: var(--text-body);
  line-height: 1.68;
}

/* ── Industry clients strip ──────────────────────────────── */
.ind-clients {
  padding: var(--space-16) 0;
}

.ind-clients-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: var(--space-8);
}

.ind-clients-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.ind-clients-logos img {
  height: 64px;
  width: 160px;
  object-fit: contain;
  padding: var(--space-4) var(--space-6);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  opacity: 0.55;
  filter: grayscale(1);
  transition: all var(--duration-base) var(--ease-out);
}

.ind-clients-logos img:hover {
  opacity: 0.85;
  filter: grayscale(0);
}

/* ── Feature row text additions ──────────────────────────── */
.feature-row-text .feature-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.feature-row-text > .btn {
  margin-top: var(--space-8); /* 32px */
}

.feature-check-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-body);
  line-height: 1.65;
}

.feature-check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary-pale);
  border: 1px solid rgba(0,50,249,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-check-dot svg {
  width: 9px;
  height: 9px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 2.5;
}

/* ── Section header + sub width override for industry pages ── */
.industry-page .section-header {
  max-width: 960px;
}

.industry-page .section-sub {
  max-width: none;
}

/* ── Context image: Strim logo reveal overlay ────────────── */
.context-strim-logo {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  max-width: 240px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 2px 24px rgba(0, 0, 0, 0.5));
  z-index: 2;
}

/* ── Ports & Terminals: How Strim Helps ─────────────────── */

/* Header strip — light background, above the pinned video section */
.ports-helps-prelude {
  background: var(--bg-default, #fff);
  padding: var(--space-16) 0 var(--space-10);
}

.ports-helps-prelude--no-bg {
  background: transparent;
  padding-top: calc(var(--navbar-h, 72px) + var(--space-16));
}

.ports-helps-prelude--no-bg .section-label {
  background: transparent;
  color: var(--color-text-muted, #6b7280);
  padding-left: 0;
  padding-right: 0;
}

.ports-helps-prelude-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-8);
}

.ports-helps-prelude-left {
  flex: 1 1 0;
}

.ports-helps-prelude-right {
  flex: 0 0 auto;
  padding-bottom: 0.25rem;
}

/* Wrapper — establishes stacking context for the absolute step nav */
.ports-helps-wrapper {
  position: relative;
}

/* Step nav — inside the section, floats in the right video area; pins with the section */
.ports-step-nav-outer {
  position: absolute;
  right: 18%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
}

/* clip-path gives rounded corners without overflow:hidden,
   so GSAP pin (position:fixed) keeps working correctly.
   GSAP expands this to inset(0 0% round 0rem) on scroll. */
.ports-helps-section {
  position: relative;
  width: 100%;
  height: 100vh;
  clip-path: inset(0 5% round 2rem);
  background: #030a1e;
}

.ports-helps-section video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.ports-helps-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 30, 0.68);
  z-index: 1;
}

/* Inner — vertically centres the cards wrap, confines to left half */
.ports-helps-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  max-width: var(--container-max, 1440px);
  margin: 0 auto;
  padding: var(--space-12) clamp(2rem, 5vw, 5rem);
  box-sizing: border-box;
}

/* Cards wrap — CSS grid stacking: all cards overlap in the same cell */
.ports-cards-wrap {
  display: grid;
  width: min(680px, 60%);
}

/* All cards share the same grid cell — overlap like a card stack */
.ports-card {
  grid-row: 1;
  grid-column: 1;
  background: rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.5rem;
  padding: clamp(var(--space-8), 3vw, var(--space-10));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  will-change: transform, opacity;
}

/* Mobile card carousel controls — hidden on desktop, shown <=1024px */
.ports-mobile-nav {
  display: none;
}

.ports-mobile-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.ports-mobile-arrow:hover { background: rgba(255, 255, 255, 0.18); }
.ports-mobile-arrow:disabled { opacity: 0.3; pointer-events: none; }

.ports-mobile-dots {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.ports-mobile-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.ports-mobile-dot.active {
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
  transform: scale(1.2);
}

/* Light variant used inside the video section only */
.ports-label-light {
  background: rgba(255, 255, 255, 0.10) !important;
  color: rgba(255, 255, 255, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

/* Prelude (light bg) overrides — uses regular dark token colours */
.ports-helps-prelude .section-title {
  max-width: 680px;
}

/* Title used inside the video section (white text) */
.ports-section-title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 3vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: #fff;
  margin: var(--space-4) 0 0;
  max-width: 680px;
}

/* Gradient for dark backgrounds */
.ports-gradient-text {
  font-weight: 500;
  background: linear-gradient(120deg, #ffffff 0%, #a5c8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Vertical step dots */
.ports-step-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ports-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ports-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.ports-step-item.active .ports-step-dot {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
}

.ports-step-line {
  width: 2px;
  height: 52px;
  background: rgba(255, 255, 255, 0.12);
  margin: var(--space-2) 0;
}

.ports-glass-h3 {
  font-size: clamp(var(--text-2xl), 2.5vw, 2.25rem);
  font-family: var(--font-heading);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0;
}

.ports-glass-p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.78;
  margin: 0;
}

.ports-glass-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ports-glass-checklist .feature-check-item {
  color: rgba(255, 255, 255, 0.72);
}

.ports-check-dot {
  background: rgba(255, 255, 255, 0.11) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.ports-check-dot svg {
  stroke: rgba(255, 255, 255, 0.90) !important;
}

.ports-card .btn {
  align-self: flex-start;
}

/* CTA button on the pinned video hero — solid white, not glass */
.btn-glass-cta {
  background: #fff;
  color: var(--color-primary);
  border: 1px solid #fff;
  box-shadow: none;
}

.btn-glass-cta:hover {
  background: var(--color-primary-pale);
  border-color: var(--color-primary-pale);
  color: var(--color-primary);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .challenges-grid      { grid-template-columns: repeat(2, 1fr); }
  .industry-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .capabilities-grid    { grid-template-columns: repeat(2, 1fr); }
  .ind-stat             { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .ind-stat:nth-last-child(-n+2) { border-bottom: none; }

  /* ports: unpin at tablet, cards become a swipeable horizontal carousel */
  .ports-helps-prelude  { padding: var(--space-12) 0 var(--space-8); }
  .ports-step-nav-outer { display: none; }
  .ports-helps-section  { clip-path: inset(0 2% round 1.5rem) !important; height: auto; }
  .ports-helps-inner    { height: auto; padding: var(--space-12) var(--space-6); flex-direction: column; align-items: stretch; }

  .ports-cards-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    gap: var(--space-6);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ports-cards-wrap::-webkit-scrollbar { display: none; }

  .ports-card {
    grid-row: auto;
    grid-column: auto;
    flex: 0 0 100%;
    scroll-snap-align: center;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .ports-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
  }
}

@media (max-width: 768px) {
  .industry-hero        { min-height: 70svh; }
  .challenges-grid      { grid-template-columns: 1fr; }
  .capabilities-grid    { grid-template-columns: 1fr; }
  .industry-hero-actions { flex-direction: column; align-items: flex-start; }
  .ind-clients-logos    { gap: var(--space-4); }
  .ind-clients-logos img { height: 52px; width: 130px; padding: var(--space-3) var(--space-4); }
  .context-strim-logo   { width: 100px; bottom: var(--space-6); }

  .ports-helps-prelude  { padding: var(--space-10) 0 var(--space-6); }
  .ports-helps-prelude-row   { flex-direction: column; align-items: flex-start; gap: var(--space-5); margin-top: 100px;}
  .ports-helps-prelude-right { width: 100%; }
  .ports-helps-prelude-right .btn { justify-content: center; }
  .ports-helps-section  { clip-path: inset(0 1.5% round 1rem) !important; background-color: #fff;}
  .ports-card           { padding: 32px }
  .ports-glass-h3       { font-size: 32px; }

  /* Video becomes a square loop with the cards overlapping ~20% on top of it */
  .ports-helps-section video {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    /* section's clip-path only rounds its own top corners now that the card
       overlaps and extends past the video — round the video's own bottom
       corners to match */
    border-radius: 0 0 1rem 1rem;
  }

  .ports-helps-overlay { display: none; }

  .ports-helps-inner {
    margin-top: -72px;
    padding-top: 0;
  }

  /* Cards go flat gray (same as the home page cards) instead of glass-on-video */
  .ports-card {
    background: #f8f8f8;
    border-color: var(--border-light);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .ports-glass-h3 { color: var(--text-heading); }
  .ports-glass-p  { color: var(--text-body); }
  .ports-glass-checklist .feature-check-item { color: var(--text-body); }

  .ports-check-dot {
    background: var(--color-primary-pale) !important;
    border: 1px solid rgba(0, 50, 249, 0.15) !important;
  }
  .ports-check-dot svg { stroke: var(--color-primary) !important; }

  /* No per-card CTA on mobile */
  .ports-card .btn { display: none; }

  /* Section bg is now white here — the carousel dots/arrows need dark contrast instead of the white-on-video styling */
  .ports-mobile-arrow {
    border-color: rgba(10, 10, 20, 0.15);
    background: rgba(10, 10, 20, 0.04);
    color: var(--text-heading);
  }
  .ports-mobile-arrow:hover { background: rgba(10, 10, 20, 0.08); }

  .ports-mobile-dot { background: rgba(10, 10, 20, 0.18); }
  .ports-mobile-dot.active {
    background: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 50, 249, 0.35);
  }
}
