/* Import your global font if not already in main.css */
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville&display=swap");

.mri-page {
  --padding: 10vmin;
}

.mri-page {
  font-family: var(--default-font, 'Open Sans', sans-serif);
  color: var(--default-color, #333);
  background-color: var(--background-color, #fff);
  font-size: var(--font-size-normal, 1rem);
}

.mri-page h1,
.mri-page h2,
.mri-page h3 {
  font-family: var(--heading-font, 'Montserrat', sans-serif);
  color: var(--heading-color, #222);
}

.mri-page .section h2 {
  font-size: 2rem;
  font-weight: 600;
}
.mri-page .section h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.mri-page .section p {
  margin-bottom: 1rem;
}

.mri-page .section ul {
  margin-top: 1.5rem;
  padding-left: 1.2rem;
}

/* Demoted section titles (semantic H2/H3 used for outline; these keep visual weight) */
.mri-page .section-heading {
  font-family: var(--heading-font, 'Montserrat', sans-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: inherit;
}
.mri-page .lead {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

/* Base layout and fonts */
.mri-page {
  font-family: var(--default-font);
  color: var(--default-color);
  background-color: var(--background-color);
  font-size: var(--font-size-normal);
}

/* Canvas setup */
 canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  visibility: visible;
  opacity: 0;
}

/* Sections */
.mri-page .section {
  position: relative;
  padding: var(--padding);
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
}

.section {
  min-height: 100vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}


.mri-page .section.dark {
  background-color: transparent;
  color: #fff;
}

.mri-page .section.dark .section-heading,
.mri-page .section.dark h1,
.mri-page .section.dark h2,
.mri-page .section.dark h3,
.mri-page .section.dark p {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mri-page .section.dark::before {
  background-color: rgba(0, 0, 0, 0.6) !important;
}

.mri-page .section.right {
  text-align: right;
}

/* Text styling */
.mri-page h1,
.mri-page h2,
.mri-page h3 {
  font-family: var(--heading-font);
  color: var(--heading-color);
  margin-bottom: 20px;
}

.mri-page p,
.mri-page li {
  font-family: var(--default-font);
  line-height: 1.6;
}

/* Lists */
.mri-page ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mri-page li {
  margin-top: 10px;
}

/* Backgrounds using classes like bg-mrichallenge */
.mri-page .bg-mrichallenge,
.mri-page .bg-mri2,
.mri-page .bg-mrifin,
.mri-page .bg-mriresults {
  
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  
}





svg.sg {
  display: none !important;
}


/* Blueprint SVG */
.mri-page .blueprint {
  position: relative;
  background-color: #131C2A;
  background-image:
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  color: white;
  padding: var(--padding);
}

/* Scroll cue */
.mri-page .scroll-cta {
  font-size: var(--font-size-normal);
  color: var(--accent-color);
  margin-top: 2rem;
  animation: pulse 2s infinite;
  text-align: center;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

.content .scroll-cta, .content .credits {
  position: absolute;
  bottom: var(--padding);
}
.content .scroll-cta {
  font-size: var(--font-size-medium);
  opacity: 0;
}


.mri-page .section-text {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.mri-page .section-text h1,
.mri-page .section-text p {
  margin: 0 0 0.5rem 0;
  color: var(--heading-color, #222);
}

.blueprint,
.blueprint h1,
.blueprint h2,
.blueprint p {
  color: white !important;
}


.blueprint .section {
  min-height: 60vh;
  position: relative;
  z-index: 2;
}

.apple-title h1 {
  transform-origin: center top;
  will-change: transform, opacity;
}

.section-text h1 {
  position: relative;
  text-align: center;
  transform-origin: center center;
  width: 100%;
}


.section-text {
  text-align: center;
}

.section.bg-image {
  position: relative;
  overflow: hidden;
}

.section.bg-image::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(20, 20, 20, 0.65);
  z-index: 1;
  pointer-events: none;
}
/* Optional extra overlay layer when .image-overlay is present */
.section.bg-image .image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
  pointer-events: none;
}
.section-text {
  z-index: 2;
  position: relative;
}


.section-text.apple-title {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.section-text.apple-title .text-content {
  max-width: 1700px;
  text-align: center;
  z-index: 2;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .section-text {
    padding: 1.5rem 1rem;
    max-width: 95vw;
  }
}


/* White text on image sections with overlay (not on clear-section with light backing) */
.section.bg-image:not(#clear-section) .section-text.apple-title h1,
.section.bg-image:not(#clear-section) .section-text.apple-title h2,
.section.bg-image:not(#clear-section) .section-text.apple-title h3 {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.section-text.apple-title h1 {
  font-size: clamp(2.5rem, 6vw, 6rem);
  margin: 0;
  transform-origin: center center;
}

.section-text.apple-title h2,
.section-text.apple-title h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  margin: 0 0 0.5rem 0;
}

.section.bg-image:not(#clear-section) .section-text.apple-title p {
  font-size: 1.2rem;
  margin-top: 1rem;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1.65;
}
/* Dark text on image (clear-section): use a solid backing so text is always legible on any background */
.section.bg-image#clear-section .section-text .text-content,
.section#clear-section.bg-image .section-text .text-content {
  background: rgba(255, 255, 255, 0.96);
  color: #222 !important;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  max-width: 720px;
  margin: 0 auto;
}
.section.bg-image#clear-section .section-text .text-content .section-heading,
.section#clear-section.bg-image .section-text .text-content .section-heading {
  color: #1e1e1e !important;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72) !important;
  transition: background 0.3s ease;
  z-index: 1;
}

#clear-section::before {
  background: transparent !important;
}
/* Ensure sections inside .blueprint are transparent */
.blueprint .section::before {
  background: transparent !important;
}


/* Avoid white fallback anywhere */
.section {
  background: transparent;
}

/* Hero / title section (first section with no bg-image): ensure legible text on light background */
.mri-page .content > .section:first-of-type {
  background: var(--background-color, #fff);
}
.mri-page .content > .section:first-of-type h1,
.mri-page .content > .section:first-of-type .lead {
  color: var(--heading-color, #1e1e1e);
}

.cta-section {
  padding: 8rem 2rem;
  text-align: center;
  background: #fff;
  color: #ff8c24;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #1e1e1e;
}

.cta-section p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: #444;
  line-height: 1.6;
}

.cta-button {
  background-color: white;         /* white fill by default */
  color: #ff8c24;                  /* orange text */
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid #ff8c24;       /* orange border */
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.cta-button:hover {
  background-color: #ff8c24;       /* orange background on hover */
  color: white;                    /* white text on hover */
}


.bg-image {
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
}

.highlight-number {
  color: #ff8c24;
  font-weight: 700;
  font-size: 1.35em;
}

.floating-quote-section {
  position: relative;
  min-height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  background: transparent;
}

.floating-quote {
  max-width: 800px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  color: white;
  font-family: 'Libre Baskerville', serif;
  font-size: 1.25rem;
  text-align: center;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.quote-author {
  margin-top: 1rem;
  font-size: 1rem;
  font-style: italic;
  color: #ccc;
}
