/* ==========================================================================================
   CaspNET CRL: site styles. One file, no preprocessor, no build step.

   ORDER OF THE STYLESHEET
   Top to bottom the stylesheet follows the page: shared tokens and base first, then each part
   of the page in the order a visitor meets each part, then the floating controls and page-wide
   states, and finally the rules depending on the window or the visitor's settings.

   Each selector appears ONCE (per media condition). To change how something looks, find the
   one rule for the selector. Order still matters between different selectors of equal weight,
   so add a new rule beside the component the rule belongs to, not at the end.

   The stylesheet was produced by merging an earlier layered version. The merge was proven
   equivalent by comparing the computed style of every element, in five states at four window
   widths, before and after. Preserve the equivalence: add to a selector's existing rule, never
   a second copy.

   SECURITY NOTES
     No remote @import, no data: URLs, no url() to another host. The Content-Security-Policy
     in site/_headers would block all three. Fonts are local files (see "Fonts" below).
     Nothing here is generated from visitor input.

   PERFORMANCE NOTES
     Looping animations change only opacity and transform wherever possible, so the browser
     can run each one without re-laying-out the page. Animations stop when the animated scene
     is off screen (.is-paused), when the tab is hidden (.is-hidden) and when the visitor asks
     (.no-motion), and thin out on modest devices (.lite).

   CONTENTS
     1. Tokens
     2. Base
     3. Buttons
     4. Header
     5. Section furniture
     6. 01 Hero
     7. 02 Services: tiles
     8. 02 Services: Our Commitment
     9. 03 Methodology
     10. 04 Contact
     11. Mountain ridge and footer
     12. Floating controls
     13. Error page
     14. Page-wide states
     15. Window sizes and visitor settings (media queries)
   ========================================================================================== */

/* --trace is registered as an angle, so the browser can animate the value. */
@property --trace { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---- Fonts -------------------------------------------------------------------------------
   The three typefaces are served from the site's own assets/fonts/ folder, not from an outside service,
   so loading the page contacts no third party. All three are open-source (SIL Open Font
   License): see assets/fonts/README.txt.

   Lora and Nunito are "variable" files: one file holds every weight in the stated range.
   unicode-range tells the browser which characters a file covers, so the latin-ext file is
   only fetched if the page (or something a visitor types) actually needs those characters.
   font-display: swap shows text at once in a fallback font, then switches when the file arrives. */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("../assets/fonts/lora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("../assets/fonts/lora-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Accented letters beyond Western European (for example in a name typed into the form) */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/rajdhani-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/rajdhani-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/rajdhani-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ==========================================================================================
   1. TOKENS
   Colours, fonts and spacing used everywhere below. Change a value here, not in the rules.
   The *-rgb entries are colour channels for use with transparency: rgb(var(--gold-rgb) / .5).
   color-scheme makes native controls, scrollbars and autofill follow the dark theme.
   ========================================================================================== */

:root {
  --bg: #0b0910;
  --bg-2: #120c1c;
  --ink: #f5f1fb;
  --muted: #d2c9e0;
  --gold: #f6b122;
  --gold-hi: #ffd257;
  --gold-lo: #d98a0c;
  --violet: #8a4dff;
  --line: rgba(150, 104, 235, .45);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Nunito", "Segoe UI", system-ui, sans-serif;
  --tech: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --pad: clamp(1.25rem, 3.4vw, 3.5rem);
  --header-h: 4.5rem;
  color-scheme: dark;
  --gold-rgb: 246 177 34;
  --violet-rgb: 138 77 255;
  --bg-rgb: 11 9 16;
}


/* ==========================================================================================
   2. BASE
   Reset, page defaults, typography, icons, the centred content column and helpers.
   ========================================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-color: #5b3a9e var(--bg);
  scroll-padding-top: 4.4rem;
  /* Phones must not enlarge text automatically when turned sideways. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* The hidden attribute always wins, whatever display a component rule sets. */
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 4px;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.container {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: var(--pad);
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--gold);
  color: #1a1004;
  padding: .6rem 1rem;
  border-radius: 6px;
  font-weight: 700;
}
.skip:focus { top: 1rem; }
h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: .005em;
  text-wrap: balance;
  font-kerning: normal;
  font-optical-sizing: auto;
}
h2 {
  font-size: clamp(1.8rem, 2.9vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -.005em;
}
::placeholder { color: var(--muted); opacity: .85; }
/* Page ambience: faint violet haze behind everything, themed selection and scrollbar */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(60rem 40rem at 12% 30%, rgba(96, 48, 190, .13), transparent 70%), radial-gradient(50rem 36rem at 88% 62%, rgba(138, 60, 220, .1), transparent 70%), radial-gradient(40rem 30rem at 50% 100%, rgb(var(--gold-rgb) / .04), transparent 70%);
}
::selection { background: rgb(var(--gold-rgb) / .85); color: #1d1203; }
/* Accessibility helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Typography: no orphaned last words, tighter display headings, aligned figures */
p, li { text-wrap: pretty; }
main:focus { outline: none; }
input, textarea { caret-color: var(--gold); }
/* Scrollbar in the site's colours (Chromium and Safari) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6a45b8, #40246f);
  border-radius: 8px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--gold), var(--gold-lo)); }
.is-current > .container > .label, .hero.is-current .label { text-shadow: 0 0 14px rgb(var(--gold-rgb) / .5); }


/* ==========================================================================================
   3. BUTTONS
   The .btn family and the "Coming soon" tooltip on the Client Portal button.
   ========================================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  font: 700 1.05rem/1 var(--tech);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .8em 1.3em;
  border-radius: .55em;
  border: 1.5px solid var(--gold);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn .icon { transition: transform .25s ease; }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; }
/* Gold buttons: a sheen crosses each button now and then (::before, further down) */
.btn--gold {
  color: #1d1203;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 0 18px rgb(var(--gold-rgb) / .45), inset 0 1px 0 rgba(255, 255, 255, .5);
  position: relative;
  overflow: hidden;
}
.btn--gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgb(var(--gold-rgb) / .7), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn--outline { color: var(--ink); background: rgb(var(--bg-rgb) / .55); }
.btn--outline .icon { color: var(--gold); }
.btn--outline:hover { background: rgb(var(--gold-rgb) / .14); }
/* Client Portal: reads and shows "Coming soon" instead of being a dead button */
.btn--portal {
  color: var(--gold);
  font-size: .95rem;
  padding: .65em 1em;
  position: relative;
}
.btn--lg {
  font-size: 1.25rem;
  padding: .7em 2.2em;
  position: relative;
}
.btn.is-loading { cursor: progress; }
.btn.is-loading .icon { visibility: hidden; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  right: 1.6em;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  border: 2.5px solid rgba(29, 18, 3, .3);
  border-top-color: #1d1203;
  animation: spin .7s linear infinite;
}
.btn--gold::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 35%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent);
  transform: skewX(-20deg);
  animation: sheen 6.5s ease-in-out infinite;
}
.btn--gold:hover .icon { transform: translateX(4px); }
.tip {
  position: absolute;
  left: 50%;
  top: calc(100% + .55rem);
  transform: translate(-50%, -.3rem);
  white-space: nowrap;
  pointer-events: none;
  padding: .35rem .65rem;
  border-radius: .35rem;
  border: 1px solid var(--gold-lo);
  background: #09070e;
  color: var(--ink);
  font: 600 .78rem/1 var(--tech);
  letter-spacing: .08em;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.btn--portal:hover .tip, .btn--portal:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.btn:active { transform: translateY(1px) scale(.985); }

/* Animations used by the rules above */
@keyframes sheen {
  0%, 72% { transform: translateX(0) skewX(-20deg); }
  100% { transform: translateX(560%) skewX(-20deg); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ==========================================================================================
   4. HEADER
   Sticky bar: wordmark, section links, reading-progress line, menu button for narrow screens.
   ========================================================================================== */

/* Header: compact once the page is scrolled, with a reading-progress line */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgb(var(--bg-rgb) / .93);
  -webkit-backdrop-filter: blur(8px);   /* Safari before 18 */
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--gold-lo);
  transition: height .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.site-header__row, .site-footer__row {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  height: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-right: auto;
}
.brand img {
  width: 3.1rem;
  height: auto;
  filter: drop-shadow(0 0 6px rgb(var(--gold-rgb) / .35));
  transition: transform .5s cubic-bezier(.2, .7, .2, 1.3), filter .3s ease, width .25s ease;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
/* Header: wordmark with a metal sheen, links warm up under the pointer */
.brand__name {
  font: 600 1.7rem/1 var(--serif);
  letter-spacing: .01em;
  background: linear-gradient(180deg, #ffe08a 0%, var(--gold) 55%, var(--gold-lo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold);
  transition: font-size .25s ease;
}
.brand__tag {
  font: 600 .72rem/1 var(--tech);
  letter-spacing: .26em;
  text-transform: uppercase;
  margin-top: .35rem;
  color: var(--ink);
}
.nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 3rem);
  padding-right: clamp(1rem, 3vw, 3rem);
  border-right: 2px solid rgba(245, 241, 251, .85);
}
.nav a {
  position: relative;
  padding: .5rem .1rem;
  font: 600 1.12rem/1 var(--tech);
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: color .2s ease, text-shadow .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.15rem;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.site-header.is-scrolled {
  height: 3.6rem;
  background: rgba(9, 7, 14, .97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
}
.site-header.is-scrolled .brand img { width: 2.5rem; }
.site-header.is-scrolled .brand__name { font-size: 1.45rem; }
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
  box-shadow: 0 0 10px var(--gold);
}
.brand:hover img {
  transform: rotate(-10deg) scale(1.08);
  filter: drop-shadow(0 0 12px rgb(var(--gold-rgb) / .8));
}
/* Menu button: only shown on narrow screens */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1.5px solid var(--gold);
  border-radius: .5rem;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  width: 1.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform .25s ease, opacity .2s ease;
}
.site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav a:hover, .nav a[aria-current] { color: var(--gold-hi); }
.nav a[aria-current] { text-shadow: 0 0 14px rgb(var(--gold-rgb) / .45); }
/* Header call to action: appears once the hero's own buttons have scrolled away (wide windows only, see section 15) */
.header-cta {
  display: none;
  font-size: .9rem;
  padding: .6em 1em;
}


/* ==========================================================================================
   5. SECTION FURNITURE
   Parts every section shares: spacing, the numbered label, and the gold divider rules.
   ========================================================================================== */

.section {
  position: relative;
  padding-block: clamp(1.5rem, 2.6vw, 2.75rem);
  scroll-margin-top: .5rem;
}
.label {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 32rem;
  font: 700 1.15rem/1.2 var(--tech);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--gold);
  transition: text-shadow .4s ease;
}
.label::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.section__lead {
  margin-top: .4rem;
  color: var(--ink);
  max-width: 78ch;
}
.rule {
  height: 1.5px;
  position: relative;
  z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(255, 243, 196, .95), transparent) no-repeat, linear-gradient(90deg, transparent, var(--gold-lo) 12%, var(--gold-lo) 88%, transparent);
  background-size: 16% 100%, 100% 100%;
  animation: glint 9s ease-in-out infinite;
}
.rule--diamond span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--bg);
  border: 2px solid var(--gold);
  box-shadow: 0 0 10px rgb(var(--gold-rgb) / .7), inset 0 0 0 3px var(--bg), inset 0 0 0 6px var(--gold);
}
/* Section label rules draw themselves in */
.reveal.label::after { transform: scaleX(0); transform-origin: left; }
.reveal.is-in.label::after { transform: scaleX(1); transition: transform .9s ease .15s; }
.label span::before {
  content: "\25C6";
  display: inline-block;
  margin-right: .6em;
  font-size: .55em;
  vertical-align: .25em;
  opacity: .85;
}

