/* Article pages (geckoboard.html, flicket.html, xero.html).
   Loaded after common.css. Styled from index.html: glass nav, Fraunces headings, themed bands.
   Each page sets html[data-project] which picks that project's theme (the same tokens as its teaser on the index).
   All sizes are in rem so they grow with the screen the way the index's wide-screen zoom does. */

/* Fraunces with its optical-size axis: it draws finer, higher-contrast letters at large sizes and sturdier ones at small sizes (font-optical-sizing is on by default) */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2?v=2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
    --t-theme: #2d294e; --t-shade: #ffffff; --t-fg: #ffffff; --t-fg-soft: rgba(255,255,255,.82); --t-glow: rgba(150,135,255,.5);
    --page: #f5f5f5; --ink: #191919; --ink-soft: #4e4e4e; --ink-mute: #7f7f7f; --caption: #5a5a5a; --line: #dedede;
    --serif: "Fraunces", Georgia, serif;
    --sans: "Instrument Sans", 'San Francisco', -apple-system, BlinkMacSystemFont, sans-serif;
    --col: 42.5rem;
}
html { font-size: 16px; scroll-behavior: smooth; background: var(--t-theme, var(--page)); color: var(--ink); }
#nav-section { --nav-theme: var(--t-theme); --nav-fg: var(--t-fg); --nav-fg-soft: var(--t-fg-soft); } /* the menu starts in the hero's colours, before any script runs */
@media screen and (min-width: 1440px) { html { font-size: 17.28px; } }
/* text size stops growing at 1440px, matching the 1200px cap on the content width */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
/* elastic scroll: html and body both carry the hero colour (the footer uses it too), because Safari shows the body's background when the page is pulled past either end and Chrome shows the html's; every section paints its own background on top, so it never shows on the page itself */
body { background: var(--t-theme, var(--page)); font-family: var(--sans); color: var(--ink); line-height: 1.6; overflow-x: clip; }
body, h1, h2, h3, p { margin: 0; }

/* the content column uses the same widths and side padding as the .container on index.html, so both views line up at every size:
   under 760px a single column (24px padding, 32px from 541px, content capped at 500px); then 740px, 940px, and 72vw (capped at 1200px) on big screens */
.wrap { width: 100%; max-width: 540px; margin: 0 auto; padding: 0 24px; }
@media screen and (min-width: 541px) { .wrap { max-width: 564px; padding: 0 32px; } }
@media screen and (min-width: 760px) { .wrap { max-width: 740px; padding: 0 1.25rem; } }
@media screen and (min-width: 960px) { .wrap { max-width: 940px; } }
@media screen and (min-width: 1440px) { .wrap { max-width: min(72vw, 1200px); } } /* 72vw of the window, but never wider than 1200px */

/* ---------- menu: the same frosted glass as index.html ----------
   Hidden at the top (the hero has its own Back button); article.js adds .show on scroll up once that has gone, and sets
   --nav-theme / --nav-fg from the section behind it plus .nav-dark. */
