/* ==========================================================================
   Rovai Heavy Industries
   One palette: ink, bone, steel and a single accent, molten orange.
   Type: Saira (display), IBM Plex Sans (text), IBM Plex Mono (labels).
   All self-hosted, SIL OFL 1.1.
   Colours are semantic (--bg, --fg, --fg-2, --fg-3, --rule, --accent), so a
   surface such as .on-bone can redefine them and every component follows.
   ========================================================================== */

@font-face { font-family: 'Saira'; src: url('/assets/fonts/saira-var.woff2') format('woff2'); font-weight: 100 900; font-stretch: 50% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('/assets/fonts/plex-sans-var.woff2') format('woff2'); font-weight: 100 700; font-stretch: 85% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
    --ink: #0b0a09;
    --ink-2: #0f0e0c;
    --ink-3: #151311;
    --bone: #efe8da;
    --molten: #ff5a1f;

    --bg: var(--ink);
    --fg: var(--bone);
    --fg-2: #c2bbab;
    --fg-3: #9a9385;
    --rule: rgba(239, 232, 218, .12);
    --rule-2: rgba(239, 232, 218, .26);
    --accent: #ff8a3d;
    --focus: #ff8a3d;

    --wrap: 1320px;
    --gut: clamp(20px, 4.2vw, 68px);
    --nav-h: 66px;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --ease-io: cubic-bezier(.65, 0, .35, 1);

    --f-display: 'Saira', 'Helvetica Neue', Arial, sans-serif;
    --f-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --f-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
.on-bone { --bg: var(--bone); --fg: #12100e; --fg-2: #4d473d; --fg-3: #5a5449; --rule: rgba(11, 10, 9, .14); --rule-2: rgba(11, 10, 9, .34); --accent: #b23a0c; --focus: #b23a0c; background-color: var(--bg); color: var(--fg); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: #3a352d var(--ink); }
body { margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; color: var(--fg); background: var(--ink); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--molten); color: #140600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--f-mono); font-size: .72rem; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); }
.display { font-family: var(--f-display); font-weight: 300; line-height: 1.03; letter-spacing: -.03em; font-size: clamp(2.3rem, 5.2vw, 4.6rem); text-wrap: balance; }
.display.sm { font-size: clamp(1.9rem, 3.8vw, 3.2rem); line-height: 1.07; }
.lede { font-size: clamp(1.03rem, 1.25vw, 1.2rem); line-height: 1.55; color: var(--fg-2); max-width: 56ch; }
.lede a { color: var(--fg); text-decoration-color: var(--molten); text-underline-offset: 4px; }
.lede a:hover { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px 18px; background: var(--bone); color: var(--ink); font-size: .9rem; font-weight: 500; text-decoration: none; border-radius: 2px; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- buttons and links ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; font-family: var(--f-body); font-weight: 500; font-size: .95rem; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; border: 1px solid transparent; border-radius: 2px; transition: background-color .25s, color .25s, border-color .25s; }
.btn svg { width: 16px; height: 16px; flex: none; stroke-width: 1.6; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-molten { background: var(--molten); color: #140600; }
.btn-molten:hover { background: var(--bone); }
.btn-steel, .btn-line { border-color: var(--rule-2); color: var(--fg); background: rgba(11, 10, 9, .4); }
.btn-steel:hover, .btn-line:hover { border-color: var(--fg); background: rgba(239, 232, 218, .06); }
.arrow-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: .95rem; font-weight: 500; text-decoration: none; color: var(--fg); transition: color .2s; }
.arrow-link::before { content: "\21B3"; color: var(--molten); }
.arrow-link:hover { color: var(--accent); }

/* ---------- nav ---------- */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: var(--nav-h); }
/* the blur sits on a pseudo-element: on the bar itself it would trap the fixed phone menu inside the bar */
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(11, 10, 9, .74); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid var(--rule); opacity: 0; transition: opacity .4s; }
.nav.is-stuck::before { opacity: 1; }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; padding: 0 var(--gut); }
.nav-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--molten); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fg); min-height: 44px; }
.brand-nut { width: 20px; height: 20px; flex: none; color: var(--molten); transform: rotate(calc(var(--scroll, 0) * 360deg)); }
.brand-name { font-family: var(--f-display); font-stretch: 112%; font-weight: 600; font-size: .84rem; letter-spacing: .2em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.brand-name span { font-weight: 300; color: var(--fg-2); }

.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.3vw, 34px); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; text-decoration: none; color: var(--fg-2); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
.nav-links .nav-cta { min-height: 36px; padding: 0 15px; border: 1px solid var(--rule-2); border-radius: 2px; color: var(--fg); transition: background-color .25s, color .25s, border-color .25s; }
.nav-links .nav-cta:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }

