/* =====================================================================================================================
   ECUWORKS 2026 — CORE CINEMATIC & RESPONSIVE COMPONENTS
   Pendle-Style 100svh Full-Viewport Mandatory Snap Deck across Mobile Phones, Tablets & Desktops (min-height: 540px)
   Ultra-Short Sideways Phone Landscape (<540px height, e.g. 844x390): Zero-Clip Fluid Fallback
   ===================================================================================================================== */

/* ---------- 1. BASE RESET ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html {
  height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  font: 400 16px/1.5 var(--f-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-height: 540px) {
  body:not(.ew-subpage) {
    height: 100%;
    overflow: hidden;
  }
}

img, video, canvas, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

svg.ico {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.cx-skip {
  position: fixed;
  left: 14px;
  top: -64px;
  z-index: 99;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 700 15px var(--f-ui);
  text-decoration: none;
  transition: top 0.2s ease;
}

.cx-skip:focus {
  top: 14px;
}

/* ---------- 2. FULL-VIEWPORT MANDATORY SNAP DECK & SECTION FRAME ---------- */
/* Ultra-short landscape fallback (<540px height, e.g. 844x390 rotated phone) */
.cx-deck {
  position: relative;
  width: 100%;
  overflow-x: clip;
  outline: none;
}

.cx-sec {
  position: relative;
  min-height: var(--screen);
  height: auto;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  isolation: isolate;
  background: var(--ink);
}

.cx-sec + .cx-sec {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cx-frame {
  position: relative;
  z-index: 3;
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  row-gap: var(--row-gap);
  padding: var(--anchor) var(--edge) var(--line);
}

.cx-series .cx-frame {
  padding-bottom: calc(var(--line) + var(--ctl) + var(--ctl-gap));
}

/* One-Swipe = One-Screen Mandatory Snap Mode (All Portrait Phones 320x568+, Tablets & Desktops) */
@media (min-height: 540px) {
  .cx-deck {
    position: fixed;
    inset: 0;
    height: var(--screen);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: none;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cx-deck::-webkit-scrollbar {
    display: none;
  }

  .cx-sec {
    height: var(--screen);
    min-height: var(--screen);
    overflow: hidden;
    overflow: clip;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .cx-sec + .cx-sec {
    border-top: 0;
  }

  .cx-frame {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
}

/* 2-Column Split Grid for Landscape Tablets (1024x768+) & Desktops */
@media (min-width: 960px) and (min-height: 540px) and (min-aspect-ratio: 1/1) {
  .cx-frame--split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--col-gap);
  }

  .cx-frame--split > .cx-head {
    grid-column: 1;
    grid-row: 1;
  }

  .cx-frame--split > .cx-foot {
    grid-column: 1;
    grid-row: 3;
  }

  .cx-frame--split > .cx-body {
    grid-column: 2;
    grid-row: 1 / 4;
  }
}

.cx-head {
  grid-row: 1;
  grid-column: 1;
  min-width: 0;
  margin: 0;
}

.cx-body {
  grid-row: 2;
  grid-column: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.cx-body--center {
  display: flex;
  align-items: center;
}

.cx-body--end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 959px), (max-height: 539px), (max-aspect-ratio: 1/1) {
  .cx-body--end {
    justify-content: flex-start;
  }
}

.cx-foot {
  grid-row: 3;
  grid-column: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0;
}

.cx-foot:empty {
  display: none;
}

/* ---------- 3. TYPOGRAPHY HIERARCHY ---------- */
.cx-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 18px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 700 11.5px/18px var(--f-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kick);
}

@media (max-width: 480px) {
  .cx-eyebrow {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
  }
}

.cx-eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  box-shadow: 0 0 12px rgba(var(--red-rgb), 0.95);
}

@media (min-width: 700px) {
  .cx-eyebrow {
    gap: 12px;
    font-size: 14px;
    letter-spacing: 0.22em;
  }
  .cx-eyebrow::before {
    width: 34px;
  }
}

@media (min-width: 1200px) {
  .cx-eyebrow {
    font-size: 14.5px;
    letter-spacing: 0.24em;
  }
  .cx-eyebrow::before {
    width: 44px;
  }
}