/* Animations used by the rules above */
@keyframes glint {
  0%, 55% { background-position: -25% 0, 0 0; }
  100% { background-position: 125% 0, 0 0; }
}


/* ==========================================================================================
   6. 01 HERO
   The scene is a stack of layers inside .hero__art. Every layer is placed in % of .hero__art,
   so the whole picture scales as one. Order in the stack: sky extension, painted plate,
   sky effects (masked to pass behind the castle), castle lights, waterfall, bird, fog.
   ========================================================================================== */

/* one smooth wash: near-black on the left, deepening to the plate's own dark violet on the right */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(18.5rem, 21.5vw, 30rem);
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, #0c0913 0%, #130b20 30%, #1b1030 62%, #1b1030 100%);
}
/* All hero layers are sized in % of .hero__art, which keeps the plate's aspect ratio. */
.hero__art {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  aspect-ratio: 1536 / 780;
  z-index: 0;
}
/* Sky extension: a sharp strip built from the plate's own clouds and hills, mirrored to join
   the plate's left edge exactly. The strip carries the scene behind the text; the overlay
   (::after) keeps the text readable. */
.hero__mirror {
  position: absolute;
  top: 0;
  right: calc(100% - 1px);
  width: 180%;
  height: 100%;
  background: url("../assets/scenes/hero-sky-extension.jpg") right center / auto 100% no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%);
}
.hero__mirror::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(var(--bg-rgb) / .72) 0, rgb(var(--bg-rgb) / .5) 55%, rgb(var(--bg-rgb) / .15) 88%, transparent 100%);
}
.hero__stack { position: absolute; inset: 0; }
.hero__stack > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__scene { object-fit: cover; }
.hero__stack > .hero__sky {
  inset: 0 0 auto 0;
  height: 55.13%;
  overflow: hidden;
  -webkit-mask: url("../assets/animation/sky-mask.png") center / 100% 100% no-repeat;
  mask: url("../assets/animation/sky-mask.png") center / 100% 100% no-repeat;
}
/* Clouds crossing the sky: two dark bodies plus a paler, lit layer. Each has a resting opacity
   for when motion is off; while moving, cloud-bob sets the opacity. */
.hero__cloud {
  position: absolute;
  left: 0;
  width: 200%;
  background-repeat: repeat-x;
}
.hero__cloud--a {
  top: 2%;
  height: 62%;
  background-image: url("../assets/animation/fog-near.png");
  background-size: 50% 100%;
  filter: brightness(.28) saturate(1.6) blur(1px);
  opacity: .5;
  animation: drift 46s linear infinite, cloud-bob 15s ease-in-out infinite;
}
.hero__cloud--b {
  top: 30%;
  height: 70%;
  background-image: url("../assets/animation/fog-far.png");
  background-size: 37% 100%;
  filter: brightness(.36) saturate(1.5) blur(1.5px);
  opacity: .5;
  animation: drift-mid 64s linear infinite reverse, cloud-bob 19s ease-in-out -7s infinite;
}
.hero__cloud--c {
  top: 12%;
  height: 55%;
  background-image: url("../assets/animation/fog-far.png");
  background-size: 50% 100%;
  filter: brightness(.75) saturate(1.3) blur(2px);
  opacity: .45;
  animation: drift 80s linear infinite reverse, cloud-bob 23s ease-in-out -11s infinite;
}
/* Bird: a foreground watcher at the lower left of the picture. Graded down to night, with a cool
   rim of light on the upper side and a heavy shadow beneath. The bird shifts slightly with the pointer. */