.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; background: none; border: 0; cursor: pointer; position: relative; z-index: 2; }
.nav-toggle i { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--bone); transition: transform .35s var(--ease); }
.nav-toggle i:nth-child(1) { top: 18px; }
.nav-toggle i:nth-child(2) { top: 25px; }
.nav.is-open .nav-toggle i:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav.is-open .nav-toggle i:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { --fx: 77%; --fy: 42%; position: relative; z-index: 0; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: var(--ink); isolation: isolate; }
/* the field stays put while the page rides up over it, but only when the whole hero fits on screen */
@media (min-height: 620px) { .hero { position: sticky; top: 0; } }
.hero-gl { position: absolute; inset: 0; width: 100%; height: 100%; }
/* a WebGL canvas that is not being drawn is opaque black: it only shows once the field is running */
[data-field]:not(.has-gl) .hero-gl { display: none; }
/* without WebGL2, or without scripts: still rings round the same hot spot */
[data-field].no-gl, html:not(.js) [data-field] { background: radial-gradient(58% 68% at var(--fx) var(--fy), rgba(255, 90, 31, .17), transparent 70%), repeating-radial-gradient(circle at var(--fx) var(--fy), transparent 0 47px, rgba(239, 232, 218, .075) 47px 48px), var(--ink); }
/* keeps the copy readable over the lines, and lets the field sink into the page below */
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(11, 10, 9, .86) 0%, rgba(11, 10, 9, .55) 32%, rgba(11, 10, 9, 0) 60%), linear-gradient(0deg, var(--ink) 0%, rgba(11, 10, 9, 0) 24%); }
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--nav-h) + 28px) var(--gut) clamp(40px, 8vh, 96px); pointer-events: none; }
.hero-inner a { pointer-events: auto; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); }
.hero-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--molten); box-shadow: 0 0 0 4px rgba(255, 90, 31, .16); }
.hero-line { margin-top: clamp(18px, 3.2vh, 30px); max-width: 11.5em; font-family: var(--f-display); font-weight: 300; font-size: clamp(2.7rem, min(6.8vw, 12vh), 6.3rem); line-height: 1.01; letter-spacing: -.035em; text-wrap: balance; }
.hero-sub { margin-top: clamp(20px, 3.4vh, 32px); max-width: 46ch; color: var(--fg-2); font-size: clamp(1.02rem, 1.25vw, 1.2rem); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 3.6vh, 34px); }
.hero-cue { position: absolute; z-index: 2; right: var(--gut); bottom: clamp(40px, 8vh, 96px); display: flex; align-items: center; gap: 14px; pointer-events: none; }
.hero-cue i { position: relative; width: 64px; height: 1px; background: var(--rule-2); overflow: hidden; }
.hero-cue i::after { content: ""; position: absolute; inset: 0; background: var(--bone); transform: translateX(-101%); animation: cue 2.8s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: translateX(-101%); } 55%, 100% { transform: translateX(101%); } }

/* the copy rises in once, on load */
.js .hero-inner > *, .js .hero-cue { animation: rise 1.1s var(--ease) both; }
.js .hero-inner > :nth-child(1) { animation-delay: .15s; }
.js .hero-inner > :nth-child(2) { animation-delay: .25s; }
.js .hero-inner > :nth-child(3) { animation-delay: .38s; }
.js .hero-inner > :nth-child(4) { animation-delay: .5s; }
.js .hero-cue { animation-delay: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- the floor: everything that rides up over the hero ---------- */
.floor { position: relative; z-index: 1; background: var(--ink); }

/* ---------- sections ---------- */
.bay { position: relative; padding: clamp(84px, 13.5vh, 168px) 0; border-top: 1px solid var(--rule); background: var(--bg); }
.bay-alt { --bg: var(--ink-2); }
.bay-rule { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(22px, 4vh, 44px); }
.bay-rule i { flex: none; width: 44px; height: 1px; background: var(--rule-2); }
.bay-rule b { font-weight: 500; color: var(--fg); }
.bay-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px clamp(32px, 6vw, 96px); align-items: end; }
.bay-head .bay-rule { grid-column: 1 / -1; margin-bottom: clamp(2px, 2vh, 22px); }

