/* ============================================================
   shortenurl.id — MOTION LAYER (2026)
   Additive only. Original design stays 100% intact.
   ============================================================ */

/* ---- @property registrations for interpolable custom props ---- */
@property --grad-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@property --beam-x {
  syntax: "<percentage>";
  initial-value: 50%;
  inherits: false;
}
@property --beam-y {
  syntax: "<percentage>";
  initial-value: 50%;
  inherits: false;
}

/* =========================================================
   1. PRE-PAINT — kill FOUC during splash
   ========================================================= */
html.motion-booting body { opacity: 0; }
html.motion-ready body {
  opacity: 1;
  transition: opacity .5s ease;
}

/* =========================================================
   2. SPLASH — brand-mark draw-in
   ========================================================= */
.splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--canvas);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity .55s ease, transform .55s ease;
}
.splash.is-done {
  opacity: 0;
  transform: translateY(-2vh);
}
.splash.is-removed { display: none; }
.splash-mark {
  width: 56px;
  height: 56px;
  background: var(--ink);
  border-radius: 50%;
  position: relative;
  animation: splashScaleIn .55s cubic-bezier(.2,.9,.2,1.05) both;
}
.splash-mark::before,
.splash-mark::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--signal);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%) scale(0);
  animation: splashEyes .55s cubic-bezier(.2,.9,.2,1.05) .25s both;
}
.splash-mark::before { left: 8px; }
.splash-mark::after { right: 8px; border-color: var(--canvas); }
.splash-tagline {
  position: absolute;
  bottom: 38vh;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  animation: splashTag .6s ease .4s both;
}
.splash-tagline .scram { display: inline-block; min-width: 11ch; }
@keyframes splashScaleIn {
  from { transform: scale(.4) rotate(-25deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes splashEyes {
  to { transform: translateY(-50%) scale(1); }
}
@keyframes splashTag {
  from { opacity: 0; letter-spacing: 0.6em; }
  to   { opacity: 1; letter-spacing: 0.4em; }
}

/* =========================================================
   3. SCROLL PROGRESS bar — chartreuse top strip
   ========================================================= */
.scroll-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.scroll-rail::after {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--signal), #8fff52);
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll, 0));
  box-shadow: 0 0 18px rgba(212,255,58,.55);
}
@supports (animation-timeline: scroll()) {
  .scroll-rail::after {
    transform: scaleX(0);
    animation: scrollFill linear both;
    animation-timeline: scroll(root);
  }
  @keyframes scrollFill { to { transform: scaleX(1); } }
}

/* =========================================================
   4. AMBIENT chartreuse field — slow conic behind hero
   ========================================================= */
.ambient {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 120vh;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  filter: blur(60px);
  background:
    radial-gradient(40vw 40vw at 18% 22%, rgba(212,255,58,.35), transparent 60%),
    radial-gradient(34vw 34vw at 82% 10%, rgba(74,43,217,.18), transparent 65%),
    radial-gradient(30vw 30vw at 60% 70%, rgba(212,255,58,.18), transparent 60%);
  animation: ambientDrift 22s ease-in-out infinite alternate;
}
@keyframes ambientDrift {
  0%   { transform: translate3d(0,0,0) rotate(0deg); }
  50%  { transform: translate3d(-3%, 2%, 0) rotate(8deg); }
  100% { transform: translate3d(2%,-1%,0) rotate(-6deg); }
}
.hero { position: relative; isolation: isolate; }
.hero > *:not(.ambient) { position: relative; z-index: 1; }
.ambient { z-index: 0; }

/* =========================================================
   5. CUSTOM CURSOR — minimal disc + magnetic ring
   ========================================================= */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
  transition: opacity .25s ease;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--paper);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(251, 248, 241, .85);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  transition: width .18s ease, height .18s ease, opacity .25s ease, border-color .18s ease, background .18s ease;
}
html.cursor-active .cursor-dot,
html.cursor-active .cursor-ring { opacity: 1; }
html.cursor-active a,
html.cursor-active button,
html.cursor-active input,
html.cursor-active label,
html.cursor-active .opt-pill { cursor: none; }

