/* Digital Projections: the main site's base, shared by every page (index.html, portfolio.html): the page, the type,
   the header and its menu, and the footer. Each page's own styles are in css/site.css (and css/portfolio.css).
   index.html keeps the intro's styles inline. */

:root {
  --ws: #ff9e6b;             /* coral: links, the section labels (index.html's intro defines it too) */
  --ws-rgb: 255,158,107;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }

/* ---------- The site ---------- */
html.is-site, html.is-site body { height: auto; }
html.is-site body { margin: 0; overflow: visible; background: #0e0a12; }
.site {
  --bg: #0e0a12; --bg-2: #151019; --line: rgba(255,240,230,0.09);
  --fg: #ece4ea; --muted: rgba(236,228,234,0.62);
  background: var(--bg); color: var(--fg);
  --body-font: 'Wix Madefor Text', system-ui, sans-serif;     /* the text face, header and menu included */
  font-family: var(--body-font); font-size: 18px; line-height: 1.65;
}
.site[hidden] { display: none; }
html.skip-intro .screen, html.skip-intro .mosaic { display: none !important; }
html.skip-intro .site[hidden], html.skip-intro .site-main[hidden] { display: block; }
/* Over the (fixed) intro while it fades in. will-change keeps the site on one compositing layer for good: if the layer
   were dropped when the fade ends, phones redraw it (and the header's backdrop blur switches what it samples) in
   the same frame, which flickers. */
.site { position: relative; z-index: 1; will-change: opacity; }
/* Where the full header sits at the top of the page, a still strip in its colours (as it looks over the page's dark):
   behind the header and the top section, so it only shows when the header unsticks right at the top. There the page
   drops back into place at once (no scroll to adjust) while the header slides down to meet it; without this, the
   page's dark and the painting's edge flash in the gap. Its height is the full header's (--tb + --mb + its 1px line). */
.site::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 133px; pointer-events: none;
  background: linear-gradient(180deg, rgb(17,14,44), rgb(23,19,58));
}
.wrap { max-width: 1664px; margin: 0 auto; padding: 0 32px; }     /* 1600px of content at 1920 */
.site a { color: inherit; }
.site :focus-visible { outline: 2px solid var(--ws); outline-offset: 3px; border-radius: 2px; }
/* <main> is focused from script (after the intro) so keyboard and screen-reader users start at the content; it isn't a
   control, so no ring (otherwise, after a key press, its bottom edge drew a coral line over the footer) */
.site .site-main:focus { outline: none; }

/* Header: the logo spans the top bar and the main bar. Scroll down and the top bar folds away while the logo shrinks
   into the main bar. That makes the sticky header --shrink shorter, so it switches on two thresholds (see the script).
   Nothing inside it is relaid out to do it: the whole header slides up by --shrink (the top bar going off the top of
   the screen) and gives that space back to the page with a negative margin, and the logo scales. Both are transforms,
   which the browser's compositor runs smoothly; sizing the bars each frame stuttered in Chrome on phones. */
.site-head {
  position: sticky; top: 0; z-index: 20; --tb: 52px; --mb: 80px; --logo: 102px; --logo-s: 44px; --edge: 32px;
  --mb-s: 80px; --mb-pad: 0px;     /* the main bar's height once stuck; the space under its contents (phones) */
  --logo-k: 0.4314;                /* the stuck logo's scale (--logo-s / --logo) */
  --shrink: calc(var(--tb) + var(--mb) - var(--mb-s));
  --j: 0.058;     /* the J's descender: share of the logo's height to drop it by, so DIGITAL..PROJECTIONS sits centred */
  --head: 22,18,58;                                   /* #16123A: dark blue leaning purple, opposite #EEECC1 on the wheel */
  --accent: #eeecc1; --accent-rgb: 238,236,193;
  --head-top: 17,14,46; --head-bottom: 24,20,62;      /* the same navy, a shade darker at the top and a touch brighter at the bottom */
  background: linear-gradient(180deg, rgba(var(--head-top),0.92), rgba(var(--head-bottom),0.9));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);   /* one panel behind both bars */
  transition: background-color 0.3s ease, transform 0.28s ease;
}
.topbar {
  height: var(--tb); overflow: hidden;
  color: var(--muted); font: 300 12.5px/1 'Lexend Exa', sans-serif; letter-spacing: 0.03em;
}
.topbar-in { display: flex; align-items: center; justify-content: flex-end; gap: 6px; height: var(--tb); padding-top: 12px; }
/* Phone and email as icons. Hover (or keyboard focus) unrolls the number or address like a scroll of paper: the
   words stay put while the icon, the roll, travels left to uncover them, with a curl of shadow at its edge. */
