:root {
	--rail: 100px;
	--line: rgba(255, 255, 255, .32);
	--ink: #fff;
	--muted: rgba(255, 255, 255, .62);
	--bg: #050506;
	--ease-out: cubic-bezier(.19, 1, .22, 1);
	--display: "Bebas Neue", "Oswald", Impact, sans-serif;
	--body: "Open Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.tr-page { background: var(--bg); color: var(--ink); font: 400 14px/1.85 var(--body); -webkit-font-smoothing: antialiased; }
body.tr-page--showcase { overflow: hidden; overscroll-behavior: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.tr-page :focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ---------- Background video (one loop behind every slide) ---------- */
.tr-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.tr-bg__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tr-bg__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, .3) 45%, rgba(0, 0, 0, .05) 80%), linear-gradient(0deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0) 30%); }

.tr-no-text .tr-bg__shade { background: linear-gradient(0deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 35%); }

.tr-ph { position: absolute; inset: 0; background: radial-gradient(120% 90% at 78% 30%, #24406b 0%, #0c1426 45%, #03050a 100%); }
.tr-ph::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 80px 80px; }
.tr-ph span, .tr-ph small { position: absolute; right: calc(var(--rail) + 60px); font-family: var(--display); letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .38); }
.tr-ph span { top: 44px; font-size: 15px; }
.tr-ph small { top: 68px; font-size: 13px; }

/* ---------- Frame ---------- */
.tr-rail {
	position: fixed; top: 0; bottom: 0; width: var(--rail); z-index: 30;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tr-rail--left { left: 0; border-right: 1px solid var(--line); }
.tr-rail--right { right: 0; }

.custom-logo-link { display: block; }
.custom-logo { display: block; max-width: 64px; max-height: 140px; width: auto; height: auto; }

.tr-progress { position: absolute; left: -1px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tr-progress span { position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: top; transition: none; }
.tr-progress.is-running span { transform: scaleY(1); transition-property: transform; transition-timing-function: linear; }
.tr-count { font: 34px/1 var(--display); letter-spacing: .06em; display: inline-block; }
.tr-count.is-swapping { animation: tr-count .6s var(--ease-out); }
@keyframes tr-count { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.tr-corner { position: fixed; z-index: 30; bottom: 46px; }
.tr-corner--left { left: calc(var(--rail) + 40px); }
.tr-corner--top { left: calc(var(--rail) + 40px); top: 44px; bottom: auto; }
.tr-badge { margin: 0; font: 17px/1 var(--display); letter-spacing: .42em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .45); }
.tr-social svg, .tr-btn--line { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45)); }
.admin-bar .tr-corner--top { top: 76px; }
.tr-corner--right { right: calc(var(--rail) + 32px); }
.tr-social { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }
.tr-social a { display: block; opacity: .9; transition: opacity .3s; }
.tr-social a:hover { opacity: .55; }
.tr-social svg { display: block; }