html.cursor-hover .cursor-ring {
  width: 68px; height: 68px;
  background: rgba(212,255,58,.35);
  border-color: rgba(212,255,58,.9);
}
html.cursor-hover .cursor-dot { opacity: 0; }
html.cursor-press .cursor-ring { width: 28px; height: 28px; }

/* hide on touch */
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* =========================================================
   6. REVEAL — IntersectionObserver-driven
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-d, 0ms);
}
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(.96); }
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   7. HEADLINE — masked line reveal (per-line)
   ========================================================= */
.display-xl .ln,
.h2 .ln {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: inherit;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.display-xl .ln > span,
.h2 .ln > span {
  display: inline-block;
  transform: translateY(110%) rotate(6deg);
  transform-origin: 0 100%;
  opacity: 0;
  transition: transform 1s cubic-bezier(.2,.85,.18,1), opacity .9s ease;
  transition-delay: var(--ln-d, 0ms);
}
.lines-in .ln > span {
  transform: translateY(0) rotate(0);
  opacity: 1;
}

/* Hero accent underline draw-in */
.hero h1 .accent::after {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .9s cubic-bezier(.2,.85,.2,1) .5s;
}
.lines-in.hero h1 .accent::after { transform: scaleX(1); }

/* =========================================================
   8. MAGNETIC buttons (handled in JS via transform var)
   ========================================================= */
.btn[data-magnetic],
.opt-pill[data-magnetic],
a[data-magnetic] {
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .15s ease, color .15s ease, border-color .15s ease;
  will-change: transform;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    conic-gradient(from var(--grad-angle), var(--signal), #fff7a8, var(--signal-press), var(--signal));
  z-index: -1;
  opacity: 0;
  transition: opacity .25s ease;
  filter: blur(8px);
  animation: spinGrad 4s linear infinite;
}
.btn-primary:hover::before { opacity: .9; }
@keyframes spinGrad { to { --grad-angle: 360deg; } }

/* =========================================================
   9. BENTO TILT — feature cards & cases
   ========================================================= */
.feature,
.case,
.plan,
.tape,
.dash-card {
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
  will-change: transform;
}
.feature[data-tilt],
.case[data-tilt],
.plan[data-tilt] {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
}
.feature[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
              rgba(212,255,58,.18), transparent 65%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}
.feature[data-tilt]:hover::after { opacity: 1; }
.feature.dark[data-tilt]:hover { box-shadow: 0 30px 80px -30px rgba(212,255,58,.35); }

/* =========================================================
   10. CHART line draw-in (analytics)
   ========================================================= */
.dash-chart svg path[data-line] {
  stroke-dasharray: var(--len, 2000);
  stroke-dashoffset: var(--len, 2000);
  transition: stroke-dashoffset 2.2s cubic-bezier(.2,.8,.2,1);
}
.dash-chart.is-in svg path[data-line] {
  stroke-dashoffset: 0;
}
.dash-chart svg path[data-area] {
  opacity: 0;
  transition: opacity 1.4s ease .6s;
}
.dash-chart.is-in svg path[data-area] { opacity: 1; }
.dash-chart svg circle[data-dot] {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  transition: opacity .4s ease, transform .4s cubic-bezier(.2,1.5,.3,1);
}
.dash-chart.is-in svg circle[data-dot] {
  opacity: 1;
  transform: scale(1);
  transition-delay: calc(1.5s + var(--di, 0) * 60ms);
}

/* Bar staircase reveal for analytics feature */
.illus.analytics .bar {
  transform-origin: bottom;
  transform: scaleY(0);
}
.feature.span-3[data-reveal].is-in .illus.analytics .bar {
  animation: barRise .8s cubic-bezier(.2,.9,.2,1.05) both;
  animation-delay: calc(var(--bi, 0) * 50ms + 200ms);
}
@keyframes barRise {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* QR cells stagger reveal */
.illus.qr span {
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
}
.feature[data-reveal].is-in .illus.qr span {
  animation: qrPop .5s cubic-bezier(.2,1.5,.3,1) both;
  animation-delay: calc(var(--qi, 0) * 14ms + 250ms);
}
@keyframes qrPop {
  to { opacity: 1; transform: scale(1); }
}

/* =========================================================
   11. ODOMETER — stat number reveal
   ========================================================= */
.stat .num {
  display: inline-flex;
  align-items: baseline;
}
.stat .num [data-roll] {
  display: inline-block;
  white-space: pre;
  overflow: hidden;
  vertical-align: bottom;
}
.stat .num [data-roll] .digit {
  display: inline-block;
  position: relative;
  overflow: hidden;
  width: 1ch;
  height: 1em;
  vertical-align: bottom;
}
.stat .num [data-roll] .digit .col {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(0);
  transition: transform 1.4s cubic-bezier(.18,.85,.2,1);
  transition-delay: calc(var(--ci, 0) * 80ms);
}
.stat .num [data-roll] .digit .col span {
  display: block;
  height: 1em;
  line-height: 1;
}

/* =========================================================
   12. TICKER / MARQUEE — features carousel-like
   ========================================================= */
.ticker {
  margin-top: 32px;
  border-top: 1px dashed var(--hairline);
  border-bottom: 1px dashed var(--hairline);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: inline-flex;
  gap: 60px;
  white-space: nowrap;
  animation: tickerSlide 38s linear infinite;
  will-change: transform;
}
.ticker-track .dot {
  width: 6px; height: 6px;
  background: var(--signal);
  border-radius: 50%;
  display: inline-block;
  align-self: center;
}
@keyframes tickerSlide {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}

/* =========================================================
   13. PRESS RIPPLE on .btn
   ========================================================= */
.btn { position: relative; overflow: hidden; }
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: currentColor;
  opacity: .18;
  pointer-events: none;
  animation: ripple .6s ease-out forwards;
}
@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* =========================================================
   14. FAQ smoothed open
   ========================================================= */
.faq-item .faq-a {
  transition: max-height .55s cubic-bezier(.2,.85,.2,1), margin-top .35s ease, opacity .35s ease;
  opacity: .5;
}
.faq-item.is-open .faq-a { opacity: 1; }
.faq-item .faq-q { transition: color .25s ease, padding-left .35s cubic-bezier(.2,.85,.2,1); }
.faq-item.is-open .faq-q { padding-left: 10px; }
.faq-item.is-open .faq-q::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 4px;
  height: 60%;
  background: var(--signal);
  transform: translateY(-50%);
  border-radius: 4px;
  animation: faqBar .35s cubic-bezier(.2,.85,.2,1) both;
}
.faq-q { position: relative; }
@keyframes faqBar { from { height: 0; opacity: 0; } }

/* =========================================================
   15. RESULT card — stamp entrance
   ========================================================= */
.result {
  animation: stampIn .6s cubic-bezier(.2,1.4,.3,1) both !important;
}
@keyframes stampIn {
  0%   { opacity: 0; transform: translateY(18px) scale(.96) rotate(-1.4deg); }
  60%  { transform: translateY(0) scale(1.01) rotate(.4deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
.result .short-url .slug {
  display: inline-block;
  position: relative;
}
.result .short-url .slug::after {
  content: "";
  position: absolute;
  inset: -2px -4px;
  border: 1px dashed var(--signal);
  border-radius: 4px;
  animation: slugFlash .9s ease both;
  opacity: 0;
}
@keyframes slugFlash {
  0% { opacity: 1; transform: scale(.9); }
  100% { opacity: 0; transform: scale(1.18); }
}

/* Confetti burst on copy */
.copy-burst {
  position: fixed;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--signal);
  pointer-events: none;
  z-index: 200;
  animation: confetti .9s cubic-bezier(.15,.9,.4,1) forwards;
}
@keyframes confetti {
  0%   { transform: translate3d(var(--x0,0),var(--y0,0),0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--x1,0),var(--y1,0),0) rotate(var(--r,180deg)); opacity: 0; }
}

/* =========================================================
   16. ICON-BTN copy success pulse
   ========================================================= */
.icon-btn.copied {
  animation: copyPulse .55s cubic-bezier(.2,1.5,.3,1) both;
}
@keyframes copyPulse {
  0%   { transform: scale(.9); }
  50%  { transform: scale(1.12); box-shadow: 0 0 0 14px rgba(212,255,58,0); }
  100% { transform: scale(1);  box-shadow: 0 0 0 0 rgba(212,255,58,.0); }
}

/* =========================================================
   17. NAV — hide on scroll-down, show on scroll-up + bg solidify
   ========================================================= */
.nav-rail {
  transition: transform .35s cubic-bezier(.2,.85,.2,1), background .35s ease, border-color .35s ease;
}
html.scroll-down .nav-rail { transform: translateY(-100%); }
html.scrolled .nav-rail {
  background: rgba(244, 239, 228, 0.92);
  border-bottom-color: var(--hairline);
}

/* underline grow on nav links */
.nav-links a {
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .3s cubic-bezier(.2,.85,.2,1);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* =========================================================
   18. SCROLL-DRIVEN — section pin & feature lift (new APIs)
   ========================================================= */
@supports (animation-timeline: view()) {
  .feature {
    animation: featureLift linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
  @keyframes featureLift {
    from { transform: translateY(40px); opacity: .0; }
    to   { transform: translateY(0); opacity: 1; }
  }

  .giant-mark {
    animation: giantSlide linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes giantSlide {
    from { transform: translateX(-8%); }
    to   { transform: translateX(8%); }
  }

  .case {
    animation: caseFloat linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
  }
  @keyframes caseFloat {
    from { transform: translateY(28px) scale(.97); opacity: .0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
  }
}

/* =========================================================
   19. CTA BAND — arrow spin on hover
   ========================================================= */
.cta-band::before {
  transition: transform .9s cubic-bezier(.2,.85,.2,1), color .3s ease;
}
.cta-band:hover::before {
  transform: rotate(20deg) scale(1.05);
  color: rgba(14,20,16,.13);
}

/* =========================================================
   20. FOOTER giant-mark — variable glow + parallax
   ========================================================= */
.giant-mark {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(212,255,58,.04));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  transition: filter .4s ease;
}
.footer:hover .giant-mark { filter: drop-shadow(0 0 28px rgba(212,255,58,.18)); }

/* =========================================================
   21. PRICING toggle — slide thumb
   ========================================================= */
.pricing-toggle {
  position: relative;
  isolation: isolate;
}
.pricing-toggle::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  background: var(--ink);
  border-radius: 999px;
  z-index: -1;
  transition: transform .45s cubic-bezier(.2,.85,.2,1), width .45s cubic-bezier(.2,.85,.2,1);
}
.pricing-toggle.annual::before {
  transform: translateX(100%);
  width: calc(50% - 4px);
}
.pricing-toggle button.is-active { background: transparent; }
.pricing-toggle button { transition: color .3s ease; position: relative; z-index: 1; }

/* =========================================================
   22. TAPE-row entry — slide + sheen sweep
   ========================================================= */
.tape-row { position: relative; overflow: hidden; }
.tape-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212,255,58,.35), transparent);
  transform: translateX(-100%);
  animation: tapeSheen 1.1s ease both;
  pointer-events: none;
}
@keyframes tapeSheen {
  to { transform: translateX(100%); }
}

/* =========================================================
   23. SECTION DIVIDER stroke draw-in
   ========================================================= */
.step {
  background-image: linear-gradient(90deg, var(--ink) 0, var(--ink) 100%);
  background-position: 0 0;
  background-size: 0% 1px;
  background-repeat: no-repeat;
  border-top-color: transparent;
  transition: background-size 1.4s cubic-bezier(.2,.85,.2,1);
}
.step.is-in { background-size: 100% 1px; }

/* =========================================================
   24. REDUCED MOTION KILL-SWITCH
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .ambient { display: none; }
  .splash { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .display-xl .ln > span, .h2 .ln > span { opacity: 1; transform: none; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* =========================================================
   25. VIEW TRANSITIONS (browsers that support)
   ========================================================= */
@supports (view-transition-name: x) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: .42s;
    animation-timing-function: cubic-bezier(.2,.85,.2,1);
  }
  ::view-transition-old(root) {
    animation-name: vtOut;
  }
  ::view-transition-new(root) {
    animation-name: vtIn;
  }
  @keyframes vtOut { to { opacity: 0; transform: scale(.985); } }
  @keyframes vtIn  { from { opacity: 0; transform: scale(1.015); } }
}
