/* A shared motion rhythm. Content stays visible without JavaScript. */
:root {
  --motion-quick: 160ms;
  --motion-control: 260ms;
  --motion-reveal: 640ms;
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-state: cubic-bezier(.2,.7,.2,1);
}
.site-header {
  transition: background var(--motion-control) var(--ease-state),
    color var(--motion-control) var(--ease-state),
    border-color var(--motion-control) var(--ease-state),
    border-radius var(--motion-control) var(--ease-state),
    box-shadow var(--motion-control) var(--ease-state);
}
.button,.header-cta,.hero-down,.guide-choices button,.day-example {
  transition: background-color var(--motion-quick) ease,
    color var(--motion-quick) ease, border-color var(--motion-quick) ease,
    transform var(--motion-control) var(--ease-out),
    box-shadow var(--motion-control) var(--ease-out);
}
.text-link>.icon,.hero-text-link>.icon,.button>.icon,.header-cta>.icon,
.day-example>.icon:last-child {
  transition: transform var(--motion-control) var(--ease-out);
}
.desktop-nav a,.footer-top nav a,.product-jump a,.feature-tabs button {
  transition: color var(--motion-quick) ease,
    border-color var(--motion-control) ease, background-color var(--motion-control) ease;
}
.feature-tabs button>.icon {
  transition: opacity var(--motion-control) ease, transform var(--motion-control) var(--ease-out);
  transform: translateX(-5px);
}
.feature-tabs button[aria-selected=true]>.icon { transform: translateX(0); }
.menu-toggle span {
  transition: transform var(--motion-control) var(--ease-state), top var(--motion-control) var(--ease-state);
}
.faq-list summary .icon { transition: transform var(--motion-control) var(--ease-state); }
.motion-height,.motion-menu { overflow: hidden; }
.site-header.is-menu-closing { background: #fff; color: var(--ink); border-radius: 28px; border-color: var(--line); }
.site-header.is-menu-closing .brand img { filter: none; }
.site-header.is-menu-closing .menu-toggle { border-color: var(--line); }

  html.motion-enabled .button:active,html.motion-enabled .header-cta:active,html.motion-enabled .guide-choices button:active { transform: scale(.98); transition-duration:90ms; }
  html.motion-enabled .hero-down:active { transform: scale(.94); transition-duration:90ms; }
  html.motion-enabled .text-link:active>.icon,html.motion-enabled .hero-text-link:active>.icon { transform: translateX(2px); }
  /* Native details retain keyboard behavior and immediate open/closed semantics. */
  @supports(interpolate-size:allow-keywords) and (transition-behavior:allow-discrete) {
    html.motion-enabled .faq-list details { interpolate-size: allow-keywords; }
    html.motion-enabled .faq-list details::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 280ms var(--ease-state), content-visibility 280ms;
      transition-behavior: allow-discrete;
    }
    html.motion-enabled .faq-list details[open]::details-content { block-size: auto; }
  }
  /* Scroll timelines follow the user's scroll, without a per-frame JS loop. */
  @supports(animation-timeline:scroll()) {
    html.motion-enabled.has-motion .site-header::after {
      content: '';
      position: absolute;
      left: 28px;
      right: 28px;
      bottom: -1px;
      height: 2px;
      border-radius: 2px;
      background: var(--brand);
      opacity: .7;
      pointer-events: none;
      transform-origin: left;
      animation: reading-progress linear both;
      animation-timeline: scroll(root block);
    }
  }
@media(hover:hover) and (pointer:fine) {
  html.motion-enabled .button:hover,html.motion-enabled .header-cta:hover { transform: translateY(-2px); box-shadow: 0 5px 15px #2a283010; }
  html.motion-enabled .button:active,html.motion-enabled .header-cta:active { transform: translateY(0) scale(.98); box-shadow: none; }
  html.motion-enabled .button:hover>.icon,html.motion-enabled .header-cta:hover>.icon,html.motion-enabled .hero-text-link:hover>.icon,
  html.motion-enabled .text-link:hover>.icon,html.motion-enabled .day-example:hover>.icon:last-child { transform: translateX(4px); }
  html.motion-enabled .hero-down:hover { transform: translateY(3px); background: #ffffff14; }
  html.motion-enabled .hero-down:active { transform: translateY(3px) scale(.94); }
  html.motion-enabled .guide-choices button:hover { transform: translateY(-2px); }
  html.motion-enabled .guide-choices button:active { transform: translateY(0) scale(.98); }
}
@media(min-width:801px) {
  @supports(animation-timeline:scroll()) {
    html.motion-enabled.has-motion .hero-photo img {
      animation: hero-depth linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px 100svh;
    }
  }
}
@keyframes reading-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hero-depth {
  from { transform: translateY(0) scale(1.05); }
  to { transform: translateY(18px) scale(1.05); }
}

/* Precise mouse feedback on wide screens; the controls keep their hit areas. */
.motion-nav-group::before,.motion-selection-group::before { content: none; }
@media(min-width:1051px) and (hover:hover) and (pointer:fine) {
  .has-desktop-motion .desktop-nav,
  .has-desktop-motion .feature-tabs,
  .has-desktop-motion .product-jump { position: relative; isolation: isolate; }
  .has-desktop-motion .product-jump { position: sticky; }
  .has-desktop-motion .motion-nav-group::before,
  .has-desktop-motion .motion-selection-group::before {
    content: '';
    display: block;
    position: absolute;
    inset: 0 auto auto 0;
    pointer-events: none;
    opacity: var(--marker-visible,0);
    transform: translate3d(var(--marker-x,0px),var(--marker-y,0px),0);
    transition: transform 360ms var(--ease-out), width 260ms var(--ease-out),
      height 260ms var(--ease-out), opacity 140ms ease;
  }
  .motion-nav-group::before {
    width: var(--marker-width,0px);
    height: 2px;
    border-radius: 2px;
    background: var(--brand-action);
  }
  .site-header.on-photo .motion-nav-group::before { background: #fff; }
  .motion-selection-group::before {
    width: var(--marker-width,0px);
    height: var(--marker-height,0px);
    z-index: -1;
    border-radius: 7px;
    background: #7c6ff20e;
    border-inline-start: 2px solid var(--brand);
  }
  .has-desktop-motion .feature-tabs button,
  .has-desktop-motion .product-jump a { padding-inline: 12px; }
  .has-desktop-motion .feature-tabs button:not([aria-selected=true]):hover,
  .has-desktop-motion .product-jump a:not([aria-current=true]):hover { background: #7c6ff207; }
  .has-desktop-motion .hero-photo img {
    translate: var(--hero-pointer-x,0px) var(--hero-pointer-y,0px);
    transition: translate 420ms var(--ease-out);
  }
  .has-desktop-motion :is(.button,.header-cta,.guide-choices button,[role=tab]) {
    position: relative;
    isolation: isolate;
    overflow: hidden;
  }
  .motion-ink {
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
    background: currentColor;
    z-index: -1;
  }
}
html.motion-reduced { scroll-behavior: auto; }
html.motion-reduced *,html.motion-reduced *::before,html.motion-reduced *::after,
html.motion-reduced *::details-content { animation: none!important; transition: none!important; }
html.motion-reduced :is(.button,.header-cta,.hero-down,.guide-choices button,.feature-tabs button>.icon,
  .text-link>.icon,.hero-text-link>.icon,.button>.icon,.header-cta>.icon,
  .day-example>.icon:last-child) { transform: none!important; }
@media print { .site-header::after { display: none; } }