/* scroll reveals: the rise uses the translate property, so a component keeps its own transform */
.js .reveal { opacity: 0; translate: 0 22px; transition: opacity .8s var(--ease), translate .9s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .reveal.is-in { opacity: 1; translate: none; }

/* ---------- featured work: a reel of large cards ---------- */
.featured { padding: clamp(52px, 8.5vh, 100px) 0 clamp(44px, 7.5vh, 88px); border-top: 1px solid var(--rule); background: var(--ink-2); }
.featured-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { min-height: 36px; padding: 0 12px; border: 0; border-radius: 2px; background: none; font-size: .9rem; color: var(--fg-3); cursor: pointer; transition: background-color .2s, color .2s; }
.chip:hover { color: var(--fg); }
.chip[aria-current="true"] { background: rgba(239, 232, 218, .09); color: var(--fg); }
.reel { position: relative; display: flex; gap: clamp(10px, 1.2vw, 18px); margin-top: 22px; padding: 0 var(--gut) 18px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gut); overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: rgba(239, 232, 218, .28) transparent; }
.feature { position: relative; flex: none; width: min(84vw, 1120px); height: clamp(340px, 58vh, 560px); scroll-snap-align: start; overflow: hidden; border: 1px solid var(--rule); border-radius: 2px; background: var(--ink-3); isolation: isolate; transition: border-color .3s; }
.feature:hover { border-color: var(--rule-2); }
.feature::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(52% 78% at var(--cx, 76%) var(--cy, 52%), rgba(255, 90, 31, .12), transparent 72%), repeating-radial-gradient(circle at var(--cx, 76%) var(--cy, 52%), transparent 0 51px, rgba(239, 232, 218, .04) 51px 52px); }
.feature-link { position: absolute; inset: 0; z-index: 2; text-decoration: none; color: inherit; }
.feature-link:focus-visible { outline-offset: -4px; }
.feature-tag { position: absolute; left: clamp(16px, 2.4vw, 34px); top: clamp(16px, 2.4vw, 34px); max-width: min(30rem, calc(100% - 32px)); }
.feature-tag .mono { display: block; margin-bottom: 12px; color: var(--accent); }
.feature-title { display: block; font-family: var(--f-display); font-weight: 300; font-size: clamp(1.6rem, 3vw, 2.7rem); line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
.feature-text { display: block; margin-top: 14px; max-width: 40ch; font-size: .98rem; line-height: 1.5; color: var(--fg-2); }
.feature-go { position: absolute; left: clamp(16px, 2.4vw, 34px); bottom: clamp(16px, 2.4vw, 30px); display: inline-flex; align-items: center; gap: 9px; font-size: .95rem; font-weight: 500; }
.feature-go::before { content: "\21B3"; color: var(--molten); }
.feature-art { position: absolute; z-index: 1; right: clamp(8px, 5vw, 88px); top: 50%; translate: 0 -50%; width: min(42%, 400px); aspect-ratio: 1; }
.feature-art svg { width: 100%; height: 100%; overflow: visible; }

/* figures: one abstract diagram per featured piece */
.fig { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig .a { stroke: rgba(239, 232, 218, .8); stroke-width: 1; }
.fig .b { stroke: rgba(154, 147, 133, .5); stroke-width: 1; }
.fig .h { stroke: var(--molten); stroke-width: 1.2; }
.fig .hf { fill: var(--molten); stroke: none; }
.fig .bf { fill: var(--bone); stroke: none; }
.fig text { fill: #9a9385; stroke: none; font-family: var(--f-mono); font-size: 8.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.js .feature .fig .ink { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.7s var(--ease-io); transition-delay: calc(var(--d, 0) * 1ms); }
.js .feature .fig .fd { opacity: 0; transition: opacity .9s ease; transition-delay: calc(var(--d, 0) * 1ms); }
.js .feature.is-drawn .fig .ink { stroke-dashoffset: 0; }
.js .feature.is-drawn .fig .fd { opacity: 1; }
.fig .spin { animation: spin var(--t, 60s) linear infinite; }
.fig .spin.rev { animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.fig .beat { animation: beat 3.2s ease-in-out infinite; }
@keyframes beat { 50% { opacity: .25; } }
/* a claim crossing eight layers */
.fig .probe { opacity: 0; animation: probe 6.4s linear infinite; }
@keyframes probe { 0% { transform: translateX(-192px); opacity: 0; } 5% { opacity: 1; } 70% { transform: translateX(0); opacity: 1; } 78% { transform: translateX(0) scale(2.4); opacity: 1; } 92%, 100% { transform: translateX(0); opacity: 0; } }
.fig .ring { animation: ring 6.4s linear infinite; animation-delay: calc(var(--k) * 1s); }
@keyframes ring { 0% { stroke: var(--molten); } 12%, 80% { stroke: rgba(239, 232, 218, .85); } 100% { stroke: rgba(154, 147, 133, .5); } }
/* a document read line by line */
.fig .scan { opacity: 0; animation: scan 7.2s linear infinite; }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 4% { opacity: 1; } 68% { transform: translateY(244px); opacity: 1; } 74%, 100% { transform: translateY(244px); opacity: 0; } }
.fig .row { animation: row 7.2s linear infinite; animation-delay: calc(var(--k) * 1s); }
@keyframes row { 0% { stroke: var(--molten); } 10%, 84% { stroke: rgba(239, 232, 218, .85); } 100% { stroke: rgba(154, 147, 133, .5); } }
.fig .tick { animation: tick 7.2s linear infinite; animation-delay: calc(var(--k) * 1s); }
@keyframes tick { 0%, 84% { fill: var(--molten); stroke: var(--molten); } 100% { fill: rgba(255, 90, 31, 0); stroke: rgba(154, 147, 133, .5); } }
.fig .score { transform: scaleX(0); animation: score 7.2s linear infinite; }
@keyframes score { 0% { transform: scaleX(0); opacity: 1; } 68%, 90% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
/* nothing moves until its card is on screen; this has to outrank the animation shorthands above */
.feature:not(.is-drawn) .fig .run { animation-play-state: paused; }

/* ---------- the statement ---------- */
.statement { padding: clamp(100px, 19vh, 240px) 0; border-top: 1px solid var(--rule); }
.statement-text { max-width: 21em; margin-inline: auto; text-align: center; font-family: var(--f-display); font-weight: 300; font-size: clamp(1.7rem, 3.9vw, 3.5rem); line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
/* each word lights as the block is scrolled through; site.js sets the opacity */
.statement-text .w { opacity: .4; transition: opacity .3s linear; }

/* ---------- our software ---------- */
.wares { margin-top: clamp(8px, 2vh, 20px); border-top: 1px solid var(--rule); }
.ware { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; padding: clamp(20px, 3.4vh, 34px) 0 clamp(22px, 3.6vh, 38px); border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--fg); transition: padding-left .5s var(--ease); }
.ware-name { font-family: var(--f-display); font-weight: 300; font-size: clamp(2.5rem, 7.4vw, 6.4rem); line-height: .98; letter-spacing: -.04em; transition: color .3s; }
.ware-desc { grid-column: 1; max-width: 60ch; font-size: clamp(1rem, 1.25vw, 1.16rem); line-height: 1.45; color: var(--fg-2); }
.ware-no { grid-column: 2; grid-row: 1; align-self: start; padding-top: .9em; }
.ware-go { grid-column: 2; grid-row: 2; align-self: end; justify-self: end; width: 26px; height: 26px; color: var(--molten); stroke-width: 1.4; opacity: 0; translate: -10px 0; transition: opacity .3s, translate .5s var(--ease); }
.ware:hover, .ware:focus-visible { padding-left: clamp(10px, 1.4vw, 22px); }
.ware:hover .ware-go, .ware:focus-visible .ware-go { opacity: 1; translate: none; }

/* ---------- open work by sector ---------- */
.sectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(30px, 5vh, 54px) clamp(20px, 3vw, 48px); margin-top: clamp(44px, 8vh, 88px); }
.sector h3 { padding-bottom: 12px; border-bottom: 1px solid var(--rule-2); color: var(--fg); }
.sector a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: .95rem; line-height: 1.35; text-decoration: none; color: var(--fg-2); transition: color .2s; }
.sector a::after { content: "\2197"; color: var(--molten); opacity: 0; transition: opacity .2s; }
.sector a:hover { color: var(--fg); }
.sector a:hover::after { opacity: 1; }

/* ---------- work delivered ---------- */
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(44px, 8vh, 88px); border-top: 1px solid var(--rule); }
.case { padding: 28px clamp(20px, 3vw, 48px) 30px 0; border-bottom: 1px solid var(--rule); }
.case:nth-child(even) { padding-left: clamp(20px, 3vw, 48px); padding-right: 0; border-left: 1px solid var(--rule); }
.case h3 { margin-top: 14px; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.case-text { margin-top: 12px; max-width: 54ch; font-size: .98rem; line-height: 1.55; color: var(--fg-2); }
.case .arrow-link { margin-top: 6px; }
.worked { margin-top: clamp(44px, 8vh, 88px); }
.worked .bay-rule { margin-bottom: 20px; }
.clients { display: flex; flex-wrap: wrap; gap: 8px clamp(24px, 3.4vw, 52px); }
.clients li { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.3; letter-spacing: -.01em; color: var(--fg-2); }

/* ---------- output ---------- */
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 7vh, 80px); border-top: 1px solid var(--rule); }
.gauge { padding: 30px clamp(16px, 2vw, 32px) 4px; border-left: 1px solid var(--rule); }
.gauge:first-child { border-left: 0; padding-left: 0; }
.counter { display: flex; align-items: flex-end; font-family: var(--f-display); font-weight: 300; font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; letter-spacing: -.035em; white-space: nowrap; }
.drum { display: inline-block; height: 1em; overflow: hidden; }
.drum > span { display: block; transition: transform 1.9s var(--ease-io); transition-delay: var(--dd, 0ms); }
.drum b { display: block; height: 1em; line-height: 1; font-weight: inherit; text-align: center; }
.counter .sep { color: var(--fg-3); }
.counter .suffix { color: var(--molten); padding-left: .04em; }
.gauge-label { margin-top: 16px; }

