/*
 * TùmLum. One loud thing (the hero headline and its tossed platform
 * stickers); everything else stays plain and quiet.
 */
:root {
    --ink: #1b1a3a;
    --muted: #57577a;
    --line: #dcdff0;
    --bg: #ffffff;
    --wash: #eef1ff;
    --cobalt: #2f3bd6;
    --cobalt-dark: #2129a8;
    --mango: #ffc93c;
    --pink: #ff5c8a;
    --mint: #19b98a;
    --danger: #c42847;
    --radius: 12px;
    --font: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
}

a { color: var(--cobalt); }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 720px; }

/* Header */
.site-header { background: var(--wash); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; border: 2px solid transparent; border-radius: 0; transition: background .3s ease, border-color .3s ease, border-radius .3s ease, box-shadow .3s ease, margin .3s ease, min-height .3s ease, width .3s ease; }
/* Scrolled: the header floats as a pill. */
.site-header { transition: background .3s ease; }
.site-header.is-pill { background: transparent; }
.site-header.is-pill .header-row { width: min(1048px, calc(100% - 20px)); margin-top: 6px; min-height: 52px; padding: 0 10px 0 16px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand .logo { flex: none; }
.wordmark { letter-spacing: -.045em; }
.wordmark .wm-l { display: inline-block; }
.wordmark .wm-tld { color: var(--cobalt); }
.site-footer .wordmark .wm-tld { color: var(--mango); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav > a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav > a:hover, .site-nav > a.active { color: var(--cobalt); }
.site-nav > a.active { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--mango); }
.nav-more { position: relative; }
.nav-more summary { list-style: none; cursor: pointer; font-weight: 500; color: var(--ink); }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); }
.nav-more[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.nav-more[data-active] summary, .nav-more summary:hover { color: var(--cobalt); }
.nav-more-menu { position: absolute; right: 0; top: calc(100% + 12px); min-width: 220px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--ink); padding: 6px; display: flex; flex-direction: column; z-index: 20; }
.nav-more-menu a, .nav-soon { padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav-more-menu a:hover, .nav-more-menu a.active { background: var(--wash); color: var(--cobalt); }
.nav-soon { color: var(--muted); }
.nav-soon small { font-size: 11px; font-weight: 700; color: var(--pink); }
.lang-switch { display: inline-flex; gap: 2px; border: 2px solid var(--ink); border-radius: 999px; padding: 2px; }
.lang-switch a { padding: 1px 10px; border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; }
.lang-switch a.active { background: var(--ink); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 3px; margin: 4px 0; background: var(--ink); border-radius: 2px; }

@media (max-width: 760px) {
    .menu-toggle { display: block; }
    .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; border-bottom: 2px solid var(--ink); }
    .site-header.is-pill .site-nav { top: 66px; left: 10px; right: 10px; border: 2px solid var(--ink); border-radius: 22px; overflow: hidden; box-shadow: 4px 4px 0 var(--ink); }
    .site-nav.open { display: flex; }
    .site-nav > a { padding: 14px 16px; border-top: 1px solid var(--line); }
    .lang-switch { margin: 12px 16px; align-self: flex-start; }
    .nav-more summary { padding: 14px 16px; border-top: 1px solid var(--line); }
    .nav-more-menu { position: static; border: 0; box-shadow: none; padding: 0 8px 8px; min-width: 0; }
}