.cx-h1, .cx-h2 {
  margin: var(--gap-h) 0 0;
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.65);
}

.cx-h1 {
  font-size: var(--h1);
  line-height: var(--h1-lh);
}

.cx-h2 {
  font-size: var(--h2);
  line-height: var(--h2-lh);
  max-width: 16ch;
}

.cx-h2--wide {
  max-width: none;
}

.cx-h1 em, .cx-h2 em {
  font-style: normal;
  display: block;
  line-height: 1.06;
  padding: 0.03em 0 0.09em;
  margin-bottom: -0.09em;
  color: var(--red);
  background: linear-gradient(180deg, #ff7a85 0%, #ea2b38 50%, #c11824 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 6px 26px rgba(var(--red-rgb), 0.28));
}

.cx-lede {
  margin: var(--gap-h) 0 0;
  max-width: 36em;
  font: 400 var(--lede)/var(--lede-lh) var(--f-text);
  color: var(--body);
  text-wrap: pretty;
}

.cx-sub {
  margin: 8px 0 0;
  font: 700 13.5px/18px var(--f-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b4c4d6;
}

/* ---------- 4. CINEMATIC BACKGROUND LAYERS ---------- */
.cx-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}

.cx-bg > img, .cx-bg > video, .cx-bg > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--focus, 62% 50%);
}

