/* The work section: the websites' recordings riding a tunnel of cards (js/tunnel.js), full width of the page,
   then the three websites listed under it, each with its link */
@media (max-width: 599px) { .sites { display: block; padding-top: 44px; } }   /* (phones: right after the buttons, in place of the slideshow there) */

.work-tunnel { position: relative; margin: clamp(28px, 4vh, 48px) calc(50% - 50vw) 0; width: 100vw; }
.work-tunnel .tf-frame { --tf-bg: transparent; --tf-ink: var(--silver); width: 100%; height: clamp(400px, min(76vh, 54vw), 760px); }
@media (max-width: 599px) { .work-tunnel .tf-frame { height: clamp(260px, 40vh, 360px); } }

/* the slider itself (from the Tunnel Fold Slider template) */
.tf-frame { display: grid; place-items: center; overflow: hidden; }
.tf-root { --tf-pad: clamp(16px, 3cqw, 40px); --tf-band: clamp(36px, 9cqh, 84px); --tf-band-top: 0px; --tf-band-bottom: 0px; position: relative; width: 100%; height: 100%; background: var(--tf-bg); color: var(--tf-ink); overflow: hidden; outline: none; container-type: size; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.tf-root[data-draggable] { cursor: grab; }
.tf-root[data-dragging] { cursor: grabbing; }
.tf-root:focus-visible::after { content: ''; position: absolute; inset: 0; z-index: 3; box-shadow: inset 0 0 0 2px var(--blue-soft); pointer-events: none; }
.tf-gl { position: absolute; left: 0; right: 0; top: var(--tf-band-top); bottom: var(--tf-band-bottom); z-index: 1; overflow: hidden; pointer-events: none; }
.tf-canvas { display: block; width: 100%; height: 100%; }
.tf-still { display: none; position: absolute; left: 50%; top: 50%; z-index: 1; width: min(70cqw, 90cqh * 1.67); aspect-ratio: 1512 / 906; object-fit: cover; border-radius: 6px; transform: translate(-50%, -50%); }
.tf-root[data-tf-fallback] .tf-still { display: block; }
.tf-toggle { position: absolute; left: 16px; top: 16px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--bg); color: var(--text); cursor: pointer; clip-path: inset(50%); opacity: 0; }
.tf-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tf-toggle .tf-play, .tf-toggle[aria-pressed="true"] .tf-pause { display: none; }
.tf-toggle[aria-pressed="true"] .tf-play { display: block; }
.tf-toggle:focus-visible { clip-path: none; opacity: 1; outline: 2px solid var(--blue-soft); outline-offset: 2px; }
.tf-live { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* the three websites, one row each */
.work-list { list-style: none; margin: clamp(40px, 6vh, 72px) 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.work-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px clamp(20px, 3vw, 48px); align-items: baseline; padding: clamp(22px, 3vh, 34px) 0; border-bottom: 1px solid var(--line-strong); }
.work-item__num { font-size: 13px; letter-spacing: 0.16em; color: var(--muted); }
.work-item__name { font-size: clamp(1.3rem, 2vw, 1.9rem); font-weight: 400; line-height: 1.15; text-transform: uppercase; }
.work-item__desc { margin-top: 10px; max-width: 62ch; color: var(--silver); font-size: 15px; }
.work-item__desc em { color: var(--muted); }
.work-item__visit { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); font-size: 14px; text-decoration: none; white-space: nowrap; transition: background 0.25s var(--ease), color 0.25s var(--ease); }
.work-item__visit:hover, .work-item__visit:focus-visible { background: var(--text); color: var(--bg); }
@media (max-width: 760px) {
  .work-item { grid-template-columns: 40px minmax(0, 1fr); }
  .work-item__visit { grid-column: 2; justify-self: start; margin-top: 10px; }
}

