/* ursy.ai (3 Dec 2026): the real URSY.com app in a life-size phone, in the hero's middle tile.
   Replaces the old voice-call phone, which was drawn 400 x 660 and shrunk to 76%: too short and too small.
   This phone keeps the real iPhone shape (the screenshots are 923 x 2000) and the tile gets the room it needs. */

/* ---------------------------------------------------------------- one big card: the three tiles share one background, no gaps
   Lee, 3 Dec 2026: "merge it into one giant card". Desktop: the story on the left, the phone in the middle,
   trades and "yes, no, or I don't know" on the right, split by hairlines instead of gaps. */
.up-bento:has(.up-tour) {
	--pw: clamp(300px, 27vw, 360px);
	--gx: clamp(28px, 3.6vw, 52px);
	position: relative; isolation: isolate; overflow: hidden; gap: 0;
	padding: clamp(22px, 3.4vw, 48px); border-radius: calc(var(--r, 20px) + 8px);
	background:
		radial-gradient(60% 70% at 50% 55%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 70%),
		linear-gradient(135deg, #dcf3ea 0%, #e9f2f6 48%, #ece6ff 100%);
	box-shadow: inset 0 0 0 1px rgba(10, 10, 12, .05);
}
/* the other two tiles become plain sections of the card */
.up-bento:has(.up-tour) > .up-tile:not(.up-tour) { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.up-bento:has(.up-tour) > .up-tile:not(.up-tour)::after { display: none; }
.up-bento:has(.up-tour) .up-trades a { background: rgba(255, 255, 255, .85); }
.up-bento:has(.up-tour) .up-three li { background: rgba(255, 255, 255, .7); }
.up-bento:has(.up-tour) > .up-tile:not(.up-tour) p { margin-top: 0; }
.up-bento:has(.up-tour) .up-three { margin-top: 10px; }
.up-bento:has(.up-tour) > .up-tile:not(.up-tour) .up-btn { margin-top: auto; }
.up-tile.up-tour.up-phonetile { min-height: 0; padding: 0; border-radius: 0; background: none; overflow: visible; text-align: left; }

@media (min-width: 1081px) {
	.up-bento:has(.up-tour) { grid-template-columns: minmax(0, 1fr) var(--pw) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: var(--gx); }
	.up-bento .up-tile.up-tour.up-phonetile { display: grid; grid-column: 1 / 3; grid-row: 1 / 3; grid-template-columns: subgrid; grid-template-rows: auto auto; align-content: center; order: 0; }
	.up-tour__head { grid-column: 1; grid-row: 1; padding-top: 4px; }
	.up-tour__steps { grid-column: 1; grid-row: 2; padding-top: 22px; }
	.up-tour__phone { grid-column: 2; grid-row: 1 / 3; align-self: center; }
	.up-bento:has(.up-tour) > .up-tile:not(.up-tour) { grid-column: 3; padding-left: var(--gx); border-left: 1px solid rgba(10, 10, 12, .09); }
	.up-bento:has(.up-tour) > .up-tile:first-child { grid-row: 1; padding-bottom: 28px; }
	.up-bento:has(.up-tour) > .up-tile:last-child { grid-row: 2; padding-top: 28px; border-top: 1px solid rgba(10, 10, 12, .09); }
}

/* ---------------------------------------------------------------- inside the phone's part of the card */
.up-tour__head { padding-top: 4px; }
.up-tour__phone { display: flex; justify-content: center; }
.up-tour__steps { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.up-tile.up-tour h2 { margin: 16px 0 0; max-width: 15ch; font-size: clamp(26px, 2.5vw, 36px); line-height: 1.08; }
.up-tile.up-tour .up-tour__lead { margin: 12px 0 0; max-width: 32ch; font-size: 15.5px; }
.up-tour__eyebrow { font-size: 12px; }

/* ---------------------------------------------------------------- the phone itself */
.up-tour__device {
	position: relative; width: var(--pw); padding: calc(var(--pw) * .03); border-radius: calc(var(--pw) * .17);
	background: linear-gradient(150deg, #34363d 0%, #0c0d10 38%, #16171b 70%, #2b2d33 100%);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 1.5px #24262c, 0 46px 80px -34px rgba(6, 52, 34, .5), 0 22px 36px -22px rgba(0, 0, 0, .45);
}
.up-tour__device::before, .up-tour__device::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #23252b; }
.up-tour__device::before { left: -3px; top: 21%; height: 9%; box-shadow: 0 calc(var(--pw) * .25) 0 #23252b; }
.up-tour__device::after { right: -3px; top: 27%; height: 14%; }
.up-tour__screen {
	position: relative; aspect-ratio: 923 / 2000; overflow: hidden; border-radius: calc(var(--pw) * .14);
	background: #06070a; cursor: pointer; touch-action: pan-y; -webkit-tap-highlight-color: transparent; isolation: isolate;
}
.up-tour__img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.up-tour__img.is-under { z-index: 0; }
.up-tour__island { position: absolute; z-index: 2; top: 1.3%; left: 50%; width: 30%; height: 4%; transform: translateX(-50%); border-radius: 999px; background: #000; pointer-events: none; }

.up-tour__img.is-in.is-tap { animation: upTourIn .42s cubic-bezier(.2, .75, .25, 1) both; }
.up-tour__img.is-in.is-back { animation: upTourBack .42s cubic-bezier(.2, .75, .25, 1) both; }
.up-tour__img.is-in.is-scroll { animation: upTourScroll .5s cubic-bezier(.2, .75, .25, 1) both; }
@keyframes upTourIn { from { opacity: 0; transform: translateX(9%); } to { opacity: 1; transform: none; } }
@keyframes upTourBack { from { opacity: 0; transform: translateX(-9%); } to { opacity: 1; transform: none; } }
@keyframes upTourScroll { from { opacity: 0; transform: translateY(16%); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- the glowing spot on the button to press */
.up-tour__hit { position: absolute; z-index: 3; margin: 0; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: pointer; }
.up-tour__hit::before { content: ""; position: absolute; inset: -3px; border-radius: inherit; border: 2px solid rgba(64, 196, 255, .75); box-shadow: 0 0 16px rgba(64, 196, 255, .45); animation: upTourGlow 1.8s ease-in-out infinite; }
.up-tour__hit:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.up-tour__ring { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none;
	background: rgba(64, 196, 255, .22); border: 2.5px solid #fff; box-shadow: 0 0 0 3px rgba(64, 196, 255, .9), 0 6px 18px rgba(0, 0, 0, .35);
	animation: upTourPulse 1.8s ease-in-out infinite; }
.up-tour__hit[data-go="scroll"]::before { display: none; }
.up-tour__hit[data-go="scroll"] .up-tour__ring { top: 62%; animation: upTourSwipe 1.8s ease-in-out infinite; }
.up-tour__hit.is-press .up-tour__ring { animation: upTourPress .5s ease-out both; }
.up-tour__hit[data-go="scroll"].is-press .up-tour__ring { animation: upTourSwipeNow .5s ease-in both; }
.up-tour__ring.is-nudge { animation: upTourNudge .7s ease-out 2, upTourPulse 1.8s ease-in-out 1.4s infinite; }
@keyframes upTourGlow { 50% { opacity: .35; } }
@keyframes upTourPulse { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.06); } }
@keyframes upTourPress { 0% { transform: scale(1); } 45% { transform: scale(.72); background: rgba(64, 196, 255, .65); } 100% { transform: scale(.8); background: rgba(64, 196, 255, .55); } }
@keyframes upTourSwipe { 0% { transform: translateY(30px); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-40px); opacity: 0; } }
@keyframes upTourSwipeNow { from { transform: translateY(20px); } to { transform: translateY(-70px); opacity: 0; } }
@keyframes upTourNudge { 0% { transform: scale(1); } 40% { transform: scale(1.7); box-shadow: 0 0 0 10px rgba(64, 196, 255, .35); } 100% { transform: scale(1); } }

/* ---------------------------------------------------------------- what is happening, the controls and the chapters */
.up-tile.up-tour .up-tour__say { margin: 0; max-width: 30ch; min-height: 2.7em; font-size: clamp(17px, 1.35vw, 19px); font-weight: 650; line-height: 1.35; letter-spacing: -.01em; color: var(--ink); }
.up-tour__ctrl { display: flex; align-items: center; gap: 8px; }
.up-tour__btn { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid rgba(10, 10, 12, .12); background: #fff; color: var(--ink); cursor: pointer; transition: transform .15s, background .15s; }
.up-tour__btn:hover { transform: translateY(-1px); }
.up-tour__btn:focus-visible, .up-tour__chapters button:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.up-tour__btn--play { background: var(--ink); border-color: var(--ink); color: #fff; }
.up-tour__btn--play .up-tour__pause, .up-tour.is-playing .up-tour__btn--play .up-tour__play { display: none; }
.up-tour.is-playing .up-tour__btn--play .up-tour__pause { display: block; }
.up-tour__count { margin-left: 6px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }

.up-tour__chapters { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.up-tour__chapters button { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; overflow: hidden; border: 1px solid transparent; border-radius: 12px; background: rgba(255, 255, 255, .42); color: var(--ink2, #2a2b31); font: inherit; font-size: 15px; text-align: left; cursor: pointer; transition: background .2s, border-color .2s; }
.up-tour__chapters button:hover { background: rgba(255, 255, 255, .75); }
.up-tour__chapters b { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(10, 10, 12, .08); font-size: 13px; font-weight: 700; }
.up-tour__chapters i { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--violet); transition: width .45s ease; }
.up-tour__chapters .is-on { background: #fff; border-color: rgba(10, 10, 12, .1); font-weight: 700; color: var(--ink); }
.up-tour__chapters .is-on b { background: var(--violet); color: #fff; }
.up-tour__chapters .is-done b { background: var(--ink); color: #fff; }
.up-tile.up-tour .up-tour__note { margin: 2px 0 0; max-width: none; font-size: 13px; color: var(--muted); }
.up-tour__note a { color: var(--ink); font-weight: 600; }

/* before the script runs (or without it) the first screen shows, still and tidy */
.up-tour:not(.is-live) .up-tour__ctrl, .up-tour:not(.is-live) .up-tour__hit { display: none; }

/* ---------------------------------------------------------------- tablets: the tile runs full width above the other two */
@media (max-width: 1080px) {
	.up-bento:has(.up-tour) { --pw: clamp(280px, 36vw, 330px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gx); }
	.up-bento .up-tile.up-tour.up-phonetile {
		display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) var(--pw); grid-template-areas: "head phone" "steps phone";
		grid-template-rows: auto 1fr; column-gap: var(--gx); margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(10, 10, 12, .09);
	}
	.up-tour__head { grid-area: head; }
	.up-tour__steps { grid-area: steps; padding-top: 22px; }
	.up-tour__phone { grid-area: phone; align-self: center; }
	.up-bento:has(.up-tour) > .up-tile:last-child { padding-left: var(--gx); border-left: 1px solid rgba(10, 10, 12, .09); }
}

/* ---------------------------------------------------------------- phones: words, then the phone, then the chapters as a row */
@media (max-width: 820px) {
	.up-bento:has(.up-tour) { --pw: min(310px, 76vw); }
	.up-bento .up-tile.up-tour.up-phonetile { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "phone" "steps"; grid-template-rows: auto; row-gap: 24px; }
	.up-tour__steps { padding-top: 0; }
	.up-tour__head { text-align: center; }
	.up-tile.up-tour h2, .up-tile.up-tour .up-tour__lead { margin-left: auto; margin-right: auto; }
	.up-tour__steps { align-items: center; text-align: center; }
	.up-tile.up-tour .up-tour__say { min-height: 2.7em; }
	.up-tour__chapters { flex-direction: row; gap: 6px; width: 100%; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; padding-bottom: 2px; }
	.up-tour__chapters::-webkit-scrollbar { display: none; }
	.up-tour__chapters li { flex: none; }
	.up-tour__chapters button { width: auto; padding: 8px 12px 9px; font-size: 14px; white-space: nowrap; }
	.up-tour__chapters b { width: 22px; height: 22px; font-size: 12px; }
}

@media (max-width: 600px) {
	.up-bento:has(.up-tour) { padding: 26px 20px; border-radius: var(--r, 20px); }
	.up-bento:has(.up-tour) > .up-tile:last-child { margin-top: 28px; padding: 28px 0 0; border-left: 0; border-top: 1px solid rgba(10, 10, 12, .09); }
}

@media (prefers-reduced-motion: reduce) {
	.up-tour__img.is-in, .up-tour__ring, .up-tour__hit::before { animation: none !important; }
}

/* ---------------------------------------------------------------- Truth Spine page: the same real phone among the fanned cards
   It takes the old drawn phone's place and width (19em of the stage), with the true screen shape.
   The stage was a fixed 31em tall inside a section that hides overflow, so the phone ran into "Facts first": it now grows to fit. */
.up-tour--solo { --pw: 19em; flex: none; position: relative; z-index: 3; width: var(--pw); height: auto; padding: 0; background: none; box-shadow: none; }
.up-tour--solo .up-tour__device { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 0 0 1.5px #1c2444, 0 3em 7em rgba(0, 4, 36, .55), 0 0 6em var(--glow, rgba(45, 91, 255, .45)); }
/* The ring is a full circle 72em across (top -3.5em), but the stage was only 31em tall, so the circle was cut flat at the
   bottom and the phone stood on the cut: the picture looked unfinished. Now the stage shows the whole ring (to 68.5em,
   plus its glow) and the phone sits in the middle of it (ring centre 32.5em of the stage = 25em of the phone frame,
   which is 1.3x the stage's text size; 1.36x on phones). The phone is 2.2246 times as tall as it is wide. */
.ua-splash .ua-stage:has(.up-tour--solo) { height: 71em !important; }
.up-tour--solo { --rc: 25em; margin-top: calc(var(--rc) - var(--pw) * 1.1123); }
.up-tour--solo .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
@media (max-width: 700px) { .up-tour--solo { --rc: 23.9em; } }
@media (max-width: 600px) { .up-tour--solo { --pw: min(250px, 66vw); } }
/* the fan of cards sat in the top half of the ring; move it down so it balances around the ring's middle (rotation kept) */
.ua-splash .ua-stage:has(.up-tour--solo) > div[style*="rotate("] { translate: 0 10em; }