#nav-section {
    position: fixed; top: 0; left: 0; width: 100%; height: 3.75rem; z-index: 100;
    background-color: color-mix(in srgb, var(--nav-theme, #2d294e) 58%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 0 rgba(255,255,255,.14), 0 8px 24px -8px rgba(0,0,0,.25);
    transform: translateY(calc(-100% - 2rem)); visibility: hidden; /* the extra 2rem lets the shadow clear the top edge */
    transition: background-color 150ms ease-out, transform 280ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 280ms; /* slides away, then switches off */
}
#nav-section:not(.nav-dark) { background-color: color-mix(in srgb, color-mix(in srgb, #ffffff 65%, var(--nav-theme, #f5f5f5)) 72%, transparent); }
#nav-section.show { transform: none; visibility: visible; transition: background-color 150ms ease-out, transform 280ms cubic-bezier(.2,.7,.2,1), visibility 0s; }
@media (prefers-reduced-motion: reduce) { #nav-section, #nav-section.show { transition: background-color 150ms ease-out; } }
#nav-section .wrap { display: flex; flex-direction: row; align-items: center; gap: .875rem; height: 100%; }
#nav-section .nav-logo { flex: none; height: 1.25rem; width: auto; margin-left: auto; } /* the client logo, small, on the right; js/article.js swaps in the version for a light or dark menu */
html[data-project="xero"] #nav-section .nav-logo { height: 1.125rem; }
html[data-project="flicket"] #nav-section .nav-logo { height: .875rem; } /* 70% of the default */
@media screen and (max-width: 759px) { #nav-section .nav-logo { display: none; } } /* no logo in the menu on phones: the title needs the room */
html[data-project="geckoboard"] #nav-section .nav-logo, html[data-project="mitsubishi"] #nav-section .nav-logo { height: 1.5rem; }
/* the arrow and the project name are one link: the whole thing goes back, and hovering it tints the arrow's circle (a 10% tint of the text colour; the colour stays put, a:hover in common.css would otherwise turn it blue) */
#nav-section .back { display: inline-flex; align-items: center; gap: .875rem; min-width: 0; margin-left: -.5rem; color: var(--nav-fg, #fff); text-decoration: none; }
#nav-section a.back:hover, #nav-section a.back:focus-visible { color: var(--nav-fg, #fff); }
#nav-section .back-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; transition: background-color .2s ease; }
#nav-section .back:hover .back-icon, #nav-section .back:focus-visible .back-icon { background: color-mix(in srgb, var(--nav-fg, #fff) 10%, transparent); }
#nav-section .nav-title { min-width: 0; padding: .15em 0; margin: -.15em 0; overflow: hidden; text-overflow: ellipsis; font-family: var(--serif); font-weight: 700; font-size: 1.3125rem; letter-spacing: -0.005em; line-height: 1; color: var(--nav-fg, #fff); white-space: nowrap; transition: color 150ms ease-out; }

.hero .backrow { position: absolute; top: 5.25rem; left: 0; right: 0; z-index: 2; pointer-events: none; }
.hero .back { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--t-fg-soft); color: var(--t-fg); text-decoration: none; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.hero .back:hover, .hero .back:focus-visible { background: var(--t-fg); color: var(--t-theme); border-color: var(--t-fg); }
/* ---------- shared headings and text ---------- */
.kicker { display: block; font-family: var(--sans); font-size: .9375rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: .9rem; }
.sec-title {
    font-family: var(--serif); font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink);
    font-size: 1.75rem; margin: 0 0 2rem;
}
.prose p { font-family: var(--sans); font-size: 1.125rem; line-height: 1.6; color: var(--ink); max-width: var(--col); margin: 0 0 1.25rem; text-align: left; } /* tuned for Instrument Sans: its tall lowercase needs less line spacing than Proxima did */
.prose p:last-child { margin-bottom: 0; }
.prose figure { margin: 3rem 0; }
.prose p.video-intro { max-width: none; }
.prose h3.sub-title { font-family: var(--serif); font-weight: 650; letter-spacing: -0.01em; font-size: 1.5rem; line-height: 1.2; color: var(--ink); margin: 0 0 1.25rem; }
.prose * + h3.sub-title { margin-top: 5.5rem; } /* each sub-heading starts a new group, so give it clear space above */
@media (max-width: 759px) { .prose * + h3.sub-title { margin-top: 4rem; } }
.prose h3.sub-title + .grid3, .prose h3.sub-title + .phones { margin-top: 0; }
.prose .cols.one + .phones { margin-top: 2.5rem; }
.prose .cols + .grid3 { margin-top: 3rem; }
.prose figure img.crop.wide { aspect-ratio: 16 / 9; }
.prose figure img.guide-shot.crop { aspect-ratio: 16 / 9; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: .5rem; background: rgba(0,0,0,.05); box-shadow: 0 .5rem 1.875rem rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }
.prose figcaption { font-size: 1rem; line-height: 1.6; letter-spacing: .005em; color: var(--caption); max-width: var(--col); margin: .9rem 0 0; text-align: left; }
.prose a { color: inherit; }

/* each principle / theme is its own white card */
.principles { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 2rem 0 0; }
@media screen and (min-width: 760px) { .principles { grid-template-columns: 1fr 1fr; gap: 1.25rem; } }
.principle { background: #fff; border-radius: .75rem; box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.04); padding: 1.6rem 1.6rem 1.8rem; }
/* icon sits to the left of the title */
.principle { display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; align-items: start; align-content: start; }
.principle h3 { grid-column: 2; grid-row: 1; }
.principle p { grid-column: 2; } /* copy lines up under the title, with the icon in its own column */
.principle h3 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.01em; font-size: 1.3125rem; line-height: 1.25; color: var(--ink); margin: 0 0 .6rem; }
.principle p { font-size: 1.0625rem; line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: none; }

/* ---------- hero shared bits (each concept lays them out) ---------- */
.hero { position: relative; background: var(--t-theme); color: var(--t-fg); overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: -35% -12% -35% 38%; background: radial-gradient(closest-side, var(--t-glow), transparent); pointer-events: none; opacity: .75; }
.hero .logo { display: block; height: 1.875rem; width: auto; margin: 0 0 1.5rem; }
.hero h1 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.015em; line-height: 1.05; color: var(--t-fg); }
.hero .sub { font-family: var(--sans); color: var(--t-fg-soft); line-height: 1.4; }

/* ---------- next project + footer (index look) ---------- */
.next { display: block; text-decoration: none; background: var(--t-theme); color: var(--t-fg); padding: 4.5rem 0 5rem; }
.next .kicker { color: var(--t-fg-soft); }
.next h2 { font-family: var(--serif); font-weight: 650; letter-spacing: -0.01em; font-size: 1.75rem; line-height: 1.1; margin: 0; }
.next .arrow { display: inline-block; transition: transform 250ms; }
@media (hover: hover) { .next:hover .arrow { transform: translateX(.5rem); } }
/* the footer is the same one as on index.html (css/footer.css); only its colours are set here: fixed, like the index's static mode */
/* the footer takes the project's hero colours (background and text), without the hero's glow */
#footer-section { --theme: var(--t-theme); --sfg: var(--t-fg); --sfg-soft: var(--t-fg-soft); --mix: 100%;
    background-image: none; background-color: var(--t-theme); color: var(--t-fg); }