/* ---------- latest ---------- */
.news { margin-top: clamp(40px, 7vh, 80px); border-top: 1px solid var(--rule); }
.news li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr) auto; gap: 8px clamp(18px, 3vw, 52px); align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.news h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.2; letter-spacing: -.015em; }
.news-text { margin-top: 8px; max-width: 68ch; font-size: .96rem; line-height: 1.55; color: var(--fg-2); }
.news .mono { line-height: 1.7; }

/* ---------- the group ---------- */
.units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(44px, 8vh, 88px); border-top: 1px solid var(--rule); }
.unit { position: relative; display: flex; flex-direction: column; min-height: 340px; padding: 26px clamp(16px, 1.9vw, 30px) 8px; border-left: 1px solid var(--rule); }
.unit:first-child { border-left: 0; padding-left: 0; }
.unit::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--molten); transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease); }
.unit:hover::before { transform: scaleX(1); }
.unit-icon { width: 28px; height: 28px; flex: none; margin-top: clamp(24px, 4vh, 44px); stroke-width: 1.25; }
.unit h3 { margin-top: clamp(32px, 5.5vh, 60px); font-family: var(--f-display); font-weight: 400; font-size: clamp(1.35rem, 1.75vw, 1.7rem); line-height: 1.12; letter-spacing: -.015em; }
.unit-kicker { margin-top: 8px; }
.unit-text { margin-top: 14px; font-size: .95rem; line-height: 1.55; color: var(--fg-2); }
.tags { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: auto; padding-top: 22px; }
.tags li { font-family: var(--f-mono); font-size: .66rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }

