/**
 * Animated slider scenes (one short loop per slide, like a GIF, drawn in CSS).
 * Every animation runs only on the slide that is showing and restarts when it comes back.
 * Without animation (reduced motion) every element rests in its final, finished state.
 */

/* ---------- Medium widths: keep the mockup tidy ---------- */
.tc-mock__bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tc-mock__top { min-width: 0; }
@media (max-width: 1100px) {
	.tc-slider-arrow { top: auto; bottom: 18px; transform: none; width: 38px; height: 38px; }
	.tc-slider-arrow--prev { left: calc(50% - 130px); }
	.tc-slider-arrow--next { right: calc(50% - 130px); }
	.tc-mock__float { display: none; }
}

/* Shared timing: 6.5 s per slide, the slider moves on at 7 s. */
.tc-hero__slide { --tc-run: 6.5s; }
.tc-hero__slide.is-active .tc-a { animation-duration: var(--tc-run); animation-fill-mode: both; animation-timing-function: ease-out; }


/* ---------- 1. Edit and sign ---------- */
.tc-type { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
.tc-hero__slide.is-active .tc-type--1 { animation-name: tc-type1; }
.tc-hero__slide.is-active .tc-type--2 { animation-name: tc-type2; }
@keyframes tc-type1 { 0%, 8% { max-width: 0; } 28%, 100% { max-width: 12em; } }
@keyframes tc-type2 { 0%, 28% { max-width: 0; } 42%, 100% { max-width: 12em; } }
.tc-hero__slide.is-active .tc-tick { animation-name: tc-tick; }
@keyframes tc-tick { 0%, 46% { opacity: 0; transform: scale(0.3); } 52%, 100% { opacity: 1; transform: none; } }
.tc-mock__sign span { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
.tc-hero__slide.is-active .tc-draw { animation-name: tc-draw; animation-timing-function: linear; }
@keyframes tc-draw { 0%, 55% { clip-path: inset(0 100% 0 0); } 78%, 100% { clip-path: inset(0 0 0 0); } }
.tc-hero__slide.is-active .tc-done { animation-name: tc-done; }
@keyframes tc-done { 0%, 80% { opacity: 0; transform: translateY(10px); } 88%, 100% { opacity: 1; transform: none; } }

/* ---------- 2. Edit text with AI OCR ---------- */
.tc-scanline { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--pdfe-accent); box-shadow: 0 0 14px 4px color-mix(in srgb, var(--pdfe-accent) 60%, transparent); opacity: 0; }
.tc-hero__slide.is-active .tc-scanline { animation-name: tc-scan; animation-timing-function: linear; }
@keyframes tc-scan { 0% { top: 0; opacity: 1; } 25% { top: 100%; opacity: 1; } 26%, 100% { top: 100%; opacity: 0; } }
.tc-hero__slide.is-active .tc-mock__hit { animation-name: tc-hit; }
@keyframes tc-hit { 0%, 28% { outline-color: transparent; background: transparent; } 34%, 100% { outline-color: var(--pdfe-accent); background: var(--pdfe-surface); } }
.tc-hero__slide.is-active .tc-strike { animation-name: tc-strike; }
@keyframes tc-strike { 0%, 40% { text-decoration-color: transparent; } 46%, 100% { text-decoration-color: currentColor; } }
.tc-mock__hit ins { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; }
.tc-hero__slide.is-active .tc-mock__hit ins { animation: tc-type3 var(--tc-run) both steps(7, end); }
@keyframes tc-type3 { 0%, 48% { max-width: 0; } 68%, 100% { max-width: 7ch; } }

/* ---------- 3. Merge PDF ---------- */
.tc-merge { position: relative; height: 282px; }
.tc-merge__file {
	position: absolute;
	top: 34px;
	width: 92px;
	padding: 10px;
	border: 1px solid var(--pdfe-border);
	border-radius: 8px;
	background: var(--pdfe-surface);
	box-shadow: var(--pdfe-shadow);
	font-size: 11px;
	font-weight: 700;
}
.tc-merge__file b { display: inline-block; margin-bottom: 6px; padding: 2px 5px; border-radius: 4px; background: var(--pdfe-danger); color: var(--pdfe-surface); font-size: 9px; }
.tc-merge__file i { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--pdfe-border); }
.tc-merge__file small { display: block; margin-top: 6px; color: var(--pdfe-text-muted); font-weight: 600; }
.tc-merge__file--a { left: 6%; transform: rotate(-6deg); }
.tc-merge__file--b { left: calc(50% - 46px); top: 18px; }
.tc-merge__file--c { right: 6%; transform: rotate(6deg); }
.tc-hero__slide.is-active .tc-merge__file--a { animation-name: tc-in-a; }
.tc-hero__slide.is-active .tc-merge__file--b { animation-name: tc-in-b; }
.tc-hero__slide.is-active .tc-merge__file--c { animation-name: tc-in-c; }
@keyframes tc-in-a { 0%, 15% { transform: rotate(-6deg); opacity: 1; } 45% { transform: translate(110%, 40px) rotate(0); opacity: 1; } 50%, 100% { transform: translate(110%, 40px); opacity: 0; } }
@keyframes tc-in-b { 0%, 15% { opacity: 1; } 45% { transform: translateY(56px); opacity: 1; } 50%, 100% { transform: translateY(56px); opacity: 0; } }
@keyframes tc-in-c { 0%, 15% { transform: rotate(6deg); opacity: 1; } 45% { transform: translate(-110%, 40px) rotate(0); opacity: 1; } 50%, 100% { transform: translate(-110%, 40px); opacity: 0; } }
.tc-merge__result { position: absolute; left: 50%; top: 66px; width: 150px; margin-left: -75px; padding: 14px; border: 2px solid var(--pdfe-accent); border-radius: 10px; background: var(--pdfe-surface); box-shadow: var(--pdfe-shadow); font-weight: 800; text-align: center; }
.tc-merge__result b { display: inline-block; margin-bottom: 8px; padding: 3px 7px; border-radius: 4px; background: var(--pdfe-danger); color: var(--pdfe-surface); font-size: 10px; }
.tc-merge__result small { display: block; margin-top: 4px; color: var(--pdfe-success); font-size: 12px; }
.tc-merge__result--hidden { opacity: 0; }
.tc-hero__slide.is-active .tc-merge__result { animation-name: tc-result; }
@keyframes tc-result { 0%, 48% { opacity: 0; transform: scale(0.7); } 58%, 100% { opacity: 1; transform: none; } }
.tc-merge__files { position: absolute; inset: 0; }
/* At rest (no animation) only the merged file shows. */
.tc-merge__files { opacity: 0; }
.tc-hero__slide.is-active .tc-merge__files { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .tc-hero__slide.is-active .tc-merge__files { opacity: 0; } }

