/* Dells Websites motion layer (November 2026).
   Calm, river-like motion: things settle into place, nothing bounces.
   Uses the site's --ease-out / --ease-in-out tokens from style.css.
   Everything here sits behind prefers-reduced-motion: no-preference, and the
   global reduced-motion rule in style.css still switches all of it off.
   Hero text never starts at opacity 0 on the h1 itself, so it can't delay LCP. */

/* Hover-only affordances need a real pointer, or touch taps leave them stuck on. */
@media (hover: hover) and (pointer: fine) {
  .header nav a:not(.nav-contact) {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 7px;
    transition: color 160ms ease, text-decoration-color 160ms ease, text-underline-offset 200ms var(--ease-out);
  }
  .header nav a:not(.nav-contact):hover {
    text-decoration-color: currentColor;
    text-underline-offset: 4px;
  }
  .button span[aria-hidden], .nav-contact span[aria-hidden], .service-choice-more span[aria-hidden],
  .text-link span[aria-hidden], .read-link span[aria-hidden] {
    display: inline-block;
    transition: transform 200ms var(--ease-out);
  }
  .button:hover span[aria-hidden], .nav-contact:hover span[aria-hidden],
  .service-choice-link:hover .service-choice-more span[aria-hidden], .read-link:hover span[aria-hidden] {
    transform: translate(2px, -2px);
  }
  .text-link:hover span[aria-hidden] { transform: translateY(2px); }
}

/* Touch screens: no lift/zoom on the service cards (it sticks after a tap). */
@media (hover: none) {
  .service-choice-link:hover { transform: none; box-shadow: none; }
  .service-choice-link:hover .service-choice-art img { transform: none; }
}

/* Form feedback: the label picks up the focus colour with its field. */
.form-field label { transition: color 150ms ease; }
.contact .form-field:focus-within > label { color: #e4b986; }
#contact-title em { display: inline-block; }

.launch-arrow { transition: transform 200ms var(--ease-out); }

@media (prefers-reduced-motion: no-preference) {
  /* 1. First impression: the hero settles in once per page load (CSS, off the main thread). */
  .hero .eyebrow, .trade-copy .eyebrow, .blog-intro .eyebrow, .service-detail-hero .service-back {
    animation: dw-rise 600ms var(--ease-out) both;
  }
  .hero h1, .trade-copy h1, .blog-intro h1, .service-detail-hero h1 {
    animation: dw-lift 700ms var(--ease-out) 40ms both;
  }
  .hero h1 em, .trade-copy h1 em, .blog-intro h1 em, .service-detail-hero h1 em {
    display: inline-block;
    animation: dw-settle 700ms var(--ease-out) 260ms both;
  }
  .hero .intro, .hero .hero-description, .trade-copy .lead, .trade-copy .muted, .blog-intro .article-deck, .service-detail-lead {
    animation: dw-rise 600ms var(--ease-out) 160ms both;
  }
  .hero-actions, .service-detail-hero .button, .landing-proof-line, .trade-copy .hero-note {
    animation: dw-rise 600ms var(--ease-out) 240ms both;
  }
  .hero-image img, .trade-photo img, .service-detail-art img {
    animation: dw-zoom 1400ms var(--ease-out) both;
  }
  .hero-image figcaption, .trade-photo figcaption {
    animation: dw-fade 700ms ease 600ms both;
  }
  /* The rule under the hero draws left to right, like the river line under the logo. */
  .hero-bottom { position: relative; border-bottom-color: transparent; }
  .hero-bottom::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
    background: var(--line); transform-origin: left center;
    animation: dw-draw 1100ms var(--ease-in-out) 350ms both;
  }
  .hero-bottom > * { animation: dw-fade 600ms ease 700ms both; }

  /* 2. Scroll reveal: sections rise into place once as they arrive (motion.js adds data-reveal). */
  .has-motion [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
    transition-delay: calc(var(--reveal-i, 0) * 70ms);
  }
  .has-motion [data-reveal].is-in { opacity: 1; transform: none; }

  /* 3. Accordions open and close smoothly where the browser supports it. */
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    details::details-content {
      height: 0;
      overflow: clip;
      transition: height 260ms var(--ease-out), content-visibility 260ms allow-discrete;
    }
    details[open]::details-content { height: auto; }
  }
}

@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

@keyframes dw-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes dw-lift { from { transform: translateY(14px); } }
@keyframes dw-settle { from { opacity: 0; transform: translateY(.18em); filter: blur(3px); } }
@keyframes dw-zoom { from { transform: scale(1.06); } }
@keyframes dw-fade { from { opacity: 0; } }
@keyframes dw-draw { from { transform: scaleX(0); } }