.hero__bird {
  position: absolute;
  aspect-ratio: 729 / 800;
  transform: translate(calc(var(--px, 0) * -1.6%), calc(var(--py, 0) * -1%));
  transition: transform .6s ease-out;
  left: 3%;
  bottom: -9%;
  height: 71%;
  filter: brightness(.8) saturate(.9) contrast(1.04) drop-shadow(3px -3px 5px rgba(160, 140, 255, .38)) drop-shadow(0 10px 16px rgba(0, 0, 0, .75));
}
.hero__bird img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
/* .bird-part: soft-masked copies of the bird picture, so one region can move while the outline stays put */
/* breathing: only the chest swells */
.bird-part--chest {
  -webkit-mask-image: radial-gradient(ellipse 17% 21% at 74% 47%, #000 25%, transparent 100%);
  mask-image: radial-gradient(ellipse 17% 21% at 74% 47%, #000 25%, transparent 100%);
  transform-origin: 74% 47%;
  animation: breathe 5.5s ease-in-out infinite;
}
/* ruffle: every so often the wing and crest feathers shiver, then settle */
.bird-part--wing {
  -webkit-mask-image: radial-gradient(ellipse 30% 25% at 48% 45%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 30% 25% at 48% 45%, #000 30%, transparent 100%);
  transform-origin: 62% 30%;
  animation: ruffle 13s ease-in-out infinite;
}
.bird-part--crest {
  -webkit-mask-image: radial-gradient(ellipse 17% 10% at 67% 7%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 17% 10% at 67% 7%, #000 30%, transparent 100%);
  transform-origin: 72% 14%;
  animation: ruffle 13s ease-in-out -.15s infinite;
}
/* eye: deepen the painted cyan to dark blue, then add a low, slow glow */
.hero__eye-shade {
  position: absolute;
  left: 83%;
  top: 10.5%;
  width: 26%;
  height: 15%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgb(34, 58, 190) 0, rgb(34, 58, 190) 35%, #fff 75%);
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse, #000 45%, transparent 72%);
  mask-image: radial-gradient(ellipse, #000 45%, transparent 72%);
}
.hero__eye {
  position: absolute;
  left: 84.7%;
  top: 9.2%;
  width: 8%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(70, 110, 255, .8) 0, rgba(24, 50, 210, .4) 35%, transparent 70%);
  mix-blend-mode: screen;
  animation: eye 7s ease-in-out infinite;
}
/* soft ambient glow around the whole castle */
.hero__glow {
  mix-blend-mode: screen;
  filter: blur(7px);
  opacity: .25;
  animation: flicker 8.7s ease-in-out infinite;
}
/* individual windows: four random groups on different clocks, so no two neighbours match */
.hero__stack > .hero__windows {
  inset: auto;
  left: 49.41%;
  top: 17.69%;
  width: 45.18%;
  height: 51.15%;
}
.hero__windows img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.win-on {
  mix-blend-mode: screen;
  opacity: 0;
  animation: win-on 7s linear infinite;
}
.win-off {
  filter: brightness(0);
  opacity: 0;
  animation: win-off 23s linear infinite;
}
.win-on.win--2 { animation-duration: 11s; animation-delay: -4s; }
.win-on.win--3 { animation-duration: 13s; animation-delay: -9s; }
.win-on.win--4 { animation-duration: 5.5s; animation-delay: -2s; }
.win-off.win--2 { animation-duration: 31s; animation-delay: -12s; }
.win-off.win--3 { animation-duration: 19s; animation-delay: -6s; }
.win-off.win--4 { animation-duration: 37s; animation-delay: -25s; }
/* Falling strands: the moving light is only visible through fine vertical slits, and so reads
   as threads of water running down instead of bands sliding over the picture */
.hero__water {
  overflow: hidden;
  mix-blend-mode: screen;
  -webkit-mask: url("../assets/animation/waterfall-mask.png") center / 100% 100% no-repeat;
  mask: url("../assets/animation/waterfall-mask.png") center / 100% 100% no-repeat;
  opacity: .9;
  filter: blur(.3px);
  animation: water-breathe 7s ease-in-out infinite;
}
.hero__water::before, .hero__water::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 200%;
}
.hero__water::before {
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .95) 1.4%, rgba(255, 255, 255, 0) 4%);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0, #000 1.2px, transparent 1.2px, transparent 3.4px);
  mask-image: repeating-linear-gradient(90deg, #000 0, #000 1.2px, transparent 1.2px, transparent 3.4px);
  animation: fall .85s linear infinite;
}
/* A second, slower and broader set of strands, offset from the first, for depth */
.hero__water::after {
  background: repeating-linear-gradient(180deg, rgba(222, 212, 255, 0) 0, rgba(222, 212, 255, .7) 2.5%, rgba(222, 212, 255, 0) 7%);
  -webkit-mask-image: repeating-linear-gradient(90deg, transparent 0, transparent 2px, #000 2px, #000 4.2px, transparent 4.2px, transparent 7px);
  mask-image: repeating-linear-gradient(90deg, transparent 0, transparent 2px, #000 2px, #000 4.2px, transparent 4.2px, transparent 7px);
  animation: fall-b 1.9s linear infinite;
}
/* Landing zones, one where each fall lands, sized to the width of the fall. Each holds flat
   churning water (::before), a low veil of spray (::after) and two sheets of mist (the <i>s). */
.hero__stack > .hero__splash {
  inset: auto;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}
.hero__stack > .hero__splash--mid {
  left: 71.6%;
  top: 66.6%;
  width: 9%;
  height: 5%;
}
.hero__stack > .hero__splash--base {
  left: 65.9%;
  top: 93.6%;
  width: 12%;
  height: 6%;
}
/* Mist: two thin sheets of real fog texture sliding outward along the rock and the pool */
.hero__splash i {
  position: absolute;
  bottom: -10%;
  width: 190%;
  height: 120%;
  opacity: 0;
  pointer-events: none;
  background: url("../assets/animation/fog-near.png") center / 100% 100% no-repeat;
}
.hero__splash i:nth-child(1) { right: 40%; animation: mist-left 7s ease-out infinite; }
.hero__splash i:nth-child(2) { left: 40%; animation: mist-right 8.5s ease-out -3s infinite; }
/* Ground fog, confined to the artwork side so the text side stays clean */
.hero__fogs {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000 64%);
  mask-image: linear-gradient(90deg, transparent 40%, #000 64%);
  translate: calc(var(--px, 0) * -1%) 0;
  transition: translate .6s ease-out;
}
.hero__fog {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 50% 100%;
}
.hero__fog--far {
  height: 60%;
  bottom: 14%;
  background-image: url("../assets/animation/fog-far.png");
  animation: drift 70s linear infinite, fog-bob 17s ease-in-out infinite;
}
.hero__fog--mid {
  height: 70%;
  bottom: -6%;
  background-image: url("../assets/animation/fog-near.png");
  background-size: 37% 100%;
  animation: drift-mid 48s linear infinite reverse, fog-bob 13s ease-in-out -5s infinite;
}
.hero__fog--near {
  height: 50%;
  bottom: -10%;
  background-image: url("../assets/animation/fog-near.png");
  filter: blur(2px);
  animation: drift 36s linear infinite, fog-bob 11s ease-in-out -3s infinite;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding-block: 1rem;
}
.hero__content > * { max-width: min(46%, 40rem); }
.hero h1 {
  font-size: clamp(1.9rem, 2.85vw, 2.7rem);
  line-height: 1.1;
  margin-top: .25rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .7);
}
/* The gold fill on "Engineered Solutions." is painted only inside the word's own box, which cut
   off the tail of the "g". The box now extends below the baseline; the negative margin keeps
   the line spacing unchanged. */
.hero h1 em {
  display: block;
  color: var(--gold);
  font-weight: 600;
  background: linear-gradient(100deg, var(--gold) 0, var(--gold) 42%, #fff3c4 50%, var(--gold) 58%, var(--gold) 100%) 100% 0 / 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 14px rgb(var(--gold-rgb) / .28));
  animation: em-sheen 8s ease-in-out infinite;
  padding-bottom: .22em;
  margin-bottom: -.22em;
}
.hero__lead {
  margin-top: .7rem;
  font-size: clamp(.95rem, 1.12vw, 1.05rem);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .9);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.1rem;
}
.hero__cta .btn { font-size: .95rem; }
.hero .label { font-size: 1.05rem; }
.hero.is-paused *, .hero.is-paused *::before, .hero.is-paused *::after {
  animation-play-state: paused !important;
}
/* Hero: text rises in on load, stars and a shooting star in the sky, slight depth with the pointer */
.js .hero__content > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero__content > :nth-child(2) { animation-delay: .12s; }
.js .hero__content > :nth-child(3) { animation-delay: .26s; }
.js .hero__content > :nth-child(4) { animation-delay: .4s; }
/* Stars only in the upper sky, thinning toward the horizon */
.hero__stars {
  position: absolute;
  inset: 0;
  animation: twinkle 4.5s ease-in-out infinite;
  background-image: radial-gradient(1.6px 1.6px at 6% 14%, #fff, transparent), radial-gradient(1.2px 1.2px at 14% 38%, #e8dcff, transparent), radial-gradient(1.8px 1.8px at 23% 9%, #fff, transparent), radial-gradient(1.2px 1.2px at 31% 27%, #e8dcff, transparent), radial-gradient(1.4px 1.4px at 44% 6%, #fff, transparent), radial-gradient(1.2px 1.2px at 58% 12%, #e8dcff, transparent), radial-gradient(1.6px 1.6px at 67% 5%, #fff, transparent), radial-gradient(1.2px 1.2px at 86% 9%, #e8dcff, transparent), radial-gradient(1.4px 1.4px at 94% 22%, #fff, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 35%, transparent 72%);
  mask-image: linear-gradient(180deg, #000 0, #000 35%, transparent 72%);
}
.hero__stars--b {
  animation-duration: 6.5s;
  animation-delay: -3s;
  background-image: radial-gradient(1.3px 1.3px at 10% 26%, #fff, transparent), radial-gradient(1.7px 1.7px at 19% 20%, #fff, transparent), radial-gradient(1.2px 1.2px at 27% 40%, #e8dcff, transparent), radial-gradient(1.5px 1.5px at 38% 15%, #fff, transparent), radial-gradient(1.2px 1.2px at 52% 4%, #e8dcff, transparent), radial-gradient(1.6px 1.6px at 73% 14%, #fff, transparent), radial-gradient(1.3px 1.3px at 81% 4%, #fff, transparent), radial-gradient(1.2px 1.2px at 97% 8%, #e8dcff, transparent);
}
/* Shooting star: fine and rare, falling away from the castle */
.hero__shoot {
  position: absolute;
  left: 30%;
  top: 4%;
  width: 6%;
  height: 1.5px;
  border-radius: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95));
  animation: shoot 31s linear infinite;
}
/* Lightning deep in the storm clouds (masked to the sky, so the flash never lights the castle face) */
.hero__flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: lightning 19s linear infinite;
  background: radial-gradient(ellipse 28% 46% at 20% 28%, rgba(228, 214, 255, .8), transparent 70%), radial-gradient(ellipse 20% 34% at 80% 20%, rgba(200, 180, 255, .45), transparent 70%);
}
/* Bats rise from the towers and cross the sky */
.bat {
  position: absolute;
  aspect-ratio: 2 / 1;
  opacity: 0;
  animation: bat-fly 27s linear infinite;
  left: 63%;
  top: 60%;
  width: 1.25%;
}
.bat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #07050c;
  animation: bat-flap .28s ease-in-out infinite alternate;
  clip-path: polygon(0 40%, 15% 18%, 30% 36%, 42% 12%, 46% 30%, 54% 30%, 58% 12%, 70% 36%, 85% 18%, 100% 40%, 80% 52%, 65% 48%, 56% 74%, 50% 56%, 44% 74%, 35% 48%, 20% 52%);
}
.bat:nth-of-type(2) {
  animation-delay: .5s;
  top: 64%;
  width: 1%;
}
.bat:nth-of-type(3) {
  animation-delay: 1.1s;
  top: 57%;
  width: .85%;
}
.js .hero__art { animation: art-in 1.4s ease both; }
.no-motion .hero__glow { opacity: .3; }
.hero__stack > .fx {
  inset: auto;
  width: auto;
  height: auto;
  pointer-events: none;
}
/* the ledge sinks into shadow at the bottom and so belongs to the ground */
.hero__bird::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -6%;
  bottom: 0;
  height: 26%;
  pointer-events: none;
  background: linear-gradient(0deg, rgb(var(--bg-rgb) / .95) 22%, rgb(var(--bg-rgb) / 0));
}
/* Blink: an eyelid closes over the eye now and then */
.hero__blink {
  position: absolute;
  left: 84.7%;
  top: 9.3%;
  width: 5.4%;
  height: 3.3%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #12163f;
  opacity: 0;
  animation: blink 8.5s linear infinite;
}
/* Tail feathers settle after each ruffle */
.bird-part--tail {
  -webkit-mask-image: radial-gradient(ellipse 22% 24% at 15% 80%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 22% 24% at 15% 80%, #000 30%, transparent 100%);
  transform-origin: 42% 62%;
  animation: tail 13s ease-in-out infinite;
}
/* Chimney smoke drifting off a tower */
.hero__stack > .hero__smoke {
  left: 87.2%;
  top: 21%;
  width: 3%;
  height: 6%;
}
.hero__smoke i {
  position: absolute;
  left: 20%;
  bottom: 0;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(190, 175, 225, .5), rgba(190, 175, 225, 0) 70%);
  animation: smoke 7s ease-out infinite;
}
.hero__smoke i:nth-child(2) { animation-delay: -2.4s; }
.hero__smoke i:nth-child(3) { animation-delay: -4.7s; }
/* The great hall window burns brighter than the rest */
.hero__stack > .hero__hall {
  left: 74.2%;
  top: 39.7%;
  width: 8%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 214, 120, .75) 0, rgba(255, 150, 40, .3) 38%, rgba(255, 150, 40, 0) 70%);
  animation: hall 4.2s ease-in-out infinite;
}
/* Window light warms the mist on the cliff below */
.hero__stack > .hero__warmfog {
  left: 52%;
  top: 52%;
  width: 40%;
  height: 26%;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 150, 60, .2), rgba(255, 150, 60, 0) 70%);
  animation: hall 6.8s ease-in-out -2s infinite;
}
/* Bright lips where the water leaves each ledge */
.hero__stack > .hero__crest {
  transform: translate(-50%, -50%);
  border-radius: 50%;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .8), rgba(215, 200, 255, 0) 70%);
  width: 7%;
  height: 2.2%;
  animation: crest 3.4s ease-in-out infinite;
}
.hero__crest--a { left: 71.6%; top: 49.6%; }
.hero__crest--b {
  left: 67%;
  top: 70%;
  animation-delay: -1.3s;
}
/* Night light shimmering on the pool */
.hero__stack > .hero__pool {
  left: 52%;
  top: 94.2%;
  width: 27%;
  height: 5.8%;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(180deg, rgba(220, 205, 255, 0) 0, rgba(220, 205, 255, .5) 9%, rgba(220, 205, 255, 0) 22%);
  -webkit-mask-image: radial-gradient(ellipse 50% 60% at 52% 40%, #000 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 60% at 52% 40%, #000 20%, transparent 100%);
  opacity: .45;
  animation: pool 4.6s linear infinite;
}
/* Pool: flatter, finer, slower ripples and a quieter shimmer */
.hero__stack > .hero__ripples {
  left: 65.8%;
  transform: translate(-50%, -50%);
  top: 97%;
  width: 15%;
  height: 2.6%;
}
.hero__ripples i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: .6px solid rgba(225, 212, 255, .55);
  opacity: 0;
  animation: ripple 5.4s ease-out infinite;
}
.hero__ripples i:nth-child(2) { animation-delay: -1.8s; }
.hero__ripples i:nth-child(3) { animation-delay: -3.6s; }
/* A few embers lifting off the castle */
.hero__stack > .hero__embers {
  left: 60%;
  top: 30%;
  width: 26%;
  height: 40%;
}
.hero__embers i {
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 1.4%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: #ffcf7a;
  box-shadow: 0 0 4px 1px rgba(255, 160, 50, .9);
  animation: ember 9s ease-in infinite;
}
.hero__embers i:nth-child(2) {
  left: 48%;
  animation-duration: 11s;
  animation-delay: -3s;
}
.hero__embers i:nth-child(3) {
  left: 66%;
  animation-duration: 8s;
  animation-delay: -5s;
}
.hero__embers i:nth-child(4) {
  left: 82%;
  animation-duration: 12s;
  animation-delay: -8s;
}
.hero__embers i:nth-child(5) {
  left: 34%;
  animation-duration: 10s;
  animation-delay: -6.5s;
}
/* A low band of mist breathing at the foot of the cliff */
.hero__stack > .hero__mist {
  left: 30%;
  top: 70%;
  width: 70%;
  height: 30%;
  background: radial-gradient(ellipse 60% 70% at 45% 80%, rgba(150, 120, 225, .32), rgba(150, 120, 225, 0) 75%);
  animation: mist 12s ease-in-out infinite;
}
/* Colour grade: cooler sky, warmer castle, slightly deeper shadows */
.hero__grade {
  mix-blend-mode: soft-light;
  pointer-events: none;
  background: radial-gradient(ellipse 45% 55% at 76% 48%, rgba(255, 170, 70, .28), rgba(255, 170, 70, 0) 70%), linear-gradient(180deg, rgba(70, 90, 255, .28) 0, rgba(70, 90, 255, 0) 45%, rgba(20, 8, 40, .35) 100%);
}
/* Vignette: the scene settles into the page at the top, bottom and right edges */
.hero__vignette {
  pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--bg-rgb) / .6) 0, rgb(var(--bg-rgb) / 0) 14%, rgb(var(--bg-rgb) / 0) 84%, rgb(var(--bg-rgb) / .7) 100%), linear-gradient(270deg, rgb(var(--bg-rgb) / .55) 0, rgb(var(--bg-rgb) / 0) 12%);
}
/* grade and vignette fade out toward the picture's left edge, leaving no visible step where the picture meets the sky strip */
.hero__grade, .hero__vignette {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32%);
  mask-image: linear-gradient(90deg, transparent 0, #000 32%);
}
/* Churn: flat white water, flickering and shifting where the fall lands */
.hero__splash::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 8%;
  height: 34%;
  border-radius: 50%;
  background: radial-gradient(ellipse 34% 50% at 32% 50%, #fff, rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 38% 46% at 66% 54%, rgba(255, 255, 255, .92), rgba(255, 255, 255, 0) 72%), radial-gradient(ellipse 50% 50% at 50% 50%, rgba(226, 216, 255, .6), rgba(226, 216, 255, 0) 75%);
  animation: churn .42s ease-in-out infinite alternate;
}
/* Spray: a low, wide veil standing just above the churn. The veil swells and thins and never flies */
.hero__splash::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: 14%;
  height: 150%;
  background: radial-gradient(ellipse 46% 100% at 50% 100%, rgba(236, 228, 255, .5) 0, rgba(210, 198, 255, .2) 45%, rgba(210, 198, 255, 0) 78%);
  transform-origin: 50% 100%;
  animation: veil 3.2s ease-in-out infinite;
}
/* Scene details wait until the page has loaded (.is-ready, set by site.js), so the first paint stays light */
.js:not(.is-ready) .hero__stack > .fx,
.js:not(.is-ready) .hero__fogs,
.js:not(.is-ready) .bat,
.js:not(.is-ready) .hero__flash {
  display: none;
}
/* Modest devices and data-saver (.lite, set by site.js): keep the scene, drop the costliest layers */
.lite .hero__embers,
.lite .hero__smoke,
.lite .hero__flash,
.lite .bat,
.lite .hero__cloud--c,
.lite .firefly,
.lite .globe-sat,
.lite .pointer-glow {
  display: none;
}