/* ---------- careers ---------- */
.careers { padding: clamp(84px, 13.5vh, 168px) 0 0; border-top: 1px solid var(--rule); }
.careers-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: end; padding: clamp(28px, 5.6vw, 84px); border: 1px solid var(--rule); border-radius: 2px; background: var(--ink-3); overflow: hidden; isolation: isolate; }
.careers-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(46% 90% at 92% 8%, rgba(255, 90, 31, .15), transparent 70%), repeating-radial-gradient(circle at 92% 8%, transparent 0 51px, rgba(239, 232, 218, .045) 51px 52px); }
.careers-panel .bay-rule { margin-bottom: clamp(20px, 3.5vh, 36px); }
.careers-side p { color: var(--fg-2); max-width: 46ch; }
.careers-side p + p { margin-top: 1em; }
.careers-side .btn { margin-top: 24px; }

/* ---------- two ways in ---------- */
.cta { padding: clamp(10px, 1.2vw, 18px) 0 clamp(84px, 13.5vh, 168px); }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: clamp(180px, 28vh, 280px); padding: clamp(20px, 2.6vw, 36px); border: 1px solid var(--rule); border-radius: 2px; text-decoration: none; color: var(--fg); background: var(--bg); transition: background-color .3s, color .3s, border-color .3s; }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; font-family: var(--f-display); font-weight: 300; font-size: clamp(1.8rem, 3.6vw, 3.2rem); line-height: 1; letter-spacing: -.035em; }
.tile-top svg { width: .85em; height: .85em; flex: none; stroke-width: 1.2; transition: transform .45s var(--ease); }
.tile:hover .tile-top svg { transform: translateX(8px); }
.tile-note { max-width: 40ch; font-size: .95rem; line-height: 1.5; color: var(--fg-2); }
.tile.on-bone { border-color: var(--bone); }
.tile.on-bone:hover { --bg: #fffaf0; }
.tile-line { --bg: var(--ink-3); }
.tile-line:hover { --bg: var(--molten); --fg: #140600; --fg-2: #2a0f02; border-color: var(--molten); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; padding: clamp(48px, 8vh, 88px) 0 28px; background: var(--ink); border-top: 1px solid var(--rule); overflow: hidden; }
.foot-word { font-family: var(--f-display); font-stretch: 125%; font-weight: 200; font-size: min(25.6vw, 23rem); line-height: .8; letter-spacing: -.03em; text-transform: uppercase; white-space: nowrap; color: rgba(239, 232, 218, .075); -webkit-user-select: none; user-select: none; margin-left: -.045em; }
/* decoration, not text: generated content stays out of search, copy and the accessibility tree */
.foot-word::before { content: "Rovai"; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 32px clamp(20px, 3vw, 48px); margin-top: clamp(30px, 5vh, 54px); }
.foot-col .mono { margin-bottom: 10px; }
.foot-col a { display: flex; align-items: center; min-height: 34px; font-size: .9rem; text-decoration: none; color: var(--fg-2); transition: color .2s; }
.foot-col a:hover { color: var(--fg); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px 48px; align-items: end; margin-top: clamp(30px, 5vh, 54px); }
.legal { max-width: 30rem; font-size: .86rem; line-height: 1.6; color: var(--fg-3); }
.legal strong { display: block; margin-bottom: 8px; font-family: var(--f-mono); font-size: .66rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 26px; justify-content: flex-end; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; text-decoration: none; color: var(--fg-2); transition: color .2s; }
.foot-links a:hover { color: var(--fg); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--rule); }

/* ==========================================================================
   Profile page
   ========================================================================== */
.file-hero { --fx: 84%; --fy: 30%; position: relative; z-index: 0; padding: calc(var(--nav-h) + clamp(56px, 11vh, 128px)) 0 clamp(64px, 11vh, 128px); background: var(--ink); overflow: hidden; isolation: isolate; }
.file-hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(11, 10, 9, .9) 0%, rgba(11, 10, 9, .6) 42%, rgba(11, 10, 9, .1) 78%), linear-gradient(0deg, var(--ink) 0%, rgba(11, 10, 9, 0) 22%); }
.file-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: clamp(32px, 6vw, 104px); align-items: end; }
.file-hero h1 { font-size: clamp(3.4rem, 11vw, 9.4rem); line-height: .94; letter-spacing: -.04em; }
.file-role { margin-top: clamp(18px, 2.8vh, 28px); color: var(--accent); }
.file-hero .lede { margin-top: 18px; max-width: 58ch; }
.file-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.portrait img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); border-radius: 2px; }
.facts-list { margin-top: 18px; border-top: 1px solid var(--rule); }
.facts-list div { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: .92rem; line-height: 1.45; }
.facts-list dt { padding-top: 3px; font-family: var(--f-mono); font-size: .66rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.js .file-grid > * { animation: rise 1.1s var(--ease) both; animation-delay: .15s; }
.js .file-grid > :nth-child(2) { animation-delay: .35s; }

.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.prose p { color: var(--fg-2); max-width: 60ch; }
.prose p + p { margin-top: 1.1em; }
.prose a { color: var(--fg); text-decoration-color: var(--molten); text-underline-offset: 4px; }
.prose a:hover { color: var(--accent); }
.prose .display { margin-bottom: clamp(24px, 4vh, 42px); color: var(--fg); }

.facts { justify-self: end; width: min(100%, 420px); border: 1px solid var(--rule); border-radius: 2px; background: var(--ink-3); overflow: hidden; }
.facts figure img { width: 100%; height: auto; filter: grayscale(1) contrast(1.05); }
.facts figcaption { padding: 12px 20px 14px; border-bottom: 1px solid var(--rule); }
.facts dl div { padding: 14px 20px; border-bottom: 1px solid var(--rule); }
.facts dl div:last-child { border-bottom: 0; }
.facts dt { margin-bottom: 4px; }
.facts dd { font-size: .95rem; line-height: 1.5; }

.register { margin-top: clamp(30px, 5vh, 54px); border-top: 1px solid var(--rule); }
.register-head { display: flex; align-items: baseline; gap: 18px; margin-top: clamp(56px, 9vh, 100px); }
.register-head h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.15; letter-spacing: -.015em; }
.register-head i { flex: 1; height: 1px; background: var(--rule); }
.register-head + .register { margin-top: 18px; }
.entry { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 8px clamp(18px, 3vw, 44px); padding: 26px 0; border-bottom: 1px solid var(--rule); }
.entry-meta { display: flex; flex-direction: column; gap: 8px; }
.entry-meta b { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; line-height: 1; letter-spacing: 0; color: var(--fg); }
.entry h4 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.12rem, 1.5vw, 1.34rem); line-height: 1.26; letter-spacing: -.01em; text-wrap: balance; }
.entry h4 a { text-decoration-color: var(--rule-2); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s, text-decoration-color .2s; }
.entry h4 a:hover { color: var(--accent); text-decoration-color: var(--molten); }
.entry-venue { margin-top: 8px; font-size: .98rem; }
.entry-text { margin-top: 8px; color: var(--fg-2); font-size: .96rem; line-height: 1.6; max-width: 76ch; }