.cx-bg > video {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

.cx-bg > video.is-playing {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cx-bg > video {
    display: none;
  }
}

.cx-bg-img--hero { --focus: 66% 54%; }
.cx-bg-img--founder { --focus: 75% 40%; }
.cx-bg-img--run { --focus: 68% 52%; }

.cx-bg--depth {
  background:
    radial-gradient(70% 60% at 82% 18%, rgba(var(--red-rgb), 0.16) 0%, rgba(var(--red-rgb), 0) 62%),
    radial-gradient(60% 55% at 6% 96%, rgba(40, 62, 88, 0.24) 0%, rgba(40, 62, 88, 0) 66%),
    var(--ew-tile) 0 0 / 260px 260px,
    linear-gradient(180deg, #0b1118 0%, #040a0f 100%);
}

.cx-bg--depth2 {
  background:
    radial-gradient(75% 65% at 18% 14%, rgba(var(--red-rgb), 0.14) 0%, rgba(var(--red-rgb), 0) 60%),
    radial-gradient(65% 60% at 94% 90%, rgba(40, 62, 88, 0.24) 0%, rgba(40, 62, 88, 0) 66%),
    var(--ew-tile) 0 0 / 260px 260px,
    linear-gradient(180deg, #090f16 0%, #040a0f 100%);
}

.cx-bg--net {
  background:
    radial-gradient(55% 50% at 72% 52%, rgba(var(--red-rgb), 0.22) 0%, rgba(var(--red-rgb), 0) 70%),
    radial-gradient(60% 55% at 0% 100%, rgba(30, 52, 76, 0.22) 0%, rgba(30, 52, 76, 0) 66%),
    var(--ew-tile) 0 0 / 260px 260px,
    linear-gradient(180deg, #070b11 0%, #040a0f 100%);
}

.cx-scrim {
  --tr: 45%;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(130% 95% at 50% 45%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.68) 100%),
    linear-gradient(180deg, rgba(4, 10, 15, 0.94) 0%, rgba(4, 10, 15, 0.74) 48%, rgba(4, 10, 15, 0.96) 100%);
}

@media (min-aspect-ratio: 1/1) {
  .cx-scrim {
    background:
      radial-gradient(120% 100% at 64% 45%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0.65) 100%),
      linear-gradient(0deg, rgba(4, 10, 15, 0.94) 0%, rgba(4, 10, 15, 0.62) calc(var(--line) + 60px), rgba(4, 10, 15, 0) 36%),
      linear-gradient(90deg, rgba(4, 10, 15, 0.96) 0%, rgba(4, 10, 15, 0.91) var(--tr), rgba(4, 10, 15, 0.42) calc(var(--tr) + 240px), rgba(4, 10, 15, 0.14) calc(var(--tr) + 520px), rgba(4, 10, 15, 0.32) 100%);
  }
  .cx-scrim--hero {
    background:
      radial-gradient(120% 100% at 65% 45%, rgba(0, 0, 0, 0) 54%, rgba(0, 0, 0, 0.52) 100%),
      linear-gradient(180deg, rgba(4, 10, 15, 0.72) 0%, rgba(4, 10, 15, 0) calc(var(--anchor) + 24px)),
      linear-gradient(0deg, rgba(4, 10, 15, 0.92) 0%, rgba(4, 10, 15, 0.58) calc(var(--line) + 150px), rgba(4, 10, 15, 0) 48%),
      linear-gradient(90deg, rgba(4, 10, 15, 0.88) 0%, rgba(4, 10, 15, 0.76) var(--tr), rgba(4, 10, 15, 0.22) calc(var(--tr) + 280px), rgba(4, 10, 15, 0.06) calc(var(--tr) + 580px));
  }
}

.cx-beam {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: -30%;
  left: 18%;
  width: 62%;
  height: 160%;
  opacity: 0.62;
  background: linear-gradient(
    104deg,
    rgba(var(--red-rgb), 0) 30%,
    rgba(var(--red-rgb), 0.06) 44%,
    rgba(255, 160, 168, 0.11) 50%,
    rgba(var(--red-rgb), 0.06) 56%,
    rgba(var(--red-rgb), 0) 70%
  );
}

.cx-sec.is-on .cx-beam::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(104deg, rgba(var(--red-rgb), 0) 40%, rgba(255, 190, 196, 0.14) 50%, rgba(var(--red-rgb), 0) 60%);
  animation: cx-sweep-soft 5.2s cubic-bezier(0.4, 0.1, 0.4, 1) 0.25s both;
}

@keyframes cx-sweep-soft {
  0% { transform: translate3d(-32%, 0, 0); opacity: 0; }
  40% { opacity: 0.8; }
  70% { opacity: 0.55; }
  100% { transform: translate3d(32%, 0, 0); opacity: 0; }
}

.cx-mark {
  position: absolute;
  z-index: 1;
  right: var(--edge);
  bottom: calc(var(--line) - 0.08em);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  font: 400 18vw/0.8 var(--f-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: transparent;
  background: linear-gradient(180deg, rgba(234, 43, 56, 0.11) 0%, rgba(160, 180, 205, 0.04) 58%, rgba(160, 180, 205, 0) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
}

.cx-series .cx-mark {
  bottom: calc(var(--line) + var(--ctl) + var(--ctl-gap) - 0.08em);
}

@media (max-aspect-ratio: 1/1), (max-width: 1099px) {
  .cx-mark {
    display: none;
  }
}

/* ---------- 5. PERSISTENT TOP BAR ---------- */
.cx-bar {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--edge);
  background: linear-gradient(180deg, rgba(4, 10, 15, 0.92) 0%, rgba(4, 10, 15, 0.55) 75%, rgba(4, 10, 15, 0) 100%);
}

.cx-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: rgba(8, 12, 18, 0.88);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.07);
}

.cx-bar.is-solid::before {
  opacity: 1;
}

.cx-bar__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  margin-right: auto;
  text-decoration: none;
  line-height: 0;
}

.cx-bar__logo svg {
  width: clamp(114px, 33vw, 158px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.65));
}

@media (min-width: 768px) {
  .cx-bar { gap: 12px; }
  .cx-bar__logo svg { width: 168px; }
}

@media (min-width: 1200px) {
  .cx-bar__logo svg { width: 210px; }
}

.cx-bar__nav {
  display: none;
}

@media (min-width: 1120px) {
  .cx-bar__nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 12px;
  }
  .cx-bar__nav a {
    position: relative;
    padding: 6px 2px;
    font: 700 13.5px/1 var(--f-ui);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #dbe5f0;
    transition: color 0.18s ease;
  }
  .cx-bar__nav a:hover,
  .cx-bar__nav a[aria-current="page"] {
    color: #ffffff;
  }
  .cx-bar__nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--red);
    box-shadow: 0 0 10px rgba(var(--red-rgb), 0.9);
  }
}

