/* Intro.docx / About.docx: shared formatting for modal and scrolling sections. */
#intro.home-story, #about.home-story { text-align: left; }
#scroll-intro.home-story, #scroll-about.home-story {
  height: auto; min-height: 100svh; padding: 90px 24px 48px;
  text-align: left; scroll-margin-top: 60px;
}
#scroll-intro.home-story .scroll-content-box,
#scroll-about.home-story .scroll-content-box {
  width: 100%; max-width: 960px; max-height: none; overflow: visible;
  padding: clamp(22px, 4vw, 48px); background: rgba(8, 15, 24, .94);
  border: 1px solid rgba(255,255,255,.14); border-radius: 20px;
}
.home-story .story-heading {
  max-width: 24ch; margin: 0 0 1.25rem; font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.25; letter-spacing: -.025em; text-transform: none;
}
.home-story p { font-size: 1rem; line-height: 1.8; margin: 0 0 1.4rem; color: #e5eaf0; }
.home-story .story-divisions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0; }
.home-story .story-division { padding: 22px; border: 1px solid #445263; border-top: 3px solid #84e1bd; border-radius: 12px; background: #14212b; }
.home-story .story-diagnostics { border-top-color: #b7bdff; }
.home-story .story-division h3 { margin: 0 0 12px; text-transform: none; letter-spacing: 0; font-size: 1.2rem; }
.home-story .story-division h3 a { color: #a5eed3; }
.home-story .story-diagnostics h3 a { color: #ccd0ff; }
.home-story .story-division p { margin: 0; }
.home-story .story-mission { padding-left: 20px; border-left: 3px solid #84e1bd; color: #fff; font-weight: 500; }
.home-story .story-actions { margin: 24px 0 0; }
.home-story .story-action { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 1px solid #84e1bd; border-radius: 10px; background: #84e1bd; color: #101c23; font-weight: 600; line-height: 1.5; text-decoration: none; }
.home-story .story-action:hover { background: #a5eed3; color: #101c23 !important; }
.home-story .home-branch-links { margin-bottom: 0; }
.home-story .home-branch-links a { color: #a5eed3; text-underline-offset: 4px; }
.home-story a:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
#main .home-story { width: 54rem; }
#main .home-story .image.main { margin: 0 0 28px; }
#main .home-story .image.main img { max-height: 240px; object-fit: cover; border-radius: 12px; }
@media (max-width: 680px) {
  .home-story .story-divisions { grid-template-columns: 1fr; }
  #scroll-intro.home-story, #scroll-about.home-story { padding: 82px 16px 32px; }
  .home-story .story-division { padding: 18px; }
  .home-story .story-action { width: 100%; justify-content: center; }
}

/* Intro popup stays internally scrollable; scrolling Intro uses an image backdrop. */
#wrapper:has(#intro.active, #about.active) { height: auto; min-height: 100svh; padding: 20px 16px; }
#wrapper:has(#intro.active, #about.active) #main { padding: 0; flex-grow: 0; width: 100%; }
body:has(#intro.active, #about.active) .scroll-nav { visibility: hidden; }
#main #intro.home-story { width: 46rem; background: #101820; padding: 56px 28px 28px; margin: 0; max-height: calc(100vh - 48px); max-height: calc(100svh - 48px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #728c99 #101820; }
#intro .intro-title, #scroll-intro .intro-title { font-size: 1.65rem; letter-spacing: .12em; margin: 0 0 24px; }
#scroll-intro.home-story { background: #101820; min-height: 100svh; padding: 90px 24px 48px; display: flex; isolation: isolate; }
#scroll-intro .intro-backdrop { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; }
#scroll-intro .intro-backdrop svg { display: block; width: 100%; height: 100%; overflow: hidden; }
#scroll-intro.home-story .scroll-content-box { position: relative; max-width: 960px; margin: 0 auto; background: rgba(8, 15, 24, .94); padding: clamp(22px, 4vw, 48px); border: 1px solid rgba(255,255,255,.14); border-radius: 20px; }
/* SVG viewport crops the top 80px at every screen size, without changing the original. */
#intro .intro-cropped-art svg { display: block; width: 100%; height: auto; aspect-ratio: 960 / 449; overflow: hidden; border-radius: 8px; }
#intro.home-story p, #scroll-intro.home-story p { font-size: 1rem; line-height: 1.65; font-weight: 400; margin-bottom: 20px; }
#intro.home-story .image.main, #scroll-intro.home-story .image.main { display: block; margin: 0 0 24px; }
#intro.home-story .image.main img, #scroll-intro.home-story .image.main img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: 8px; }
#intro .intro-divisions a, #scroll-intro .intro-divisions a { color: #a5eed3; text-decoration: underline; text-underline-offset: 3px; }
#intro .story-mission, #scroll-intro .story-mission { border: 0; padding: 0; }
#intro .story-actions, #scroll-intro .story-actions { margin-bottom: 0; }
@media (max-width: 680px) {
  #main #intro.home-story { padding: 56px 20px 24px; }
  #scroll-intro.home-story { padding: 82px 16px 32px; }
  #scroll-intro.home-story .scroll-content-box { padding: 22px; }
}

/* Keep the About popup inside the screen after adding the joining options. */
#main #about.home-story { max-height:calc(100vh - 48px); max-height:calc(100svh - 48px); margin:0; overflow-y:auto; overscroll-behavior-y:contain; scrollbar-width:thin; scrollbar-color:#728c99 #101820; }