/* Hero */
.hero { background: var(--wash); padding: 28px 0 40px; }
.hero-title { font-size: clamp(30px, 6vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; margin: 0 0 10px; }
.hero-title-home { font-size: clamp(52px, 14vw, 104px); line-height: .95; letter-spacing: -.045em; margin-bottom: 16px; }
.lead { color: var(--muted); margin: 0 0 8px; max-width: 34em; font-size: 17px; }

/* Stickers: tossed at angles; the detected platform straightens up. */
.stickers { list-style: none; margin: 18px 0 0; padding: 0 4px; display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: 12px; }
.sticker {
    --tilt: -5deg;
    --lift: 0px;
    --shade: var(--cobalt);
    display: inline-block;
    margin: 0 -2px 0 0;
    padding: 5px 14px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 3px 3px 0 var(--shade);
    transform: translateY(var(--lift)) rotate(var(--tilt));
    transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s, color .2s, opacity .2s, box-shadow .2s;
    position: relative;
}
.stickers .sticker:nth-child(1) { --tilt: -7deg; --lift: 6px; z-index: 2; }
.stickers .sticker:nth-child(2) { --tilt: 5deg; --lift: -2px; z-index: 1; }
.stickers .sticker:nth-child(3) { --tilt: -3deg; --lift: 8px; z-index: 3; }
.stickers .sticker:nth-child(4) { --tilt: 8deg; --lift: 2px; }
.sticker-facebook { --shade: var(--cobalt); }
.sticker-tiktok { --shade: var(--pink); }
.sticker-x { --shade: var(--ink); }
.sticker-pinterest { --shade: var(--mango); }
.stickers .sticker-soon { --tilt: -4deg; --lift: 4px; color: var(--muted); background: transparent; border-style: dashed; border-color: var(--muted); box-shadow: none; font-weight: 500; }
.stickers .sticker-soon + .sticker-soon { --tilt: 6deg; --lift: 0px; }
.sticker-soon small { font-size: 11px; font-weight: 700; text-transform: lowercase; color: var(--pink); }
.dl-form[data-soon-hit] .sticker:not([data-soon-hit]) { opacity: .4; }
.stickers .sticker-soon[data-soon-hit] { --tilt: 0deg; --lift: -6px; opacity: 1; color: var(--ink); border-color: var(--pink); }

.dl-form[data-platform] .sticker { opacity: .4; }
.sticker[data-active], .dl-form[data-platform] .sticker[data-active] {
    --tilt: 0deg;
    --lift: -6px;
    opacity: 1;
    background: var(--ink);
    color: #fff;
    z-index: 4;
}

/* Form */
.dl-form { margin-top: 6px; }
.input-wrap { position: relative; margin-top: 12px; }
.input-wrap input {
    width: 100%;
    font: inherit;
    font-size: 17px;
    padding: 17px 108px 17px 18px;
    color: var(--ink);
    border: 3px solid var(--ink);
    border-radius: 16px;
    outline: none;
    background: #fff;
    box-shadow: 5px 5px 0 var(--cobalt);
}
.input-wrap input:focus { box-shadow: 5px 5px 0 var(--mango); }
.input-wrap input[aria-invalid="true"] { box-shadow: 5px 5px 0 var(--danger); }
.input-action {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    height: 42px; min-width: 42px; padding: 0 10px; border: 0; border-radius: 10px;
    background: var(--wash); color: var(--ink); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font: inherit; font-size: 14px; font-weight: 700;
}
.input-action:hover { background: var(--line); }
.input-action[hidden] { display: none; }
.detected { min-height: 1.6em; margin: 10px 0 0; font-size: 14px; font-weight: 700; color: var(--cobalt); }
.form-error { color: var(--danger); margin: 4px 0 0; font-size: 15px; font-weight: 500; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 700; border: 0; border-radius: var(--radius);
    padding: 12px 22px; cursor: pointer; text-decoration: none; line-height: 1.2;
    transition: background .15s ease, transform .12s ease, box-shadow .12s ease;
}
.btn:active:not([disabled]) { transform: translateY(2px); }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-block { display: flex; width: 100%; margin-top: 10px; padding: 17px; font-size: 19px; border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.btn-block:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 15px; min-width: 110px; white-space: nowrap; }
.btn[disabled] { opacity: .75; cursor: progress; }
.btn.is-loading .btn-text::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sections */
.section { padding: 40px 0; }
.section-alt { background: var(--wash); }
.intro p { margin: 0 0 14px; max-width: 38em; }
.more-tools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.more-tools a { display: inline-block; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; }
.more-tools a:hover { background: var(--ink); color: #fff; }
.section-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 20px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; align-items: center; gap: 16px; }
.steps p { margin: 0; }
.step-num { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--ink); background: var(--mango); border: 2px solid var(--ink); }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; margin: 0; }
.feature dt { font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.feature dd { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; gap: 18px; } }

