/* Motion enhances a complete static document; it never gates access to content. */
.hero-line { display: block; }
.hero-art { --float-step: clamp(22px, 3vw, 44px); }
.brand-gear { transform-box: view-box; transform-origin: center; }
.studio-tile .brand-gear { --gear-duration: 24s; }
.studio-illustration .brand-gear { --gear-duration: 32s; --gear-turn: -1turn; }
.contact-flower .brand-gear { --gear-duration: 28s; }
.header-utilities { display: flex; align-items: center; gap: 10px; }
.motion-toggle { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; }
.motion-toggle:hover { background: #e8eddf; }
.motion-toggle:disabled { cursor: default; }
.motion-toggle[aria-pressed="false"] .motion-pause-icon,
.motion-toggle[aria-pressed="true"] .motion-play-icon { display: none; }
.page-progress { display: none; position: fixed; z-index: 50; top: 0; left: 0; width: 100%; height: 3px; background: #6e8c45; transform-origin: left; transform: scaleX(var(--page-progress, 0)); pointer-events: none; }
.motion-enabled .page-progress { display: block; }

.story-section { padding: 90px 0 65px; background: #1d3729; color: #f2f5e9; }
.story-heading { position: relative; margin-bottom: 58px; }
.story-heading .eyebrow { color: #c7d8b0; }
.story-heading h2 { margin-top: 18px; font-size: clamp(36px, 4.5vw, 62px); font-weight: 400; letter-spacing: -2.5px; }
.story-heading-arrow { position: absolute; right: 5px; bottom: 7px; color: #d6ed9b; font-size: 60px; font-weight: 300; }
.story-chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; }
.story-chapter { min-width: 0; }
.chapter-label { display: flex; align-items: center; gap: 12px; color: #c7d8b0; font-size: 10px; font-weight: 500; line-height: 1.8; letter-spacing: 1.4px; }
.story-chapter h3 { margin-top: 22px; font-size: clamp(32px, 3.1vw, 43px); font-weight: 400; line-height: 1.12; letter-spacing: -1.7px; }
.chapter-description { max-width: 390px; margin-top: 22px; color: #c5d1bd; font-size: 16px; line-height: 1.85; }
.chapter-link { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; margin-top: 23px; border-bottom: 1px solid #8a9b76; color: #e2efc5; font-size: 14px; font-weight: 500; }
.chapter-link:hover { color: white; border-bottom-color: white; }
.chapter-preview { display: grid; place-items: center; margin: 35px 0 0; padding: 25px 10px; border-radius: 22px; background: #edeaf3; }
.story-chapter[data-chapter="1"] .chapter-preview { background: #f4e3d6; }
.story-chapter[data-chapter="2"] .chapter-preview { background: #e3edcb; }
.story-device { position: relative; width: 150px; aspect-ratio: 9 / 19.5; padding: 5px; border: 2px solid #617466; border-radius: 25px; background: #15251b; box-shadow: 0 24px 35px -22px #0c211b80; overflow: hidden; }
.story-device::after { content: ""; position: absolute; top: 9px; left: 50%; width: 28%; height: 10px; border-radius: 12px; background: #15251b; transform: translateX(-50%); }
.story-device img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 18px; }
.story-visual { display: none; }
.story-section :focus-visible { outline-color: var(--lime); }

/* The sticky scene is an enhancement for viewports with room for it. */
.story-enhanced .story-layout { display: grid; grid-template-columns: 1fr 1.08fr; align-items: start; gap: 70px; }
.story-enhanced .story-chapters { display: block; grid-area: 1 / 1; }
.story-enhanced .story-chapter { display: flex; align-items: center; min-height: 74svh; padding-block: 65px; }
.story-enhanced .story-chapter h3 { font-size: clamp(44px, 5.4vw, 68px); letter-spacing: -2.8px; }
.story-enhanced .chapter-description { font-size: 17px; }
.story-enhanced .chapter-preview { display: none; }
.story-enhanced .story-visual { display: block; grid-area: 1 / 2; position: sticky; top: max(125px, calc((100svh - 560px) / 2 + 30px)); height: min(590px, calc(100svh - 180px)); min-height: 390px; border-radius: 30px; background: #edeaf3; overflow: hidden; isolation: isolate; transition: background-color .7s ease; }
.story-visual[data-active="1"] { background: #f4e3d6; }
.story-visual[data-active="2"] { background: #e3edcb; }
.stage-orbit { position: absolute; left: 8%; top: 16%; width: 84%; height: 68%; border: 1px solid #8791794d; border-radius: 50%; }
.stage-orbit-two { transform: rotate(-33deg); width: 105%; height: 39%; left: -2%; top: 30%; }
.story-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink); opacity: 0; translate: 0 24px; transition: opacity .5s ease, translate .7s cubic-bezier(.22,1,.36,1); pointer-events: none; }
.story-scene.is-active { opacity: 1; translate: 0 0; }
.story-scene .story-device { width: auto; height: 73%; max-height: 440px; border-radius: 33px; padding: 7px; transform: translateY(calc(var(--chapter-progress, 0) * -20px)) rotate(calc(-5deg + var(--chapter-progress, 0) * 9deg)); will-change: transform; }
.story-scene .story-device img { border-radius: 24px; }
.story-scene .story-device::after { top: 13px; height: 12px; }
.scene-badge { position: absolute; width: 70px; height: 70px; right: 10%; top: 20%; border-radius: 18px; box-shadow: 0 14px 22px -12px #20322450; transform: translateY(calc(var(--chapter-progress, 0) * 27px)) rotate(12deg); }
.story-rail { position: absolute; right: 25px; bottom: 31px; display: flex; gap: 5px; }
.story-rail > span { position: relative; width: 24px; height: 3px; border-radius: 5px; background: #8a987466; overflow: hidden; }
.story-rail > span::after { content: ""; position: absolute; inset: 0; background: var(--pine); transform: scaleX(var(--scene-fill, 0)); transform-origin: left; }

@media (prefers-reduced-motion: no-preference) {
  .motion-enabled .hero-art { transform: perspective(1100px) rotateX(var(--hero-rx, 0deg)) rotateY(var(--hero-ry, 0deg)); translate: 0 calc(var(--hero-scroll, 0) * -16px); transition: transform .5s ease-out; }
  .motion-enabled .brand-gear { animation: gear-spin var(--gear-duration, 20s) linear infinite; }
  .motion-enabled .studio-tile .brand-gear { animation-play-state: paused; }
  .motion-enabled .hero-in-view .studio-tile .brand-gear { animation-play-state: running; }
  .motion-enabled .orbit-icon { animation: icon-float var(--float-duration, 9s) ease-in-out infinite; animation-delay: var(--float-delay, 0s); animation-play-state: paused; }
  .motion-enabled .hero-in-view .orbit-icon { animation-play-state: running; }
  .motion-enabled .orbit-lines { animation: orbit-turn 36s ease-in-out infinite alternate; animation-play-state: paused; }
  .motion-enabled .hero-in-view .orbit-lines { animation-play-state: running; }
  .orbit-1 { --float-delay: -.8s; --float-duration: 8.4s; --float-x: -.45; }
  .orbit-2 { --float-delay: -2.7s; --float-duration: 9.7s; --float-x: .35; }
  .orbit-3 { --float-delay: -1.6s; --float-duration: 10.2s; --float-x: .3; }
  .orbit-4 { --float-delay: -4.2s; --float-duration: 8.9s; --float-x: -.3; }
  .orbit-5 { --float-delay: -3.4s; --float-duration: 9.4s; --float-x: -.4; }
  .orbit-6 { --float-delay: -1.1s; --float-duration: 10.6s; --float-x: .35; }
  .orbit-7 { --float-delay: -2.2s; --float-duration: 11.2s; --float-x: .15; --float-step: clamp(16px, 2vw, 28px); }
  .orbit-8 { --float-delay: -4.8s; --float-duration: 10.8s; --float-x: -.1; --float-step: clamp(12px, 1.6vw, 22px); }
  .motion-enabled .button { transition: background .2s, transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s; }
  .motion-enabled .button:hover { box-shadow: 0 10px 22px -13px #173c2999; }
  .motion-enabled .button:hover span, .motion-enabled .text-link:hover span { translate: 3px -2px; }
  .button span, .text-link span { transition: translate .25s; }
  .motion-suspended .orbit-icon, .motion-suspended .orbit-lines, .motion-suspended .brand-gear { animation-play-state: paused !important; }
  @supports (animation-timeline: scroll()) {
    .motion-enabled.native-scroll .page-progress { animation: page-read 1s linear both; animation-timeline: scroll(root block); }
    .motion-enabled.native-scroll .studio-illustration { animation: studio-turn 1s linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .motion-enabled.native-scroll .contact-flower { animation: contact-turn 1s linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
  @media (hover: hover) and (pointer: fine) {
    .motion-enabled .app-card { transform: perspective(1000px) rotateX(var(--card-rx, 0deg)) rotateY(var(--card-ry, 0deg)) translateY(var(--card-rise, 0px)); transition: transform .35s ease-out, border-color .2s, box-shadow .2s; }
    .motion-enabled .app-card:hover { --card-rise: -4px; }
    .motion-enabled .app-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(250px circle at var(--card-x, 50%) var(--card-y, 50%), #ffffff65, transparent 75%); opacity: 0; transition: opacity .3s; }
    .motion-enabled .app-card:hover::before { opacity: 1; }
    .motion-enabled .app-card > * { position: relative; }
  }
}

@keyframes icon-float {
  0%, 100% { translate: calc(var(--float-step) * var(--float-x) * -1) calc(var(--float-step) * .35); rotate: -2deg; }
  35% { translate: calc(var(--float-step) * var(--float-x)) calc(var(--float-step) * -1); rotate: 3deg; }
  70% { translate: calc(var(--float-step) * var(--float-x) * .35) calc(var(--float-step) * .45); rotate: -1deg; }
}
@keyframes gear-spin { to { rotate: var(--gear-turn, 1turn); } }
@keyframes orbit-turn { from { rotate: -5deg; } to { rotate: 16deg; } }
@keyframes page-read { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes studio-turn { from { rotate: -17deg; scale: .92; } to { rotate: 22deg; scale: 1.03; } }
@keyframes contact-turn { from { rotate: -12deg; } to { rotate: 35deg; } }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: .22s; }
::view-transition-new(root) { animation-duration: .32s; }
html:not(.motion-enabled)::view-transition-group(*), html:not(.motion-enabled)::view-transition-old(*), html:not(.motion-enabled)::view-transition-new(*) { animation: none; }

@media (max-width: 1100px) {
  .story-enhanced .story-layout { gap: 40px; }
  .story-chapters { gap: 25px; }
  .story-chapter h3 { font-size: 37px; }
  .chapter-description { font-size: 15px; }
}
@media (max-width: 900px) {
  .story-section { padding: 65px 0; }
  .story-chapters { display: block; }
  .story-chapter { display: grid; grid-template-columns: 1.2fr 1fr; gap: 38px; align-items: center; padding-block: 30px; }
  .story-chapter + .story-chapter { border-top: 1px solid #55704d; margin-top: 15px; }
  .chapter-preview { margin: 0; padding: 25px; }
  .story-device { width: 145px; }
  .chapter-description { font-size: 16px; }
  .story-heading { margin-bottom: 25px; }
}
@media (max-width: 640px) {
  .header-utilities { grid-area: 1 / 2; gap: 6px; }
  .header-utilities .language-switch { padding: 2px; }
  .motion-toggle { width: 33px; height: 36px; }
  .story-section { padding: 45px 0 36px; }
  .story-heading h2 { font-size: 35px; letter-spacing: -1.7px; }
  .story-heading-arrow { display: none; }
  .story-chapter { grid-template-columns: 1.05fr .95fr; gap: 18px; padding-block: 25px; }
  .story-chapter h3 { font-size: clamp(28px, 7.5vw, 39px); letter-spacing: -1.2px; margin-top: 16px; }
  .chapter-label { gap: 7px; font-size: 8px; letter-spacing: .6px; }
  .chapter-description { margin-top: 15px; font-size: 14px; line-height: 1.8; }
  .chapter-link { gap: 8px; font-size: 12px; margin-top: 13px; line-height: 1.6; }
  .chapter-link > span { font-size: 16px; }
  .chapter-preview { padding: 19px 9px; border-radius: 16px; }
  .story-device { width: 100%; max-width: 150px; padding: 4px; border-radius: 21px; }
  .story-device img { border-radius: 15px; }
  .story-device::after { top: 7px; height: 8px; }
}
@media (max-width: 360px) {
  .hero .eyebrow { letter-spacing: 1px; }
  .header-utilities { gap: 4px; }
  .header-utilities .language-switch a { min-width: 32px; }
  .story-chapter { gap: 12px; }
  .story-chapter h3 { font-size: 26px; }
  .chapter-description { font-size: 13px; }
  .chapter-label { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art, .orbit-icon, .orbit-lines, .studio-illustration, .contact-flower, .brand-gear { translate: none !important; rotate: none !important; scale: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