/* Animations used by the rules above */
/* dim: a group goes dark for a while, as if the lights were put out, then comes back */
@keyframes win-off {
  0%, 38% { opacity: 0; }
  40% { opacity: .8; }
  55% { opacity: .8; }
  57% { opacity: 0; }
  80% { opacity: 0; }
  81% { opacity: .6; }
  84% { opacity: 0; }
  100% { opacity: 0; }
}
/* The whole fall brightens and dims very slightly, like night light on moving water */
@keyframes water-breathe {
  0%, 100% { opacity: .78; }
  50% { opacity: .95; }
}
@keyframes lightning {
  0%, 60%, 63.2%, 100% { opacity: 0; }
  60.5% { opacity: .85; }
  61.1% { opacity: .1; }
  61.7% { opacity: .65; }
}
/* brighten: quick sparkles, a longer flare, then rest */
@keyframes win-on {
  0%, 100% { opacity: 0; }
  8% { opacity: .9; }
  12% { opacity: .15; }
  16% { opacity: .7; }
  24% { opacity: 0; }
  52% { opacity: 0; }
  60% { opacity: .55; }
  78% { opacity: .5; }
  86% { opacity: 0; }
}
@keyframes mist-left {
  0% { transform: translateX(22%) scaleX(.6); opacity: 0; }
  25% { opacity: .75; }
  100% { transform: translateX(-18%) scaleX(1.1); opacity: 0; }
}
@keyframes em-sheen {
  0%, 60% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@keyframes shoot {
  0%, 94% { opacity: 0; transform: translate(0, 0) rotate(160deg); }
  94.6% { opacity: 1; }
  97%, 100% { opacity: 0; transform: translate(-300%, 1800%) rotate(160deg); }
}
@keyframes fall {
  from { transform: translateY(-4%); }
  to { transform: translateY(0); }
}
@keyframes fall-b {
  from { transform: translateY(-7%); }
  to { transform: translateY(0); }
}
@keyframes blink {
  0%, 93%, 96.5%, 100% { opacity: 0; }
  94%, 95.5% { opacity: 1; }
}
@keyframes bat-flap {
  from { transform: scaleY(1); }
  to { transform: scaleY(.35); }
}
@keyframes mist-right {
  0% { transform: translateX(-22%) scaleX(.6); opacity: 0; }
  25% { opacity: .7; }
  100% { transform: translateX(18%) scaleX(1.1); opacity: 0; }
}
@keyframes tail {
  0%, 84%, 100% { transform: none; }
  88% { transform: rotate(.9deg); }
  92% { transform: rotate(-.6deg); }
  96% { transform: rotate(.3deg); }
}
@keyframes ruffle {
  0%, 78%, 100% { transform: none; }
  80% { transform: rotate(-.8deg) scale(1.012); }
  82% { transform: rotate(.7deg) scale(1.016); }
  84% { transform: rotate(-.6deg) scale(1.012); }
  86% { transform: rotate(.5deg) scale(1.008); }
  88% { transform: rotate(-.3deg) scale(1.004); }
  91% { transform: none; }
}
@keyframes fog-bob {
  0%, 100% { translate: 0 0; opacity: .6; }
  50% { translate: 0 -9%; opacity: 1; }
}
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes bat-fly {
  0% { transform: translate(0, 0) scale(.5); opacity: 0; }
  1.5% { opacity: .95; }
  14% { transform: translate(-650%, -900%) scale(.9); opacity: .95; }
  26% { transform: translate(-2300%, -2100%) scale(1.1); opacity: .9; }
  28%, 100% { transform: translate(-2500%, -2300%) scale(1.1); opacity: 0; }
}
@keyframes drift-mid {
  from { transform: translateX(0); }
  to { transform: translateX(-37%); }
}
@keyframes pool {
  from { background-position: 0 0; }
  to { background-position: 0 -22%; }
}
@keyframes art-in {
  from { opacity: 0; }
}
@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  70% { opacity: .7; }
  100% { transform: translate(900%, -5200%); opacity: 0; }
}
@keyframes smoke {
  0% { transform: translate(0, 0) scale(.5); opacity: 0; }
  15% { opacity: .7; }
  100% { transform: translate(260%, -420%) scale(2.6); opacity: 0; }
}
@keyframes churn {
  from { transform: translateX(-3%) scaleX(.94); opacity: .72; }
  to { transform: translateX(3%) scaleX(1.05); opacity: 1; }
}
/* Ledge lips hold steadier, so the eye follows the water down rather than a blinking light */
@keyframes crest {
  0%, 100% { opacity: .5; }
  50% { opacity: .78; }
}
@keyframes flicker {
  0%, 100% { opacity: .12; }
  22% { opacity: .5; }
  41% { opacity: .2; }
  63% { opacity: .6; }
  80% { opacity: .28; }
}
@keyframes eye {
  0%, 100% { opacity: .45; }
  50% { opacity: .9; }
}
@keyframes hall {
  0%, 100% { opacity: .45; }
  30% { opacity: .95; }
  55% { opacity: .6; }
  78% { opacity: 1; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.022, 1.016); }
}
@keyframes veil {
  0%, 100% { transform: scale(.94, .82); opacity: .6; }
  50% { transform: scale(1.04, 1.06); opacity: .95; }
}
@keyframes ripple {
  0% { transform: scale(.15); opacity: .9; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes cloud-bob {
  0%, 100% { translate: 0 0; opacity: .7; }
  50% { translate: 0 9%; opacity: .35; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(1.4rem); }
}
@keyframes twinkle {
  0%, 100% { opacity: .9; }
  50% { opacity: .25; }
}
@keyframes mist {
  0%, 100% { opacity: .5; transform: translateX(-2%); }
  50% { opacity: 1; transform: translateX(3%); }
}


/* ==========================================================================================
   7. 02 SERVICES: TILES
   The eight service tiles. .card is also the base for the methodology steps further down.
   ========================================================================================== */

/* Service tiles and methodology tiles share one column gap, giving both sets the same width; each row is as tall as the text inside. */
.cards, .steps { --tile-gap: clamp(1.75rem, 2.5vw, 2.6rem); --arrow: clamp(1rem, 1.4vw, 1.35rem); }
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: clamp(1rem, 1.5vw, 1.5rem) var(--tile-gap);
  margin-top: 1.1rem;
}
/* Tiles: pointer spotlight, livelier icon */
.card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: clamp(.9rem, 1.3vw, 1.4rem);
  border: 1.5px solid var(--line);
  border-radius: .8rem;
  background: linear-gradient(155deg, rgba(64, 33, 108, .72), rgba(24, 13, 42, .88) 70%);
  box-shadow: inset 0 0 26px rgb(var(--violet-rgb) / .16), 0 0 18px rgba(80, 30, 160, .18);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  position: relative;
}
/* Tiles lean toward the pointer (angles set by site.js) */
.card:hover {
  border-color: rgb(var(--gold-rgb) / .7);
  box-shadow: inset 0 0 26px rgb(var(--violet-rgb) / .22), 0 0 26px rgb(var(--gold-rgb) / .16);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-2px);
}
.card__icon {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--gold);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 6px rgb(var(--gold-rgb) / .35));
  transition: transform .3s cubic-bezier(.2, .7, .2, 1.4), filter .3s ease;
}
.card h3, .features h3 { font: 600 1.45rem/1.1 var(--tech); letter-spacing: .01em; }
.card p {
  margin-top: .5rem;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--ink);
}
/* Services sit on a faint blueprint grid (#services::before, further down) */
#services { padding-bottom: 0; isolation: isolate; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(14rem circle at var(--mx, 50%) var(--my, 50%), rgba(255, 210, 87, .16), rgb(var(--violet-rgb) / .12) 40%, transparent 70%);
  transition: opacity .3s ease;
}
.card:hover::after { opacity: 1; }
.card:hover .card__icon {
  transform: scale(1.12) rotate(-4deg);
  filter: drop-shadow(0 0 12px rgb(var(--gold-rgb) / .75));
}
.card h3 { transition: color .2s ease; }
.card:hover h3 { color: var(--gold-hi); }
/* Each service tile links to the form with the matching service preselected (link is added by site.js) */
.cards .card { cursor: pointer; }
.card__link {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  margin-top: .65rem;
  font: 700 .85rem/1 var(--tech);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gold);
}
/* whole tile is the target */
.card__link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: .8rem;
}
.card__link .icon {
  width: 1em;
  height: 1em;
  stroke-width: 2.4;
  transition: transform .25s ease;
}
.card:hover .card__link .icon { transform: translateX(5px); }
/* Keyboard focus is drawn around the whole tile. Browsers without :has() keep the plain link outline. */
@supports selector(:has(a)) {
  .card__link:focus-visible { outline: none; }
  .card:has(.card__link:focus-visible) { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
}
/* Each icon draws itself as the surrounding tile is revealed */
.reveal .card__icon, .reveal > .icon { stroke-dasharray: 200; stroke-dashoffset: 200; }
.reveal.is-in .card__icon, .reveal.is-in > .icon {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .85s ease;
}
.cards .card.is-selected {
  border-color: var(--gold);
  box-shadow: inset 0 0 30px rgb(var(--gold-rgb) / .12), 0 0 26px rgb(var(--gold-rgb) / .25);
}
/* Gold corner marks frame a service tile under the pointer */
.cards .card::before {
  content: "";
  position: absolute;
  inset: .45rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease, inset .25s ease;
  background: linear-gradient(var(--gold), var(--gold)) left top / .9rem 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) left top / 1.5px .9rem no-repeat, linear-gradient(var(--gold), var(--gold)) right bottom / .9rem 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) right bottom / 1.5px .9rem no-repeat;
}
.cards .card:hover::before, .cards .card.is-selected::before { opacity: 1; inset: .35rem; }
.lite .card:hover { transform: translateY(-2px); }
.card:has(.card__link:focus-visible)::before, .card:has(.card__link:focus-visible)::after { opacity: 1; }
#services::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgb(var(--violet-rgb) / .08) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--violet-rgb) / .08) 1px, transparent 1px);
  background-size: 3.2rem 3.2rem;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 34%, #000 0, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 34%, #000 0, transparent 100%);
}
.cards .card h3 {
  width: fit-content;
  padding-bottom: 3px;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1.5px no-repeat;
  transition: background-size .35s ease, color .2s ease;
}
.cards .card:hover h3, .cards .card.is-selected h3 { background-size: 100% 1.5px; }
.cards .card.is-selected .card__link::after {
  content: "\2713  In your request";
  position: absolute;
  right: .9rem;
  top: -.6rem;
  padding: .25rem .5rem;
  border-radius: .3rem;
  background: var(--gold);
  color: #1d1203;
  font-size: .68rem;
  letter-spacing: .06em;
}