/* The 3D logo (js/logo-3d.js): the symbol made solid, laid over its picture, which it hides once drawn */
.mark__3d, .wordmark__3d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease); }
.mark__3d.is-on { opacity: 1; }
.mark__3d { z-index: 1; }
.mark__3d { inset: -14%; width: 128%; height: 128%; filter: drop-shadow(0 8px 26px rgba(59, 123, 255, 0.35)); }
.wordmark { position: relative; }
.wordmark__3d { left: -14%; top: 50%; bottom: auto; width: 128%; height: auto; aspect-ratio: 1; transform: translateY(-50%); }
.js .wordmark.is-in .wordmark__3d.is-on { opacity: 1; }
.wordmark__logo.is-hidden { opacity: 0 !important; }
@media (max-width: 599px) { .wordmark__3d { display: none; } }

/* "Design. Build. Launch. Grow." on one line under the tunnel */
.work-tunnel__words { margin: clamp(10px, 2vh, 20px) 0 0; text-align: center; white-space: nowrap; font: 500 clamp(12px, 1.15vw, 15px)/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver); }

/* The home page opens on the tunnel: it fills the first screen under the header, with "Design. Build. Launch. Grow."
   along the bottom (every screen). Its title stays for screen readers; "Your Website / Our project." comes next */
.sites.wrap { display: flex; flex-direction: column; max-width: none; min-height: calc(100svh - var(--nav-h)); padding-block: 0; --tw: clamp(56px, 8vh, 88px); }
.sites > .eyebrow, .sites > .sites__title { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sites .work-tunnel { margin-top: 0; }
.sites .work-tunnel .tf-frame { height: calc(100svh - var(--nav-h) - var(--tw)); min-height: 300px; }
.sites .work-tunnel__words { box-sizing: border-box; height: var(--tw); margin: 0; padding-top: clamp(10px, 2vh, 20px); }
@media (max-width: 599px) { .sites.wrap { display: flex; } }
/* (screens held upright - phones and iPads: the tunnel is a band across, so it keeps a band's shape - a full-height
   frame would zoom it in too far on a phone and leave it thin on an iPad - in the middle of the first screen, with the
   words just under it) */
@media (orientation: portrait) and (max-width: 1099px) {
  .sites.wrap { justify-content: center; }
  .sites .work-tunnel .tf-frame { height: clamp(300px, 42svh, 560px); }
  /* (and its title over it, filling the screen's height: "Different websites, different businesses.") */
  .sites > .sites__title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; margin: 0 0 clamp(4px, 1.5vh, 20px); text-align: center; }
  .sites > .sites__title .sites__script, .sites > .sites__title em { margin-inline: auto; }
}
@media (orientation: portrait) and (max-width: 599px) { .sites .work-tunnel .tf-frame { height: clamp(260px, 40vh, 360px); } }

/* The header's logo is the star logo on every screen (the intro's stars land on it, and it stays stars - never the
   picture): fixed exactly over the header's picture logo, which stays hidden. Phones place it in site.css; here the
   wider screens, from the header's own sizes (the logo clamp(44px, 3.6vw, 54px) wide, the bar's padding, its middle) */
@media (min-width: 600px) {
  .hero__mark {
    --hl: clamp(44px, 3.6vw, 54px);
    position: fixed; z-index: 61; margin: 0; pointer-events: none; grid-row: auto; justify-self: auto; align-self: auto;
    width: calc(var(--hl) / 0.84);   /* (its stars - 84% of it - the size of the header logo, centred on it) */
    left: calc(max(30px, env(safe-area-inset-left)) - var(--hl) * 0.0952);
    top: calc(var(--nav-h) / 2 - var(--hl) / 1.68);
  }
  .hero__mark .orbit { display: none; }
  .nav .wordmark__logo { visibility: hidden; }
}
.js .hero__mark { transition: opacity 0.4s var(--ease); }
.nav-away .hero__mark { opacity: 0 !important; pointer-events: none; }   /* (away with the header as you scroll down) */
/* (while the intro's logo waits in the middle of the screen and flies up, the header's own is hidden: it lands on it) */
.logo-waiting .hero__mark { opacity: 0 !important; }
.intro.is-parked { pointer-events: none; cursor: auto; }   /* (the logo floats over the page: the page takes clicks) */

/* The websites under the tunnel fade in one by one as they come up the screen (js/site.js lets them in one at a time) */
@media (prefers-reduced-motion: no-preference) {
  .js .work-list > .work-item.reveal { transform: none; transition: opacity 0.8s var(--ease); transition-delay: 0s; }
}