.tr-pager { display: flex; align-items: center; gap: 24px; }
.tr-pager button { text-transform: uppercase; font: 17px/1 var(--display); letter-spacing: .22em; padding: 6px 0; position: relative; }
.tr-pager button::after { content: ""; position: absolute; left: 0; right: .22em; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.tr-pager button:hover::after { transform: scaleX(1); transform-origin: left; }
.tr-pager__sep { width: 1px; height: 36px; background: var(--line); }

/* ---------- Slides (copy only, over the video) ---------- */
.tr-showcase { position: fixed; inset: 0; z-index: 10; }
.tr-slide { position: absolute; inset: 0; visibility: hidden; }
.tr-slide.is-active, .tr-slide.is-leaving { visibility: visible; }

.tr-slide__content { position: absolute; left: 21.5vw; right: calc(var(--rail) + 40px); top: 50%; transform: translateY(-54%); }
.tr-tagline {
	text-transform: uppercase; margin: 0 0 22px; font: 16px/1 var(--display); letter-spacing: .42em; color: var(--muted);
	opacity: 0; transform: translateY(12px); transition: opacity .45s, transform .45s;
}
.tr-headline { margin: 0; font: 400 clamp(52px, 7.4vw, 124px)/.92 var(--display); letter-spacing: .005em; text-transform: uppercase; }
.tr-line { display: block; overflow: hidden; padding-top: .04em; margin-top: -.04em; }
.tr-line__in { display: inline-block; transform: translateY(108%); transition: transform .5s cubic-bezier(.55, 0, .7, .2); }

/* Buttons: fixed in place, always visible */
.tr-actions { position: fixed; z-index: 20; left: 21.5vw; top: 66%; display: flex; flex-wrap: wrap; gap: 26px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.tr-btn {
	display: inline-flex; align-items: center; justify-content: center; min-width: 238px;
	padding: 17px 40px 15px; border: 2px solid var(--ink); text-decoration: none;
	text-transform: uppercase; font: 17px/1 var(--display); letter-spacing: .2em; padding-left: calc(40px + .2em);
	transition: background-color .35s, color .35s, border-color .35s;
}
.tr-btn--line { border-color: rgba(255, 255, 255, .45); }
.tr-btn--line:hover { border-color: var(--ink); background: rgba(255, 255, 255, .08); }
.tr-btn--solid { background: var(--ink); color: #000; }
.tr-btn--solid:hover { background: transparent; color: var(--ink); }

/* Revealed: staggered entrance */
.tr-slide.is-revealed .tr-tagline { opacity: 1; transform: none; transition: opacity .8s .05s, transform .9s .05s var(--ease-out); }
.tr-slide.is-revealed .tr-line__in { transform: none; transition: transform 1.1s var(--ease-out); transition-delay: calc(.15s + var(--d, 0ms)); }

/* Leaving: copy lifts out */
.tr-slide.is-leaving .tr-line__in { transform: translateY(-108%); }
.tr-slide.is-leaving .tr-tagline { opacity: 0; transform: translateY(-10px); }

/* Frame fades in on load */
.tr-page--showcase .tr-rail, .tr-page--showcase .tr-corner { opacity: 0; transition: opacity 1.2s .2s; }
.tr-ready .tr-rail, .tr-ready .tr-corner { opacity: 1; }
.tr-rail--right { transition-delay: .5s; }

/* Logged-in admin bar */
.admin-bar .tr-rail { top: 32px; }

/* ---------- Inner pages (basic) ---------- */
.tr-inner { max-width: 760px; margin: 0 auto; padding: 120px 32px 120px calc(var(--rail) + 32px); }
.tr-inner__title { font: 400 clamp(40px, 6vw, 80px)/1 var(--display); margin: 0 0 24px; }
.tr-inner__title a { text-decoration: none; }
.tr-inner article + article { margin-top: 64px; }
.tr-inner__body { color: var(--muted); font-size: 15px; }

/* ---------- Tablet / mobile ---------- */
@media (max-width: 1024px) {
	:root { --rail: 72px; }
	.tr-slide__content, .tr-actions { left: calc(var(--rail) + 48px); }
	.custom-logo { max-width: 48px; }
}

@media (max-width: 782px) {
	.admin-bar .tr-rail { top: 46px; }
}

@media (max-width: 767px) {
	:root { --rail: 0px; }
	.tr-rail--left { bottom: auto; width: 100%; height: 76px; border-right: 0; background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
	.custom-logo { max-width: none; max-height: 44px; }
	.tr-rail--right { top: auto; bottom: 0; width: 100%; height: 3px; }
	.tr-progress { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 2px; }
	.tr-progress span { transform: scaleX(0); transform-origin: left; }
	.tr-progress.is-running span { transform: scaleX(1); }
	.tr-count { display: none; }
	.tr-corner { bottom: 26px; }
	.tr-corner--left { left: 20px; }
	.tr-corner--top { left: 20px; top: 30px; }
	.tr-badge { font-size: 14px; letter-spacing: .3em; }
	.tr-corner--right { right: 20px; }
	.tr-pager { gap: 16px; }
	.tr-pager__sep { height: 24px; }
	.tr-slide__content { left: 20px; right: 20px; top: auto; bottom: 170px; transform: none; }
	.tr-tagline { font-size: 13px; margin-bottom: 14px; }
	.tr-headline { font-size: clamp(44px, 13.5vw, 72px); }
	.tr-actions { left: 20px; right: 20px; top: auto; bottom: 96px; gap: 12px; }
	.tr-btn { min-width: 0; flex: 1 1 140px; padding: 15px 14px 13px; font-size: 15px; letter-spacing: .14em; }
	.tr-ph span, .tr-ph small { right: 20px; }
	.tr-ph span { top: 96px; }
	.tr-ph small { top: 118px; }
	.tr-bg__shade { background: linear-gradient(0deg, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .25) 55%, rgba(0, 0, 0, .35) 100%); }
	.tr-inner { padding: 110px 20px 80px; }
}

@media (prefers-reduced-motion: reduce) {
	.tr-page *, .tr-page *::before, .tr-page *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
}