/* ==========================================================================================
   8. 02 SERVICES: OUR COMMITMENT
   Gates picture beside the commitment text. Overlays are placed in % of the picture.
   ========================================================================================== */

/* same left/right edges as the centred container the cards sit in */
.commit {
  display: grid;
  grid-template-columns: minmax(0, 36fr) minmax(0, 64fr);
  align-items: center;
  padding: clamp(1rem, 1.6vw, 1.75rem) max(var(--pad), calc((100% - 90rem) / 2 + var(--pad)));
  margin-top: clamp(1.25rem, 2vw, 2rem);
  border-top: 1.5px solid var(--gold-lo);
  background: transparent;
}
/* The frame fills the full height of the row (never shorter than the picture's own shape); the
   scene inside is scaled to cover the frame, anchored on the gate, trimming the dark right-hand wall. */
.commit__art {
  position: relative;
  overflow: hidden;
  border-radius: .8rem;
  align-self: stretch;
  width: 100%;
  aspect-ratio: 1230 / 800;
  container-type: size;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.commit__scene {
  position: absolute;
  left: 45%;
  top: 50%;
  transform: translate(-45%, -50%);
  width: max(118cqw, calc(100cqh * 1230 / 800));
  aspect-ratio: 1230 / 800;
}
.commit__scene > img { width: 100%; height: 100%; }
/* dims the purple light behind the gate (positions are % of the image) */
.commit__dim {
  position: absolute;
  left: 28%;
  top: 19%;
  width: 34.5%;
  height: 80%;
  background: rgba(5, 3, 12, .5);
  border-radius: 48% 48% 5% 5% / 32% 32% 4% 4%;
  filter: blur(8px);
}
/* lantern tint: recolours the lantern and the light spilled on the wall, cycling blue > purple > red */
.commit__lamp {
  position: absolute;
  width: 30%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  color: #3b6bff;
  background: radial-gradient(circle, currentColor 0, currentColor 18%, transparent 68%);
  mix-blend-mode: color;
  opacity: .8;
  animation: lamp 14s ease-in-out infinite alternate;
}
.commit__lamp--l { left: 18.3%; top: 46%; }
.commit__lamp--r {
  left: 71.1%;
  top: 47%;
  animation-delay: -3s;
}
/* The real emblem sits over the gate's baked-in medallion (positions are % of the image). */
.commit__emblem {
  position: absolute;
  left: 45%;
  top: 52.3%;
  width: 14.6%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}
.commit__emblem img {
  width: 86%;
  height: auto;
  filter: drop-shadow(0 0 8px rgb(var(--gold-rgb) / .55));
  animation: emblem-pulse 6s ease-in-out infinite;
}
.commit h2 { font-size: clamp(1.5rem, 2.1vw, 2.1rem); }
.commit .label { font-size: 1.05rem; }
.commit .section__lead { font-size: .98rem; }
.commit .features { gap: .9rem 1.75rem; margin-top: 1rem; }
.commit .features h3 { font-size: 1.25rem; }
.commit .features p { font-size: .9rem; }
.commit .features .icon { width: 2rem; height: 2rem; }
.commit__body { padding-left: clamp(1rem, 2.2vw, 2.5rem); }
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  margin-top: 1.1rem;
}
/* Commitment points respond to the pointer */
.features li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: -.45rem;
  padding: .45rem;
  border-radius: .6rem;
  transition: background-color .25s ease;
}
/* Commitment icons sit in soft round badges */
.features .icon {
  color: var(--gold);
  stroke-width: 1.6;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1.4);
  width: 3rem;
  height: 3rem;
  padding: .6rem;
  border-radius: 50%;
  background: rgb(var(--gold-rgb) / .07);
  box-shadow: inset 0 0 0 1px rgb(var(--gold-rgb) / .32);
}
.features p {
  font-size: .95rem;
  line-height: 1.3;
  margin-top: .2rem;
  color: var(--muted);
}
/* Gates: fireflies in the ivy, a slow pulse on the emblem, logo reacts to the pointer */
.firefly {
  position: absolute;
  width: 1.1%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, #fff7c2 0, #ffd257 35%, transparent 70%);
  box-shadow: 0 0 8px 2px rgba(255, 210, 87, .7);
  animation: firefly 9s ease-in-out infinite;
}
.firefly:nth-of-type(1) { left: 9%; top: 30%; }
.firefly:nth-of-type(2) {
  left: 80%;
  top: 22%;
  animation-duration: 11s;
  animation-delay: -4s;
}
.firefly:nth-of-type(3) {
  left: 14%;
  top: 72%;
  animation-duration: 13s;
  animation-delay: -7s;
}
.firefly:nth-of-type(4) {
  left: 76%;
  top: 64%;
  animation-duration: 10s;
  animation-delay: -2s;
}
.firefly:nth-of-type(5) {
  left: 47%;
  top: 12%;
  animation-duration: 12s;
  animation-delay: -9s;
}
.firefly:nth-of-type(6) {
  left: 84%;
  top: 84%;
  animation-duration: 14s;
  animation-delay: -5s;
}
.commit__art.is-paused * { animation-play-state: paused !important; }
/* Candles behind the gate flicker */
.candle {
  position: absolute;
  left: 29.7%;
  top: 75.6%;
  width: 6%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 130, .9) 0, rgba(255, 150, 40, .4) 40%, transparent 70%);
  mix-blend-mode: screen;
  animation: candle 2.3s ease-in-out infinite;
}
.candle + .candle {
  left: 59.8%;
  animation-duration: 3.1s;
  animation-delay: -1.2s;
}
.features li:hover { background: rgb(var(--violet-rgb) / .1); }
.features li:hover .icon { transform: scale(1.12); }
/* Gates: a thin inner frame with corner marks, like a mounted plate */
.commit__art::after {
  content: "";
  position: absolute;
  inset: .55rem;
  border-radius: .45rem;
  pointer-events: none;
  border: 1px solid rgb(var(--gold-rgb) / .32);
  background: linear-gradient(var(--gold), var(--gold)) left top / 1rem 2px no-repeat, linear-gradient(var(--gold), var(--gold)) left top / 2px 1rem no-repeat, linear-gradient(var(--gold), var(--gold)) left bottom / 1rem 2px no-repeat, linear-gradient(var(--gold), var(--gold)) left bottom / 2px 1rem no-repeat;
}