/* (phones show the tunnel too now, the same slideshow as every other screen: the band of websites in the middle of the
   first screen, its title over it, as on a tablet held upright - the phone reel is in unused/) */

/* Under the tunnel: the websites live on their own domains, one row each with its link (the .work-item rows above),
   full width with the page's gutter */
.live-sites.wrap { max-width: none; padding-block: clamp(64px, 10vh, 120px) clamp(56px, 8vh, 96px); }
@media (min-width: 1000px) { .live-sites.wrap { padding-inline: max(46px, env(safe-area-inset-left)); } }
.live-sites .eyebrow { margin-bottom: 14px; }
.live-sites__title { font-size: clamp(1.9rem, 4vw, 3.6rem); font-weight: 400; line-height: 1.06; letter-spacing: -0.01em; text-transform: uppercase; }
.live-sites .work-list { margin-top: clamp(28px, 4vh, 48px); }
.live-sites .work-item__desc { margin-top: 6px; overflow-wrap: anywhere; text-transform: none; letter-spacing: 0.02em; }

/* Connect: at the foot of the slideshow (over the tunnel's bottom edge, just above "Design. Build. Launch. Grow."), a see-through pill like Youth Platoon's "Donate to Aleh" - bold white words, a
   thin light border. Pressed, it fades and shrinks away and three pills of the same look take its place, spreading out
   from the middle: WhatsApp, Email, Call - opacity and transform only */
.connect { position: absolute; left: 50%; bottom: calc(var(--tw, 0px) + 12px); z-index: 4; display: grid; place-items: center; transform: translateX(-50%); text-transform: none; letter-spacing: normal; }
.connect > * { grid-area: 1 / 1; }
.connect__btn, .connect__opt, .connect__go { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 1px solid var(--blue-soft); border-radius: 99px; background: transparent; color: #fff; font: 700 14.5px/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.connect__btn { transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1), background 0.25s; }
.connect__btn:hover, .connect__opt:hover, .connect__go:hover { background: rgba(141, 182, 255, 0.12); }
.connect__btn:focus-visible, .connect__opt:focus-visible, .connect__go:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 3px; }
.connect.is-open .connect__btn { opacity: 0; transform: scale(0.86); pointer-events: none; }
.connect__menu { display: flex; gap: 10px; width: max-content; visibility: hidden; transition: visibility 0s linear 0.45s; }
.connect.is-open .connect__menu { visibility: visible; transition: none; }
.connect__opt { opacity: 0; transition: opacity 0.3s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1), background 0.25s; }
.connect__opt:first-child { transform: translate3d(70%, 0, 0) scale(0.9); }
.connect__opt:nth-child(2) { transform: scale(0.9); }
.connect__opt:last-child { transform: translate3d(-70%, 0, 0) scale(0.9); }
.connect.is-open .connect__opt { opacity: 1; transform: none; }
.connect.is-open .connect__opt:nth-child(2) { transition-delay: 0.03s; }
.connect.is-open .connect__opt:last-child { transition-delay: 0.06s; }
/* (the last step: the pressed choice's number or address on one pill, an arrow beside it - it takes the three pills'
   place as they shrink away) */
