/* Version 5 · motion follows the selected product, section, or action. */
.fv-motion .fv-hero {
  isolation: isolate;
  border-color: #d1dbcc;
  background: radial-gradient(ellipse at 14% 82%, #dfebdd, transparent 61%), #f3eee4;
}
.fv-motion .fv-hero::before { display: none; }
.fv-cinema {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 43%;
  border-radius: 29px 0 0 29px;
  border-left: 1px solid #708476;
  background-color: #0c2f25;
  background-image: linear-gradient(154deg,#0b291cb7,#213b2470 52%,#0a261ddf),url("/assets/edition-four/counter.webp");
  background-size: cover;
  background-position: center 58%;
  pointer-events: none;
}
.fv-motion .fv-intro-label { color: #3c6550; }
.fv-motion .fv-intro-label .fv-seed { background: #568557; }
.fv-motion .fv-hero h1 { color: #193429; }
.fv-motion .fv-hero h1 em { color: #396449; }
.fv-motion .fv-intro-copy, .fv-motion .fv-intro-terms { color: #435e50; }
.fv-motion .fv-intro-terms { border-block-color: #a9bfae; }
.fv-motion .fv-hero .actions .button.primary { background: #193f30; color: #fcfaef; border-color: #193f30; }
.fv-motion .fv-hero .actions .button.primary:hover { background: #275942; border-color: #275942; }
.fv-motion .fv-hero .actions .button:not(.primary) { color: #183b2b; border-color: #8ca993; }
.fv-motion .fv-hero .actions .button:not(.primary):hover { background: #e6ede1; }
.fv-motion .fv-intro :focus-visible { outline-color: #547b32; }
.fv-motion .fv-stage {
  background-color: #0f3026;
  background-image:
    radial-gradient(ellipse at 80% 18%,color-mix(in srgb,var(--fv-stage-accent) 18%,#173b2e),transparent 62%),
    linear-gradient(150deg,#193c2fdc,#0b271f 70%);
  border-color: #a2bcad;
  box-shadow: inset 0 1px #f0f8ed55,0 28px 65px #061b14a0;
}
.fv-motion .fv-frame {
  padding: clamp(8px,1vw,16px);
  border-color: #a2bcab;
  background-color: #214338;
  background-image: radial-gradient(ellipse at 50% 60%,color-mix(in srgb,var(--fv-stage-accent) 26%,#264939),#102e24 87%);
}
.fv-motion .fv-tabs { gap: 2px; border-color: #a7c2ae76; }
.fv-motion .fv-tabs button[aria-selected=true] { background: var(--fv-stage-accent); }
.fv-motion .fv-tab-marker {
  display: block;
  bottom: 3px;
  background: #335b43;
  width: calc((100% - 8px) / 5);
  height: 2px;
}
.fv-motion .fv-preview-info .fv-platform, .fv-motion .fv-studio-price strong { color: var(--fv-stage-accent); }
.fv-motion .fv-preview-actions .fv-arrow-link { background: var(--fv-stage-accent); }
.fv-motion .fv-stage:focus-within { border-color: var(--fv-stage-accent); }

/* The gallery expands into an app browser with product context and native focus. */
.fv-motion.fv-home #preview-dialog {
  width: min(1104px,calc(100vw - 32px));
  max-width: none;
  max-height: calc(100svh - 34px);
  padding: clamp(12px,2vw,26px);
  border: 1px solid #8da895;
  border-radius: 18px;
  background: #f5f0e5;
}
.fv-motion #preview-dialog::backdrop { background: #061a14d9; }
.fv-motion.fv-home #preview-dialog h2 { font-family: var(--headline); font-weight: 400; font-size: clamp(26px,4vw,45px); letter-spacing: -.053em; }
.fv-motion .fv-focus-layout {
  display: grid;
  grid-template-columns: minmax(0,1.63fr) minmax(215px,.72fr);
  gap: clamp(13px,2.2vw,28px);
  align-items: stretch;
}
.fv-motion .fv-focus-screen {
  display: grid;
  grid-template-rows: minmax(0,1fr);
  place-items: center;
  height: clamp(280px,60svh,520px);
  padding: 8px;
  border: 1px solid #9bb5a4;
  border-radius: 11px;
  background: radial-gradient(ellipse at 50% 48%,#63866d,#173a2d 82%);
}
.fv-motion.fv-home #preview-dialog .fv-focus-screen img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 14px 32px #06191088;
}
.fv-motion .fv-focus-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 9px;
  padding: clamp(12px,1.55vw,23px);
  border: 1px solid #bccdbb;
  border-radius: 11px;
  background: #fffcf2;
}
.fv-motion .fv-focus-platform { color: #346047; font-weight: 700; font-size: 13px; }
.fv-motion .fv-focus-description { margin: 0; font-size: 15px; }
.fv-motion .fv-focus-price { margin: 0; color: #244e3b; font-weight: 750; font-variant-numeric: tabular-nums; }
.fv-motion .fv-focus-pager { display: flex; gap: 6px; margin-top: 6px; }
.fv-motion .fv-focus-pager button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #b4c8b7;
  color: #153e2c;
  background: #f6f8ed;
  font-size: 20px;
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
}
.fv-motion .fv-focus-pager button:is(:hover,:focus-visible) { border-color: #417358; background: #dcebd9; }

/* Layout and state changes across the site. */
.fv-motion .fv-chapter-nav ol { position: relative; }
.fv-motion .fv-chapter-nav ol::after {
  position: absolute;
  bottom: 3px;
  left: 0;
  width: var(--fv-chapter-width,0px);
  height: 2px;
  transform: translateX(var(--fv-chapter-offset,0px));
  pointer-events: none;
  border-radius: 2px;
  background: #d3e59e;
  opacity: 0;
  content: "";
  transition: width 330ms var(--ease), transform 330ms var(--ease), opacity 160ms linear;
}
.fv-motion .fv-chapter-nav ol:has([aria-current=location])::after { opacity: 1; }
.fv-motion .fv-chapter-nav a[aria-current=location] { color: #f4f9dc; background: #38604c; }
.fv-motion :is(.portal-box,.download-box,.launch-download) { transition: border-color 230ms var(--ease), box-shadow 230ms var(--ease); }
.fv-motion :is(.portal-box,.download-box,.launch-download):focus-within { border-color: #6c947e; box-shadow: 0 0 0 3px #87ad8d43; }
.fv-motion #copy-offer { min-inline-size: 113px; }
.fv-motion #copy-offer[data-copied] { background: #42694b; border-color: #42694b; }
.fv-motion .fv-app-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
.fv-motion .fv-app-row { grid-template-columns: minmax(75px,.4fr) minmax(0,1fr); gap: 9px 17px; }
.fv-motion .fv-app-price {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  justify-items: start;
  align-items: center;
  gap: 2px 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.fv-motion .fv-app-price .button { grid-area: 1 / 2 / span 2; margin: 0; }
.fv-motion .fv-app-list:has(> [hidden]) { grid-template-columns: repeat(auto-fit,minmax(min(100%,270px),1fr)); }
.fv-motion .fv-app-list:has(> [hidden]) .fv-app-row { grid-column: auto; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .fv-motion .product-hero :is(.showcase,.phone-showcase,.phone-visual) {
    transition: transform 480ms var(--ease), border-color 250ms var(--ease), box-shadow 250ms var(--ease);
  }
  .fv-motion .product-hero :is(.showcase,.phone-showcase,.phone-visual).fv-tracking {
    transform: perspective(1350px) rotateX(var(--fv-tilt-x,0deg)) rotateY(var(--fv-tilt-y,0deg));
    border-color: #a9bea4;
    box-shadow: inset 0 1px #f2f4dd5c,0 19px 38px #173b2b52;
    transition-duration: 175ms,250ms,250ms;
  }
}
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: edition-five-out 265ms ease-out both; }
  ::view-transition-new(root) { animation: edition-five-in 490ms cubic-bezier(.22,1,.36,1) both; }
  .fv-motion .fv-stage { animation: edition-five-arrive 790ms 125ms var(--ease) backwards; }
  .fv-motion dialog[open] { animation: edition-five-focus 460ms var(--ease) both; }
  .fv-motion :is(button,.button,.bar a):active { scale: .965; }
  .fv-motion .fv-chapter-nav a:focus-visible { outline-offset: -3px; }
  @supports (animation-timeline: view()) {
    .fv-motion .fv-cinema {
      animation: edition-five-drift auto linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
  }
  @supports selector(details::details-content) and (interpolate-size: allow-keywords) {
    .fv-motion :is(.faq-list,.legal-article,.portal-box) details { interpolate-size: allow-keywords; }
    .fv-motion :is(.faq-list,.legal-article,.portal-box) details::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 310ms var(--ease),content-visibility 310ms allow-discrete;
    }
    .fv-motion :is(.faq-list,.legal-article,.portal-box) details[open]::details-content { block-size: auto; }
  }
}
@keyframes edition-five-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes edition-five-in { from { opacity: 0; clip-path: inset(3% 0 0); transform: translateY(11px); } }
@keyframes edition-five-arrive { from { opacity: .55; transform: translateY(16px) scale(.972); clip-path: inset(3% 0 round 18px); } }
@keyframes edition-five-focus { from { opacity: .58; translate: 0 11px; scale: .976; clip-path: inset(6% 5% round 18px); } }
@keyframes edition-five-drift { to { translate: 0 5%; scale: 1.065; } }

@media (max-width: 960px) {
  .fv-cinema { display: none; }
  .fv-motion .fv-hero-grid { gap: 29px; }
  .fv-motion .fv-stage {
    background-image: linear-gradient(148deg,#0d2d24ee,#15392ab0 65%,#0a251ce8),url("/assets/edition-four/counter.webp");
    background-position: center;
    background-size: cover;
  }
}
@media (max-width: 680px) {
  .fv-motion .fv-hero-grid { gap: 21px; }
  .fv-motion .fv-focus-layout { grid-template-columns: minmax(0,1fr); }
  .fv-motion .fv-focus-screen { height: auto; min-height: 155px; grid-template-rows: auto; }
  .fv-motion.fv-home #preview-dialog .fv-focus-screen img { max-height: 51vh; }
  .fv-motion .fv-focus-details { gap: 5px; }
  .fv-motion .fv-app-list { grid-template-columns: minmax(0,1fr); }
  .fv-motion .fv-app-row { gap: 8px 11px; }
  .fv-motion .fv-app-price .button { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .fv-motion .fv-chapter-nav ol::after { transition: none; }
}