/* Animations used by the rules above */
@keyframes lamp {
  0% { color: #3b6bff; }
  50% { color: #9a4dff; }
  100% { color: #ff3347; }
}
@keyframes candle {
  0%, 100% { opacity: .35; }
  20% { opacity: .9; }
  35% { opacity: .5; }
  55% { opacity: 1; }
  75% { opacity: .45; }
}
@keyframes firefly {
  0%, 100% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: .95; }
  30% { transform: translate(260%, -340%); opacity: .3; }
  48% { opacity: 1; }
  62% { transform: translate(-220%, -520%); opacity: .5; }
  80% { transform: translate(140%, -180%); opacity: .9; }
  92% { opacity: 0; }
}
@keyframes emblem-pulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgb(var(--gold-rgb) / .45)) brightness(1); }
  50% { filter: drop-shadow(0 0 16px rgb(var(--gold-rgb) / .9)) brightness(1.18); }
}


/* ==========================================================================================
   9. 03 METHODOLOGY
   Four steps lighting in sequence, joined by arrows and a track line.
   ========================================================================================== */

/* Pointing at a step holds the sequence on the pointed step (.steps:hover, further down) */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--tile-gap);
  margin-top: 1rem;
  position: relative;
  isolation: isolate;
}
/* Methodology: four steps lighting up in order, Research > Engineer > Analyze > Defend */
.step { position: relative; animation: step-lit 10s ease-in-out infinite; }
.step + .step::before {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(100% + (var(--tile-gap) - var(--arrow)) / 2);
  width: var(--arrow);
  height: var(--arrow);
  transform: translateY(-50%);
  background: var(--gold);
  -webkit-mask: url("../assets/icons/arrow.svg") center / contain no-repeat;
  mask: url("../assets/icons/arrow.svg") center / contain no-repeat;
  animation: arrow-go 10s ease-in-out infinite;
}
.step h3 { color: var(--gold); letter-spacing: .03em; }
.step:nth-child(2) { animation-delay: 2.5s; }
.step:nth-child(3) { animation-delay: 5s; }
.step:nth-child(4) { animation-delay: 7.5s; }
.step:nth-child(2)::before { animation-delay: 1.6s; }
.step:nth-child(3)::before { animation-delay: 4.1s; }
.step:nth-child(4)::before { animation-delay: 6.6s; }
.steps.is-paused .step, .steps.is-paused .step::before { animation-play-state: paused; }
.steps:hover .step, .steps:hover .step::before { animation: none; }
.steps:hover .step:hover {
  border-color: rgb(var(--gold-rgb) / .85);
  box-shadow: inset 0 0 30px rgb(var(--gold-rgb) / .14), 0 0 26px rgb(var(--gold-rgb) / .28);
}
/* a faint track runs behind the four steps, with a light travelling along the track */
.steps::before {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  top: 50%;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 243, 196, .9), transparent) no-repeat, rgb(var(--gold-rgb) / .28);
  background-size: 12% 100%, 100% 100%;
  animation: track 10s linear infinite;
}
.steps.is-paused::before { animation-play-state: paused; }

/* Animations used by the rules above */
@keyframes track {
  from { background-position: -15% 0, 0 0; }
  to { background-position: 115% 0, 0 0; }
}
@keyframes arrow-go {
  0%, 12%, 100% { transform: translate(0, -50%); opacity: .75; }
  5% { transform: translate(35%, -50%); opacity: 1; }
}
@keyframes step-lit {
  0%, 22%, 100% { border-color: var(--line); box-shadow: inset 0 0 26px rgb(var(--violet-rgb) / .16), 0 0 18px rgba(80, 30, 160, .18); }
  6%, 14% { border-color: rgb(var(--gold-rgb) / .85); box-shadow: inset 0 0 30px rgb(var(--gold-rgb) / .14), 0 0 26px rgb(var(--gold-rgb) / .28); }
}


/* ==========================================================================================
   10. 04 CONTACT
   Intro text, the animated globe, and the Connect form with every form state.
   ========================================================================================== */