.kit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); margin-top: clamp(40px, 7vh, 80px); }
.kit-card { position: relative; display: flex; flex-direction: column; min-height: 220px; padding: 22px 22px 24px; text-decoration: none; border: 1px solid var(--rule); border-radius: 2px; background: var(--ink-2); overflow: hidden; }
.js .kit-card.reveal { transition: opacity .8s var(--ease), translate .9s var(--ease), border-color .3s; transition-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms), 0s; }
.kit-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(239, 232, 218, .075), transparent 62%); opacity: 0; transition: opacity .35s; }
.kit-card:hover { border-color: var(--rule-2); }
.kit-card:hover::before { opacity: 1; }
.kit-card > * { position: relative; }
.kit-card .mono { display: flex; justify-content: space-between; gap: 10px; }
.kit-card h3 { margin-top: 44px; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.3rem, 1.8vw, 1.6rem); line-height: 1.1; letter-spacing: -.015em; }
.kit-card p:not(.mono) { margin-top: 10px; font-size: .93rem; line-height: 1.5; color: var(--fg-2); }
.kit-card .go { color: var(--accent); }

.record { margin-top: clamp(40px, 7vh, 80px); border-top: 1px solid var(--rule); }
.record li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 6px clamp(18px, 3vw, 44px); align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.record h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.14rem; line-height: 1.25; letter-spacing: -.005em; }
.record p { margin-top: 3px; color: var(--fg-2); font-size: .95rem; }