.cx-bar__acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .cx-bar__acts { gap: 8px; }
}

.cx-bar__social {
  display: none;
}

@media (min-width: 768px) {
  .cx-bar__social {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
  }
  .cx-bar__social a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #cbd5e1;
    transition: color var(--t-colour) ease, transform 0.25s ease, background-color 0.2s ease;
  }
  .cx-bar__social a:hover {
    color: var(--ember);
    background: rgba(var(--red-rgb), 0.12);
    transform: scale(1.08);
  }
  .cx-bar__social a svg {
    width: 21px;
    height: 21px;
  }
}

/* ---------- 6. PERSISTENT 7-ICON BOTTOM DOCK & MOBILE DOCK STRIP ---------- */
.cx-dock {
  position: fixed;
  z-index: 41;
  left: 0;
  right: 0;
  bottom: 0;
}

.cx-dock__strip {
  display: none;
}

@keyframes cx-fadeInUp {
  from { opacity: 0; transform: translate3d(0, 36px, 0); }
  to { opacity: 1; transform: none; }
}

.cx-dock__row li:nth-child(1) .cx-dock__item { --d: 40ms; }
.cx-dock__row li:nth-child(2) .cx-dock__item { --d: 90ms; }
.cx-dock__row li:nth-child(3) .cx-dock__item { --d: 140ms; }
.cx-dock__row li:nth-child(4) .cx-dock__item { --d: 190ms; }
.cx-dock__row li:nth-child(5) .cx-dock__item { --d: 240ms; }
.cx-dock__row li:nth-child(6) .cx-dock__item { --d: 290ms; }
.cx-dock__row li:nth-child(7) .cx-dock__item { --d: 340ms; }

@media (min-width: 768px) {
  .cx-dock {
    height: var(--dock);
    background: var(--dock-fade);
    pointer-events: none;
  }
  .cx-dock__row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: min(980px, calc(100% - 40px));
    height: 100%;
    margin: 0 auto;
    padding: 0;
    list-style: none;
  }
  .cx-dock__row li {
    display: flex;
  }
  .cx-dock__item {
    pointer-events: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 4px 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-decoration: none;
    color: #ffffff;
    animation: cx-fadeInUp 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: var(--d, 0ms);
  }
  .cx-dock__ico {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    color: var(--red);
    filter: drop-shadow(0 4px 14px rgba(var(--red-rgb), 0.32));
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.2s ease, filter 0.2s ease;
  }
  .cx-dock__ico svg {
    width: 38px;
    height: 38px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .cx-dock__ico svg .dock-hi {
    stroke: #ffffff;
  }
  .cx-dock__cap {
    margin-top: 8px;
    font: 700 12.5px/12.5px var(--f-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    color: #ffffff;
    opacity: 0.56;
    transition: opacity 0.25s ease, color 0.25s ease;
  }
  .cx-dock__item:hover .cx-dock__ico,
  .cx-dock__item[aria-current="true"] .cx-dock__ico,
  .cx-dock__item[aria-current="page"] .cx-dock__ico {
    transform: translateY(-3px) scale(1.1);
    color: var(--ember);
    filter: drop-shadow(0 0 18px rgba(var(--red-rgb), 0.72));
  }
  .cx-dock__item:hover .cx-dock__cap,
  .cx-dock__item[aria-current="true"] .cx-dock__cap,
  .cx-dock__item[aria-current="page"] .cx-dock__cap {
    opacity: 1;
  }
}

@media (min-width: 768px) and (max-height: 830px) {
  .cx-dock__item { padding-top: 5px; }
  .cx-dock__ico { height: 38px; }
  .cx-dock__ico svg { width: 32px; height: 32px; }
  .cx-dock__cap { margin-top: 6px; font-size: 11.5px; line-height: 11.5px; }
}

@media (max-width: 767px) {
  .cx-dock__row {
    display: none;
  }
  .cx-dock__strip {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: calc(var(--dock) + var(--safe-b));
    padding: 0 14px var(--safe-b);
    background: var(--dock-strip);
    box-shadow: 0 -8px 26px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  }
  .cx-dock__mbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 8px;
    border: 0;
    background: none;
    color: #fff;
    font: 700 12.5px/1 var(--f-ui);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
  }
  .cx-dock__mbtn--end {
    justify-self: end;
  }
  .cx-dock__menu {
    display: grid;
    place-items: center;
    width: 52px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
  }
}