.contact { padding-bottom: clamp(3.5rem, 6vw, 6rem); overflow: hidden; }
/* the globe sits under the intro text column, wherever the centred container places the column */
.contact__globe {
  position: absolute;
  left: max(0px, calc((100% - 90rem) / 2 + var(--pad) - 2rem));
  bottom: 0;
  width: min(32vw, 30rem);
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 100% at 50% 100%, #000 70%, transparent 100%);
}
.contact__globe img {
  width: 100%;
  height: auto;
  animation: globe-glow 9s ease-in-out infinite;
}
.globe-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* data paths: each link is drawn from one node to the other, then fades out */
.globe-flows path {
  fill: none;
  stroke: #ffe9a8;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  opacity: 0;
  filter: blur(.6px) drop-shadow(0 0 6px #ffb52e) drop-shadow(0 0 14px rgba(255, 150, 20, .7));
  animation: trace 7s ease-in-out infinite;
}
.globe-flows path:nth-child(3n+1) { animation-duration: 6s; animation-delay: -2.2s; }
.globe-flows path:nth-child(3n+2) { animation-duration: 8.5s; animation-delay: -5s; }
.globe-flows path:nth-child(4n) { animation-name: trace-back; animation-delay: -1.3s; }
.globe-flows path:nth-child(5n) { animation-duration: 10s; animation-delay: -7s; }
/* ping rings expanding from each node */
.globe-pings circle {
  fill: none;
  stroke: #ffd257;
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ping 3s ease-out infinite;
}
.globe-pings circle:nth-child(3n+1) { animation-delay: -1s; }
.globe-pings circle:nth-child(3n+2) { animation-delay: -2s; animation-duration: 3.6s; }
.globe-pings circle:nth-child(4n) { animation-delay: -.4s; animation-duration: 2.5s; }
.contact__globe.is-paused * { animation-play-state: paused !important; }
.contact__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 31fr) minmax(0, 69fr);
  gap: clamp(1.25rem, 2.2vw, 2.5rem);
  align-items: start;
}
.contact__intro h2 { margin-top: .2rem; }
.contact__intro .section__lead { margin-top: .9rem; text-shadow: 0 1px 8px #000; }
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem 2rem;
  padding: clamp(1rem, 1.6vw, 1.6rem);
  border: 1.5px solid var(--gold);
  border-radius: .9rem;
  background: rgba(13, 9, 20, .9);
  box-shadow: 0 0 22px rgb(var(--gold-rgb) / .18), inset 0 0 30px rgb(var(--violet-rgb) / .08);
  position: relative;
}
.field--wide { grid-column: 1 / -1; }
/* Form: per-field messages, counter, valid/loading/sent states */
.field > label, .chips legend {
  display: block;
  margin-bottom: .35rem;
  font: 700 1.05rem/1 var(--tech);
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .15s ease;
}
.req { color: var(--gold); }
.control { position: relative; }
.control > .icon {
  position: absolute;
  left: .85rem;
  top: .72rem;
  color: var(--gold);
  pointer-events: none;
  transition: color .2s ease, filter .2s ease;
}
.control input, .control textarea {
  width: 100%;
  padding: .62rem .9rem .62rem 2.9rem;
  font: 400 1rem/1.4 var(--sans);
  color: var(--ink);
  background: rgba(8, 6, 13, .9);
  border: 1.5px solid rgba(210, 201, 224, .5);
  border-radius: .5rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
/* The description box grows with the typed text (site.js) up to a limit, then scrolls. */
.control textarea {
  resize: vertical;
  min-height: 4.6rem;
  overflow-x: hidden;
  overflow-y: auto;
}
/* Services: selectable tiles. Each tile is a real checkbox stretched invisibly over a styled
   label, so a click, a tap, the Space key and a screen reader all work natively. A visitor may
   select several. */
.chips {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.chips legend { padding: 0; }
.chips__list {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .15rem;
}
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.chip span {
  padding: .62rem .95rem;
  border: 1.5px solid rgba(210, 201, 224, .5);
  border-radius: .5rem;
  background: rgba(8, 6, 13, .9);
  color: var(--muted);
  font: 600 .92rem/1 var(--tech);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease, box-shadow .2s ease;
}
.chip:hover span { border-color: rgb(var(--gold-rgb) / .7); color: var(--ink); }
/* Selected: gold outline, gold text, a faint gold fill and glow */
.chip input:checked + span {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: rgb(var(--gold-rgb) / .12);
  box-shadow: 0 0 12px rgb(var(--gold-rgb) / .3), inset 0 0 12px rgb(var(--gold-rgb) / .08);
}
.chip input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
/* No service chosen when Connect was pressed */
.chips.is-invalid .chip span { border-color: #ff7a7a; }
/* A service tile in section 02 was just used to add a service: the chosen tiles flash once */
.chips.is-prefilled .chip input:checked + span { box-shadow: 0 0 0 3px rgb(var(--gold-rgb) / .35); }
.control :is(input, textarea):focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(var(--gold-rgb) / .25);
}
.control [aria-invalid="true"] { border-color: #ff7a7a; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* Notice panels in the form (Security Notice, Privacy): the icon breathes, the panel has a little depth */
.notice {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: .7rem 1.1rem;
  border: 1.5px solid var(--gold);
  border-radius: .7rem;
  font-size: .98rem;
  line-height: 1.35;
  box-shadow: 0 0 12px rgb(var(--gold-rgb) / .2);
  background: linear-gradient(90deg, rgb(var(--gold-rgb) / .07), transparent 60%);
}
.notice .icon {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--gold);
  animation: shield 4.5s ease-in-out infinite;
}
.notice strong {
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}
.form__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
/* Status line: a neutral panel once text is present, tinted green or red by state.
   The two state rules must stay after the neutral one: all three have the same weight. */
.form__status { font-weight: 600; }
.form__status:not(:empty) {
  padding: .45rem .9rem;
  border-radius: .5rem;
  background: rgba(245, 241, 251, .06);
}
.form__status[data-state="ok"] { color: #8ef0b0; background: rgba(142, 240, 176, .1); }
.form__status[data-state="error"] { color: #ff9a9a; background: rgba(255, 122, 122, .1); }
.field:focus-within > label, .chips:focus-within legend { color: var(--gold-hi); }
.field__error {
  margin-top: .3rem;
  font-size: .88rem;
  font-weight: 600;
  color: #ff9a9a;
}
/* Line under the description box: "* Required" on the left, the character count on the right of the pair */
.field__meta {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 1.1rem;
  margin-top: .25rem;
}
.field__count {
  text-align: right;
  font-size: .8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.field__count.is-near { color: var(--gold); }
.control :is(input, textarea):user-valid { border-color: rgba(142, 240, 176, .55); }
/* Globe brightens while the form is in use and bursts when a request is sent; hero art fades in */
.contact__globe.is-active .globe-pings circle { stroke: #fff3c4; stroke-width: 3; }
.contact__globe.is-active .globe-flows path { stroke: #fff6d6; stroke-width: 3.2; }
.contact__globe.is-burst .globe-flows path { animation: trace 1.4s ease-in-out 2; stroke-width: 4; }
.form__req {
  font-size: .8rem;
  color: var(--muted);
}
/* Hints under a field: the "did you mean" email suggestion and the nudge for a short description */
.field__hint {
  margin-top: .3rem;
  font-size: .88rem;
  color: var(--muted);
}
.field__hint button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.form__mailto {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
}
.form.is-sent > :not(.form__done) { display: none; }
.form__done {
  display: grid;
  justify-items: center;
  gap: .6rem;
  padding: 2rem 1rem;
  text-align: center;
}
.form__done .icon {
  width: 3.2rem;
  height: 3.2rem;
  color: #8ef0b0;
  filter: drop-shadow(0 0 12px rgba(142, 240, 176, .5));
}
.form__done h3 { font: 500 1.8rem/1.1 var(--serif); }
.form__done p { max-width: 34rem; color: var(--muted); }
.form::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(from var(--trace), transparent 0 68%, #fff3c4 84%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity .4s ease;
  animation: trace-edge 5s linear infinite;
}
.form:focus-within::before { opacity: 1; }
/* A satellite crosses above the globe */
.globe-sat {
  fill: #fff;
  filter: drop-shadow(0 0 6px #9fd0ff) drop-shadow(0 0 14px rgba(120, 170, 255, .8));
  offset-path: path("M20 600 Q640 -520 1260 600");
  offset-rotate: 0deg;
  animation: orbit 18s linear infinite;
}
/* "(optional)" beside a label, in ordinary case */
.opt {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
/* browser autofill keeps the dark field instead of painting the field pale */
.control :is(input, textarea):-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--gold);
  box-shadow: 0 0 0 100px #0f0b18 inset;
  transition: background-color 9999s;
}
/* Progress meter at the top of the form: how many required fields are complete (--done is set by site.js) */
.form__progress {
  display: flex;
  align-items: center;
  gap: .9rem;
  font: 600 .78rem/1 var(--tech);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.form__progress i {
  position: relative;
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(245, 241, 251, .12);
  overflow: hidden;
}
.form__progress i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-origin: left;
  transform: scaleX(var(--done, 0));
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi));
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.control:focus-within > .icon { color: var(--gold-hi); filter: drop-shadow(0 0 6px rgb(var(--gold-rgb) / .7)); }

/* Animations used by the rules above */
@keyframes trace-back {
  0% { stroke-dashoffset: -100; opacity: 0; }
  6% { opacity: 1; }
  55% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes orbit {
  0% { offset-distance: 0%; opacity: 0; }
  12%, 88% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
@keyframes ping {
  0% { transform: scale(.6); opacity: .95; }
  70% { opacity: .25; }
  100% { transform: scale(6); opacity: 0; }
}
@keyframes trace {
  0% { stroke-dashoffset: 100; opacity: 0; }
  6% { opacity: 1; }
  55% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes globe-glow {
  0%, 100% { filter: brightness(.94); }
  50% { filter: brightness(1.1); }
}
@keyframes trace-edge {
  to { --trace: 360deg; }
}
@keyframes shield {
  0%, 100% { filter: drop-shadow(0 0 0 rgb(var(--gold-rgb) / 0)); }
  50% { filter: drop-shadow(0 0 8px rgb(var(--gold-rgb) / .8)); }
}


/* ==========================================================================================
   11. MOUNTAIN RIDGE AND FOOTER
   The mountain strip closing the page, then the footer.
   ========================================================================================== */

/* The page is one centred stage: full-bleed art never grows past the stage, so on very wide or
   zoomed-out windows everything stays together and the sides fade to the background. */
main, .ridge { max-width: 120rem; margin-inline: auto; }
/* Mountain strip: two mirrored halves, faded at the top and at both sides. A band of light glides along the strip (::after). */
.ridge {
  position: relative;
  z-index: 2;
  display: flex;
  height: clamp(3.5rem, 6.2vw, 7rem);
  margin-top: calc(-1 * clamp(3.5rem, 6.2vw, 7rem));
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  isolation: isolate;
}
.ridge span {
  flex: 1;
  background: url("../assets/scenes/mountain-ridge.jpg") left bottom / auto 100% repeat-x;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%);
  mask-image: linear-gradient(180deg, transparent, #000 45%);
}
.ridge span:first-child { transform: scaleX(-1); }
/* Footer: a faint glow under the top rule */
.site-footer {
  background: var(--bg);
  border-top: 1.5px solid var(--gold-lo);
  position: relative;
}
.site-footer__row { height: auto; padding-block: .8rem; }
.site-footer .nav { border-left: 2px solid rgba(245, 241, 251, .85); padding-left: clamp(1rem, 3vw, 3rem); }
.site-footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: .8rem;
  border-top: 1px solid rgba(217, 138, 12, .6);
  font-size: .98rem;
}
.site-footer__mail {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat;
  transition: background-size .3s ease, color .2s ease;
  padding-bottom: 2px;
}
.site-footer__mail .icon { color: var(--gold); }
.site-footer__mail:hover { color: var(--gold); background-size: 100% 1px; }
.read {
  display: flex;
  font: 700 1.05rem/1 var(--tech);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
}
.read span + span::before { content: "\2022"; margin-inline: 1.1rem; }   /* bullet between the four words */
.read span { animation: read-lit 10s ease-in-out infinite; }
.read span:nth-child(2) { animation-delay: 2.5s; }
.read span:nth-child(3) { animation-delay: 5s; }
.read span:nth-child(4) { animation-delay: 7.5s; }
.site-footer.is-paused .read span { animation-play-state: paused; }
.site-footer .nav a { transition: color .2s ease; }
.site-footer .tip { top: auto; bottom: calc(100% + .55rem); }
.site-footer__contact {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
}
.copy-mail {
  padding: .25rem .6rem;
  border-radius: .35rem;
  border: 1px solid rgb(var(--gold-rgb) / .5);
  background: transparent;
  color: var(--gold);
  font: 600 .75rem/1 var(--tech);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.copy-mail:hover { background: var(--gold); color: #1d1203; }
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5rem;
  pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0, rgb(var(--gold-rgb) / .08), transparent 70%);
}
.ridge::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(100deg, transparent 42%, rgba(200, 150, 255, .22) 50%, transparent 58%) 100% 0 / 320% 100%;
  animation: ridge-light 13s linear infinite;
}
.site-footer .brand img { animation: emblem-pulse 7s ease-in-out infinite; }
.site-footer.is-paused .brand img { animation-play-state: paused; }

/* Animations used by the rules above */
@keyframes read-lit {
  0%, 22%, 100% { color: var(--gold); text-shadow: none; }
  6%, 14% { color: #fff3c4; text-shadow: 0 0 12px rgb(var(--gold-rgb) / .9); }
}
@keyframes ridge-light {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}


/* ==========================================================================================
   12. FLOATING CONTROLS
   Section dots, back-to-top, pause-animation button, pop-up messages, pointer light.
   ========================================================================================== */

/* Back-to-top button; footer words light in the same order as the methodology */
.to-top {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  color: #1d1203;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 0 18px rgb(var(--gold-rgb) / .45), 0 6px 18px rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(.75rem);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, box-shadow .2s ease;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover { box-shadow: 0 0 28px rgb(var(--gold-rgb) / .8), 0 6px 18px rgba(0, 0, 0, .5); }
.to-top .icon { transform: rotate(-90deg); stroke-width: 2.4; }
/* Section dots are joined by a line filling as the page scrolls */
.rail {
  position: fixed;
  right: .85rem;
  top: 50%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: .95rem;
  transform: translateY(-50%);
  isolation: isolate;
}
.rail a {
  position: relative;
  display: block;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgb(var(--bg-rgb) / .8);
  transition: background-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.rail a[aria-current] {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  transform: scale(1.25);
}
.rail span {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translate(.4rem, -50%);
  white-space: nowrap;
  pointer-events: none;
  padding: .3rem .6rem;
  border-radius: .35rem;
  border: 1px solid var(--gold-lo);
  background: rgba(9, 7, 14, .95);
  font: 600 .8rem/1 var(--tech);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: translate(0, -50%); }
/* collapsed to a small round button in the page margin; the label slides out on hover or focus */
.motion-toggle {
  position: fixed;
  left: clamp(.75rem, 1.5vw, 1.5rem);
  bottom: clamp(.75rem, 1.5vw, 1.5rem);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  border-radius: 2rem;
  border: 1px solid rgb(var(--gold-rgb) / .55);
  background: rgba(9, 7, 14, .85);
  color: var(--muted);
  font: 600 .78rem/1 var(--tech);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s ease, color .2s ease, border-color .2s ease;
  gap: 0;
  padding: .5rem;
}
.motion-toggle:hover, .motion-toggle:focus-visible, .motion-toggle[aria-pressed="true"] {
  opacity: 1;
  color: var(--ink);
  border-color: var(--gold);
}
.motion-toggle .icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  color: var(--gold);
  stroke-width: 2.4;
}
.motion-toggle span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width .3s ease, margin .3s ease;
}
.motion-toggle:hover span, .motion-toggle:focus-visible span { max-width: 12rem; margin: 0 .3rem 0 .5rem; }
/* Larger pointer targets and clear focus on the small round controls */
.rail a::before {
  content: "";
  position: absolute;
  inset: -.55rem;
  border-radius: 50%;
}
.rail a:focus-visible, .to-top:focus-visible, .nav-toggle:focus-visible { outline-offset: 5px; }
.to-top:active { transform: scale(.94); }
/* Back-to-top: the ring fills as the visitor moves down the page */
.to-top::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(var(--gold-hi) calc(var(--scroll, 0) * 360deg), rgb(var(--gold-rgb) / .2) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
}
.rail::before, .rail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: .35rem;
  bottom: .35rem;
  width: 1px;
  margin-left: -.5px;
  z-index: -1;
}
.rail::before { background: rgb(var(--gold-rgb) / .25); }
.rail::after {
  background: var(--gold);
  transform-origin: top;
  transform: scaleY(var(--scroll, 0));
  box-shadow: 0 0 6px var(--gold);
}
/* A faint light following the pointer (element is added and moved by site.js) */
.pointer-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 34rem;
  height: 34rem;
  margin: -17rem 0 0 -17rem;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--violet-rgb) / .11) 0, rgb(var(--violet-rgb) / .04) 40%, transparent 68%);
  opacity: 0;
  transition: opacity .6s ease;
  will-change: transform;
}
.pointer-glow.is-on { opacity: 1; }
.no-motion .pointer-glow { display: none; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 70;
  transform: translate(-50%, 1rem);
  width: max-content;
  max-width: calc(100vw - 2rem);   /* a long message wraps instead of running off a phone screen */
  pointer-events: none;
  padding: .65rem 1.1rem;
  border-radius: .6rem;
  border: 1px solid var(--gold-lo);
  background: #09070e;
  color: var(--ink);
  font: 600 .92rem/1.3 var(--sans);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }


/* ==========================================================================================
   13. ERROR PAGE
   Used only by 404.html.
   ========================================================================================== */

/* Error page */
.lost {
  min-height: 100vh;
  min-height: 100dvh;   /* phones: the height actually visible, toolbars excluded */
  display: grid;
  place-items: center;
  text-align: center;
}
.lost__box {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2rem var(--pad);
}
.lost__box img { width: 7rem; filter: drop-shadow(0 0 14px rgb(var(--gold-rgb) / .5)); }
.lost__box h1 { font-size: clamp(2rem, 4vw, 3rem); }
.lost__box h1 em { color: var(--gold); }
.lost__box .label { max-width: none; }
.lost__box .label::after { display: none; }


/* ==========================================================================================
   14. PAGE-WIDE STATES
   Classes site.js puts on <html> or on elements: scroll reveal, motion off, hidden tab.
   ========================================================================================== */

/* Scroll reveal: site.js adds .reveal, then .is-in when the element is first seen */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.reveal.is-in { opacity: 1; transform: none; }
/* Visitor's own off switch for motion (.no-motion on <html>, set by the pause button) */
.no-motion { scroll-behavior: auto; }
.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; }
.no-motion .reveal { opacity: 1; transform: none; }
/* Tab not visible (.is-hidden on <html>): every animation waits */
.is-hidden *, .is-hidden *::before, .is-hidden *::after { animation-play-state: paused !important; }


/* ==========================================================================================
   15. WINDOW SIZES AND VISITOR SETTINGS
   Rules applying only under a condition. Conditional rules come last in order to win over the defaults above.
   ========================================================================================== */

/* Wide windows: room for the header call to action. */
@media (min-width: 1200px) {
  /* collapsed to nothing (and cancelling the row gap) until needed, so the header holds no empty gap for the button */
  .header-cta {
    display: inline-flex;
    max-width: 0;
    padding-inline: 0;
    border-width: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    margin-left: calc(-1 * clamp(1rem, 3vw, 3rem));
    transition: max-width .35s ease, padding .35s ease, margin .35s ease, opacity .25s ease, visibility .35s;
  }
  .is-past-hero .header-cta {
    max-width: 14rem;
    padding-inline: 1em;
    border-width: 1.5px;
    margin-left: 0;
    opacity: 1;
    visibility: visible;
  }
}

/* Very wide windows: the page stays one centred column and both sides fade out. */
@media (min-width: 121rem) {
  /* The mountain ridge has a separate side fade at every width (see "Mountain ridge and footer"). */
  main {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }
}

/* Medium windows: tiles two across, no section dots. */
@media (max-width: 1100px) {
  .rail { display: none; }
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .step + .step::before { display: none; }
  .nav { gap: 1rem; }
  .btn--portal { display: none; }
}

/* Narrow windows: a working single-column fallback (the mobile design is a separate piece of work). */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-header.is-open .nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: .75rem var(--pad) 1rem;
    border-right: 0;
    border-bottom: 1.5px solid var(--gold-lo);
    background: #09070e;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .6);
    z-index: 60;
  }
  .site-header.is-open .nav a { padding: .8rem .1rem; font-size: 1.2rem; }
  :root { --header-h: 3.75rem; }
  .site-header .nav { display: none; }
  .brand__name { font-size: 1.25rem; }
  .hero__content > * { max-width: 100%; }
  .hero__stack { opacity: .45; }
  .cards, .steps, .commit, .contact__grid, .form, .features { grid-template-columns: 1fr; }
  .contact__globe { display: none; }
  .site-footer__row { flex-wrap: wrap; }
  .site-footer .nav { border: 0; padding: 0; }
}

