/* ELVION v71 — content-led chapter sizing and persistent mobile navigation.
   Loaded after v70. The approved sheet transitions and decorative orbits remain. */

:root { --v71-anchor-clearance: 92px; }
#positioning, #models, #cases, #process, #markets, #guarantees, #contact {
  scroll-margin-top: var(--v71-anchor-clearance);
}

/* A viewport is the minimum chapter size, never a cap on its content. */
#process, #markets, #guarantees, #contact {
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  max-height: none;
}

/* The process keeps its two-column composition; list rows own their text height. */
#process { padding-block: clamp(56px, 6vw, 88px); }
#process .process-layout { height: auto; min-height: 0; }
#process .process-list {
  height: auto;
  min-height: 0;
  grid-template-rows: repeat(5, minmax(min-content, auto));
}
#process .process-list li {
  min-height: clamp(100px, 14svh, 128px);
  padding-block: 18px;
}

/* Reserve the runner's complete flight above the country ribbon. */
#markets {
  grid-template-rows: auto minmax(380px, 1fr) auto;
  row-gap: 28px;
  padding-block: clamp(56px, 7svh, 88px);
}
#markets .market-playground { --jump-room: 300px; }

/* The marquee is a real row, so it cannot share the guarantee heading's space.
   Only this deliberately repeating, aria-hidden ribbon clips at the page edge. */
#guarantees {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(38px, 5svh, 64px);
  padding-block: 24px clamp(64px, 8svh, 100px);
}
#guarantees .guarantee-marquee {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: clip;
  line-height: 1.3;
}
#guarantees .guarantee-layout {
  flex: 1 0 auto;
  width: 100%;
  height: auto;
  min-height: 0;
  grid-template-rows: auto auto;
  align-content: center;
  row-gap: clamp(28px, 4svh, 48px);
}
#guarantees .guarantee-layout h2 { margin: 0; }
#guarantees .guarantee-copy {
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 24px;
  height: auto;
  min-width: 0;
  margin: 0;
}
#guarantees .guarantee-copy li {
  height: auto;
  min-height: var(--guarantee-cell);
  padding-block: 12px;
}
#guarantees .guarantee-copy > p { height: auto; margin-top: 0; }

/* The form and an optional calculator summary may expand the final chapter. */
#contact { padding-block: clamp(56px, 6vw, 88px); }
#contact .contact-layout { height: auto; min-height: 0; }
#contact .contact-layout > :first-child { height: auto; min-height: 0; }
#contact .contact-actions > p { display: block; }
#contact .campaign-summary-values > span {
  overflow: visible;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
@media (min-width: 1181px) {
  #contact .contact-mascot {
    flex: 0 0 auto;
    height: clamp(260px, 32svh, 360px);
  }
}

/* On short phones the full menu scrolls as a dialog, keeping every link reachable. */
.v70-menu {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.v70-menu-top, .v70-menu-foot { flex-shrink: 0; }
.v70-menu-links { flex: 1 0 auto; }

/* Compact tablets use the same unobtrusive calculator footprint as phones. */
@media (min-width: 721px) and (max-width: 1050px) {
  .campaign-widget {
    width: 74px;
    height: 99px;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    transition: transform .45s var(--v70-ease);
  }
  .campaign-widget.is-tucked { transform: translateX(calc(100% + 16px)); }
  .campaign-speech { right: 46px; bottom: 82px; }
}

@media (max-width: 900px) {
  #process .process-layout {
    grid-template-rows: auto auto;
    gap: 32px;
    align-items: stretch;
  }
  #process .process-list li { min-height: 96px; }
  #process .process-list p { font-size: clamp(22px, 5.6vw, 28px); line-height: 1.15; }
  #guarantees .guarantee-layout { grid-template-rows: auto auto auto; row-gap: 28px; }
}
@media (max-width: 720px) {
  #process, #contact { padding-block: 56px; }
  #markets { grid-template-rows: auto minmax(340px, 1fr) auto; row-gap: 24px; }
  #markets .market-playground { --jump-room: clamp(230px, 28svh, 270px); }
  #guarantees { --guarantee-cell: 48px; gap: 32px; padding-bottom: 72px; }
  #guarantees .guarantee-copy { width: 100%; }
  #guarantees .guarantee-copy li { font-size: 13px; letter-spacing: .06em; }
  #guarantees .guarantee-copy > p { font-size: 22px; line-height: 1.3; }
}

/* A stacked card must fit below the floating bar to remain fully readable.
   Short landscape screens use the same cards in normal document flow. */
@media (max-width: 900px) and (max-height: 620px) {
  .why-step { position: relative; top: auto; transform: none; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .why-step { position: relative; top: auto; transform: none; }
}

/* The compact guarantee frame encloses the heading, list and contract together. */
@media (max-width: 900px) {
  #guarantees { min-height: 0; }
  #guarantees .guarantee-layout {
    flex: 0 0 auto;
    align-content: start;
    padding-block: var(--guarantee-frame-pad, 64px);
  }
}
#guarantees .ambient-wave { animation-name: guarantee-frame-wave-v72; }
@keyframes guarantee-frame-wave-v72 {
  0% { transform: scale(1); opacity: 0; }
  18% { opacity: .22; }
  100% { transform: scale(1.08); opacity: 0; }
}

/* Compact contacts follow their content instead of centering inside a viewport. */
@media (max-width: 1050px) {
  #contact {
    height: auto;
    min-height: 0;
    justify-content: flex-start;
    padding-block: clamp(40px, 7vw, 64px);
  }
  #contact .contact-form .messenger-choice { border-block-end: 0; }
}