.tb-item {
  display: inline-flex; align-items: center; height: 34px; padding: 0 9px; border-radius: 17px;
  color: #fff; text-decoration: none; font-size: 14px;
}
.tb-item svg { width: 22px; height: 22px; flex: none; color: #fff; }
.tb-text {
  position: relative; display: inline-flex; justify-content: flex-end;   /* anchored right: revealed in place */
  max-width: 0; margin-left: 0; padding: 2px 0 4px;
  overflow-x: clip; overflow-y: visible;              /* clip the unrolling sideways only, never the descenders */
  transition: max-width 1.1s cubic-bezier(.45,0,.2,1), margin-left 1.1s cubic-bezier(.45,0,.2,1);
}
.tb-text > span { flex: none; white-space: nowrap; color: var(--accent); }
.tb-text::before {                                   /* the paper's curl, beside the roll */
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 16px; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(18,15,49,0.95), rgba(18,15,49,0));   /* the header's colour at the top bar's height */
  transition: opacity 0.35s ease 0.75s;
}
.tb-item:hover .tb-text, .tb-item:focus-visible .tb-text { max-width: var(--w, 30em); margin-left: 10px; }   /* --w: the text's own width (set in script), so the unroll takes the whole duration */
.tb-item:hover .tb-text::before, .tb-item:focus-visible .tb-text::before { opacity: 0; }
.tb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mainbar { position: relative; border-bottom: 1px solid transparent; transition: border-color 0.3s ease;
  container-type: inline-size; }   /* the menu's sizes go by its width (cqw): the window's, without a scroll bar */
.mainbar-in { display: flex; align-items: center; justify-content: flex-end; gap: 24px; height: var(--mb); }
.brand { position: absolute; z-index: 1; left: max(var(--edge), calc((100% - 1600px) / 2)); top: calc((var(--tb) + var(--mb) - var(--logo)) / 2 + var(--logo) * var(--j)); display: block;
  transform-origin: 0 0; transition: transform 0.28s ease; }
.brand img { display: block; height: var(--logo); width: auto; }
/* The logo is inline (img/logo-header.svg, drawn by includes/site-header.inc) so it can change as the header docks: the
   full header shows "Web Studio" in its glowing box; docked, the box fades out and "Web Studio" grows (1.15x) onto
   DIGITAL's baseline, where it's easier to read that small. DIGITAL and PROJECTIONS never change. Both moves use the
   logo's own shrink timing, so they start and end together; the two places come from the SVG (--lg-ws-full/-docked). */
.brand .lg { display: block; height: var(--logo); width: calc(var(--logo) * 4.0496); }   /* 432.405 x 106.776 */
/* Back to full size, the box starts building as "Web Studio" eases into place (at 0.2s, in the last 80ms of its move):
   the glow's 32 thin frames light up from the innermost out, 7ms apart, and the border last (each part's delay is --d,
   set in the SVG by logo/source/make-header-svg.py). Docking, it all fades out at once, as the lettering leaves. (A
   transition takes the timing of the state it's going to.) */
.brand .lg-box path { transition: opacity 0.07s ease calc(0.2s + var(--d, 0ms)); }
.brand .lg-ws { transform: var(--lg-ws-full); transform-box: view-box; transform-origin: 0 0; transition: transform 0.28s ease; }
.site-head.is-stuck .brand .lg-box path { opacity: 0; transition: opacity 0.28s ease; }
.site-head.is-stuck .brand .lg-ws { transform: var(--lg-ws-docked); }
.site-head.is-stuck {
  background: linear-gradient(180deg, rgba(var(--head-top),0.97), rgba(var(--head-bottom),0.96));
  transform: translateY(calc(-1 * var(--shrink))); margin-bottom: calc(-1 * var(--shrink));
}
/* stuck: the same logo scaled down from its top-left corner, to --logo-s tall and centred in the stuck main bar (the
   header's slide counted back in) */
