/* Textpixora — immersive homepage hero, banner slider and page effects. Loaded on the homepage only. */
@property --tp-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.tp-stage {
    --st-text: #f5f3ff;
    --st-muted: #b4b8d8;
    --st-line: rgba(255, 255, 255, .12);
    --st-glass: rgba(255, 255, 255, .06);
    --st-accent: #8b5cff;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: min(920px, calc(100svh - 86px));
    padding-top: clamp(40px, 6vh, 72px);
    border-radius: 0 0 36px 36px;
    color: var(--st-text);
    background:
        radial-gradient(55% 50% at 78% 40%, rgba(121, 60, 255, .26), transparent 70%),
        radial-gradient(42% 40% at 10% 15%, rgba(36, 87, 255, .2), transparent 70%),
        radial-gradient(40% 35% at 50% 105%, rgba(223, 34, 239, .16), transparent 70%),
        linear-gradient(180deg, #070a1f 0%, #090b24 60%, #0d0a28 100%);
}
.tp-stage-canvas, .tp-stage-floor, .tp-stage-cursor, .tp-stage-grain { position: absolute; pointer-events: none; }
.tp-stage-canvas { inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0; transition: opacity 1.6s ease; }
.tp-stage.is-3d-ready .tp-stage-canvas { opacity: 1; }
.tp-stage-floor {
    left: -25%; right: -25%; bottom: -2px; height: 46%; z-index: -2;
    background-image: linear-gradient(rgba(150, 125, 255, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 125, 255, .2) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: perspective(520px) rotateX(64deg);
    transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 75%);
    mask-image: linear-gradient(to top, #000 0%, transparent 75%);
    opacity: .5;
    animation: tp-floor-run 4s linear infinite;
}
.tp-stage-cursor {
    inset: 0; z-index: -1;
    background: radial-gradient(520px circle at var(--px, 70%) var(--py, 30%), rgba(120, 92, 255, .16), transparent 60%);
    transition: background .2s;
}
.tp-stage-grain {
    inset: 0; z-index: 3; opacity: .07; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tp-stage-grid {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
    padding-bottom: clamp(40px, 6vh, 64px);
}

/* Copy */
.tp-stage-badge {
    display: inline-flex; align-items: center; gap: 10px;
    position: relative; overflow: hidden;
    padding: 6px 14px 6px 6px; margin-bottom: 26px;
    border: 1px solid var(--st-line); border-radius: 40px;
    background: var(--st-glass); backdrop-filter: blur(10px);
    color: #d6d3f3; font-size: 12px;
}
.tp-stage-badge span {
    padding: 4px 10px; border-radius: 30px;
    background: linear-gradient(115deg, #3d6bff, #8b4dff 60%, #d23cf0);
    color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.tp-stage-badge::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%);
    transform: translateX(-100%);
    animation: tp-badge-shine 5.5s ease-in-out 1.6s infinite;
}
body.tp-site .tp-stage h1.tp-stage-title {
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(46px, 5.8vw, 84px);
    line-height: 1.02;
    letter-spacing: -.055em;
    font-weight: 700;
    perspective: 600px;
}
.tp-word { display: inline-block; animation: tp-word-in 1.1s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
.tp-stage-gradient {
    padding-right: .06em;
    background: linear-gradient(100deg, #5aa9ff 0%, #9b7bff 30%, #ff6bd6 55%, #ffb36b 75%, #5aa9ff 100%);
    background-size: 220% auto;
    -webkit-background-clip: text; background-clip: text;
    color: transparent !important;
    animation: tp-word-in 1.1s cubic-bezier(.2, .8, .2, 1) both, tp-shine 7s linear infinite;
    animation-delay: calc(var(--i) * 90ms + 120ms), 0s;
    filter: drop-shadow(0 6px 30px rgba(155, 100, 255, .35));
}
.tp-fx-in { animation: tp-rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 90ms + 120ms); }
body.tp-site .tp-stage p.tp-stage-lead { max-width: 480px; margin: 0 0 30px; color: var(--st-muted); font-size: 16px; line-height: 1.8; }

.tp-stage-form {
    position: relative; max-width: 560px;
    display: flex; align-items: center; gap: 8px; padding: 8px;
    border-radius: 16px;
    background: rgba(11, 13, 36, .78); backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px -20px rgba(80, 60, 255, .55);
}
.tp-stage-form::before {
    content: ''; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
    background: conic-gradient(from var(--tp-angle), #3d7bff, #a35cff, #ff5ccf, #3dd6ff, #3d7bff);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: tp-spin-angle 6s linear infinite;
}
.tp-stage-form-icon { margin-left: 10px; color: #b69bff; font-size: 22px; }
.tp-stage-form input {
    flex: 1; min-width: 0; padding: 13px 4px;
    border: 0; outline: none; background: transparent;
    font-size: 14px;
}
/* Override the shared form text color on the dark hero background. */
.tp-stage-form #creative-prompt { color: #fff; caret-color: #fff; }
.tp-stage-form input::placeholder { color: #8f94bd; }
.tp-stage-form input:focus-visible { outline: 2px solid #9b86ff; outline-offset: 2px; border-radius: 6px; }
.tp-stage-form .tp-button { padding: 14px 20px; font-size: 13px; border-radius: 11px; }
.tp-stage-form .tp-button i { font-size: 11px; transition: transform .25s; }
.tp-stage-form .tp-button:hover i { transform: translateX(3px); }

.tp-stage-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: 12px; color: #9ea3c9; }
.tp-stage-chips button {
    padding: 7px 14px; border: 1px solid var(--st-line); border-radius: 30px;
    background: var(--st-glass); color: #e4e1ff; font-size: 12px;
    transition: background .25s, border-color .25s, transform .25s;
}
.tp-stage-chips button:hover { background: rgba(139, 92, 255, .22); border-color: rgba(170, 140, 255, .55); transform: translateY(-2px); }
.tp-stage-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 26px; font-size: 12px; color: #aeb2d3; }
.tp-stage-notes i { color: #6fd7ff; margin-right: 4px; }
.tp-stage .tp-motion-toggle { display: inline-flex; margin: 0; border-color: var(--st-line); background: var(--st-glass); color: #c9c4ea; font-size: 11px; }
.tp-stage .tp-motion-toggle:before { background: #6fd7ff; }

/* Visual column */
.tp-stage-visual { position: relative; }
.tp-stage-chip {
    position: absolute; z-index: 4;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 15px; border-radius: 14px;
    border: 1px solid var(--st-line); background: rgba(16, 18, 46, .72); backdrop-filter: blur(12px);
    color: #ecebff; font-size: 12px; white-space: nowrap;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
    animation: tp-chip-float 7s ease-in-out infinite;
}
.tp-stage-chip span, .tp-stage-chip i { color: #c3a6ff; }
.tp-stage-chip-a { top: -22px; left: -18px; }
.tp-stage-chip-b { right: -16px; top: 22%; animation-delay: -3.5s; }

.tp-banner { position: relative; }
.tp-banner-stage {
    position: relative;
    transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.tp-banner-stage.is-tilting { transition-duration: .15s; }
.tp-banner-stage::before {
    content: ''; position: absolute; inset: -2px; z-index: -1; border-radius: 28px;
    background: conic-gradient(from var(--tp-angle), #3d7bff, #a35cff, #ff5ccf, #ffb35c, #3dd6ff, #3d7bff);
    filter: blur(22px); opacity: .5;
    animation: tp-spin-angle 8s linear infinite;
}
.tp-banner-frame {
    position: relative; overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: 26px;
    background: #0b0d24;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 50px 90px -40px rgba(0, 0, 0, .9);
    touch-action: pan-y;
}
.tp-banner-track { position: absolute; inset: 0; }
.tp-banner-slide { position: absolute; inset: 0; visibility: hidden; z-index: 0; }
.tp-banner-slide.is-active { visibility: visible; z-index: 2; }
.tp-banner-slide.is-leaving { visibility: visible; z-index: 1; }
.tp-banner-slide img { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: 60% 50%; }
.tp-banner-slide.is-active img { animation: tp-ken-burns 9s ease-out both; }
.tp-banner-slide.is-leaving img { transform: scale(1.06); filter: brightness(.45) saturate(.8); transition: transform 1s ease, filter 1s ease; }
.tp-banner-slide::after { content: ''; position: absolute; inset: 42% 0 0; background: linear-gradient(transparent, rgba(5, 6, 22, .9)); pointer-events: none; }
.tp-banner.is-animated .tp-banner-slide.is-active { animation: tp-wipe-next 1s cubic-bezier(.77, 0, .18, 1) both; }
.tp-banner.is-animated[data-dir=prev] .tp-banner-slide.is-active { animation-name: tp-wipe-prev; }
.tp-banner.is-animated .tp-banner-slide.is-active .tp-banner-caption > * { animation: tp-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.tp-banner.is-animated .tp-banner-slide.is-active .tp-banner-caption > :nth-child(1) { animation-delay: .45s; }
.tp-banner.is-animated .tp-banner-slide.is-active .tp-banner-caption > :nth-child(2) { animation-delay: .55s; }
.tp-banner.is-animated .tp-banner-slide.is-active .tp-banner-caption > :nth-child(3) { animation-delay: .65s; }

.tp-banner-caption { position: absolute; z-index: 1; left: 26px; right: 26px; bottom: 24px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 6px 18px; }
.tp-banner-label { flex-basis: 100%; display: inline-flex; align-items: center; gap: 8px; color: #c8b5ff; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tp-banner-label::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #5aa9ff, #ff6bd6); }
body.tp-site .tp-stage p.tp-banner-title { flex: 1 1 260px; margin: 0; color: #fff; font-family: Outfit, Inter, sans-serif; font-size: clamp(20px, 2vw, 27px); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.tp-banner-use {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 30px;
    background: rgba(255, 255, 255, .12); backdrop-filter: blur(10px);
    color: #fff; font-size: 12px; font-weight: 600;
    transition: background .25s, color .25s;
}
.tp-banner-use:hover { background: #fff; color: #5b34d6; }
.tp-banner-use i { font-size: 10px; }

.tp-banner-glare {
    position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .2), transparent 45%);
    opacity: 0; transition: opacity .4s;
}
.tp-banner-stage.is-tilting .tp-banner-glare { opacity: 1; }
.tp-banner-count {
    position: absolute; z-index: 4; top: 18px; right: 18px;
    display: flex; align-items: baseline; gap: 6px;
    padding: 7px 13px; border-radius: 30px;
    background: rgba(8, 9, 28, .55); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .14);
    color: #b9b6dc; font-size: 11px;
}
.tp-banner-count b { color: #fff; font-family: Outfit, Inter, sans-serif; font-size: 16px; font-weight: 600; }
.tp-banner-arrow {
    position: absolute; z-index: 4; top: 50%;
    display: grid; place-items: center;
    width: 50px; height: 50px; margin-top: -25px;
    border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%;
    background: rgba(10, 11, 32, .45); backdrop-filter: blur(10px);
    color: #fff; font-size: 15px;
    transition: background .25s, color .25s, transform .25s, border-color .25s;
}
.tp-banner-arrow:hover { background: #fff; color: #5b34d6; border-color: #fff; transform: scale(1.08); }
.tp-banner-arrow:active { transform: scale(.94); }
.tp-banner-arrow-prev { left: 16px; }
.tp-banner-arrow-next { right: 16px; }

.tp-banner-controls { display: flex; align-items: stretch; gap: 10px; margin-top: 16px; }
.tp-banner-tabs { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tp-banner-tab {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px 10px 8px; text-align: left;
    border: 1px solid var(--st-line); border-radius: 14px;
    background: var(--st-glass); backdrop-filter: blur(10px);
    color: #a9acd0; font-size: 12px; line-height: 1.3;
    transition: border-color .3s, background .3s, color .3s;
}
.tp-banner-tab img { width: 52px; height: 36px; flex-shrink: 0; border-radius: 8px; object-fit: cover; opacity: .6; transition: opacity .3s; }
.tp-banner-tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-banner-tab small { display: block; color: #7f84ad; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.tp-banner-tab:hover { color: #fff; border-color: rgba(255, 255, 255, .26); }
.tp-banner-tab[aria-current=true] { color: #fff; border-color: rgba(170, 140, 255, .6); background: rgba(139, 92, 255, .16); }
.tp-banner-tab[aria-current=true] img, .tp-banner-tab:hover img { opacity: 1; }
.tp-banner-tab[aria-current=true] small { color: #c8b5ff; }
.tp-banner-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .08); }
.tp-banner-progress::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, #5aa9ff, #a35cff, #ff6bd6);
    transform: scaleX(var(--progress, 0)); transform-origin: left;
}
.tp-banner-play {
    flex-shrink: 0; width: 54px;
    border: 1px solid var(--st-line); border-radius: 14px;
    background: var(--st-glass); color: #fff; font-size: 13px;
    transition: background .25s, border-color .25s;
}
.tp-banner-play:hover { background: rgba(139, 92, 255, .25); border-color: rgba(170, 140, 255, .55); }

/* Marquee */
.tp-stage-marquee { position: relative; z-index: 1; display: flex; align-items: center; gap: 28px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .025); }
body.tp-site .tp-stage p.tp-stage-marquee-title { flex-shrink: 0; margin: 0 0 0 max(32px, calc((100vw - 1240px) / 2)); color: #8d91b8; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.tp-marquee { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tp-marquee-track { display: flex; width: max-content; animation: tp-marquee 42s linear infinite; }
.tp-marquee:hover .tp-marquee-track { animation-play-state: paused; }
.tp-marquee-group { display: flex; flex-shrink: 0; gap: 38px; margin: 0; padding: 0 38px 0 0; list-style: none; }
.tp-marquee-group li { display: inline-flex; align-items: center; gap: 14px; color: #e3e1fb; font-family: Outfit, Inter, sans-serif; font-size: 17px; font-weight: 500; white-space: nowrap; }
.tp-marquee-group li span { background: linear-gradient(135deg, #5aa9ff, #ff6bd6); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Entrance and slide animations finish even while ambient motion is paused. */
.tp-stage .tp-word, .tp-stage .tp-fx-in, .tp-stage .tp-banner-slide, .tp-stage .tp-banner-caption > * { animation-play-state: running !important; }
.tp-stage .tp-stage-gradient { animation-play-state: running, var(--tp-ambient-state, running) !important; }
.tp-motion-paused { --tp-ambient-state: paused; }

/* Page-wide pointer effects (classes are added by JavaScript on fine pointers). */
.tp-home .tp-fx-spot {
    background-image: radial-gradient(380px circle at var(--mx, 50%) var(--my, -60%), rgba(121, 60, 255, .1), transparent 45%);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1), translate .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s, border-color .4s;
    transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0s, 0s, 0s;
}
.tp-home .tp-fx-spot:hover { translate: 0 -5px; border-color: #cfc2ff; box-shadow: 0 24px 48px -28px rgba(76, 46, 200, .45); }
.tp-home .tp-fx-tilt { transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; }
.tp-home .tp-fx-tilt.is-tilting { transition-duration: .12s, .4s; box-shadow: 0 30px 50px -28px rgba(40, 20, 120, .6); }
.tp-fx-glare { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .3), transparent 50%); mix-blend-mode: soft-light; opacity: 0; transition: opacity .3s; }
.tp-fx-tilt.is-tilting .tp-fx-glare { opacity: 1; }
.tp-home .tp-fx-magnet { translate: var(--mgx, 0) var(--mgy, 0); transition: translate .35s cubic-bezier(.2, .8, .2, 1), transform .2s, box-shadow .2s, background .2s; }

/* Living gradient on the closing call to action. */
.tp-home .tp-cta {
    background:
        radial-gradient(40% 60% at 20% 80%, #0f73d5, transparent 70%),
        radial-gradient(40% 60% at 80% 20%, #c043e0, transparent 70%),
        radial-gradient(30% 50% at 60% 90%, #ff5ca8, transparent 70%),
        #5735cc;
    background-size: 160% 160%;
    animation: tp-aurora 16s ease-in-out infinite alternate;
}
.tp-home .tp-cta::before { animation: tp-ring-drift 18s ease-in-out infinite alternate; }
.tp-home .tp-cta::after { animation: tp-ring-drift 14s ease-in-out -6s infinite alternate-reverse; }

/* Keyframes */
@keyframes tp-word-in { from { opacity: 0; transform: translateY(.5em) rotateX(-55deg); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes tp-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tp-shine { to { background-position: -220% center; } }
@keyframes tp-spin-angle { to { --tp-angle: 360deg; } }
@keyframes tp-badge-shine { 0%, 60% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
@keyframes tp-chip-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes tp-floor-run { to { background-position: 0 64px, 0 0; } }
@keyframes tp-ken-burns { from { transform: scale(1.16); } to { transform: scale(1.02); } }
@keyframes tp-wipe-next { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes tp-wipe-prev { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes tp-marquee { to { transform: translateX(-50%); } }
@keyframes tp-aurora { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes tp-ring-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.12); } }

/* Responsive */
@media (max-width: 1100px) {
    .tp-stage-chip-b { right: 8px; }
}
@media (max-width: 1000px) {
    .tp-stage { min-height: 0; border-radius: 0 0 28px 28px; }
    .tp-stage-grid { grid-template-columns: 1fr; gap: 48px; }
    .tp-stage-copy { max-width: 640px; }
    .tp-stage-chip-a { left: 8px; }
    .tp-stage-chip-b { top: auto; bottom: 90px; }
}
@media (max-width: 640px) {
    .tp-stage { padding-top: 36px; border-radius: 0 0 22px 22px; }
    body.tp-site .tp-stage h1.tp-stage-title { font-size: clamp(40px, 12vw, 54px); }
    body.tp-site .tp-stage p.tp-stage-lead { font-size: 14px; }
    .tp-stage-form { flex-wrap: wrap; }
    .tp-stage-form input { flex-basis: calc(100% - 50px); }
    .tp-stage-form .tp-button { width: 100%; }
    .tp-stage-chip { display: none; }
    .tp-banner-frame { border-radius: 18px; }
    .tp-banner-caption { left: 16px; right: 16px; bottom: 14px; }
    .tp-banner-use { display: none; }
    body.tp-site .tp-stage p.tp-banner-title { font-size: 17px; }
    .tp-banner-label { font-size: 9px; }
    .tp-banner-arrow { width: 40px; height: 40px; margin-top: -20px; font-size: 13px; }
    .tp-banner-arrow-prev { left: 10px; }
    .tp-banner-arrow-next { right: 10px; }
    .tp-banner-count { top: 10px; right: 10px; }
    .tp-banner-tab { justify-content: center; padding: 6px 6px 8px; }
    .tp-banner-tab span { display: none; }
    .tp-banner-tab img { width: 100%; height: 34px; }
    .tp-banner-play { width: 46px; }
    .tp-stage-marquee { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 0; }
    body.tp-site .tp-stage p.tp-stage-marquee-title { margin: 0 16px; text-align: center; }
    .tp-marquee-group li { font-size: 15px; }
}

/* Reduced motion: keep every control, drop the movement. */
@media (prefers-reduced-motion: reduce) {
    .tp-word, .tp-fx-in, .tp-stage-gradient, .tp-stage-badge::after, .tp-stage-form::before, .tp-banner-stage::before,
    .tp-stage-chip, .tp-stage-floor, .tp-banner-slide, .tp-banner-slide img, .tp-banner-caption > *, .tp-marquee-track,
    .tp-home .tp-cta, .tp-home .tp-cta::before, .tp-home .tp-cta::after { animation: none !important; }
    .tp-banner-slide.is-leaving { visibility: hidden; }
    .tp-marquee-track { flex-wrap: wrap; width: auto; }
    .tp-marquee-group[aria-hidden=true] { display: none; }
    .tp-banner-stage, .tp-home .tp-fx-tilt { transform: none !important; }
    .tp-home .tp-fx-spot:hover { translate: none; }
}

/* ---------------------------------------------------------------------------
   Dark homepage sections: Studio preview and Prompt playground
--------------------------------------------------------------------------- */
.tp-dark-section {
    position: relative; isolation: isolate; overflow: hidden;
    margin: 24px clamp(0px, 1.6vw, 24px);
    border-radius: 36px;
    color: #f5f3ff;
    background: linear-gradient(180deg, #080a20 0%, #0b0b26 100%);
}
.tp-dark-section::before {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .55; pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 22px 34px, rgba(255, 255, 255, .55), transparent 70%),
        radial-gradient(1px 1px at 128px 92px, rgba(255, 255, 255, .35), transparent 70%),
        radial-gradient(1.5px 1.5px at 206px 160px, rgba(190, 170, 255, .55), transparent 70%),
        radial-gradient(1px 1px at 74px 188px, rgba(140, 200, 255, .45), transparent 70%);
    background-size: 240px 220px;
}
.tp-dark-glow {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(40% 50% at 88% 8%, rgba(121, 60, 255, .3), transparent 70%),
        radial-gradient(38% 46% at 4% 92%, rgba(36, 120, 255, .22), transparent 70%);
}
.tp-dark-glow-alt {
    background:
        radial-gradient(40% 50% at 12% 10%, rgba(223, 34, 239, .2), transparent 70%),
        radial-gradient(45% 55% at 92% 85%, rgba(61, 107, 255, .28), transparent 70%);
}
body.tp-site .tp-dark-section h2, body.tp-site .tp-dark-section h3 { color: #fff; }
body.tp-site .tp-dark-section p { color: #b4b8d8; }
.tp-dark-section .tp-eyebrow { color: #c8b5ff; }
.tp-dark-section .tp-eyebrow::before { background: #a98bff; box-shadow: 0 0 0 4px rgba(169, 139, 255, .16); }
.tp-dark-gradient {
    background: linear-gradient(100deg, #6ab0ff, #a88bff 40%, #ff7ad9 75%, #ffb36b);
    -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* Studio preview */
.tp-studio { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 26px; align-items: stretch; }
.tp-studio-window {
    overflow: hidden; border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
    box-shadow: 0 40px 90px -40px rgba(70, 40, 200, .65), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(12px);
}
.tp-studio-bar { display: flex; align-items: center; gap: 7px; padding: 13px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .18); }
.tp-studio-bar span { width: 10px; height: 10px; border-radius: 50%; background: #ff6b8b; }
.tp-studio-bar span:nth-child(2) { background: #ffc35c; }
.tp-studio-bar span:nth-child(3) { background: #5ce0a0; }
.tp-studio-bar b { margin-left: 10px; color: #a9adcf; font-size: 12px; font-weight: 500; }
.tp-studio-body { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); min-height: 420px; }
.tp-studio-panel { display: flex; flex-direction: column; gap: 18px; padding: 24px; border-right: 1px solid rgba(255, 255, 255, .07); }
.tp-studio-label { display: block; margin-bottom: 8px; color: #8d91b8; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
body.tp-site .tp-dark-section p.tp-studio-prompt {
    min-height: 128px; margin: -8px 0 0; padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .09); border-radius: 14px;
    background: rgba(0, 0, 0, .28);
    color: #eeecff; font-size: 14px; line-height: 1.65;
}
.tp-studio-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: #b69bff; animation: tp-caret 1s steps(1) infinite; }
.tp-studio-options { display: grid; gap: 14px; }
.tp-studio-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.tp-studio-pills span {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 30px;
    color: #a7abcf; font-size: 12px;
    transition: background .35s, border-color .35s, color .35s, box-shadow .35s;
}
.tp-studio-pills span.is-on { background: rgba(139, 92, 255, .26); border-color: rgba(170, 140, 255, .65); color: #fff; box-shadow: 0 0 18px -4px rgba(139, 92, 255, .7); }
.tp-ratio { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }
.tp-ratio-square { width: 10px; height: 10px; }
.tp-ratio-portrait { width: 8px; height: 12px; }
.tp-ratio-landscape { width: 13px; height: 9px; }
.tp-studio-generate { margin-top: auto; display: grid; gap: 9px; padding: 14px; border-radius: 14px; background: rgba(139, 92, 255, .1); border: 1px solid rgba(170, 140, 255, .2); }
.tp-studio-status { display: flex; align-items: center; gap: 8px; color: #e3defc; font-size: 12px; font-weight: 600; }
.tp-studio-status i { color: #8ee0ff; }
.tp-studio-meter { height: 5px; overflow: hidden; border-radius: 5px; background: rgba(255, 255, 255, .08); }
.tp-studio-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5aa9ff, #a35cff, #ff6bd6); transform: scaleX(1); transform-origin: left; }
.tp-studio-stage {
    container-type: inline-size;
    display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 26px;
    background:
        radial-gradient(circle at 50% 45%, rgba(139, 92, 255, .18), transparent 65%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 10px, transparent 10px 20px);
}
.tp-studio-canvas {
    /* Height follows the stage width so a 3:2 frame always fits; width morphs with the format. */
    --h: min(340px, 100cqi / 1.5); --ar: 1.5;
    position: relative; overflow: hidden; margin: 0;
    height: var(--h); width: calc(var(--h) * var(--ar)); max-width: 100%;
    border-radius: 16px;
    background: #12122e;
    box-shadow: 0 26px 60px -24px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .12);
    transition: width .8s cubic-bezier(.65, 0, .35, 1);
}
.tp-studio-canvas[data-format=square] { --ar: 1; }
.tp-studio-canvas[data-format=portrait] { --ar: .667; }
.tp-studio-canvas img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0;
    transition: opacity .6s ease, filter 2.4s cubic-bezier(.2, .8, .2, 1), transform 2.4s cubic-bezier(.2, .8, .2, 1);
}
.tp-studio-canvas img.is-active { opacity: 1; }
.tp-studio-canvas.is-developing img.is-active { filter: blur(26px) saturate(.15) brightness(.65); transform: scale(1.18); }
.tp-studio-canvas.is-instant img { transition: none !important; }
.tp-studio-scan { position: absolute; left: 0; right: 0; top: -40%; height: 40%; opacity: 0; pointer-events: none; background: linear-gradient(transparent, rgba(150, 110, 255, .45) 60%, rgba(255, 255, 255, .5) 62%, transparent 64%); mix-blend-mode: screen; }
.tp-studio-canvas.is-generating .tp-studio-scan { opacity: 1; animation: tp-scan 1.25s linear infinite; }
.tp-studio-canvas figcaption {
    position: absolute; left: 12px; bottom: 12px; z-index: 1; max-width: calc(100% - 24px);
    padding: 7px 12px; border-radius: 30px;
    background: rgba(8, 9, 28, .6); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .14);
    color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tp-studio-side { display: flex; flex-direction: column; gap: 18px; }
.tp-studio-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tp-studio-steps li {
    position: relative; display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03);
    transition: background .4s, border-color .4s, transform .4s;
}
.tp-studio-steps li > span { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .06); color: #9da1c8; font-family: Outfit, Inter, sans-serif; font-size: 13px; font-weight: 600; transition: background .4s, color .4s; }
.tp-studio-steps strong { display: block; color: #fff; font-family: Outfit, Inter, sans-serif; font-size: 16px; font-weight: 600; }
.tp-studio-steps small { color: #9da1c8; font-size: 12px; }
.tp-studio-steps li.is-on { border-color: rgba(170, 140, 255, .5); background: rgba(139, 92, 255, .12); box-shadow: inset 3px 0 0 #a35cff; }
.tp-studio-steps li.is-on > span { background: linear-gradient(135deg, #3d6bff, #a35cff); color: #fff; }
.tp-studio-examples { display: grid; gap: 8px; }
.tp-studio-examples button {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 7px 12px 7px 7px; text-align: left;
    border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px;
    background: transparent; color: #c9cbe6; font-size: 13px;
    transition: background .3s, border-color .3s, color .3s;
}
.tp-studio-examples img { width: 42px; height: 42px; flex-shrink: 0; border-radius: 10px; object-fit: cover; }
.tp-studio-examples button:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.tp-studio-examples button[aria-pressed=true] { border-color: rgba(170, 140, 255, .55); background: rgba(139, 92, 255, .14); color: #fff; }
.tp-studio-side .tp-button { align-self: flex-start; }
body.tp-site .tp-dark-section p.tp-studio-note, body.tp-site .tp-dark-section p.tp-builder-note { margin: 0; color: #7f84ad; font-size: 11px; }

/* Prompt playground */
.tp-builder-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.tp-builder-copy h2 { margin: 0 0 18px; font-size: clamp(32px, 4vw, 49px); }
body.tp-site .tp-dark-section .tp-builder-copy > p { max-width: 460px; margin: 0 0 30px; }
.tp-builder-groups { display: grid; gap: 20px; }
.tp-builder-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.tp-builder-group legend { display: flex; align-items: center; gap: 10px; float: none; width: auto; margin: 0 0 10px; padding: 0; color: #e6e3ff; font-size: 13px; font-weight: 600; }
.tp-builder-group legend span { color: #a98bff; font-family: Outfit, Inter, sans-serif; font-size: 12px; letter-spacing: .08em; }
.tp-builder-options { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-builder-option { position: relative; cursor: pointer; }
.tp-builder-option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tp-builder-option span {
    display: inline-flex; padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, .12); border-radius: 30px;
    background: rgba(255, 255, 255, .04); color: #c9cbe6; font-size: 13px;
    transition: background .25s, border-color .25s, color .25s, transform .25s, box-shadow .25s;
}
.tp-builder-option:hover span { border-color: rgba(255, 255, 255, .28); color: #fff; transform: translateY(-2px); }
.tp-builder-option input:checked + span { border-color: transparent; background: linear-gradient(115deg, #3d6bff, #8b4dff 60%, #d23cf0); color: #fff; box-shadow: 0 10px 26px -10px rgba(139, 77, 255, .8); }
.tp-builder-option input:focus-visible + span { outline: 3px solid #a98bff; outline-offset: 3px; }

.tp-builder-result { position: relative; display: grid; justify-items: center; padding: 12px 0 0; }
.tp-builder-orbit { position: absolute; top: 0; left: 50%; width: min(520px, 110%); aspect-ratio: 1; transform: translateX(-50%); perspective: 900px; pointer-events: none; }
.tp-builder-orbit i { position: absolute; inset: 0; border: 1px solid rgba(169, 139, 255, .32); border-radius: 50%; transform-style: preserve-3d; animation: tp-orbit-a 16s linear infinite; }
.tp-builder-orbit i:nth-child(2) { inset: 7%; border-color: rgba(90, 169, 255, .28); animation-name: tp-orbit-b; animation-duration: 21s; }
.tp-builder-orbit i:nth-child(3) { inset: 14%; border-color: rgba(255, 107, 214, .25); animation-name: tp-orbit-c; animation-duration: 26s; }
.tp-builder-orbit i::after { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 3px rgba(169, 139, 255, .9); }
.tp-builder-preview { position: relative; z-index: 1; overflow: hidden; width: min(420px, 86%); aspect-ratio: 1; margin: 34px 0 0; border-radius: 28px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .14); }
.tp-builder-preview img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease, transform 1.2s cubic-bezier(.2, .8, .2, 1), filter .25s; }
.tp-builder-preview img.is-swapping { opacity: 0; transform: scale(1.06); filter: blur(8px); }
.tp-builder-preview figcaption { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; padding: 7px 12px; border-radius: 30px; background: rgba(8, 9, 28, .6); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .14); color: #b9b6dc; font-size: 11px; }
.tp-builder-preview figcaption b { color: #fff; }
.tp-builder-card {
    position: relative; z-index: 2; width: min(480px, 100%); margin-top: -70px;
    padding: 22px; border-radius: 22px;
    background: rgba(13, 14, 40, .82); backdrop-filter: blur(16px);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9);
}
.tp-builder-card::before {
    content: ''; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
    background: conic-gradient(from var(--tp-angle), #3d7bff, #a35cff, #ff5ccf, #3dd6ff, #3d7bff);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: tp-spin-angle 7s linear infinite;
}
.tp-builder-card-label { display: inline-flex; align-items: center; gap: 8px; color: #c8b5ff; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
body.tp-site .tp-dark-section p.tp-builder-output { min-height: 3.2em; margin: 12px 0 18px; color: #fff; font-family: Outfit, Inter, sans-serif; font-size: clamp(18px, 1.7vw, 21px); font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
.tp-builder-output.is-updated { animation: tp-output-flash .7s ease; }
.tp-builder-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tp-builder-shuffle { display: inline-flex; align-items: center; gap: 8px; padding: 13px 16px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(255, 255, 255, .05); color: #e6e3ff; font-size: 13px; font-weight: 600; transition: background .25s, border-color .25s; }
.tp-builder-shuffle:hover { background: rgba(139, 92, 255, .2); border-color: rgba(170, 140, 255, .55); }
.tp-builder-shuffle:active i { transform: rotate(180deg); }
.tp-builder-shuffle i { transition: transform .4s; }
.tp-builder-note { margin-top: 14px !important; text-align: center; }

@keyframes tp-caret { 50% { opacity: 0; } }
@keyframes tp-scan { from { transform: translateY(0); } to { transform: translateY(350%); } }
@keyframes tp-output-flash { 0% { opacity: .2; filter: blur(4px); transform: translateY(4px); } 100% { opacity: 1; filter: none; transform: none; } }
@keyframes tp-orbit-a { from { transform: rotateX(72deg) rotateZ(0); } to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes tp-orbit-b { from { transform: rotateX(64deg) rotateY(18deg) rotateZ(0); } to { transform: rotateX(64deg) rotateY(18deg) rotateZ(-360deg); } }
@keyframes tp-orbit-c { from { transform: rotateX(78deg) rotateY(-22deg) rotateZ(0); } to { transform: rotateX(78deg) rotateY(-22deg) rotateZ(360deg); } }

@media (max-width: 1100px) {
    .tp-studio { grid-template-columns: 1fr; }
    .tp-studio-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
    .tp-studio-side .tp-button, .tp-studio-note { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
    .tp-builder-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .tp-dark-section { margin: 12px 0; border-radius: 26px; }
    .tp-studio-body { grid-template-columns: 1fr; }
    .tp-studio-panel { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); padding: 18px; }
    body.tp-site .tp-dark-section p.tp-studio-prompt { min-height: 104px; font-size: 13px; }
    .tp-studio-stage { padding: 18px; }
    .tp-studio-side { grid-template-columns: 1fr; }
    .tp-builder-card { margin-top: -50px; padding: 18px; }
    .tp-builder-actions .tp-button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .tp-studio-caret, .tp-studio-scan, .tp-builder-orbit i, .tp-builder-card::before, .tp-builder-output.is-updated { animation: none !important; }
    .tp-studio-canvas, .tp-studio-canvas img, .tp-builder-preview img { transition: none !important; }
}