/* ---------- 7. TACTILE 3D PILL KEYS & ROUND CONTROLS ---------- */
.cx-key {
  --bf: rgba(18, 25, 34, 0.72);
  --bh: #243244;
  --rim: rgba(185, 202, 222, 0.42);
  --rim-h: #ff9aa2;
  --ring: transparent;
  --hi: rgba(255, 255, 255, 0.12);
  --lo: transparent;
  --lip: #05070b;
  --drop: rgba(0, 0, 0, 0.5);
  --gl: rgba(var(--red-rgb), 0.45);
  --bloom: 0 0 0 transparent;
  --fg: #ffffff;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 20px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1.15 var(--f-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  white-space: nowrap;
  background-color: var(--bf);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.16) 100%);
  box-shadow:
    inset 0 0 0 1px var(--rim),
    inset 0 0 0 2px var(--ring),
    inset 0 2px 0 var(--hi),
    inset 0 -3px 0 var(--lo),
    0 4px 0 var(--lip),
    0 8px 16px var(--drop),
    var(--bloom);
  transition: transform var(--t-press) ease, box-shadow 0.14s ease, background-color var(--t-colour) ease;
}

@media (max-width: 460px) {
  .cx-key {
    white-space: normal;
    padding: 10px 16px;
    font-size: 14px;
  }
}

.cx-key svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

@media (hover: hover) and (pointer: fine) {
  .cx-key:hover {
    transform: translateY(-1px);
    background-color: var(--bh);
    box-shadow:
      inset 0 0 0 1px var(--rim-h),
      inset 0 0 0 2px var(--ring),
      inset 0 2px 0 var(--hi),
      inset 0 -3px 0 var(--lo),
      0 5px 0 var(--lip),
      0 10px 20px var(--drop),
      0 0 24px var(--gl);
  }
}

.cx-key:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 0 0 1px var(--rim),
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    0 1px 0 var(--lip),
    0 2px 4px rgba(0, 0, 0, 0.45);
}

.cx-key--red {
  --bf: #ea2b38;
  --bh: #ff3f4c;
  --rim: #ff8e97;
  --rim-h: #ffd6da;
  --ring: rgba(255, 195, 200, 0.35);
  --hi: rgba(255, 255, 255, 0.42);
  --lo: rgba(70, 5, 12, 0.28);
  --lip: #690b13;
  --drop: rgba(90, 8, 16, 0.58);
  --gl: rgba(var(--red-rgb), 0.72);
  --bloom: 0 10px 32px rgba(var(--red-rgb), 0.34);
  --fg: #ffffff;
}

.cx-key--sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 13.5px;
}

.cx-key--bar {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12.5px;
  gap: 6px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .cx-key--bar {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
    gap: 8px;
  }
}

