/*
 * Ultimate Dimension - base stylesheet.
 *
 * Body: .design-source/design.css shipped VERBATIM (global animations,
 * marquee, scroll-reveal, link underline, scroll-progress, keyframes).
 *
 * Minimal resets required by the build spec (box-sizing: border-box,
 * body margin 0, html scroll-behavior: smooth) are already present at the
 * top of design.css, so no extra reset block is prepended - shipping it
 * unchanged keeps it a true verbatim copy.
 */


  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; }
  /*
   * Mobile horizontal-overflow guard. `clip` (not `hidden`) so the document
   * root stays the scroll container: the sticky <header> and the .ud-progress
   * `animation-timeline: scroll(root)` both depend on that. `hidden` would
   * establish a scroll container/BFC and recompute overflow-y, breaking them.
   * background:var(--bg) paints the theme colour behind everything so any
   * residual sub-pixel gap shows the theme, never the white browser canvas /
   * the fixed grid overlay sliding into view.
   */
  html, body { overflow-x: clip; background: var(--bg); }
  ::selection { background: var(--accent, #9D5A39); color: var(--bg, #F6F4EF); }
  @keyframes ud-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  .ud-track { display: flex; width: max-content; animation: ud-marq 34s linear infinite; }
  .ud-marq:hover .ud-track { animation-play-state: paused; }
  [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
  .rv-in { opacity: 1 !important; transform: none !important; }
  .ud-link { position: relative; }
  .ud-link::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 0; background: var(--accent, #9D5A39); transition: width .35s cubic-bezier(.2,.7,.2,1); }
  .ud-link:hover::after { width: 100%; }
  @keyframes ud-word-up { from { opacity: 0; transform: translateY(0.85em) rotate(1.5deg); } to { opacity: 1; transform: none; } }
  @keyframes ud-float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-24px, 28px) scale(1.06); } }
  @keyframes ud-float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -26px) scale(1.08); } }
  @keyframes ud-mesh { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-30px, 24px) scale(1.12); } }
  @keyframes ud-scan { 0% { transform: translateY(-10vh); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(78vh); opacity: 0; } }
  @keyframes ud-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.55); opacity: .35; } }
  @keyframes ud-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes ud-spin { to { transform: rotate(360deg); } }
  .ud-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 9999; animation: ud-progress linear both; animation-timeline: scroll(root); }
  .ud-pulse { animation: ud-pulse 2.4s ease-in-out infinite; transform-origin: center; }
