/* Demo E2: High-Vis Rescue Service, alive.
   Demo E's system pushed alive under discipline: black deepened
   (black header band, black protocols field, black hero diagonal,
   black footer), yellow as the signal that moves. Motion lives on
   edges, dividers, tracks, tabs and backgrounds only; text never
   moves and reading surfaces stay still and high-contrast.
   All animation honours prefers-reduced-motion, pauses off-screen,
   and the page is complete with JS disabled. */
@font-face {
  font-family: "Carlito";
  src: url("assets/carlito-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Carlito";
  src: url("assets/carlito-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("assets/noto-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("assets/noto-sans-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("assets/noto-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("assets/noto-sans-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* Angle for the button border-run; unsupported engines keep a static arc. */
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --yellow: #FFD21A;
  --yellow-deep: #F5C400;
  --black: #101010;
  --ink: #161616;
  --ink-soft: #3D3D3D;
  --white: #FFFFFF;
  --red: #E8321E;
  --line: #101010;
  /* Condensed signage stack: no condensed family is self-hosted in the
     house set, so system condensed faces lead, Noto Sans backs them. */
  --sign: "Arial Narrow", "Liberation Sans Narrow", "Noto Sans", sans-serif;
  --font: "Noto Sans", sans-serif;
  --body: "Carlito", "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--yellow); color: var(--ink);
  font-family: var(--body); font-size: 19px; line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--black); outline-offset: 3px; }
.site-header :focus-visible, .site-footer :focus-visible,
.section-black :focus-visible, .plate :focus-visible {
  outline-color: var(--yellow);
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 80;
  background: var(--black); color: var(--yellow); padding: 10px 18px;
  font-family: var(--font); font-weight: 700; text-decoration: none;
  transition: top 200ms ease;
}
.skip-link:focus { top: 12px; color: var(--yellow); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Scroll progress hairline: yellow, rides the very top edge. */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 70;
  pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; background: var(--yellow);
  box-shadow: 0 1px 0 rgba(16,16,16,0.45);
  transform: scaleX(0); transform-origin: left center;
}

/* Drifting hazard stripes: section dividers and clock track share the drift. */
.hazard {
  height: 14px;
  background: repeating-linear-gradient(45deg, var(--black) 0 16px, var(--yellow) 16px 32px);
  background-size: 45.25px 45.25px;
  border-top: 3px solid var(--black); border-bottom: 3px solid var(--black);
  animation: hazard-drift 26s linear infinite;
}
@keyframes hazard-drift {
  from { background-position: 0 0; }
  to { background-position: 45.25px 0; }
}
.hazard.paused, .clock-track-fill.paused { animation-play-state: paused; }

/* Buttons: square signage, full state set, shine sweep on primaries,
   plus an animated border-run on hover for the two primary colours. */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 18px; line-height: 1.15;
  padding: 14px 24px; border: 3px solid var(--black); border-radius: 4px;
  text-decoration: none; cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 120ms ease;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn-black { background: var(--black); color: var(--yellow); }
.btn-yellow { background: var(--yellow); color: var(--black); }
.btn-outline { background: transparent; color: var(--black); }
.btn-big { font-size: 20px; padding: 17px 30px; }
.btn .arr { display: inline-block; transition: transform 250ms ease; }
@media (hover: hover) {
  .btn-black:hover { background: #2A2A2A; color: var(--yellow); }
  .btn-yellow:hover { background: var(--yellow-deep); color: var(--black); }
  .btn-outline:hover { background: var(--black); color: var(--yellow); }
  .btn:hover::after { transform: translateX(120%); transition: transform 550ms ease; }
  /* Border-run: a comet of the opposite colour travels the border.
     The layered background replaces the flat fill only while hovering. */
  .btn-black:hover {
    border-color: transparent;
    background:
      linear-gradient(#2A2A2A, #2A2A2A) padding-box,
      conic-gradient(from var(--a), rgba(255,210,26,0) 0 68%, var(--yellow) 86%, rgba(255,210,26,0) 100%) border-box;
    animation: border-run 1.6s linear infinite;
  }
  .btn-yellow:hover {
    border-color: transparent;
    background:
      linear-gradient(var(--yellow-deep), var(--yellow-deep)) padding-box,
      conic-gradient(from var(--a), rgba(16,16,16,0) 0 68%, var(--black) 86%, rgba(16,16,16,0) 100%) border-box;
    animation: border-run 1.6s linear infinite;
  }
  .plate:hover .btn .arr, .btn:hover .arr { transform: translateX(5px); }
}
@keyframes border-run { to { --a: 360deg; } }
.btn:active { transform: scale(0.97); }
.btn:active::after { transform: translateX(-120%); transition: none; }
.btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid rgba(128,128,128,0.4); border-top-color: currentColor;
  animation: btn-spin 800ms linear infinite;
}
.btn.is-success { pointer-events: none; }
.btn.is-success::before { content: "✓"; font-weight: 700; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Persistent rescue edge tab (NCC Group device, promoted):
   a slow, dignified halo pulse, never a strobe. */
.edge-tab {
  position: fixed; right: 0; top: 42%; z-index: 40;
  background: var(--black); color: var(--yellow);
  font-family: var(--sign); font-weight: 700; letter-spacing: 0.22em;
  font-size: 17px; text-decoration: none;
  writing-mode: vertical-rl; padding: 20px 11px;
  border-radius: 6px 0 0 6px; border: 2px solid var(--black);
  box-shadow: -3px 3px 0 rgba(16,16,16,0.25);
  animation: tab-pulse 2.8s ease-in-out infinite;
}
@keyframes tab-pulse {
  0% { box-shadow: -3px 3px 0 rgba(16,16,16,0.25), 0 0 0 0 rgba(255,210,26,0.50); }
  70% { box-shadow: -3px 3px 0 rgba(16,16,16,0.25), 0 0 0 13px rgba(255,210,26,0); }
  100% { box-shadow: -3px 3px 0 rgba(16,16,16,0.25), 0 0 0 0 rgba(255,210,26,0); }
}
.edge-tab:hover { background: #2A2A2A; color: var(--yellow); }
.edge-tab:focus-visible { outline: 3px solid var(--black); outline-offset: -3px; }

/* Header: black band now, yellow type, light Gemstone master. */
.site-header { background: var(--black); }
.header-in { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.brand img { width: 168px; display: block; }
.site-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 17px; text-decoration: none; color: var(--yellow);
  border-bottom: 3px solid transparent; padding: 4px 1px;
}
.site-nav a:hover { border-bottom-color: var(--yellow); }
.header-cta { margin: 0 0 0 auto; }
.header-cta .btn { padding: 11px 20px; font-size: 16px; }

/* Hero: yellow field split by a black diagonal panel (gentle parallax). */
.hero { position: relative; overflow: hidden; background: var(--yellow); padding: 52px 0 60px; }
.hero-panel {
  position: absolute; inset: -30px 0; z-index: 0; background: var(--black);
  clip-path: polygon(60% 0, 100% 0, 100% 100%, 40% 100%);
  will-change: transform;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
.hero h1 {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  font-size: clamp(44px, 6.4vw, 76px); line-height: 0.98;
  letter-spacing: 0.005em; margin: 6px 0 20px;
}
/* Highlighter swipe on the key word: the finished state is the base
   state (black band, yellow word); motion only draws it in. */
.hl {
  color: var(--yellow); padding: 0 0.07em;
  background: linear-gradient(var(--black), var(--black)) left center / 100% 92% no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  .hl { animation: hl-in 900ms cubic-bezier(0.22, 0.8, 0.3, 1) 350ms both; }
  @keyframes hl-in {
    from { background-size: 0% 92%; color: var(--ink); }
    to { background-size: 100% 92%; color: var(--yellow); }
  }
}
.lede { font-size: 21px; line-height: 1.55; margin: 0 0 30px; max-width: 560px; }
.split-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.split-note {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 15px; margin: 16px 0 0;
}

/* Rescue clock: now with a living progress track and a live demo timer. */
.clock-card {
  background: var(--white); border: 4px solid var(--black); border-radius: 6px;
  box-shadow: 8px 8px 0 rgba(255,210,26,0.9); padding: 24px 26px 20px;
}
.clock-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-bottom: 3px solid var(--black); padding-bottom: 12px; }
.clock-head h2 {
  font-family: var(--sign); text-transform: uppercase; font-size: 27px;
  margin: 0; letter-spacing: 0.02em;
}
.clock-price { font-family: var(--font); font-weight: 700; font-size: 15px; margin: 0; background: var(--yellow); border: 2px solid var(--black); padding: 4px 10px; }
.clock-track {
  position: relative; height: 14px; margin: 18px 0 2px;
  background: var(--black); border-radius: 3px; overflow: hidden;
}
.clock-track-fill {
  position: absolute; top: 0; bottom: 0; left: 0; width: 6%;
  background:
    repeating-linear-gradient(45deg, rgba(16,16,16,0.22) 0 10px, rgba(16,16,16,0) 10px 20px),
    var(--yellow);
  background-size: 28.28px 28.28px, auto;
  transition: width 900ms cubic-bezier(0.22, 0.8, 0.3, 1);
  animation: track-drift 5s linear infinite;
}
@keyframes track-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 28.28px 0, 0 0; }
}
.clock-track-fill::after {
  content: ""; position: absolute; right: -1px; top: 50%;
  width: 9px; height: 9px; background: var(--black);
  transform: translateY(-50%) rotate(45deg);
}
.clock-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.clock-step {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 18px; padding: 12px 6px;
  background: var(--white); border: 3px solid var(--black); border-radius: 4px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 150ms ease, color 150ms ease, transform 120ms ease;
}
.clock-step:hover { background: #FFF3B0; }
.clock-step:active { transform: scale(0.97); }
.clock-step.is-active { background: var(--black); color: var(--yellow); }
.clock-step .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--red);
  display: none;
}
.clock-step.is-active .dot { display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.clock-body h3 { font-family: var(--sign); text-transform: uppercase; font-size: 24px; margin: 0 0 8px; }
.clock-body p { margin: 0 0 10px; color: var(--ink-soft); }
.clock-cost { font-family: var(--font); font-weight: 700; color: var(--ink) !important; }
.clock-live {
  display: flex; align-items: center; gap: 9px; margin: 14px 0 0;
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 14px;
}
.clock-live .live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--red);
  animation: pulse 2.4s ease-in-out infinite;
}
.clock-elapsed {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
}
.clock-foot { font-size: 15.5px; color: var(--ink-soft); border-top: 2px dashed #B9B9B9; padding-top: 12px; margin: 10px 0 0; }

/* Sections: black and yellow fields now alternate down the page. */
.section { padding: 58px 0; }
.section-white { background: var(--white); }
.section-yellow { background: var(--yellow); }
.section-black { background: var(--black); color: #F2F2F2; }
.sec-title {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 4.4vw, 44px); line-height: 1.02; margin: 0 0 28px;
}
.sec-title-light { color: var(--yellow); }
.protocol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.protocol-card, .guarantee-card {
  border: 3px solid var(--black); border-radius: 6px; padding: 24px 24px 26px;
  background: var(--white); color: var(--ink); display: flex; flex-direction: column;
  box-shadow: 6px 6px 0 rgba(16,16,16,0.9);
  transition: transform 250ms ease, box-shadow 250ms ease;
}
.section-black .protocol-card { box-shadow: 6px 6px 0 rgba(255,210,26,0.9); }
.protocol-card:hover, .guarantee-card:hover {
  transform: translateY(-4px);
  box-shadow: 10px 10px 0 rgba(16,16,16,0.9);
}
.section-black .protocol-card:hover { box-shadow: 10px 10px 0 rgba(255,210,26,0.9); }
.protocol-tag, .guarantee-num {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 14px; margin: 0 0 10px;
  background: var(--yellow); border: 2px solid var(--black);
  padding: 3px 9px; align-self: flex-start;
}
.protocol-card h3, .guarantee-card h3 {
  font-family: var(--sign); text-transform: uppercase; font-size: 25px;
  line-height: 1.05; margin: 0 0 10px;
}
.first-step, .what { margin: 0 0 16px; color: var(--ink-soft); }
.time-cost { font-family: var(--font); font-weight: 700; font-size: 15.5px; margin: 0 0 20px; }
.row-action { margin: auto 0 0; }

/* Product plates: yellow sweep across the plate and an advancing arrow on hover. */
.plate-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plate {
  position: relative; overflow: hidden;
  background: var(--black); color: #F5F5F5; border-radius: 6px;
  padding: 26px 28px 28px; display: flex; flex-direction: column;
}
.plate::before {
  content: ""; position: absolute; top: 0; left: 0; z-index: 2;
  width: 100%; height: 5px; background: var(--yellow);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 450ms cubic-bezier(0.22, 0.8, 0.3, 1);
}
.plate::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,210,26,0.09) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 650ms ease;
}
.plate:hover::before { transform: scaleX(1); }
.plate:hover::after { transform: translateX(120%); }
.plate > * { position: relative; z-index: 1; }
.plate h3 {
  font-family: var(--sign); text-transform: uppercase; color: var(--yellow);
  font-size: 27px; line-height: 1.05; margin: 0 0 10px;
}
.plate .what { color: #D8D8D8; }
.plate .status { font-family: var(--font); font-weight: 700; font-size: 16px; margin: 0 0 20px; color: #fff; }

/* Seal plate */
.prose { max-width: 820px; color: var(--ink-soft); margin: 0 0 18px; }
.prose-light { color: #CFCFCF; }
.seal { border: 3px solid var(--yellow); border-radius: 6px; padding: 22px 24px; margin-top: 26px; background: #181818; }
.seal-head h3 { font-family: var(--sign); text-transform: uppercase; margin: 0 0 4px; color: var(--yellow); font-size: 22px; }
.seal-meta { font-family: var(--font); font-size: 14px; color: #BDBDBD; margin: 0 0 14px; }
.seal-scroll { overflow-x: auto; }
.seal table { border-collapse: collapse; width: 100%; font-size: 15px; }
.seal th, .seal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #3A3A3A; }
.seal th { font-family: var(--sign); text-transform: uppercase; letter-spacing: 0.05em; color: var(--yellow); }
.hash { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.state { font-family: var(--font); font-weight: 700; color: var(--yellow); white-space: nowrap; }
.seal-foot { display: flex; align-items: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.stamp {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--yellow);
  border: 3px solid var(--yellow); border-radius: 4px; padding: 4px 12px;
  transform: rotate(-3deg); opacity: 0; transition: opacity 250ms ease;
}
.stamp.show { opacity: 1; }
.note-line { font-size: 16px; color: #BDBDBD; margin: 16px 0 0; }

/* Footer: black, under a drifting hazard strip. */
.site-footer { background: var(--black); color: #EDEDED; padding: 44px 0 50px; }
.footer-in { display: flex; flex-direction: column; gap: 16px; }
.site-footer .brand img { width: 150px; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-nav a {
  font-family: var(--sign); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 15px; color: var(--yellow); text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; }
.site-footer a { color: var(--yellow); }
.footer-line { margin: 0; font-size: 16px; color: #BDBDBD; max-width: 820px; }

/* Scroll-triggered reveals. Progressive enhancement: .reveal is fully
   visible by default; only a JS-capable page (html.js) starts it
   lowered, and the observer raises it once, ease-out. */
html.js .reveal { opacity: 0; transform: translateY(16px); }
html.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.22, 0.8, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { clip-path: polygon(0 58%, 100% 48%, 100% 100%, 0 100%); }
  .protocol-grid { grid-template-columns: 1fr; }
  .plate-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .btn { width: 100%; }
  .header-cta { margin-left: 0; }
  .header-cta .btn, .seal-foot .btn { width: auto; }
  .edge-tab { top: auto; bottom: 88px; font-size: 15px; padding: 16px 9px; }
  .clock-card { box-shadow: 5px 5px 0 rgba(255,210,26,0.9); }
}

/* Reduced motion: a complete static fallback that still looks finished.
   Every animation off, the highlighter stays drawn, reveals stay shown,
   the clock track keeps its step width (set inline by JS or 6% default). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .btn:hover::after { transform: translateX(-120%); }
  .plate::before { transform: scaleX(1); }
  .plate::after { display: none; }
  .protocol-card:hover, .guarantee-card:hover { transform: none; }
}
@media print {
  .scroll-progress, .edge-tab { display: none; }
  .hazard, .clock-track-fill, .edge-tab { animation: none; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero-panel { display: none; }
  .hero, .section-yellow { background: #FFFFFF; }
  .clock-card { box-shadow: none; }
}
@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
}