/* ---------- 4. Compress image ---------- */
.tc-photo2 { position: relative; height: 180px; border-radius: 8px; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--pdfe-accent) 55%, var(--pdfe-surface)) 0%, var(--pdfe-warning-bg) 55%); }
.tc-photo2::before { content: ""; position: absolute; left: 62%; top: 26px; width: 46px; height: 46px; border-radius: 50%; background: var(--pdfe-accent); }
.tc-photo2::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -40px; height: 120px; border-radius: 50% 50% 0 0; background: var(--pdfe-sidebar-active); box-shadow: 140px 20px 0 -10px var(--pdfe-primary); }
.tc-meter { margin-top: 16px; }
.tc-meter__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 12px; color: var(--pdfe-text-muted); }
.tc-meter__val { position: relative; display: inline-grid; color: var(--pdfe-text); font-size: 18px; font-weight: 800; }
.tc-meter__val span { grid-area: 1 / 1; text-align: right; }
.tc-meter__val span:not(:last-child) { opacity: 0; }
.tc-hero__slide.is-active .tc-meter__val span:nth-child(1) { animation-name: tc-v1; }
.tc-hero__slide.is-active .tc-meter__val span:nth-child(2) { animation-name: tc-v2; }
.tc-hero__slide.is-active .tc-meter__val span:nth-child(3) { animation-name: tc-v3; }
@keyframes tc-v1 { 0%, 30% { opacity: 1; } 31%, 100% { opacity: 0; } }
@keyframes tc-v2 { 0%, 30% { opacity: 0; } 31%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes tc-v3 { 0%, 50% { opacity: 0; } 51%, 100% { opacity: 1; } }
.tc-meter__bar { height: 10px; border-radius: 999px; background: var(--pdfe-border); overflow: hidden; }
.tc-meter__bar i { display: block; width: 15%; height: 100%; border-radius: inherit; background: var(--pdfe-success); }
.tc-hero__slide.is-active .tc-meter__bar i { animation-name: tc-shrink; }
@keyframes tc-shrink { 0%, 12% { width: 100%; background: var(--pdfe-warning); } 50%, 100% { width: 15%; background: var(--pdfe-success); } }
.tc-meter__note { display: flex; gap: 8px; margin-top: 12px; }
.tc-meter__note span { padding: 3px 9px; border-radius: 999px; background: var(--pdfe-success-bg); color: var(--pdfe-success); font-size: 11px; font-weight: 700; }

/* ---------- 5. Remove background (the handle sweeps) ---------- */
.tc-wipe { position: relative; height: 300px; border-radius: 0 0 16px 16px; overflow: hidden; }
.tc-wipe > div { position: absolute; inset: 0; display: grid; place-items: end center; }
.tc-wipe svg { display: block; width: 56%; height: auto; }
.tc-wipe__after { clip-path: inset(0 0 0 50%); }
.tc-wipe .tc-mock__handle { left: 50%; }
.tc-hero__slide.is-active .tc-wipe__after { animation: tc-wipe-clip var(--tc-run) both ease-in-out; }
.tc-hero__slide.is-active .tc-wipe .tc-mock__handle { animation: tc-wipe-handle var(--tc-run) both ease-in-out; }
@keyframes tc-wipe-clip { 0%, 8% { clip-path: inset(0 0 0 100%); } 45% { clip-path: inset(0 0 0 0); } 70%, 100% { clip-path: inset(0 0 0 50%); } }
@keyframes tc-wipe-handle { 0%, 8% { left: 100%; } 45% { left: 0%; } 70%, 100% { left: 50%; } }
.tc-wipe .tc-mock__tag--r { left: auto; right: 12px; }

/* ---------- 6. Collage maker ---------- */
.tc-collage { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: 240px; padding: 6px; border-radius: 6px; background: var(--pdfe-surface); box-shadow: var(--pdfe-shadow-page); }
.tc-collage i { border-radius: 4px; }
.tc-collage i:nth-child(1) { grid-row: span 2; background: linear-gradient(160deg, var(--pdfe-accent), var(--pdfe-warning)); }
.tc-collage i:nth-child(2) { background: linear-gradient(160deg, var(--pdfe-sidebar-active), var(--pdfe-primary)); }
.tc-collage i:nth-child(3) { background: linear-gradient(160deg, var(--pdfe-success-bg), var(--pdfe-success)); }
.tc-collage i:nth-child(4) { background: linear-gradient(160deg, var(--pdfe-bg-soft-blue), var(--pdfe-sidebar-active)); }
.tc-collage i:nth-child(5) { background: linear-gradient(160deg, var(--pdfe-warning-bg), var(--pdfe-accent)); }
.tc-hero__slide.is-active .tc-collage i { animation-name: tc-fly; animation-timing-function: cubic-bezier(.2, .8, .3, 1.2); }
.tc-hero__slide.is-active .tc-collage i:nth-child(1) { --fx: -60px; --fy: -40px; --fr: -14deg; animation-delay: 0s; }
.tc-hero__slide.is-active .tc-collage i:nth-child(2) { --fx: 50px; --fy: -60px; --fr: 12deg; animation-delay: .15s; }
.tc-hero__slide.is-active .tc-collage i:nth-child(3) { --fx: 80px; --fy: -20px; --fr: -10deg; animation-delay: .3s; }
.tc-hero__slide.is-active .tc-collage i:nth-child(4) { --fx: 40px; --fy: 60px; --fr: 16deg; animation-delay: .45s; }
.tc-hero__slide.is-active .tc-collage i:nth-child(5) { --fx: 90px; --fy: 50px; --fr: -8deg; animation-delay: .6s; }
@keyframes tc-fly { 0%, 8% { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(var(--fr)) scale(0.8); } 35%, 100% { opacity: 1; transform: none; } }

/* ---------- 7. Thumbnail maker ---------- */
.tc-thumb { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 6px; overflow: hidden; background: linear-gradient(120deg, var(--pdfe-primary), var(--pdfe-sidebar-active) 60%, var(--pdfe-warning)); box-shadow: var(--pdfe-shadow-page); }
.tc-thumb svg { position: absolute; right: 2%; bottom: -6%; width: 44%; height: auto; filter: drop-shadow(3px 0 0 var(--pdfe-surface)) drop-shadow(-3px 0 0 var(--pdfe-surface)) drop-shadow(0 -3px 0 var(--pdfe-surface)); }
.tc-thumb strong { position: absolute; left: 6%; top: 14%; width: 56%; color: var(--pdfe-surface); font-size: clamp(18px, 3.2vw, 30px); font-weight: 900; line-height: 1; text-transform: uppercase; text-shadow: 0 3px 0 var(--pdfe-primary); }
.tc-thumb strong em { display: inline-block; padding: 0 6px; background: var(--pdfe-accent); color: var(--pdfe-primary); font-style: normal; text-shadow: none; transform: rotate(-3deg); }
.tc-thumb__time { position: absolute; right: 3%; bottom: 5%; padding: 2px 6px; border-radius: 4px; background: var(--pdfe-primary); color: var(--pdfe-surface); font-size: 10px; font-weight: 700; }
.tc-hero__slide.is-active .tc-thumb { animation-name: tc-bg; }
@keyframes tc-bg { 0%, 5% { filter: grayscale(1) brightness(1.6); } 25%, 100% { filter: none; } }
.tc-hero__slide.is-active .tc-thumb svg { animation-name: tc-face; animation-timing-function: cubic-bezier(.2, .8, .3, 1.3); }
@keyframes tc-face { 0%, 20% { opacity: 0; transform: translateY(30%) scale(0.8); } 40%, 100% { opacity: 1; transform: none; } }
.tc-hero__slide.is-active .tc-thumb strong { animation-name: tc-stamp; animation-timing-function: cubic-bezier(.2, .8, .3, 1.4); }
@keyframes tc-stamp { 0%, 45% { opacity: 0; transform: scale(1.6) rotate(-6deg); } 60%, 100% { opacity: 1; transform: none; } }
.tc-thumb-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tc-thumb-sizes span { padding: 3px 9px; border-radius: 999px; background: var(--pdfe-surface); border: 1px solid var(--pdfe-border); font-size: 11px; font-weight: 700; color: var(--pdfe-text-secondary); }
.tc-thumb-sizes span:first-child { border-color: var(--pdfe-primary); color: var(--pdfe-primary); }

/* Stage without the editor sidebar (merge, compress, collage, thumbnail). */
.tc-mock__plain { min-height: 300px; padding: 18px 22px; border-radius: 0 0 16px 16px; background: var(--pdfe-bg-light-blue); }

@media (max-width: 560px) {
	.tc-wipe { height: 230px; }
	.tc-mock__plain { min-height: 230px; padding: 12px; }
	.tc-merge { height: 210px; }
	.tc-photo2 { height: 120px; }
	.tc-collage { height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
	.tc-hero__slide.is-active .tc-a,
	.tc-hero__slide.is-active .tc-mock__hit ins,
	.tc-hero__slide.is-active .tc-wipe__after,
	.tc-hero__slide.is-active .tc-wipe .tc-mock__handle { animation: none; }
}

/* An uploaded image, GIF or video in place of a scene. */
.tc-mock--media { overflow: hidden; }
.tc-mock--media img, .tc-mock--media video { display: block; width: 100%; height: auto; }

/* ---------- Desktop: the slider fills the screen width and stops a little above the fold ---------- */
@media (min-width: 1101px) {
	.tc-home .tc-hero {
		/* Screen height minus the site header (76px), the gap above (24px), the trust row (64px)
		   and about 56px of the next section, so visitors can see the page goes on. */
		--tc-h: clamp(460px, calc(100svh - 220px), 760px);
		width: calc(100% - 32px);
		max-width: none;
	}
	/* Content runs out to the slider's edges, leaving room for the arrows. */
	.tc-hero .tc-hero__grid { width: calc(100% - 176px); }
	.tc-hero__slides,
	.tc-hero__grid { min-height: 0; height: var(--tc-h); }
	.tc-hero__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 4vw, 96px); padding-block: 28px 52px; }
	.tc-hero-art--mock { justify-self: end; width: 100%; }
	.tc-hero-art--mock .tc-mock { margin-right: 0; }
	.tc-hero__copy h1,
	.tc-hero__copy h2,
	.tc-hero__copy .tc-hero__title { font-size: clamp(40px, min(4.4vw, 7.4vh), 72px); }
	.tc-hero__lead { margin-top: 16px; font-size: clamp(16px, min(1.25vw, 2.2vh), 19px); line-height: 1.55; }
	.tc-actions { margin-top: clamp(16px, 3vh, 28px); }
	.tc-kicker { margin-bottom: 10px; }
	/* The window keeps its shape and shrinks with the slider's height. */
	.tc-hero-art--mock .tc-mock { width: min(720px, 100%, calc((var(--tc-h) - 90px) * 1.12)); }
	/* Dots sit just above the trust row, never on top of it. */
	.tc-slider-dots { bottom: 86px; }
}

/* Swipe or drag to change slides. */
.tc-hero__slides { touch-action: pan-y; cursor: grab; }
.tc-hero.is-dragging .tc-hero__slides { cursor: grabbing; user-select: none; }
.tc-hero__slides a, .tc-hero__slides button { cursor: pointer; }

/* Slides 2-7 use a styled paragraph instead of a heading (only slide 1 has the H1). */
.tc-hero__copy .tc-hero__title { font-weight: 700; color: var(--pdfe-text); }
.tc-hero__copy h1,
.tc-hero__copy .tc-hero__title { text-wrap: balance; }