.faq details { border-bottom: 2px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -3px; font-size: 24px; font-weight: 500; color: var(--cobalt); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Result */
.result { padding-top: 20px; padding-bottom: 36px; }
.media-card { display: flex; gap: 16px; align-items: center; margin: 16px 0 20px; }
.media-thumb { width: 128px; height: 128px; object-fit: cover; border-radius: var(--radius); border: 2px solid var(--ink); background: var(--wash); flex: none; }
.media-meta .sticker { margin: 0 0 8px; font-size: 13px; padding: 3px 12px; }
.media-title { font-size: 19px; margin: 0; line-height: 1.35; word-break: break-word; }
.media-duration { color: var(--muted); margin: 4px 0 0; }

.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: #fff; }
.tabs::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 50%; background: var(--ink); transition: translate .4s cubic-bezier(.3, 1.4, .5, 1); }
.tabs[data-tab="tab-audio"]::before { translate: 100% 0; }
.tab { position: relative; font: inherit; font-size: 19px; font-weight: 800; padding: 13px; border: 0; background: transparent; color: var(--ink); cursor: pointer; transition: color .25s ease; }
.tab.active { color: #fff; }

.tab-panel { border: 2px solid var(--ink); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.tab-panel > .note { padding: 16px; margin: 0; }
.formats { width: 100%; border-collapse: collapse; background: #fff; }
.formats th, .formats td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.formats tr:last-child td { border-bottom: 0; }
.formats th { font-size: 15px; color: var(--muted); font-weight: 700; }
.formats sup { color: var(--pink); }
.formats td.q { font-weight: 800; font-size: 17px; }

.progress { position: relative; height: 36px; min-width: 110px; border-radius: 10px; background: var(--wash); overflow: hidden; display: inline-block; vertical-align: middle; }
.progress-bar { position: absolute; inset: 0 auto 0 0; background: var(--mint); transition: width .4s ease; }
.progress-text { position: relative; line-height: 36px; padding: 0 10px; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }

.result .btn-block { margin-top: 18px; }
.note { color: var(--muted); font-size: 15px; }
.note-box { background: var(--wash); padding: 14px 16px; border-radius: var(--radius); margin-top: 16px; }

/* Ads: reserve height to avoid layout shift */
.ad { margin: 24px auto; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: 12px; color: #8a8aa6; margin-bottom: 4px; }
.ad-placeholder { display: grid; place-items: center; min-height: 250px; border: 2px dashed #c4c8e0; border-radius: var(--radius); color: #8a8aa6; font-size: 14px; }

/* Static pages */
.prose { padding-top: 28px; padding-bottom: 40px; }
.prose h1 { font-size: 34px; letter-spacing: -.02em; line-height: 1.15; }
.prose h2 { font-size: 20px; margin-top: 28px; }

/* Footer */
.site-footer { background: var(--ink); color: #c9cae6; padding: 36px 0 20px; margin-top: 32px; font-size: 15px; }
.footer-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px 48px; }
.site-footer .brand { color: #fff; font-size: 19px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; align-content: start; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.disclaimer { font-size: 13px; max-width: 32em; margin: 12px 0 0; }
.copy { font-size: 13px; margin-top: 24px; }
@media (max-width: 700px) { .footer-row { grid-template-columns: 1fr; } }

@media (max-width: 480px) {
    .media-thumb { width: 92px; height: 92px; }
    .formats td.q { font-size: 15px; }
    .btn-sm { min-width: 92px; padding: 9px 12px; }
    .input-action span { display: none; }
    .stickers { padding: 0; }
    .sticker { font-size: 13px; padding: 4px 10px; }
    .input-wrap input { padding-right: 60px; }
}

@media (prefers-reduced-motion: reduce) {
    .sticker, .btn, .progress-bar { transition: none; }
}

/* Bulk page */
.bulk-form textarea { width: 100%; margin-top: 18px; padding: 14px 16px; font: inherit; font-size: 15px; line-height: 1.7; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--cobalt); resize: vertical; background: #fff; color: var(--ink); }
.bulk-form .btn-block { margin-top: 16px; }
.bulk-results { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bulk-item { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.bulk-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-meta { grid-column: 1; color: var(--muted); font-size: 14px; }
.bulk-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; }
.bulk-item.is-loading { opacity: .6; }
.bulk-item.is-failed { border-color: var(--danger); }
.bulk-item.is-failed .bulk-meta { color: var(--danger); }
@media (max-width: 560px) {
    .bulk-item { grid-template-columns: minmax(0, 1fr); }
    .bulk-actions { grid-column: 1; grid-row: auto; }
}

/*
 * Motion. One entrance (the platform stickers get tossed onto the page and
 * land at their tilt, the logo's accent drops onto its "u"); everything else
 * answers something the visitor did. Individual `scale` / `rotate` / `translate`
 * properties are used so they stack on top of each sticker's own transform.
 */
.stickers .sticker { animation: toss .75s cubic-bezier(.2, .9, .3, 1.25) backwards; animation-delay: calc(var(--i, 0) * 70ms + 120ms); }
.stickers .sticker:nth-child(2) { --i: 1; }
.stickers .sticker:nth-child(3) { --i: 2; }
.stickers .sticker:nth-child(4) { --i: 3; }
.stickers .sticker:nth-child(5) { --i: 4; }
.stickers .sticker:nth-child(6) { --i: 5; }
.stickers .sticker:nth-child(7) { --i: 6; }
@keyframes toss {
    0% { opacity: 0; transform: translateY(-80px) rotate(calc(var(--tilt) * -5)); }
    55% { opacity: 1; transform: translateY(calc(var(--lift) + 8px)) rotate(calc(var(--tilt) * 1.6)); }
    100% { transform: translateY(var(--lift)) rotate(var(--tilt)); }
}
/* The sticker that matches a pasted link pops; hovering one wiggles it. */
.sticker.pop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { scale: 1; } 40% { scale: 1.2; } 100% { scale: 1; } }
@media (hover: hover) {
    .stickers .sticker:hover { animation: wiggle .45s ease; }
}
@keyframes wiggle { 25% { rotate: -5deg; } 60% { rotate: 4deg; } 100% { rotate: 0deg; } }

.logo-accent { transform-box: fill-box; transform-origin: center; animation: accent-drop .7s .25s cubic-bezier(.3, 1.6, .5, 1) backwards; }
@keyframes accent-drop { from { opacity: 0; translate: 0 -10px; rotate: -70deg; } }
@media (hover: hover) {
    .brand:hover .logo-accent { animation: wiggle .5s ease; }
}

/* Pasted text lands with a small bump; a rejected link shakes the box. */
.input-wrap input.pasted { animation: bump .35s ease; }
@keyframes bump { 40% { scale: 1.02; } }
.input-wrap input[aria-invalid="true"], .bulk-form textarea.shake { animation: shake .4s ease; }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.form-error { animation: rise .3s ease; }

/* Results appear one after another. */
.formats tbody tr, .bulk-item { animation: rise .35s ease backwards; }
.formats tbody tr:nth-child(2) { animation-delay: 50ms; }
.formats tbody tr:nth-child(3) { animation-delay: 100ms; }
.formats tbody tr:nth-child(4) { animation-delay: 150ms; }
.formats tbody tr:nth-child(n+5) { animation-delay: 200ms; }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }

/* A merge/MP3 in progress keeps moving even between progress updates. */
.progress-bar { background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.22) 0 10px, transparent 10px 20px); background-size: 28px 28px; animation: stripes .8s linear infinite; }
@keyframes stripes { to { background-position: 28px 0; } }

/* The "More tools" menu drops open. */
.nav-more[open] .nav-more-menu { animation: rise .2s ease; }


/* ---- More motion ---- */

/* Headline words jump in one by one. */
.hero-title .word { display: inline-block; animation: word-in .6s cubic-bezier(.2, .9, .3, 1.3) backwards; animation-delay: calc(var(--w, 0) * 90ms); }
@keyframes word-in { from { opacity: 0; translate: 0 .5em; rotate: 8deg; } }

/* Floating stickers behind the hero. */
.hero { position: relative; overflow: hidden; }
.hero > .container { position: relative; z-index: 1; }
.floaters { position: absolute; inset: 0; pointer-events: none; }
.floater { position: absolute; display: block; width: 46px; height: 20px; border: 2px solid var(--ink); border-radius: 999px; opacity: .9; animation: drift 9s ease-in-out infinite alternate; }
.floater-1 { left: 4%; top: 18%; background: var(--mango); rotate: -18deg; }
.floater-2 { left: 9%; top: 68%; width: 28px; height: 28px; background: var(--pink); animation-duration: 7s; animation-delay: -2s; }
.floater-3 { right: 6%; top: 14%; width: 60px; background: #fff; rotate: 14deg; animation-duration: 11s; }
.floater-4 { right: 10%; top: 62%; background: var(--cobalt); rotate: -8deg; animation-duration: 8s; animation-delay: -4s; }
.floater-5 { left: 16%; top: 40%; width: 16px; height: 16px; background: var(--mint); animation-duration: 6s; animation-delay: -1s; }
.floater-6 { right: 18%; top: 36%; width: 22px; height: 22px; background: var(--mango); border-radius: 6px; rotate: 20deg; animation-duration: 10s; animation-delay: -6s; }
.floater-7 { left: 46%; top: 6%; width: 34px; height: 14px; background: var(--pink); rotate: 30deg; animation-duration: 12s; animation-delay: -3s; }
@keyframes drift {
    0% { translate: 0 0; }
    50% { translate: 14px -22px; }
    100% { translate: -10px 12px; }
}
/* No room beside the text on small screens. */
@media (max-width: 1000px) { .floaters { display: none; } }

/* The pre-selected / detected sticker bobs while it waits. */
.stickers .sticker[data-active] { animation: toss .75s cubic-bezier(.2, .9, .3, 1.25) backwards, bob 2.6s 1.3s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 70ms + 120ms), 1.3s; }
@keyframes bob { 50% { translate: 0 -4px; } }

/* The Paste button calls for attention while the box is empty. */
.input-action[data-paste]:not([hidden]) { animation: nudge 3.2s 2s ease-in-out infinite; }
@keyframes nudge {
    0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(47, 59, 214, 0); }
    80% { box-shadow: 0 0 0 6px rgba(47, 59, 214, .25); scale: 1.06; }
    90% { scale: 1; }
}

/* The logo's accent fidgets now and then. */
.logo-accent { animation: accent-drop .7s .25s cubic-bezier(.3, 1.6, .5, 1) backwards, fidget 7s 4s ease-in-out infinite; }
@keyframes fidget { 0%, 88%, 100% { rotate: 0deg; translate: 0 0; } 91% { rotate: -25deg; translate: 0 -2px; } 95% { rotate: 15deg; } }

/* Ticker band. */
.ticker { overflow: hidden; background: var(--ink); border-block: 2px solid var(--ink); padding: 10px 0; }
.ticker-track { display: flex; gap: 14px; width: max-content; animation: ticker 32s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { flex: none; padding: 4px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; font-size: 15px; white-space: nowrap; rotate: -2deg; }
.ticker-alt { background: var(--mango); rotate: 2deg; }
.ticker-hot { background: var(--pink); color: #fff; }
@keyframes ticker { to { translate: -50% 0; } }

/* Scroll reveal (app.js marks elements below the fold). */
.reveal { opacity: 0; translate: 0 26px; transition: opacity .55s ease, translate .55s cubic-bezier(.2, .9, .3, 1.2); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; translate: 0 0; }
.steps li.in .step-num { animation: num-pop .6s var(--d, 0ms) cubic-bezier(.3, 1.6, .5, 1) backwards; }
@keyframes num-pop { from { scale: .2; rotate: -180deg; } }

/* Little lifts on hover. */
@media (hover: hover) {
    .feature { transition: translate .2s ease, rotate .2s ease; }
    .feature:hover { translate: 0 -4px; rotate: -1deg; }
    .more-tools a:hover { animation: wiggle .45s ease; }
    .step-num { transition: rotate .3s ease, scale .3s ease; }
    .steps li:hover .step-num { rotate: 20deg; scale: 1.12; }
    .site-nav > a { transition: translate .15s ease; }
    .site-nav > a:hover { translate: 0 -2px; }
}

/* FAQ answers slide open. */
.faq details[open] p { animation: rise .3s ease; }
.faq summary::after { transition: rotate .25s ease; }
.faq details[open] summary::after { rotate: 180deg; }

/* Confetti (app.js). */
.confetti { position: fixed; z-index: 100; width: 10px; height: 6px; border-radius: 3px; pointer-events: none; }

/* Result page: the thumbnail swings into place. */
.media-thumb, .result img { animation: swing-in .7s cubic-bezier(.2, .9, .3, 1.25) backwards; }
@keyframes swing-in { from { opacity: 0; rotate: -8deg; scale: .85; } }


/* ---- Round three ---- */

/* Logo letters do a wave when you point at the brand. */
@media (hover: hover) {
    .brand:hover .wm-l { animation: wave .5s ease; animation-delay: calc(var(--l) * 45ms); }
}
@keyframes wave { 40% { translate: 0 -6px; rotate: -6deg; } }

/* Hero stickers follow the mouse (app.js sets --mx/--my from -1 to 1) and pop when clicked. */
.floaters { --mx: 0; --my: 0; }
.floater { pointer-events: auto; cursor: pointer; transform: translate(calc(var(--mx) * var(--depth, 1) * 18px), calc(var(--my) * var(--depth, 1) * 14px)); transition: transform .5s cubic-bezier(.2, .8, .3, 1), scale .25s ease; }
.floater:hover { scale: 1.25; }
.floater.burst { animation: burst .9s ease forwards; }
@keyframes burst { 0% { scale: 1.3; } 25% { scale: 0; opacity: 0; } 70% { scale: 0; opacity: 0; } 100% { scale: 1; opacity: .9; } }

/* A light sweeps across the big button now and then. */
.btn-block { position: relative; overflow: hidden; }
.btn-block::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); animation: shine 4.5s 1.5s ease-in-out infinite; pointer-events: none; }
.btn-block[disabled]::after { display: none; }
@keyframes shine { 0%, 70% { left: -40%; } 100% { left: 130%; } }

/* A wavy underline draws itself under section titles. */
.section-title::after { content: ""; display: block; width: 110px; height: 10px; margin-top: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='10' viewBox='0 0 24 10'%3E%3Cpath d='M0 5 Q6 0 12 5 T24 5' fill='none' stroke='%23ffc93c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 0 / 24px 10px; transition: width .8s .25s cubic-bezier(.2, .8, .3, 1); }
.section-title.reveal::after { width: 0; }
.section-title.reveal.in::after { width: 110px; }
.section-title:hover::after { animation: squiggle .6s linear infinite; }
@keyframes squiggle { to { background-position: 24px 0; } }

/* Reading progress along the top edge. */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 50; background: var(--mango); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* Ticker items lift when pointed at. */
.ticker-item { transition: scale .2s ease, rotate .2s ease; }
.ticker-item:hover { scale: 1.12; rotate: 0deg; }

/* The input's shadow shifts when it gets focus. */
.input-wrap input { transition: box-shadow .25s ease, translate .25s ease; }
.input-wrap input:focus { translate: -2px -2px; box-shadow: 7px 7px 0 var(--mango); }


/* ---- Round four: pills and scrolling ---- */

/* Hero floaters become two-tone capsules, and spin as the page scrolls. */
.floater-1 { background: linear-gradient(90deg, var(--mango) 50%, #fff 50%); }
.floater-3 { background: linear-gradient(90deg, var(--pink) 50%, #fff 50%); }
.floater-4 { background: linear-gradient(90deg, var(--cobalt) 50%, var(--mango) 50%); }
.floater-7 { background: linear-gradient(90deg, var(--pink) 50%, var(--mango) 50%); }
.floater { transform: translate(calc(var(--mx) * var(--depth, 1) * 18px), calc(var(--my) * var(--depth, 1) * 14px + var(--sy, 0) * var(--depth, 1) * -.25px)) rotate(calc(var(--sy, 0) * var(--depth, 1) * .4deg)); }

/* Scroll position: a capsule on the right edge on wide screens. */
@media (min-width: 1001px) {
    .scroll-progress { top: 50%; left: auto; right: 18px; width: 16px; height: 150px; transform: translateY(-50%); background: #fff; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); }
    .scroll-progress::before { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--pink), var(--mango)); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
}

/* Back-to-top pill slides up after some scrolling. */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mango); color: var(--ink); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); translate: 0 120px; transition: translate .45s cubic-bezier(.3, 1.5, .5, 1), box-shadow .15s ease; }
.to-top[hidden] { display: inline-flex; visibility: hidden; }
.to-top.show { translate: 0 0; visibility: visible; }
.to-top:hover svg { animation: hop .5s ease infinite; }
.to-top:active { box-shadow: 1px 1px 0 var(--ink); translate: 2px 2px; }
@keyframes hop { 50% { translate: 0 -3px; } }
@media (max-width: 600px) { .to-top span { display: none; } .to-top { padding: 12px; } }

/* The ticker leans into fast scrolling. */
.ticker-track { transform: skewX(calc(var(--skew, 0) * 1deg)); transition: transform .35s ease-out; }

/* Content swings in from alternating sides. */
.reveal { transition: opacity .55s ease, translate .6s cubic-bezier(.2, .9, .3, 1.2), rotate .6s cubic-bezier(.2, .9, .3, 1.2); transition-delay: var(--d, 0ms); }
.feature.reveal:nth-child(odd), .steps li.reveal:nth-child(odd) { translate: -48px 12px; rotate: -4deg; }
.feature.reveal:nth-child(even), .steps li.reveal:nth-child(even) { translate: 48px 12px; rotate: 4deg; }
.faq details.reveal { translate: 40px 0; }
.more-tools li.reveal { translate: 0 30px; rotate: 8deg; }
.reveal.in, .feature.reveal.in, .steps li.reveal.in, .faq details.reveal.in, .more-tools li.reveal.in { opacity: 1; translate: 0 0; rotate: 0deg; }

/* Tool links become pills that roll in. */
.more-tools a { border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