.connect__go { gap: 10px; opacity: 0; visibility: hidden; transform: scale(0.9); transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1), background 0.25s, visibility 0s linear 0.45s; font-variant-numeric: tabular-nums; }
.connect__go svg { flex: none; width: 15px; height: 15px; color: var(--blue-soft); }
.connect.is-go .connect__go { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s ease 0.08s, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1) 0.08s, background 0.25s, visibility 0s; }
.connect.is-go .connect__menu { visibility: hidden; transition: visibility 0s linear 0.3s; }
.connect.is-go .connect__opt { opacity: 0; transform: scale(0.86); transition-delay: 0s; pointer-events: none; }
@media (max-width: 420px) { .connect__opt { padding: 0 20px; } .connect__menu { gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .connect__btn, .connect__opt, .connect__go { transition: opacity 0.2s; } }

/* The websites' rows all sit on the same band of dark blue. Only each row's "Visit website" button changes: it fills
   with a lighter and lighter blue as its row travels up the screen (js/site.js sets --lit, 0 to 1, on each row: the
   fill's opacity). No numbers beside the names. */
.live-sites .work-list { border-top: 0; display: grid; gap: 8px; }
.live-sites .work-item { position: relative; grid-template-columns: minmax(0, 1fr) auto; border-bottom: 0; padding-inline: clamp(16px, 2.4vw, 32px); border-radius: 18px; background: #0b1f52; }
.live-sites .work-item__visit { position: relative; isolation: isolate; }
.live-sites .work-item__visit::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #2052bd; opacity: var(--lit, 0); transition: opacity 0.25s var(--ease); will-change: opacity; }
.live-sites .work-item__visit:hover::before, .live-sites .work-item__visit:focus-visible::before { opacity: 0; }
@media (max-width: 760px) {
  .live-sites .work-item { grid-template-columns: minmax(0, 1fr); }
  .live-sites .work-item__visit { grid-column: 1; }
}
.live-sites .work-item__desc { color: #dbe3f2; }

/* On a computer the slideshow doesn't travel up with the page: it stays under the header while the page scrolls its
   first third of a screen (the section is that much taller, and the websites' list starts that much sooner, so the list
   still comes up from the bottom of the screen straight away), fading away as it goes (js/site.js) */
@media (min-width: 1000px) and (orientation: landscape) {
  :root { --pin: 32vh; }
  .sites.wrap { min-height: calc(100svh - var(--nav-h) + var(--pin)); justify-content: flex-start; }
  .sites .work-tunnel { position: sticky; top: var(--nav-h); }
  .live-sites.wrap { position: relative; z-index: 1; margin-top: calc(-1 * var(--pin)); }
}
.sites .work-tunnel { will-change: opacity; }

/* The header stays put while the page scrolls. Once the page has moved, its backing fades in: a lighter blue along its
   top edge, fading down into the page's own blue by two thirds of the way - the bottom third is the page's colour, so
   there is no line under it, just the page passing behind - opacity only */
.js.nav-solid:not(.menu-open):not(.menu-closing) .nav__bg { opacity: 1; }
.nav__bg::before { background: linear-gradient(to bottom, #123581 0%, #0b2460 33.4%, var(--bg) 66.7%, var(--bg) 100%); }   /* (a deeper blue at the top than before) */
/* (and under it the page's blue thins out to nothing over a short stretch, so what scrolls up fades away as it comes
   to the header instead of meeting its edge; it takes no clicks) */
.nav__bg { pointer-events: none; }
.nav__bg::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: clamp(36px, 6vh, 64px); background: linear-gradient(to bottom, var(--bg) 0%, rgba(6, 21, 58, 0.72) 38%, rgba(6, 21, 58, 0) 100%); pointer-events: none; }

/* Phones only: the logo lives in the header (the intro sends it there by itself: js/site.js), so the title and the
   slideshow start right under the header instead of half-way down the screen; "Design. Build. Launch. Grow." sits
   under the slideshow and the button under that, in the flow of the page, saying "Connect with us now"; the websites'
   list follows straight on */
.connect__long { display: none; }
@media (max-width: 599px) {
  .sites.wrap { justify-content: flex-start; min-height: 0; padding-bottom: 40px; }
  .sites > .sites__title { margin-top: clamp(6px, 1.6vh, 18px); }
  .sites .work-tunnel { display: flex; flex-direction: column; }
  .sites .work-tunnel .tf-frame { order: 1; }
  .sites .work-tunnel__words { order: 2; height: auto; padding-top: 14px; }
  .connect { order: 3; position: static; transform: none; align-self: center; margin-top: 18px; }
  .connect__short { display: none; }
  .connect__long { display: inline; }
}

/* The intro's loading line: thin, just the one light-blue line (no track behind it), under the logo once it has formed;
   its fill is scaled along it (js/site.js) */
.intro__load { position: absolute; z-index: 2; height: 2px; border-radius: 2px; overflow: hidden; opacity: 0; pointer-events: none; }
.intro__load i { position: absolute; inset: 0; border-radius: inherit; background: var(--blue-soft); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }
