/* Trifocal Media — home page fly-through. Loaded after tf.css on the home page only. */

body.fly { background: #0c0d0e; color: #f3f1ec; --acc: #ff5a2e; --fmute: #a8a49c; }
.fly .nav { background: transparent; border-color: transparent; color: #f3f1ec; }
.fly .nav.is-solid { background: rgba(12, 13, 14, .9); border-color: rgba(243, 241, 236, .12); }
.fly .mono { font: 500 12px/1.2 "JetBrains Mono", monospace; letter-spacing: .03em; }
.fly .disp { font-family: "Archivo"; font-variation-settings: "wdth" 120; font-weight: 600; letter-spacing: -.05em; line-height: .9; margin: 0; max-width: none; }

/* the scroll length; the stage stays put while the camera moves */
.runway { height: calc(var(--stations, 7) * 110vh); }
.stage { position: fixed; inset: 0; perspective: 900px; overflow: hidden; }
.glow { position: fixed; inset: -20%; pointer-events: none; background: radial-gradient(40% 40% at 50% 55%, var(--glow, rgba(255, 90, 46, .28)), transparent 70%); transition: background .8s; }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .12; 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.world { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; will-change: transform; }
.el { position: absolute; left: 0; top: 0; transform-style: preserve-3d; will-change: transform, opacity; backface-visibility: hidden; }
.el.txt { width: min(980px, 88vw); text-align: center; }
.el h1, .el h2 { font-size: clamp(50px, 9.5vw, 150px); }
.el h2 em { font-style: normal; color: var(--acc); }
.el .lead { max-width: 46ch; margin: 22px auto 0; color: var(--fmute); font-size: clamp(16px, 1.4vw, 20px); }
.el .kick { color: var(--acc); margin-bottom: 18px; display: block; }
.el .btn-row { justify-content: center; margin-top: 30px; }
.shot { border-radius: 18px; overflow: hidden; background: #1b1c1e; box-shadow: 0 40px 80px rgba(0, 0, 0, .5); }
.shot img, .shot video { width: 100%; height: 100%; object-fit: cover; }
.phone { width: clamp(170px, 16.5vw, 250px); aspect-ratio: 9 / 19.5; border-radius: 34px; padding: 8px; background: #1b1c1e; box-shadow: 0 40px 80px rgba(0, 0, 0, .55), inset 0 0 0 1.5px rgba(255, 255, 255, .12); }
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: 27px; }
.ad { width: clamp(220px, 22vw, 320px); background: #f3f1ec; color: #111; border-radius: 16px; padding: 12px; box-shadow: 0 40px 80px rgba(0, 0, 0, .5); }
.ad .hd { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.ad .hd i { width: 26px; height: 26px; border-radius: 50%; background: var(--acc); }
.ad .hd small { display: block; font-weight: 400; color: #555; font-size: 12px; }
.ad .im { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; }
.ad .im img, .ad .im video { width: 100%; height: 100%; object-fit: cover; }
.ad .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; font-weight: 600; }
.ad .ft b { background: #111; color: #fff; border-radius: 6px; padding: 7px 10px; font-size: 12px; }
.browser { width: min(760px, 80vw); border-radius: 14px; overflow: hidden; background: #1b1c1e; box-shadow: 0 50px 100px rgba(0, 0, 0, .55); }
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #26272a; }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #555; }
.browser .bar span { margin-left: 12px; flex: 1; background: #151618; border-radius: 6px; padding: 5px 10px; font: 500 12px "JetBrains Mono", monospace; color: var(--fmute); }
.browser .vp { aspect-ratio: 16 / 9; position: relative; }
.browser .vp video { width: 100%; height: 100%; object-fit: cover; }
.browser .vp .h { position: absolute; left: 5%; bottom: 10%; font: 600 clamp(18px, 3vw, 38px)/.95 "Archivo"; font-variation-settings: "wdth" 115; letter-spacing: -.04em; max-width: 12ch; }
.chip { background: rgba(243, 241, 236, .08); border: 1px solid rgba(243, 241, 236, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; padding: 14px 16px; width: clamp(220px, 20vw, 290px); font-size: 15px; line-height: 1.45; }
.chip .mono { color: var(--acc); display: block; margin-bottom: 6px; }
.client { font: 600 clamp(26px, 3vw, 48px)/1 "Archivo"; font-variation-settings: "wdth" 112; letter-spacing: -.03em; white-space: nowrap; color: rgba(243, 241, 236, .85); }

.chapters { position: fixed; z-index: 4; left: var(--gut); top: 50%; translate: 0 -50%; display: grid; gap: 14px; transition: opacity .3s; }
.chapters button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; color: var(--fmute); font: 500 12px "JetBrains Mono", monospace; transition: color .3s; min-height: 24px; }
.chapters button::before { content: ""; width: 18px; height: 1px; background: currentColor; transition: width .3s; }
.chapters button.on { color: #f3f1ec; }
.chapters button.on::before { width: 40px; background: var(--acc); }
.chapters button:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.depth { position: fixed; z-index: 4; right: var(--gut); bottom: 22px; color: var(--fmute); transition: opacity .3s; }
.hint { position: fixed; z-index: 4; left: 50%; bottom: 22px; translate: -50% 0; color: var(--fmute); transition: opacity .4s; }
@media (max-width: 899px) { .chapters { display: none; } .hint { left: var(--gut); translate: none; } }
@media (max-width: 599px) { .chip { width: min(200px, 54vw); font-size: 14px; padding: 12px 14px; } .ad { width: 46vw; } .phone { width: 30vw; border-radius: 22px; padding: 5px; } .phone video { border-radius: 18px; } }

/* the footer rises over the stage once the flight ends */
.fly .closing { position: relative; z-index: 6; }

/* no motion, or no script: a plain stack of the same chapters */
:is(.flat, html:not(.fly-on)) :is(.runway, .chapters, .depth, .hint) { display: none; }
:is(.flat, html:not(.fly-on)) .stage { position: static; perspective: none; overflow: visible; }
:is(.flat, html:not(.fly-on)) .world { position: static; transform: none !important; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 48px; padding: calc(var(--nav) + 64px) var(--gut) 96px; }
:is(.flat, html:not(.fly-on)) .el { position: static; transform: none !important; opacity: 1 !important; visibility: visible !important; }
:is(.flat, html:not(.fly-on)) .el.txt { flex: 1 1 100%; margin: 72px auto 0; }
:is(.flat, html:not(.fly-on)) :is(.el.backdrop, .el[data-flyby]) { display: none; }