.site-head.is-stuck .brand {
  transform: translateY(calc((var(--mb-s) - var(--logo-s)) / 2 + var(--logo-s) * var(--j) - (var(--tb) + var(--mb) - var(--logo)) / 2 - var(--logo) * var(--j) + var(--shrink))) scale(var(--logo-k));
}
.site-head.is-stuck .mainbar { border-bottom-color: var(--line); }
.site-head.no-anim, .site-head.no-anim * { transition: none !important; }
.nav { display: flex; align-items: baseline; }
/* Sized to the room beside the full-size logo (2026-11-12, when News joined the menu): the text is 20.5px wherever it
   fits, and the space between the links grows with the window as before (4.6cqw - 34px: 47px from 1760). Narrower,
   from about 1336px, the menu keeps 40px between the logo and Home: first the spaces close up (to 1em, at about
   1288px), then the text and spaces shrink together, the text rounded down to a half pixel, until it reaches 16px
   at 1140px, where the Menu button takes over. (Half pixels, as Contact's label measured within half a pixel of
   centre at all ten of them; some eighths sat up to 1.25px high.) The figures come from measuring the menu (8 links:
   29.22px of width per pixel of text, plus 30px) beside the 413px logo, so re-measure them if a link or the logo
   changes. */
.nav {
  font-size: clamp(16px, calc(2.7608cqw - 15.048px), 20.5px);
  font-size: clamp(16px, round(down, 2.7608cqw - 15.048px, 0.5px), 20.5px);
  gap: clamp(16px, min(4.6cqw - 34px, max(1em, 14.2857cqw - 163.446px)), 47px);
}
@media (min-width: 1140px) { .nav { position: relative; top: -1px; } }   /* lines the underline up with the logo's baseline */
.nav a { text-decoration: none; font-size: inherit; color: #fff; transition: color 0.2s ease, border-color 0.2s ease; }   /* white, like the logo */
/* an underline that grows out from the middle on hover (as on brooknwood.com), and stays, in cream, on the section you're in.
   It sits 4px under the letters, on the same line as the foot of PROJECTIONS in the logo (full or shrunk header), and
   reaches a little past the word at each end. */
.nav a:not(.nav-cta) { position: relative; padding: 12px 2px 4px; }
.nav a:not(.nav-cta)::after {
  /* 1.5px: drawn 2px and scaled, so it's a true 1.5px on any screen (a plain 1.5px box snaps to 1px on a 1x screen) */
  content: ''; position: absolute; left: -6px; right: -6px; bottom: 0; height: 2px; border-radius: 2px;
  background: #fff; transform: scale(0, 0.75); transform-origin: 50% 100%; transition: transform 0.35s cubic-bezier(.22,1,.36,1);
}
.nav a:not(.nav-cta):hover::after, .nav a:not(.nav-cta):focus-visible::after { transform: scale(1, 0.75); }
.nav a.is-active { color: var(--accent); }               /* the section you're in: cream */
.nav a.is-active::after { background: var(--accent); transform: scale(1, 0.75); }
.nav .nav-cta { color: #fff; border: 1px solid rgba(255,255,255,0.5); padding: 0.17em 1.12em; }
/* (the padding in proportion to the logo's Web Studio box, so it holds at every size: about 1.6 cap heights of space at each
   side of the word, and 0.84 above the capitals and below the baseline; in em, since the type is 17px to 20.5px). Its bottom
   margin gives back the height the old 10px padding took below the baseline, so the row, and the words in it, stay where
   they were. */
@media (min-width: 1140px) { .nav .nav-cta { margin-bottom: calc(10px - 0.17em); } }
.nav .nav-cta:hover { border-color: #fff; color: var(--accent); }   /* the type turns cream */
.nav .nav-cta.is-active { color: var(--accent); border-color: rgba(var(--accent-rgb),0.7); }
.menu-btn {
  display: none; align-items: center; gap: 10px; padding: 10px 0; border: 0; background: none; cursor: pointer;
  color: #fff; font: 300 13px/1 'Lexend Exa', sans-serif; letter-spacing: 0.06em; text-transform: uppercase;
}
.menu-btn i, .menu-btn i::before { display: block; width: 20px; height: 1.5px; background: currentColor; position: relative; }
.menu-btn i::before { content: ''; position: absolute; top: 6px; }
.menu-btn i { top: -3px; }

.site-main section { padding: 104px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.site-main section:first-child { border-top: 0; }
.eyebrow { margin: 0 0 18px; color: var(--ws); font: 300 13px/1.2 'Lexend Exa', sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
/* headings in Wix Madefor Display: the display partner of the text face, Wix Madefor Text */
.site h1, .site h2, .site h3 { font-family: 'Wix Madefor Display', system-ui, sans-serif; font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: 0.0025em; }
.site h1 { font-size: clamp(34px, 4.6vw, 72px); margin-bottom: 44px; letter-spacing: -0.005em; }   /* one line wherever it fits */
.site h2 { font-size: clamp(28px, 3.6vw, 46px); margin-bottom: 40px; max-width: 18em; }
.site h3 { font-size: 18px; margin-bottom: 12px; }
.lead { max-width: 36em; margin: 28px 0 0; color: var(--muted); font-size: 20.5px; }
.btn { display: inline-block; margin-top: 40px; padding: 14px 24px; background: var(--fg); color: var(--bg) !important; text-decoration: none; font-size: 15px; }
.btn:hover { background: #fff; }
.contact-big { font-family: 'Wix Madefor Display', system-ui, sans-serif; font-weight: 500; font-size: clamp(22px, 3vw, 38px); overflow-wrap: anywhere; }
.contact-big a { color: var(--ws); text-decoration: none; }
.contact-big a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
/* the footer in the header's navy (the same gradient): the copyright on the left, the white logo in the middle and the
   notes on the right, all centred on one line (stacked and centred on phones) */
.site-foot {
  border-top: 1px solid var(--line); padding: 40px 0; color: #fff; font-size: 14px;   /* white, as the logo */
  background: linear-gradient(180deg, rgba(17,14,46,0.92), rgba(24,20,62,0.9));
}
.foot-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px 32px; }
.foot-copy { justify-self: start; }
.foot-logo { display: block; justify-self: center; }
.foot-logo img { display: block; width: 240px; max-width: 100%; height: auto; }
.foot-notes { justify-self: end; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 0; }
.foot-notes li + li::before { content: "\00b7"; margin: 0 12px; opacity: 0.7; }   /* a middle dot between notes */
.foot-notes li:first-child { flex-basis: 100%; text-align: right; }   /* the cookie note on its own line, the links under it */
.foot-notes li:first-child + li::before { content: none; }   /* so no line starts with a dot */
.foot-notes a { text-decoration: none; }   /* Service Terms, Privacy, Terms of Use: underlined only under the pointer */
.foot-notes a:hover { text-decoration: underline; text-underline-offset: 0.18em; }

/* the links fold into a Menu button wherever they'd run into the full-size logo at 16px (below 1140px since News joined
   the menu, 2026-11-12; it was 1100px) */
@media (max-width: 1139px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px var(--edge) 20px; background: rgb(var(--head)); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a, .nav a:not(.nav-cta) { padding: 12px 0; font-size: 20.5px; }
  .nav a:not(.nav-cta)::after { left: 2px; right: auto; width: 2.2em; bottom: 6px; transform-origin: 0 100%; }
  .nav .nav-cta { margin-top: 10px; padding: 11px 18px; }
}
@media (max-width: 820px) {
  .wrap { padding: 0 20px; }
  /* The icons and MENU evenly spaced down the header (25px above, between and below, the icons level with the logo's
     top): a taller top bar and a shorter main bar while it's open, the main bar back to 68px once it's compacted, so
     the open (113px) and compact (69px) heights, and the shrink the sticky thresholds are measured from, stay as they were */
  .site-head { --tb: 54px; --mb: 58px; --mb-s: 68px; --mb-pad: 6px; --logo: 66px; --logo-s: 34px; --logo-k: 0.5152; --edge: 20px; }
  .site::before { height: 113px; }   /* the full header's height here (54 + 58 + 1) */
  .topbar-in { padding-top: 18px; }
  .mainbar-in { padding-bottom: var(--mb-pad); }
  .menu-btn { transition: transform 0.28s ease; }
  .site-head.is-stuck .menu-btn { transform: translateY(calc((var(--mb) + var(--mb-pad) - var(--mb-s)) / 2)); }   /* MENU centred in the taller stuck bar */
  .site-main section { padding: 72px 0; scroll-margin-top: 68px; }
}
@media (max-width: 560px) {
  .foot-in { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; }
  .foot-in > * { justify-self: center; }
  .foot-logo { order: -1; }
  .foot-notes { justify-content: center; }
  .foot-notes li:first-child { text-align: center; }
  .foot-logo img { width: 210px; }
  .tb-text { display: none; }               /* phones: just the icons (a tap calls or emails) */
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
