/* MOTION-2026-11-04 — Motion & Quality Design Program, SITE lane.
   The estate motion standard (DESIGN-LANGUAGE.md, patterns M-01…M-17)
   for the public website. Tokens only: durations 140/180/200/260/350/
   470/500/760 ms; curves --ease-out / --spring / --damped. Palette is
   the estate's: green #00e676 family on #060806 — no purple, ever.
   Every pattern collapses under prefers-reduced-motion (final block). */
:root {
  --ease-out: cubic-bezier(.22,.61,.21,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
  --damped: cubic-bezier(.25,.9,.3,1);
  --dur-expand: 350ms;
}

/* ---- M-01 press-sink + spring: primary buttons and link cards ---- */
.btn-send, .btn-primary, .btn, .nav-cta, button.btn-send {
  transition: transform 260ms var(--spring), background-color 180ms ease,
    box-shadow 180ms ease, border-color 180ms ease, color 180ms ease,
    width 260ms var(--ease-out), border-radius 260ms var(--ease-out);
}
.btn-send:active, .btn-primary:active, .btn:active, .nav-cta:active,
a.ins-card:active, .ins-card:active {
  transform: scale(.95);
}
.ins-card {
  transition: transform 260ms var(--spring), border-color 180ms ease,
    box-shadow 180ms ease;
}

/* ---- M-05 ease-out expand (THE expand standard, 350 ms) +
        M-15 origin-anchored header menus ---- */
.mainnav .nav-group .nav-menu, .site-nav .nav-group .nav-menu {
  transform-origin: top left;
  animation: m-expand var(--dur-expand) var(--ease-out);
}
.mainnav .nav-group:last-of-type .nav-menu,
.site-nav .nav-group:last-of-type .nav-menu { transform-origin: top right; }
@keyframes m-expand {
  from { opacity: 0; transform: scale(.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
details.svc-faq, .faq-item { }
.faq-item > .faq-body, details > .acc-body {
  animation: m-expand var(--dur-expand) var(--ease-out);
}

/* ---- M-09 capped list stagger (70 ms, first 10 rows) ---- */
.stagger-list > * { opacity: 1; }
html.js .stagger-list > .stagger-in {
  animation: m-stagger 350ms var(--ease-out) both;
  animation-delay: calc(var(--stagger-i, 0) * 70ms);
}
@keyframes m-stagger {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- M-03 rolling digits: digit columns built by motion.js ---- */
.roll-num { display: inline-block; font-variant-numeric: tabular-nums; }
.roll-digit {
  display: inline-block; overflow: hidden; height: 1em; line-height: 1;
  vertical-align: baseline;
}
.roll-digit > span {
  display: block; transition: transform 500ms var(--ease-out);
  transition-delay: calc(var(--roll-i, 0) * 100ms);
}

/* ---- M-06 drawn success tick + M-08 submit morph ---- */
.m-tick { display: inline-block; vertical-align: middle; }
.m-tick circle, .m-tick path {
  stroke: var(--green, #00e676); stroke-width: 2.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.m-tick circle {
  stroke-dasharray: 151; stroke-dashoffset: 151;
  animation: m-draw-circle 470ms var(--ease-out) forwards;
}
.m-tick path {
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: m-draw-tick 200ms var(--ease-out) 270ms forwards;
}
@keyframes m-draw-circle { to { stroke-dashoffset: 0; } }
@keyframes m-draw-tick { to { stroke-dashoffset: 0; } }
.btn-send.is-working, .btn-primary.is-working {
  pointer-events: none; opacity: .85;
}
.btn-send.is-working::after, .btn-primary.is-working::after {
  content: ""; display: inline-block; width: 16px; height: 16px;
  margin-left: 10px; vertical-align: -3px; border-radius: 50%;
  border: 2px solid rgba(4,21,10,.35); border-top-color: #04150a;
  animation: m-spin 760ms linear infinite;
}
@keyframes m-spin { to { transform: rotate(360deg); } }
.btn-send.is-done, .btn-primary.is-done { transform: scale(1); }

/* ---- Ten-state: inline field validation (plain language) ---- */
.field-error {
  display: block; margin-top: 6px; font-size: .92em; line-height: 1.45;
  color: #ff8a80;
}
.field input.field-invalid, .field select.field-invalid,
.field textarea.field-invalid {
  border-color: #ff5252 !important;
}
.field-ok-note { display: block; margin-top: 6px; font-size: .92em; color: var(--dim, #9db8a4); }

/* ---- Ten-state: loading skeletons (news + KC Cyber Weather) ---- */
.skeleton {
  border-radius: 10px; min-height: 18px;
  background: linear-gradient(100deg, var(--surface, #0a0d0a) 40%,
    var(--surface-2, #0e130e) 50%, var(--surface, #0a0d0a) 60%);
  background-size: 200% 100%;
  animation: m-shimmer 1400ms ease-in-out infinite;
}
.skeleton-card { padding: 18px; display: grid; gap: 12px; }
@keyframes m-shimmer {
  from { background-position: 120% 0; } to { background-position: -80% 0; }
}

/* ---- /uptime SLO presentation (Reel 5, Level 6) ---- */
.slo-headline { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: baseline; }
.slo-big {
  font-family: var(--font-disp, inherit); font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800; color: var(--grn, #00e676); line-height: 1.05;
}
.slo-target-note { max-width: 62ch; }
.slo-met { color: var(--grn, #00e676); font-weight: 700; }
.slo-missed { color: #ffb300; font-weight: 700; }
.slo-chart { width: 100%; height: auto; display: block; }
.slo-chart .slo-line { fill: none; stroke: var(--grn, #00e676); stroke-width: 2; }
.slo-chart .slo-target-line { stroke: #f2f7f2; stroke-width: 1; stroke-dasharray: 5 5; opacity: .75; }
.slo-chart text { fill: var(--dim, #9db8a4); font-size: 11px; }

/* ---- Search zero-results: suggestions are a separate labeled block ---- */
.search-suggestions {
  border: 1px solid var(--line, rgba(0,230,118,.16)); border-radius: 14px;
  padding: 18px 20px; margin-top: 18px; background: var(--surface-2, #0e130e);
}

/* ---- M-18 icon state-morphs (Reel 8, 2026-11-07) ----
   (a) Play/pause morph: the Audio Cyber Brief player on
   /sentinel-news gains a real play/pause button whose single
   SVG shape morphs — the triangle collapses while the two
   pause bars expand out of its centre (and reverse), 300 ms,
   transforms/opacity only. The morph decorates the genuine
   playback state change: the button drives the episode's
   <audio> element and mirrors its play/pause/ended events,
   so state stays true even via the native controls (which
   remain, untouched, for seek/volume). Honest-fit: the other
   five M-18 sub-patterns have no genuine control on the
   public site — see ICON-MORPH-PROGRAM-2026-11-07/LANE-B-SITE.md
   (no download button with an icon/state, no search toggle or
   clear control, text-only submit buttons, no theme toggle —
   the estate is dark-only — and no login/lock state). */
.m18-playpause {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong, rgba(0,230,118,.32));
  background: var(--surface, #0a0d0a);
  color: var(--green, #00e676);
  font: inherit; font-weight: 700; cursor: pointer;
  transition: transform 260ms var(--spring),
    background-color 180ms ease, border-color 180ms ease;
}
.m18-playpause:hover { background: rgba(0,230,118,.07); }
.m18-playpause:active { transform: scale(.95); }
.m18-playpause:focus-visible {
  outline: 2px solid var(--green, #00e676); outline-offset: 2px;
}
.m18-pp-icon { display: block; flex: none; }
.m18-pp-icon path {
  fill: currentColor;
  transition: transform 300ms var(--ease-out),
    opacity 300ms var(--ease-out);
  transform-box: fill-box; transform-origin: center;
}
.m18-pp-tri { opacity: 1; transform: scale(1); }
.m18-pp-bar { opacity: 0; }
.m18-pp-bar-l { transform: translateX(4.6px) scaleX(.3); }
.m18-pp-bar-r { transform: translateX(-4.6px) scaleX(.3); }
.m18-playpause.is-playing .m18-pp-tri {
  opacity: 0; transform: scale(.45);
}
.m18-playpause.is-playing .m18-pp-bar {
  opacity: 1; transform: translateX(0) scaleX(1);
}

/* ---- Reduced motion: every pattern collapses (mandatory) ---- */
@media (prefers-reduced-motion: reduce) {
  .btn-send, .btn-primary, .btn, .nav-cta, .ins-card { transition: none !important; }
  .btn-send:active, .btn-primary:active, .btn:active, .nav-cta:active,
  .ins-card:active { transform: none !important; }
  .mainnav .nav-group .nav-menu, .site-nav .nav-group .nav-menu,
  .faq-item > .faq-body, details > .acc-body,
  html.js .stagger-list > .stagger-in { animation: none !important; }
  .m-tick circle, .m-tick path { animation: none !important; stroke-dashoffset: 0 !important; }
  .btn-send.is-working::after, .btn-primary.is-working::after { animation: none !important; }
  .roll-digit > span { transition: none !important; }
  .skeleton { animation: none !important; }
  .m18-playpause { transition: none !important; }
  .m18-playpause:active { transform: none !important; }
  .m18-pp-icon path { transition: none !important; }
}