/* ---------- reveal on scroll ---------- */
html.js .hero .rv { opacity: 0; transform: translateY(1rem); transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
html.js .hero .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .hero .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- project themes (same tokens as each teaser on index.html) ---------- */
html[data-project="flicket"] { --t-theme: #000000; --t-shade: #170905; --t-fg: #ffffff; --t-fg-soft: rgba(255,255,255,.84); --t-glow: rgba(235,80,39,.5); }
html[data-project="xero"] { --t-theme: #e4ebf2; --t-shade: #ffffff; --t-fg: #010852; --t-fg-soft: rgba(1,8,82,.85); --t-glow: rgba(255,255,255,.95); }
html[data-project="notfound"] { --t-theme: #f5f5f5; --t-shade: #ffffff; --t-fg: #191919; --t-fg-soft: #4e4e4e; --t-glow: rgba(255,255,255,0); } /* 404.html: the same light grey and ink as the home page intro */
html[data-project="mitsubishi"] { --t-theme: #1c1c1e; --t-shade: #000000; --t-fg: #ffffff; --t-fg-soft: rgba(255,255,255,.78); --t-glow: rgba(240,23,22,.28); }
html[data-project="masters"] { --t-theme: #0c1620; --t-shade: #000000; --t-fg: #ffffff; --t-fg-soft: rgba(255,255,255,.85); --t-glow: rgba(0,0,0,0); }

/* ---------- hero: text one side, the teaser's device art the other ---------- */
.hero-1 { padding: 9.5rem 0 6.5rem; display: flex; align-items: center; }
.hero-1 .wrap { width: 100%; }
.hero-1 .grid { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; }
@media screen and (max-width: 899px) { .hero-1 .hero-art { order: -1; margin-top: 4rem; max-width: 26.25rem; } .hero-1 .grid { gap: 2rem; } } /* single column: the artwork sits above the title and text */
@media screen and (min-width: 900px) { .hero-1 .grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 5rem; }
}
.hero-1 h1 { font-size: 2.75rem; margin: 0 0 1.25rem; }
.hero-1 h1.long { font-size: 2.5rem; }
.hero-1 .sub { font-size: 1.25rem; letter-spacing: -.005em; max-width: 30rem; margin: 0 0 2.25rem; }

/* device art is the index's own markup (styled by common.css under .portfolio); room is left for what overhangs */
.hero-art { padding: 0 0 8% 7%; }
html[data-project="flicket"] .hero-art { padding: 0 4% 9% 0; }
@media screen and (min-width: 900px) { html[data-project="flicket"] .hero-art, html[data-project="xero"] .hero-art { padding-right: 0; } } /* side by side: the desktop screenshot's right edge lines up with the page edge (and the logo above); the phone overhangs it */
html[data-project="xero"] .hero-art { padding: 0 6% 10% 0; }
html[data-project="mitsubishi"] .hero-art, html[data-project="masters"] .hero-art { padding: 0; }
html[data-project="mitsubishi"] .hero .image-wrapper img, html[data-project="masters"] .hero .image-wrapper img { padding-top: 0; background-image: none; } /* no browser chrome (the three dots) on these screenshots */ /* a single screenshot, nothing overhangs */
@media screen and (min-width: 900px) { html[data-project="xero"] .hero-art { padding-right: 0; } } /* same as Flicket: the screenshot's right edge lines up with the page edge and logo */
@media screen and (max-width: 759px) { html[data-project="flicket"] .hero-art, html[data-project="xero"] .hero-art { padding-right: 5%; } }
.portfolio .device-pair .screenshot { background-color: #fff; }
@media screen and (max-width: 759px) { .portfolio .device-pair .tv { left: -6%; } }

.main { background: var(--page); display: flow-root; } /* flow-root keeps a first child's top margin inside the grey, so the hero colour behind can't show through the gap */
.main .sec { padding: 5rem 0 0; }
.main .sec + .sec { margin-top: 5rem; border-top: 1px solid var(--line); }
#s4 { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.main .sec:last-child { padding-bottom: 6rem; }
.main #s2.sec { padding-bottom: 0; }
.band-shots#s3 { padding-top: 2.5rem; }

/* ---------- extra content shapes (Xero) ---------- */
.prose video { display: block; width: 100%; height: auto; border-radius: .5rem; box-shadow: 0 .5rem 1.875rem rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); background: #000; }
.prose .row3 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media screen and (min-width: 760px) { .prose .row3 { grid-template-columns: repeat(3, 1fr); } }
.prose .row3 img { height: 100%; object-fit: cover; }

/* ---------- everything left-aligned; long text flows into two columns ---------- */
.prose figure figcaption { max-width: none; }
.prose .cols p { max-width: none; }
@media screen and (min-width: 900px) {
    .prose .cols { column-count: 2; column-gap: 3rem; }
    .prose .cols p { font-size: 1.125rem; line-height: 1.6; }
    .prose .cols p:last-child { margin-bottom: 0; }
    .prose .cols.one { column-count: 1; }
    .prose .cols.one p { max-width: none; }
}

/* ---------- back arrow in the hero ---------- */

.hero .backrow { display: flex; align-items: center; justify-content: space-between; }
.hero .backrow .logo { margin: 0; }
html[data-project="flicket"] .hero .backrow .logo { height: 1.1rem; } /* 80% of the old 1.375rem */
html[data-project="flicket"] .hero .device-pair .phone { bottom: -4%; } /* phone sits closer to the screenshot's baseline (was -8%) */
html[data-project="xero"] .hero .report-pages { bottom: -5%; } /* report pages sit closer to the screenshot's baseline (was -9%) */
html[data-project="xero"] .hero .backrow .logo { height: 24px; }
html[data-project="geckoboard"] .hero .backrow .logo { height: 38px; }
html[data-project="mitsubishi"] .hero .backrow .logo { height: 30px; }
html[data-project="masters"] .hero .backrow .logo { height: 32px; }
.hero .back { width: auto; gap: .5rem; padding: 0 1.125rem 0 .875rem; border-radius: 1.25rem; }
.hero .back-label { font-family: var(--sans); font-size: 1rem; line-height: 1; }

/* ---------- type sizes change in steps at the same breakpoints as the layout (760px, 960px; rem itself steps up on big screens), not continuously with the window width ---------- */
@media screen and (min-width: 760px) {
    .sec-title { font-size: 2rem; }
    .next h2 { font-size: 2.25rem; }
    .hero-1 h1 { font-size: 3.75rem; }
    .hero-1 h1.long { font-size: 3.25rem; }
    .hero-1 .sub { font-size: 1.375rem; }
}
@media screen and (min-width: 960px) {
    .sec-title { font-size: 2.25rem; }
    .next h2 { font-size: 2.75rem; }
    .hero-1 h1 { font-size: 4.5rem; }
    .hero-1 h1.long { font-size: 4rem; }
    .hero-1 .sub { font-size: 1.5rem; }
}

/* ---------- screen strip: a row of phone screens, caption under each (flicket.html) ----------
   Every screen sits in the same phone-shaped frame, starting at the top of the image; the long full-page captures
   are shown at their full length (the captions sit at different heights as a result). The row runs the full width of the window and scrolls sideways (snapping) when the screens don't all fit. */
/* the strip breaks out of the content column to the full width of the window; --edge is the gap that lines the first screen up with the column's left edge (same widths as .wrap above) */
.shots { --edge: 24px; margin: 2.5rem calc(50% - 50vw) 0; }
@media screen and (min-width: 541px) { .shots { --edge: max(32px, calc((100vw - 564px) / 2 + 32px)); } }
@media screen and (min-width: 760px) { .shots { --edge: max(1.25rem, calc((100vw - 740px) / 2 + 1.25rem)); } }
@media screen and (min-width: 960px) { .shots { --edge: max(1.25rem, calc((100vw - 940px) / 2 + 1.25rem)); } }
@media screen and (min-width: 1440px) { .shots { --edge: max(1.25rem, calc((100vw - min(72vw, 1200px)) / 2 + 1.25rem)); } }
.shots-track { display: flex; align-items: flex-start; gap: 1.5rem; margin: -2rem 0; padding: 2.5rem var(--edge) 3.5rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--edge); -webkit-overflow-scrolling: touch;  }
.shots-item { flex: 0 0 auto; width: 390px; margin: 0; scroll-snap-align: start; }
.shots-frame { position: relative; overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.08); }
.shots-frame img { display: block; width: 100%; height: auto; }
.shots-item figcaption { margin: .9rem 0 0; font-size: 1rem; line-height: 1.6; letter-spacing: .005em; color: var(--caption); } /* same as the captions */

/* the screen strip sits in its own full-width band (a step darker than the page) after the main content */
.band-shots { background: var(--t-theme); color: var(--t-fg); padding: 5rem 0 3.5rem; }
.band-shots .sec-title { color: var(--t-fg); }
.band-shots .shots { margin-top: 2rem; }
.band-shots .shots-item figcaption { color: var(--t-fg-soft); }
.band-shots .shots-frame { box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 8px 30px rgba(0,0,0,.14); }
/* the sideways scroll bar is hidden; the strip scrolls by trackpad, wheel, touch, or the keyboard when focused */
.shots-track { scrollbar-width: none; }
.shots-track::-webkit-scrollbar { display: none; }

/* annotation pins: numbered dots on a screen; hovering, focusing or tapping one opens its note right there, like a Figma comment.
   The frame lets the notes spill past its edge (the image carries the rounded corners), and the item being read lifts above its neighbours. */
.shots-item { position: relative; }
.shots-item:has(.shots-pin:hover, .shots-pin:focus-within, .shots-pin.open) { z-index: 5; }
.shots-frame { overflow: visible; }
.shots-frame img { border-radius: 6px; }
.shots-pin { position: absolute; width: 0; height: 0; }
.shots-pin:hover, .shots-pin:focus-within, .shots-pin.open { z-index: 10; }
.shots-pin .dot { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); width: 22px; height: 22px; padding: 0; border: 1.5px solid #fff; border-radius: 50%; background: #e8502a; color: #fff; font: inherit; font-size: 12px; line-height: 1; text-align: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s ease; }
.shots-pin:hover .dot, .shots-pin.open .dot, .shots-pin .dot:focus-visible { transform: translate(-50%, -50%) scale(1.15); }
.shots-pin .dot:focus-visible { outline: 2px solid #191919; outline-offset: 2px; }

/* Video stage: a large player (js/video-stage.js) with a strip of poster thumbnails below it. Tapping a thumbnail plays it in the stage. */
.video-stage { margin: 2rem 0 0; }
.vs-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .5rem; background: #111 center / cover no-repeat; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08); }
.vs-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; visibility: hidden; cursor: pointer; }
.vs-frame.is-playing video { visibility: visible; }
/* Minimal controls: a frosted bar along the bottom with play/pause, elapsed time, a timeline and time remaining. It fades away while the video plays. */
.vs-bar { position: absolute; left: 50%; bottom: 1rem; display: flex; align-items: center; gap: .75rem; width: min(calc(100% - 2rem), 40rem); padding: .4rem .4rem .4rem .4rem; border-radius: 999px; transform: translate(-50%, .5rem); background: rgba(30,30,30,.42); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 8px 24px rgba(0,0,0,.25); color: #fff; opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
.vs-frame.is-playing.show-bar .vs-bar { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.vs-toggle, .vs-full { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background .2s ease; }
.vs-toggle:hover, .vs-full:hover { background: rgba(255,255,255,.18); }
.vs-toggle:focus-visible, .vs-full:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.vs-full[hidden] { display: none; }
.vs-full .i-exit { display: none; }
.vs-frame.is-full .vs-full .i-enter { display: none; }
.vs-frame.is-full .vs-full .i-exit { display: block; }
/* full screen: the stage fills the screen, the video is letterboxed rather than cropped */
.vs-frame.is-full { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: #000; box-shadow: none; }
.vs-frame.is-full video { object-fit: contain; }
.vs-frame.is-full .vs-bar { bottom: 1.5rem; }
.vs-toggle .i-pause { display: none; }
.vs-frame.is-running .vs-toggle .i-play { display: none; }
.vs-frame.is-running .vs-toggle .i-pause { display: block; }
.vs-time { flex: none; min-width: 2.4rem; font-size: .8125rem; line-height: 1; font-variant-numeric: tabular-nums; color: rgba(255,255,255,.9); }
.vs-time.vs-rem { text-align: right; }
.vs-range { --p: 0%; flex: 1 1 auto; min-width: 0; height: 1.5rem; margin: 0; padding: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.vs-range:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.vs-range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #fff var(--p), rgba(255,255,255,.3) var(--p)); }
.vs-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; margin-top: -4px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.vs-range::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); }
.vs-range::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
.vs-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.vs-volume { flex: none; display: flex; align-items: center; }
.vs-mute { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: background .2s ease; }
.vs-mute:hover { background: rgba(255,255,255,.18); }
.vs-mute:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.vs-mute .i-muted { display: none; }
.vs-frame.is-muted .vs-mute .i-sound { display: none; }
.vs-frame.is-muted .vs-mute .i-muted { display: block; }
@media (max-width: 720px) { .vs-bar { bottom: .5rem; gap: .5rem; width: calc(100% - 1rem); } .vs-toggle, .vs-full, .vs-mute { width: 2rem; height: 2rem; } .vs-time { min-width: 2rem; font-size: .75rem; } }
/* big play button over the poster until a video is started */
.vs-play { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.vs-play span { position: absolute; left: 1.25rem; bottom: 1.25rem; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: rgba(20,20,20,.55); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: transform .2s ease, background .2s ease; }
.vs-play span::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -.55rem 0 0 -.3rem; border-style: solid; border-width: .55rem 0 .55rem .95rem; border-color: transparent transparent transparent #fff; }
.vs-play:hover span { background: rgba(20,20,20,.75); transform: scale(1.06); }
.vs-play:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }
.vs-frame.is-playing .vs-play { display: none; }
/* The video that is in the player: lifted, with a deeper shadow. */
.video-thumb { transition: transform .25s ease, box-shadow .25s ease; }
.video-thumb[aria-current="true"] { z-index: 2; transform: translateY(-4px) scale(1.03); box-shadow: 0 4px 8px rgba(0,0,0,.12), 0 18px 40px rgba(0,0,0,.28); }
@media (prefers-reduced-motion: reduce) { .video-thumb { transition: none; } .video-thumb[aria-current="true"] { transform: none; } }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1.25rem 0 3rem; }
.videos figure { margin: 0; }
.video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; overflow: hidden; border-radius: .5rem; background: #111; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08); }
.video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.video-thumb:hover img { transform: scale(1.03); }
.video-thumb .play { position: absolute; left: .75rem; bottom: .75rem; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: rgba(20,20,20,.55); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); box-shadow: 0 2px 10px rgba(0,0,0,.35), inset 0 0 0 .5px rgba(255,255,255,.18); transition: background-color .2s ease, transform .2s ease; }
.video-thumb .play::after { content: ""; position: absolute; left: 50%; top: 50%; margin: -.4rem 0 0 -.2rem; border-style: solid; border-width: .4rem 0 .4rem .7rem; border-color: transparent transparent transparent #fff; }
.video-thumb:hover .play { background: rgba(20,20,20,.75); transform: scale(1.06); }
/* bottom scrim keeps the title and time legible on any poster; the title sits to the right of the play button */
.video-thumb::before { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0)); pointer-events: none; }
.video-thumb .name { position: absolute; left: 3.75rem; right: 4.5rem; bottom: .75rem; height: 2.5rem; display: flex; align-items: center; justify-content: flex-start; color: #fff; font-size: .875rem; line-height: 1.2; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
/* running time, bottom right, same frosted treatment as the play button */
.video-thumb .dur { position: absolute; right: .75rem; bottom: .75rem; padding: .2rem .5rem; border-radius: .375rem; background: rgba(20,20,20,.55); -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.18); color: #fff; font-size: .75rem; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.video-thumb:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
/* The current video's title, shown only on small screens where the thumbnails are too small to carry it. */
.video-now { display: none; margin: -2rem 0 3rem; font-size: .9375rem; line-height: 1.5; color: var(--ink-mute); }
/* Small screens: keep all three thumbnails across (it keeps the "big player, small choices" hierarchy). Titles and times move to the line below. */
@media (max-width: 720px) {
  .videos { gap: .5rem; margin-bottom: 1.25rem; }
  .video-thumb { border-radius: .3rem; }
  .video-thumb .name, .video-thumb .dur, .video-thumb::before { display: none; }
  .video-thumb .play { left: .4rem; bottom: .4rem; width: 1.5rem; height: 1.5rem; }
  .video-thumb .play::after { margin: -.25rem 0 0 -.1rem; border-width: .25rem 0 .25rem .42rem; }
  /* too small to rely on the lift alone: add an orange bar along the bottom edge */
  .video-thumb[aria-current="true"] { transform: translateY(-2px) scale(1.04); box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 8px 18px rgba(0,0,0,.25); }
  .video-thumb[aria-current="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #f0801f; }
    .video-now { display: block; margin: 0 0 3rem; }
  .vs-play span { left: .75rem; bottom: .75rem; width: 2.75rem; height: 2.75rem; }
}
/* Modal player */
.vbox .vbox-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 3.5rem 1.25rem 1.5rem; }
.vbox .vbox-frame { width: min(94vw, calc((100vh - 5rem) * 16 / 9), 1400px); aspect-ratio: 16 / 9; border-radius: .5rem; overflow: hidden; background: #000; box-shadow: 0 1rem 3rem rgba(0,0,0,.5); }
.vbox iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Mobile checkout strip: every phone shows the same 390:700 slice of its screen (the full Apple Pay capture); longer captures are cropped from the top and open in full in the lightbox. */
#s3 .shots-frame img { height: auto; aspect-ratio: 390 / 700; object-fit: cover; object-position: top; }

/* Mobile checkout: six screens in a 3 x 2 grid inside the content column (two across on small screens), instead of the sideways-scrolling strip. */
#s3 .shots { margin: 2rem 0 0; }
#s3 .shots-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3rem 1.5rem; margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
#s3 .shots-item { width: auto; }
@media screen and (max-width: 640px) { #s3 .shots-track { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; } }
/* A recorded screen in place of a still: same box and rounding as the screenshots next to it. */
#s3 .shots-frame video { display: block; width: 100%; height: auto; aspect-ratio: 390 / 700; object-fit: cover; border-radius: 6px; background: #fff; }

/* Checkout hero: same browser chrome and phone treatment as the page hero (common.css .device-pair), but side by side on a shared baseline, the phone overlapping the desktop edge just past the order summary. */
.checkout-hero { margin: 2rem 0 0; }
.checkout-hero .device-pair { display: flex; align-items: flex-end; }
.checkout-hero .device-pair .screenshot { flex: 1 1 0; min-width: 0; width: auto; }
/* Recorded desktop screen: the same browser chrome (white bar with dots) that common.css gives screenshot <img>s. */
.checkout-hero .device-pair video.screenshot { display: block; height: auto; aspect-ratio: 16 / 9; object-fit: cover; padding: 0; border-radius: 6px; background: #fff; box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.1), 0px 0px 0px 1px rgba(0, 0, 0, 0.03); }
.checkout-hero .device-pair .phone { position: relative; right: auto; bottom: auto; flex: 0 0 20%; width: 20%; margin-left: -4%; }
.checkout-hero .device-pair .phone video { display: block; width: 100%; height: auto; aspect-ratio: 390 / 700; object-fit: cover; }
/* this video draws its own home indicator strip (so the keyboard can run behind it): it is 34px taller, and the frame leaves its strip off */
.checkout-hero .device-pair .phone .has-home video { aspect-ratio: 390 / 734; }
.portfolio.checkout-hero .device-pair .screen.has-home::after { display: none; }
.checkout-hero .device-pair .phone img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 700; object-fit: cover; object-position: top; }
/* hero variant: bigger phone floating over the bottom-right corner of the desktop frame */
.checkout-hero.hero-overlap { margin-bottom: 2.5rem; }
.checkout-hero.hero-overlap .device-pair { display: block; }
.checkout-hero.hero-overlap .device-pair .screenshot { width: 100%; }
.portfolio.checkout-hero.hero-overlap .image-wrapper img.screenshot { padding-top: 30px; background-size: 40px 10.5px; background-position: 14px 10px; }
.checkout-hero.hero-overlap .device-pair .phone { position: absolute; right: -3%; bottom: -6%; flex: none; width: 25%; margin-left: 0; }
@media screen and (max-width: 640px) { .checkout-hero.hero-overlap .device-pair .phone { width: 25%; margin-left: 0; } }
@media screen and (max-width: 640px) { .checkout-hero .device-pair .phone { flex-basis: 27%; width: 27%; margin-left: -5%; } }
/* No hover lift on the checkout hero (the page hero has one; this one stays still). */
.portfolio.checkout-hero .image-wrapper img:hover,
.portfolio.checkout-hero .device-pair:hover .screenshot { transform: none; box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.1), 0px 0px 0px 1px rgba(0, 0, 0, 0.03); }
.portfolio.checkout-hero .device-pair:hover .phone { transform: none; box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15), 0px 0px 0px 1px rgba(0, 0, 0, 0.08); }

/* ---------- three-up thumbnails with text below (design system, "Empowering others") ---------- */
.prose p.alt-intro { max-width: none; }
.prose .alt-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 2.5rem; }
.prose .alt-row { display: block; }
.prose .alt-row figure { margin: 0 0 1.25rem; }
.prose .alt-text h4 { font-family: var(--serif); font-weight: 650; font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 .5rem; color: var(--ink); }
.prose .alt-text p { margin: 0; font-size: 1rem; line-height: 1.65; max-width: none; }
@media screen and (max-width: 760px) {
    .prose .alt-rows { grid-template-columns: 1fr; gap: 2.5rem; }
}
#s3 .prose { margin-top: 4rem; }
#s3 .prose + .shots { margin-top: 3rem; }

/* Admin gallery: a large screenshot with a scrolling thumbnail strip below. Tapping a thumbnail swaps the large screenshot straight to that screen (js/gallery.js). */
.prose .gallery { margin: 3rem 0; }
.prose .gallery .g-stage { border-radius: .5rem; box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 8px 30px rgba(0,0,0,.08); background: #fff; }
.prose .gallery .g-track { display: flex; overflow: hidden; border-radius: .5rem; } /* moved only by the thumbnails (js/gallery.js), not by swiping */
.prose .gallery .g-slide { flex: 0 0 100%; margin: 0; }
.prose .gallery figure img.crop { border-radius: 0; box-shadow: none; }
.prose .gallery .g-thumbs { --gap: 1.25rem; --show: 3.4; display: flex; gap: var(--gap); margin: 1rem -1.5rem -1.25rem; padding: 1.25rem 1.5rem 2.75rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-padding: 0 1.5rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.prose .gallery .g-thumbs::-webkit-scrollbar { display: none; }
.prose .gallery .g-thumb { flex: 0 0 calc((100% - (var(--show) - .4) * var(--gap)) / var(--show)); }
.prose .gallery .g-thumb { display: block; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .25s ease; }
.prose .gallery .g-thumb img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; border-radius: .35rem; box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 4px 14px rgba(0,0,0,.08); opacity: .7; transition: opacity .25s ease, box-shadow .25s ease; }
.prose .gallery .g-thumb:hover img { opacity: 1; }
.prose .gallery .g-thumb[aria-current="true"] { transform: translateY(-3px); }
.prose .gallery .g-thumb[aria-current="true"] img { opacity: 1; box-shadow: 0 3px 6px rgba(0,0,0,.12), 0 12px 28px rgba(0,0,0,.22); }
.prose .gallery .g-thumb:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: .35rem; }
@media (max-width: 759px) { .prose .gallery .g-thumbs { --gap: .75rem; --show: 2.4; --bleed: calc(50vw - 50%); margin-left: calc(-1 * var(--bleed)); margin-right: calc(-1 * var(--bleed)); padding-left: var(--bleed); padding-right: var(--bleed); scroll-padding: 0 32px; } }
.prose .gallery .g-strip { position: relative; }
/* arrows over the ends of the strip (desktop only; on touch screens the strip is swiped), each on a fade so the half-visible thumbnail reads as "more this way" */
/* the fade runs the full height of the strip so a lifted, shadowed thumbnail can't poke out past it; the round button sits level with the middle of the thumbnails */
.prose .gallery .g-arrow { position: absolute; z-index: 3; top: 0; bottom: 0; width: 6.5rem; display: flex; align-items: flex-start; padding: 0; padding-top: calc(1.25rem + var(--img-h, 8rem) / 2 - 1.15rem); border: 0; cursor: pointer; color: var(--ink); transition: opacity .2s ease; }
.prose .gallery .g-arrow { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 1.25rem); mask-image: linear-gradient(to bottom, transparent, #000 1.25rem); } /* soft top edge so the fade doesn't slice through the big screenshot's shadow above */
.prose .gallery .g-arrow[hidden] { display: none; }
.prose .gallery .g-arrow.prev { left: -1.5rem; padding-left: 1.5rem; justify-content: flex-start; background: linear-gradient(to right, var(--t-theme, var(--page)) 2.75rem, transparent); }
.prose .gallery .g-arrow.next { right: -1.5rem; padding-right: 1.5rem; justify-content: flex-end; background: linear-gradient(to right, transparent, var(--t-theme, var(--page)) calc(100% - 2.75rem)); }
.prose .gallery .g-arrow svg { box-sizing: content-box; padding: .6rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 4px 14px rgba(0,0,0,.12); transition: transform .2s ease, box-shadow .2s ease; }
.prose .gallery .g-arrow:hover svg { transform: scale(1.08); box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 6px 18px rgba(0,0,0,.16); }
.prose .gallery .g-arrow:focus-visible { outline: none; }
.prose .gallery .g-arrow:focus-visible svg { outline: 2px solid currentColor; outline-offset: 2px; }
@media (max-width: 759px) { .prose .gallery .g-arrow { display: none !important; } }
@media (max-width: 540px) { .prose .gallery .g-thumbs { scroll-padding: 0 24px; } }
@media (min-width: 541px) and (max-width: 759px) { .prose .gallery .g-thumbs { scroll-padding: 0 max(32px, calc((100vw - 500px) / 2)); } }
@media (prefers-reduced-motion: reduce) { .prose .gallery .g-thumb { transition: none; } .prose .gallery .g-thumb[aria-current="true"] { transform: none; } }

/* ---------- older case studies (mitsubishi-electric.html, masters.html) ---------- */
.prose figure img.plain { background: none; box-shadow: none; border-radius: 0; } /* diagrams and cut-out images: no card behind them */
.prose figure .pair { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media screen and (min-width: 760px) { .prose figure .pair { grid-template-columns: 1fr 1fr; } }
.prose figure .stack { display: grid; gap: 1.5rem; }

/* masters.html: the old street-art header image fills the hero; no screenshot, no logo. A dark fade from the bottom up keeps the text readable. */
html[data-project="masters"] .hero-1 { background-image: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.85) 100%), url(../images/hero_masters.jpg); background-size: cover; background-position: 75% center; }
html[data-project="masters"] .hero-1::before, html[data-project="masters"] .hero-1::after { display: none; }
html[data-project="masters"] .hero .grid { display: block; }
html[data-project="masters"] .hero-text { max-width: none; padding: 0; } /* no art beside it, so the text can run the full width */
html[data-project="masters"] .hero-1 h1 { max-width: none; }
html[data-project="masters"] .hero-1 h1, html[data-project="masters"] .hero-1 .sub { text-shadow: 0 2px 16px rgba(0,0,0,.8); } /* same shadow as the Back button */
html[data-project="masters"] .hero .back { filter: drop-shadow(0 2px 16px rgba(0,0,0,.8)); } /* drop-shadow follows the white outline, arrow and label, exactly like the text-shadow on the title */
html[data-project="masters"] .hero-1 .sub { max-width: 46rem; }
@media screen and (max-width: 759px) {
    html[data-project="masters"] .hero-text { padding-top: 0; }
}

/* ---------- 404.html: just the hero (no screenshot), filling the screen ---------- */
.hero-404 { min-height: 100vh; min-height: 100svh; box-sizing: border-box; }
.hero-404 .grid { display: block; }
.hero-404 .hero-text { max-width: 40rem; }
.hero-404 .home-btn { padding: 0 1.25rem; } /* the hero's outlined Back pill, without the arrow */