.contact { position: relative; padding: clamp(110px, 18vh, 220px) 0 clamp(96px, 15vh, 180px); border-top: 1px solid var(--rule); background: radial-gradient(80% 70% at 50% 128%, rgba(255, 90, 31, .2), transparent 64%), var(--ink); overflow: hidden; }
.contact h2 { font-size: clamp(2.8rem, 8.6vw, 8rem); line-height: .98; letter-spacing: -.04em; }
.contact .lede { margin-top: clamp(24px, 4vh, 42px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4.5vh, 46px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
    .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .units { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .unit { min-height: 280px; padding-bottom: 34px; }
    .unit:nth-child(3) { border-left: 0; padding-left: 0; }
    .unit:nth-child(n+3) { border-top: 1px solid var(--rule); }
    .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gauge { padding-bottom: 30px; }
    .gauge:nth-child(3) { border-left: 0; padding-left: 0; }
    .gauge:nth-child(n+3) { border-top: 1px solid var(--rule); }
    .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .foot-cols .legal { grid-column: 1 / -1; }
    .news li { grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
    .news .arrow-link { grid-column: 2; }
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav-links { position: fixed; inset: 0; z-index: 1; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 96px var(--gut) 40px; overflow-y: auto; background: var(--ink); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
    .nav.is-open .nav-links { opacity: 1; visibility: visible; transition: opacity .35s, visibility 0s; }
    .nav-links a { font-family: var(--f-display); font-weight: 300; font-size: clamp(2rem, 9vw, 3.1rem); letter-spacing: -.03em; line-height: 1.1; color: var(--fg); min-height: 54px; }
    .nav-links .nav-cta { margin-top: 22px; padding: 0 22px; min-height: 54px; font-family: var(--f-body); font-weight: 500; font-size: 1.05rem; letter-spacing: 0; }
    .brand { position: relative; z-index: 2; }
    .bay-head { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
    .facts { justify-self: start; }
    .hero::after { background: linear-gradient(0deg, var(--ink) 0%, rgba(11, 10, 9, .8) 38%, rgba(11, 10, 9, 0) 72%); }
    .hero-cue { display: none; }
    .feature { height: clamp(430px, 68vh, 560px); }
    .feature-art { right: 50%; top: auto; bottom: 56px; translate: 50% 0; width: min(58%, 250px); }
    .feature-text { display: none; }
    .cases { grid-template-columns: 1fr; }
    .case, .case:nth-child(even) { padding-left: 0; padding-right: 0; border-left: 0; }
    .careers-panel { grid-template-columns: 1fr; }
    .tiles { grid-template-columns: 1fr; }
    .file-grid { grid-template-columns: 1fr; align-items: start; }
    .file-hero::after { background: linear-gradient(0deg, var(--ink) 0%, rgba(11, 10, 9, .86) 30%, rgba(11, 10, 9, .55) 100%); }
    .portrait { width: min(100%, 320px); }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foot-grid { grid-template-columns: 1fr; }
    .foot-links { justify-content: flex-start; }
    .entry { grid-template-columns: 1fr; }
    .entry-meta { flex-direction: row; align-items: baseline; gap: 14px; }
    .record li { grid-template-columns: 1fr; }
    .news li { grid-template-columns: 1fr; }
    .news .arrow-link { grid-column: 1; }
}

@media (max-width: 640px) {
    body { font-size: 1rem; }
    .brand-name span { display: none; }
    .sectors { grid-template-columns: 1fr; }
    .units { grid-template-columns: 1fr; }
    .unit { min-height: 0; padding-left: 0; border-left: 0; }
    .unit:nth-child(n+2) { border-top: 1px solid var(--rule); }
    .unit h3 { margin-top: 28px; }
    .gauges { grid-template-columns: 1fr; }
    .gauge { padding-left: 0; border-left: 0; }
    .gauge:nth-child(n+2) { border-top: 1px solid var(--rule); }
    .kit { grid-template-columns: 1fr; }
    .hero-inner { padding-bottom: 30px; }
    .hero-sub { font-size: 1rem; }
    .btn { padding: 0 18px; }
    .feature { width: 88vw; }
    .ware-no { padding-top: .5em; }
}

@media (max-height: 560px) {
    .hero { min-height: 500px; }
    .hero-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
    .hero-cue { display: none; }
    .brand-nut { transform: none; }
    .reel { scroll-snap-type: none; }
}

@media print {
    .nav, .hero-gl, .hero-cue, .chips { display: none !important; }
    .hero { position: static; height: auto; min-height: 0; }
    .hero::after, .file-hero::after { display: none; }
    .reel { flex-wrap: wrap; overflow: visible; }
    :root { --bg: #fff; --fg: #000; --fg-2: #222; --fg-3: #333; --rule: #999; --rule-2: #666; }
    body, .bay, .featured, .floor, .hero, .file-hero, .foot, .feature, .careers-panel, .tile, .facts, .kit-card, .contact { background: #fff !important; color: #000 !important; }
    .statement-text .w { opacity: 1 !important; }
}