/* Touch screens: larger tap targets. */
@media (pointer: coarse) {
  .nav a, .site-footer__mail, .copy-mail, .card__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .rail { display: none; }
  .chip span { padding-block: .9rem; }
}

/* Visitor asked for more contrast. */
@media (prefers-contrast: more) {
  :root { --line: rgba(190, 150, 255, .9); --muted: #efe9f8; }
  .card, .form, .notice, .control :is(input, textarea), .chip span { border-width: 2px; }
  .hero__mirror::after { background: rgb(var(--bg-rgb) / .82); }
  ::placeholder { opacity: 1; }
}

/* Visitor asked for less transparency. */
@media (prefers-reduced-transparency: reduce) {
  .site-header, .site-header.is-scrolled { background: #09070e; backdrop-filter: none; }
  .form, .card { background: #170e27; }
  .pointer-glow, .card::after { display: none; }
}

/* Windows High Contrast and similar forced-colour modes. */
@media (forced-colors: active) {
  .card,
  .form,
  .notice,
  .btn,
  .control input,
  .control textarea,
  .chip span,
  .tip,
  .motion-toggle {
    border: 1px solid ButtonText;
  }
  .rule, .progress { background: CanvasText; }
  .rail a[aria-current], .to-top { background: Highlight; }
  .card::after, .hero__fogs, .hero__mirror::after, .btn--gold::before { display: none; }
  .form__progress i::after { background: Highlight; }
  /* A selected service must stay distinguishable when the system replaces every colour */
  .chip input:checked + span { background: Highlight; color: HighlightText; }
  .brand__name { color: CanvasText; -webkit-text-fill-color: CanvasText; }
}

/* Print: black on white, artwork and controls removed. */
@media print {
  *, *::before, *::after {
    animation: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  body::before,
  .site-header,
  .hero__art,
  .hero__fogs,
  .rail,
  .to-top,
  .motion-toggle,
  .contact__globe,
  .ridge,
  .commit__art,
  .form,
  .card__link,
  .site-footer .nav,
  .btn,
  .copy-mail,
  .skip,
  .toast,
  .pointer-glow,
  .rule {
    display: none !important;
  }
  .hero { min-height: 0; background: none; }
  .hero__content > *, .reveal {
    max-width: none;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero h1 em, .label, .step h3, .brand__name, .read, .card__icon, .features .icon {
    color: #000 !important;
    -webkit-text-fill-color: #000;
  }
  .card {
    background: none;
    border: 1px solid #999;
    break-inside: avoid;
  }
  .card p, .features p, .section__lead { color: #000; }
  .cards, .steps { grid-template-columns: repeat(2, 1fr); gap: 8pt; }
  .commit {
    display: block;
    padding: 0;
    border: 0;
  }
  .site-footer { border-top: 1px solid #000; background: none; }
  .site-footer__mail { color: #000; }
}

/* Visitor asked for reduced motion. Must stay last, so no later rule can switch motion back on. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__glow { opacity: .3; }
}
