/* =========================================================
   INFORMED VISIBILITY PUBLIC PAGE STYLES
   Story-driven walkthrough + shared marketing tokens
========================================================= */

/* =========================
   PAGE WRAPPER
========================= */
.iv-page {
  max-width: 1200px;
}

/* Hero intro — secondary paragraph (uses .hero-lead from marketing.css for first line) */
.hero .iv-hero-intro {
  margin: 0 auto 22px;
  max-width: 760px;
  color: rgba(245, 230, 207, 0.78);
  font-size: 17px;
  line-height: 1.62;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}

@media (max-width: 860px) {
  .hero .iv-hero-intro {
    font-size: 15px;
    max-width: 100%;
  }
}

/* =========================
   STORY TRACK (vertical walkthrough)
========================= */
.iv-storytrack {
  margin-top: 24px;
}

.iv-story {
  padding: 88px 16px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.iv-story.iv-story--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .iv-story {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.iv-story + .iv-story {
  padding-top: 72px;
}

.iv-story-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: clamp(28px, 4vw, 56px);
  max-width: 1200px;
  margin: 0 auto;
}

.iv-story--reverse .iv-story-inner {
  flex-direction: row-reverse;
}

.iv-story-media {
  flex: 1 1 50%;
  min-width: 0;
  position: relative;
}

.iv-story-media::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(255, 140, 50, 0.14),
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
}

/* Click-to-zoom wrapper (story images) */
.iv-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  cursor: zoom-in;
  border-radius: 14px;
  overflow: hidden;
  outline: none;
}

.iv-image-wrapper:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 160, 60, 0.45);
}

.iv-zoom-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  transition: background 0.2s ease, filter 0.2s ease;
  pointer-events: none;
  user-select: none;
}

.iv-image-wrapper:hover .iv-zoom-icon {
  background: rgba(0, 0, 0, 0.88);
  filter: brightness(1.12);
}

.iv-story-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 170, 60, 0.12);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.iv-image-wrapper:hover .iv-story-img {
  transform: scale(1.02);
  box-shadow:
    0 26px 56px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 170, 60, 0.22),
    0 0 48px rgba(255, 130, 40, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .iv-story-img {
    transition: none;
  }
  .iv-image-wrapper:hover .iv-story-img {
    transform: none;
  }
}

/* =========================
   IMAGE LIGHTBOX MODAL
========================= */
.iv-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.iv-modal.hidden {
  display: none !important;
}

.iv-modal:not(.hidden) {
  display: block;
}

.iv-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
  cursor: pointer;
}

.iv-modal-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  pointer-events: none;
}

.iv-modal-content #ivModalImage,
.iv-modal-content .iv-close {
  pointer-events: auto;
}

#ivModalImage {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 170, 60, 0.18),
    0 0 60px rgba(255, 120, 40, 0.1);
  animation: ivModalPop 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
  #ivModalImage {
    animation: none;
  }
}

@keyframes ivModalPop {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.iv-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 12px;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iv-close:hover {
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
}

body.iv-modal-open {
  overflow: hidden;
}

.iv-story-content {
  flex: 1 1 50%;
  min-width: 0;
  padding: 8px 0;
}

.iv-story-title {
  margin: 0 0 16px;
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 900;
  letter-spacing: -0.35px;
  color: rgba(245, 230, 207, 0.98);
  line-height: 1.2;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.iv-story-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(245, 230, 207, 0.82);
}

/* Mobile: image always first, full width stack */
@media (max-width: 900px) {
  .iv-story {
    padding: 48px 20px;
  }

  .iv-story + .iv-story {
    padding-top: 40px;
  }

  .iv-story-inner,
  .iv-story--reverse .iv-story-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  /* DOM order is always media then content → image on top */
  .iv-story-title {
    font-size: 24px;
  }

  .iv-story-text {
    font-size: 15px;
  }
}

@media (max-width: 520px) {
  .iv-story {
    padding: 32px 16px;
  }
}

/* =========================
   LEGACY / SHARED SECTIONS
========================= */
.iv-section {
  margin-top: 48px;
}

.iv-section h2 {
  font-size: 32px;
  color: rgba(245, 230, 207, 0.98);
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.iv-description {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(245, 230, 207, 0.85);
  max-width: 800px;
  margin-bottom: 32px;
}

/* =========================
   CTA SECTION
========================= */
.iv-cta {
  margin-top: 48px;
  margin-bottom: 48px;
  padding-top: 24px;
  text-align: center;
}

/* =========================
   RESPONSIVE (legacy)
========================= */
@media (max-width: 860px) {
  .iv-section h2 {
    font-size: 26px;
  }

  .iv-description {
    font-size: 15px;
  }
}