@media (max-width: 359px) {
  .cx-key--bar svg {
    display: none;
  }
  .cx-key--bar {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.cx-key--block {
  display: flex;
  width: 100%;
}

.cx-round {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #ffffff;
  background-color: rgba(19, 27, 35, 0.8);
  box-shadow:
    inset 0 0 0 1px rgba(255, 120, 130, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.14),
    0 3px 0 rgba(0, 0, 0, 0.65),
    0 6px 16px rgba(0, 0, 0, 0.5);
  transition: background-color var(--t-colour) ease, box-shadow 0.14s ease, transform 0.14s ease, opacity 0.2s ease;
}

@media (min-width: 768px) {
  .cx-round {
    width: 46px;
    height: 46px;
  }
}

.cx-round--sm {
  width: 38px;
  height: 38px;
}

.cx-round:disabled {
  opacity: 0.32;
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .cx-round:not(:disabled):hover {
    background-color: var(--red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow:
      inset 0 0 0 1px #ffc2c7,
      inset 0 2px 0 rgba(255, 255, 255, 0.4),
      0 3px 0 #690b13,
      0 6px 16px rgba(0, 0, 0, 0.5),
      0 0 20px rgba(var(--red-rgb), 0.65);
  }
}

.cx-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 40px;
  padding: 4px 0;
  border: 0;
  background: none;
  border-bottom: 1px solid rgba(var(--red-rgb), 0.78);
  font: 700 14px/1.3 var(--f-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  color: #e5edf5;
  text-decoration: none;
  cursor: pointer;
}

.cx-link svg {
  width: 17px;
  height: 17px;
  color: var(--ember);
  transition: transform 0.2s ease;
}

.cx-link:hover {
  color: #ffffff;
}

.cx-link:hover svg {
  transform: translateX(4px);
}

/* ---------- 8. FROSTED GLASS SURFACES ---------- */
.cx-glass {
  position: relative;
  border-radius: var(--radius);
  background: var(--card-face);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 3px solid var(--red);
  box-shadow: var(--card-shadow), var(--glow);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  backdrop-filter: blur(14px) saturate(1.18);
}

/* ---------- 9. HORIZONTAL SNAP SERIES (CAROUSELS) ---------- */
.cx-rail {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
  outline: none;
}

@media (min-height: 540px) {
  .cx-rail {
    position: absolute;
    inset: 0;
  }
}

.cx-rail::-webkit-scrollbar {
  display: none;
}

.cx-panel {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-height: var(--screen);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  isolation: isolate;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (min-height: 540px) {
  .cx-panel {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    overflow: clip;
  }
}

.cx-ctl {
  position: absolute;
  z-index: 6;
  left: var(--edge);
  right: var(--edge);
  bottom: var(--line);
  height: var(--ctl);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

@media (min-width: 700px) {
  .cx-ctl { gap: 14px; }
}

.cx-ctl > * {
  pointer-events: auto;
}

.cx-ctl .cx-round {
  width: var(--ctl);
  height: var(--ctl);
}

.cx-dots {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cx-dots button {
  position: relative;
  width: 18px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

@media (min-width: 400px) {
  .cx-dots button { width: 22px; height: 40px; }
}

.cx-dots button::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 999px;
  background: rgba(214, 226, 240, 0.38);
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.cx-dots button[aria-current="true"]::before {
  background: var(--red);
  transform: scaleX(2.6);
  box-shadow: 0 0 12px rgba(var(--red-rgb), 0.9);
}

.cx-count {
  margin: 0;
  font: 400 19px/1 var(--f-display);
  letter-spacing: 0.06em;
  color: #ffffff;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 700px) {
  .cx-count { font-size: 22px; }
}

.cx-count span {
  color: var(--muted);
}

.cx-ctl__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  margin: 0 0 0 auto;
  background: rgba(14, 19, 27, 0.72);
  box-shadow: inset 0 0 0 1px rgba(var(--red-rgb), 0.38);
  font: 700 12.5px/1 var(--f-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e2eaf2;
  transition: opacity 0.4s ease;
}

.cx-ctl__hint.is-faded {
  opacity: 0;
}

.cx-ctl__hint svg {
  width: 17px;
  height: 17px;
  color: var(--ember);
  animation: cx-nudge 2.2s ease-in-out infinite;
}

@keyframes cx-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

@media (max-width: 699px) {
  .cx-ctl__hint { display: none; }
  .cx-ctl .cx-dots { margin: 0 auto; }
}

/* ---------- 10. RIGHT-EDGE VERTICAL SECTION TICK INDEX ---------- */
.cx-index {
  position: fixed;
  z-index: 30;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

@media (max-height: 539px) {
  .cx-index {
    display: none;
  }
}

@media (max-width: 767px) {
  .cx-index {
    right: 3px;
    gap: 0;
  }
}

.cx-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.cx-index a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 22px;
  width: 34px;
  text-decoration: none;
  pointer-events: auto;
}

.cx-index a::after {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: rgba(214, 226, 240, 0.36);
  transition: width 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.cx-index a[aria-current="true"]::after {
  width: 28px;
  background: var(--red);
  box-shadow: 0 0 12px rgba(var(--red-rgb), 0.95);
}

.cx-index a span {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translate(6px, -50%);
  pointer-events: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(8, 12, 18, 0.86);
  font: 700 11.5px/1 var(--f-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #f1f5f9;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1200px) {
  .cx-index:hover a span {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

.cx-index__count {
  margin: 0;
  font: 400 19px/1 var(--f-display);
  letter-spacing: 0.08em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.cx-index__count b {
  font-weight: 400;
}

.cx-index__count span {
  color: var(--muted);
}

@media (max-width: 1199px) {
  .cx-index { right: 8px; }
  .cx-index__count, .cx-index a span { display: none; }
  .cx-index a { height: 16px; width: 14px; }
  .cx-index a::after { width: 8px; }
  .cx-index a[aria-current="true"]::after { width: 14px; }
}

/* ---------- 11. MODAL DIALOG SHEETS ---------- */
dialog.cx-sheet {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: hidden;
  z-index: 80;
}

dialog.cx-sheet::backdrop {
  background: rgba(2, 5, 9, 0.84);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cx-sheet__panel {
  position: absolute;
  inset: 0;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px var(--edge) calc(24px + var(--safe-b));
  background:
    radial-gradient(80% 60% at 90% 0%, rgba(var(--red-rgb), 0.16), rgba(var(--red-rgb), 0) 60%),
    linear-gradient(180deg, #111822, #070b10);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--red-rgb), 0.55) #0a0f16;
}

.cx-sheet__panel::-webkit-scrollbar { width: 8px; }
.cx-sheet__panel::-webkit-scrollbar-track { background: #0a0f16; border-radius: 8px; }
.cx-sheet__panel::-webkit-scrollbar-thumb { background: rgba(var(--red-rgb), 0.55); border-radius: 8px; }

.cx-sheet__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cx-sheet__t {
  margin: 0;
  font: 700 13px/18px var(--f-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kick);
}

.cx-sheet__h3 {
  margin: 4px 0 0;
  font: 400 clamp(24px, 6vw, 32px)/1.05 var(--f-display);
  color: #ffffff;
}

.cx-sheet__desc {
  margin: 4px 0 0;
  font: 400 14px/1.45 var(--f-text);
  color: var(--body);
}

.cx-sheet__desc b {
  color: #ffffff;
}

.cx-sheet__foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.cx-sheet__call {
  font: 700 15px/1.2 var(--f-ui);
  color: #ffffff;
}

.cx-sheet__call a {
  color: var(--ember);
  text-decoration: none;
}

@media (min-width: 900px) {
  .cx-sheet__panel {
    inset: auto;
    left: 50%;
    top: 50%;
    width: min(1060px, calc(100vw - 72px));
    max-height: calc(100vh - 64px);
    transform: translate(-50%, -50%);
    padding: 26px 32px 30px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid var(--red);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85), 0 0 80px -24px rgba(var(--red-rgb), 0.55);
  }
  .cx-sheet--menu .cx-sheet__panel {
    width: min(560px, calc(100vw - 64px));
  }
  .cx-sheet--narrow .cx-sheet__panel {
    width: min(640px, calc(100vw - 64px));
  }
}

.cx-menu {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cx-menu a, .cx-menu button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 6px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: none;
  font: 700 15.5px/1.25 var(--f-ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease, padding-left 0.18s ease;
}

@media (min-width: 600px) {
  .cx-menu a, .cx-menu button {
    min-height: 52px;
    padding: 0 8px;
    font-size: 17px;
  }
}

.cx-menu a svg, .cx-menu button svg {
  color: var(--red);
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.cx-menu a:hover, .cx-menu button:hover {
  color: var(--ember);
  padding-left: 14px;
}

.cx-menu--more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 4px 6px;
  list-style: none;
}

.cx-menu--more a {
  font: 600 14.5px/1.4 var(--f-ui);
  color: #b8c7d8;
  text-decoration: none;
}

.cx-menu--more a:hover {
  color: #ffffff;
}

/* Pause animations off-screen */
.cx-sec.is-out *, .cx-sec.is-out *::before, .cx-sec.is-out *::after {
  animation-play-state: paused !important;
}
