/* AURIFORTH /aimotion/ — AI Motion hub (the front page of the demo suite: 01 CCTV · 02 Video · 03 Document AI · 04 DGX B300).
   Loads after /aimotion/suite.css (tokens, header, buttons, footer). Apple visual language; CSP-safe (no inline styles).
   Scale: every size is written as N × --u. --u is 1px up to a 1680px-wide window and grows with it up to 2199 px
   (1920 → 1.14px); from 2200 px the shared large-display zoom (suite.css) takes over, so 2560 / 3840 screens and TVs
   show the same composition, larger. */

:root { --u: 1px; }
@media (min-width: 1680px) { :root { --u: max(1px, calc(100vw / 1680)); } }
/* from 2200 px the whole page is zoomed instead (suite.css, html.aim-scale) — the unit returns to 1px there */
@media (min-width: 2200px) and (min-height: 1000px) { :root { --u: 1px; } }
.hub .section { padding-top: calc(104 * var(--u)); padding-bottom: calc(112 * var(--u)); }
.hub .hub-wrap { max-width: calc(1180 * var(--u)); margin: 0 auto; }

/* ---------- hero (dark) ---------- */
.hub-hero { position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding-top: clamp(88px, 15vh, calc(184 * var(--u))) !important; padding-bottom: clamp(104px, 17vh, calc(208 * var(--u))) !important; }
.hub .hub-hero > .hub-hero__glow { position: absolute; z-index: -1; left: -15%; right: -15%; top: 30%; bottom: -55%; max-width: none; margin: 0; pointer-events: none;
  background:
    radial-gradient(32% 42% at 34% 46%, rgba(0, 113, 227, .55), rgba(0, 113, 227, 0) 70%),
    radial-gradient(30% 40% at 62% 50%, rgba(125, 91, 240, .5), rgba(125, 91, 240, 0) 70%),
    radial-gradient(26% 34% at 50% 66%, rgba(193, 60, 207, .38), rgba(193, 60, 207, 0) 70%);
  animation: hubGlow 14s var(--ease) infinite alternate; will-change: transform; }
@keyframes hubGlow {
  0% { transform: translate3d(-4%, 0, 0) scale(1); opacity: .85; }
  50% { transform: translate3d(2%, -3%, 0) scale(1.06); opacity: 1; }
  100% { transform: translate3d(5%, 1%, 0) scale(.98); opacity: .9; }
}
.hub-hero__inner { position: relative; max-width: calc(980 * var(--u)) !important; }
.hub-hero__eyebrow { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 calc(12 * var(--u));
  font-size: calc(17 * var(--u)); font-weight: 600; color: #a1a1a6; margin: 0 0 calc(14 * var(--u)); }
.hub-hero__brand { color: #f5f5f7; font-family: var(--latin); letter-spacing: .02em; }
.hub-hero__sep { width: calc(4 * var(--u)); height: calc(4 * var(--u)); border-radius: 50%; background: #6e6e73; align-self: center; }
.hub-hero__title { font-family: var(--latin); font-size: clamp(64px, 11vw, calc(136 * var(--u))); line-height: 1; font-weight: 700; letter-spacing: -.03em;
  color: #f5f5f7; margin: 0; padding-bottom: .06em; }
.hub-hero__title em { color: #2997ff; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hub-hero__title em { background: linear-gradient(90deg, #2997ff, #a78bfa 55%, #ff6bd6); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
}
.hub-hero__lead { max-width: calc(760 * var(--u)); margin: calc(22 * var(--u)) auto 0; font-size: clamp(19px, 2.1vw, calc(28 * var(--u))); line-height: 1.4; color: #d2d2d7; text-wrap: balance; }
html[lang="th"] .hub-hero__lead { line-height: 1.55; }
.hub-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: calc(16 * var(--u)) calc(30 * var(--u)); margin-top: calc(36 * var(--u)); }

/* call to action (pill) + text link */
.hub-cta { display: inline-flex; align-items: center; gap: calc(8 * var(--u)); min-height: calc(50 * var(--u)); padding: calc(12 * var(--u)) calc(28 * var(--u));
  border-radius: 980px; background: var(--blue); color: #fff; font-size: calc(17 * var(--u)); line-height: 1.2; font-weight: 400;
  transition: background-color .2s var(--ease), transform .2s var(--ease); }
.hub-cta:hover { background: var(--blue-hover); text-decoration: none; }
.hub-cta:active { transform: scale(.98); }
.hub-cta svg { flex: none; width: calc(16 * var(--u)); height: calc(16 * var(--u)); align-self: center; }
.hub-more { font-size: calc(17 * var(--u)); color: #2997ff; }
.hub-more:focus-visible, .hub-hero .hub-cta:focus-visible { outline-color: rgba(41, 151, 255, .8); }

/* ---------- section heads ---------- */
.hub-head { text-align: center; }
.hub-h2 { font-size: clamp(32px, 4.4vw, calc(56 * var(--u))); line-height: 1.08; font-weight: 700; letter-spacing: -.015em; margin: 0; }
html[lang="th"] .hub-h2 { font-weight: 600; line-height: 1.25; letter-spacing: 0; font-size: clamp(30px, 3.9vw, calc(50 * var(--u))); }
.hub-h2 em { color: var(--blue); padding: .06em 0 .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hub-h2 em { background: linear-gradient(90deg, #0071e3, #7d5bf0 60%, #c13ccf); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
}
.hub-sub { max-width: calc(760 * var(--u)); margin: calc(14 * var(--u)) auto 0; font-size: clamp(17px, 1.6vw, calc(21 * var(--u))); line-height: 1.45; color: var(--text-2); text-wrap: balance; }
html[lang="th"] .hub-sub { line-height: 1.6; }

/* ---------- demo cards (whole card is the link: the title link's ::after covers the card) ---------- */
.demo-grid { list-style: none; margin: calc(52 * var(--u)) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(24 * var(--u)); }
.demo-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--bg); border-radius: calc(28 * var(--u)); overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.demo-card:hover { transform: translateY(calc(-4 * var(--u))); box-shadow: 0 4px 12px rgba(0, 0, 0, .05), 0 24px 56px rgba(0, 0, 0, .10); }
.demo-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.demo-card__media--light { background: var(--bg-alt); }
.demo-card__media::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: rgba(0, 0, 0, .06); }
.demo-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.demo-card:hover .demo-card__media img { transform: scale(1.03); }
.demo-card__body { display: flex; flex-direction: column; flex: 1 1 auto; gap: calc(10 * var(--u)); padding: calc(26 * var(--u)) calc(32 * var(--u)) calc(30 * var(--u)); }
.demo-card__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: calc(14 * var(--u)); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.demo-card__num { font-family: var(--latin); color: var(--text); letter-spacing: .02em; }
.demo-card__title { font-size: calc(30 * var(--u)); line-height: 1.15; font-weight: 700; letter-spacing: -.012em; }
html[lang="th"] .demo-card__title { font-weight: 600; line-height: 1.3; letter-spacing: 0; font-size: calc(28 * var(--u)); }
.demo-card__link { color: var(--text); }
.demo-card__link:hover { text-decoration: none; }
.demo-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.demo-card__desc { font-size: calc(17 * var(--u)); line-height: 1.5; color: var(--text-2); }
html[lang="th"] .demo-card__desc { line-height: 1.6; }
.demo-card__chips { list-style: none; display: flex; flex-wrap: wrap; gap: calc(8 * var(--u)); margin: calc(6 * var(--u)) 0 0; padding: 0; }
.demo-card__chips li { padding: calc(6 * var(--u)) calc(13 * var(--u)); border-radius: 980px; background: var(--bg-alt); color: #424245; font-size: calc(13 * var(--u)); line-height: 1.35; }
.demo-card__go { margin-top: auto; padding-top: calc(14 * var(--u)); display: flex; align-items: baseline; gap: calc(4 * var(--u)); color: var(--link); font-size: calc(17 * var(--u)); }
.demo-card__chev { font-size: 1.15em; line-height: 1; transition: transform .3s var(--ease); }
.demo-card:hover .demo-card__go span:first-child { text-decoration: underline; }
.demo-card:hover .demo-card__chev { transform: translateX(3px); }
/* keyboard focus rings the whole card where :has() exists; elsewhere the title link keeps its own ring */
@supports selector(:has(a)) {
  .demo-card__link:focus-visible { outline: none; }
  .demo-card:has(.demo-card__link:focus-visible) { outline: 3px solid rgba(0, 125, 250, .6); outline-offset: 3px; }
}

/* ---------- suggested presentation flow ---------- */
.flow { position: relative; list-style: none; margin: calc(56 * var(--u)) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(16 * var(--u)); }
.flow::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: calc(27 * var(--u)); height: 2px; background: var(--line); border-radius: 1px; }
.flow::after { content: ""; position: absolute; left: 12.5%; top: calc(26 * var(--u)); width: 12%; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(0, 113, 227, 0), var(--blue) 50%, rgba(125, 91, 240, 0)); animation: flowRun 4.2s var(--ease) infinite; }
@keyframes flowRun { 0% { transform: translateX(-20%); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(525%); opacity: 0; } }
.flow__step { position: relative; min-width: 0; }
.flow__link { display: flex; flex-direction: column; align-items: center; text-align: center; gap: calc(16 * var(--u)); padding: 0 calc(6 * var(--u)) calc(6 * var(--u)); color: var(--text); border-radius: var(--r-md); }
.flow__link:hover { text-decoration: none; }
.flow__num { position: relative; z-index: 1; flex: none; display: inline-grid; place-items: center; width: calc(56 * var(--u)); height: calc(56 * var(--u)); border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); font-family: var(--latin); font-size: calc(21 * var(--u)); font-weight: 600; line-height: 1;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
.flow__link:hover .flow__num { background: var(--blue); color: #fff; box-shadow: none; }
.flow__text { display: flex; flex-direction: column; gap: calc(4 * var(--u)); min-width: 0; }
.flow__name { font-size: calc(19 * var(--u)); line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.flow__link:hover .flow__name { color: var(--link); }
.flow__meta { font-size: calc(14 * var(--u)); color: var(--text-2); }
.hub-flow__cta { margin-top: calc(48 * var(--u)); text-align: center; }

/* ---------- presenter aids ---------- */
.tools { list-style: none; margin: calc(44 * var(--u)) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: calc(16 * var(--u)); }
.tool { display: flex; flex-direction: column; align-items: flex-start; gap: calc(10 * var(--u)); min-width: 0; padding: calc(28 * var(--u)) calc(26 * var(--u)) calc(30 * var(--u));
  background: var(--bg); border-radius: calc(22 * var(--u)); }
.tool__icon { width: calc(32 * var(--u)); height: calc(32 * var(--u)); color: var(--blue); margin-bottom: calc(6 * var(--u)); }
.tool__fill { fill: var(--bg); }
.tool__title { font-size: calc(19 * var(--u)); line-height: 1.3; }
.tool__text { font-size: calc(15 * var(--u)); line-height: 1.55; color: var(--text-2); }
html[lang="th"] .tool__text { line-height: 1.65; }
.tool kbd { display: inline-block; min-width: 1.7em; padding: 0 .38em; border-radius: calc(6 * var(--u)); background: var(--bg-alt); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 -1px 0 var(--line); font: 600 .92em/1.55 var(--latin); text-align: center; }
.tool__btn { margin-top: auto; min-height: calc(44 * var(--u)); padding: calc(10 * var(--u)) calc(20 * var(--u)); font-size: calc(15 * var(--u)); }
.tool__btn:not([hidden]) { margin-top: calc(10 * var(--u)); }

/* ---------- footer at large sizes ---------- */
.hub ~ .suite-foot { font-size: calc(12 * var(--u)); }
.hub ~ .suite-foot > * { max-width: calc(1180 * var(--u)); }

/* ---------- responsive ---------- */
@media (max-width: 1068px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 520px; margin-left: auto; margin-right: auto; }
  .flow::before { left: 27px; right: auto; top: 28px; bottom: 28px; width: 2px; height: auto; }
  .flow::after { left: 26px; top: 28px; width: 4px; height: 18%; background: linear-gradient(180deg, rgba(0, 113, 227, 0), var(--blue) 50%, rgba(125, 91, 240, 0)); animation-name: flowRunV; }
  @keyframes flowRunV { 0% { transform: translateY(-20%); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateY(330%); opacity: 0; } }
  .flow__link { flex-direction: row; align-items: baseline; text-align: left; gap: 18px; padding: 10px 0; }
  .flow__step + .flow__step .flow__link { padding-top: 22px; }
}
@media (max-width: 699px) {
  .hub .section { padding-top: 72px; padding-bottom: 80px; }
  .demo-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 36px; }
  .demo-card { border-radius: 24px; }
  .demo-card__body { padding: 22px 22px 24px; }
  .demo-card__title, html[lang="th"] .demo-card__title { font-size: 24px; }
  .hub-hero__actions { gap: 14px 24px; }
}
@media (max-width: 599px) {
  .tools { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 379px) {
  .hub-hero__title { font-size: 56px; }
  .demo-card__body { padding: 20px 18px 22px; }
  .demo-card__chips li { font-size: 12px; padding: 5px 11px; }
}
/* short landscape phones: keep the hero compact so the cards start on the first screen */
@media (max-height: 500px) and (orientation: landscape) {
  .hub-hero { padding-top: 56px !important; padding-bottom: 64px !important; }
  .hub-hero__title { font-size: 64px; }
}

/* ---------- motion preferences, pause, print ---------- */
@media (prefers-reduced-motion: reduce) {
  .hub .hub-hero > .hub-hero__glow, .flow::after { animation: none; }
  .flow::after { opacity: 0; }
  .demo-card, .demo-card__media img, .demo-card__chev, .hub-cta, .flow__num { transition: none; }
  .demo-card:hover, .demo-card:hover .demo-card__media img, .demo-card:hover .demo-card__chev { transform: none; }
}
@media print {
  :root { --u: 1px; }
  .hub .hub-hero > .hub-hero__glow, .flow::after, .demo-card__go, .tool__btn, .hub-more, .hub-flow__cta { display: none !important; }
  .hub-hero { padding: 0 0 8mm !important; text-align: left; }
  .hub-hero__title, .hub-hero__brand { color: var(--text) !important; }
  .hub-hero__title em { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--link) !important; }
  .hub-hero__eyebrow { justify-content: flex-start; color: var(--text-2); }
  .hub-hero__lead { color: var(--text-2); margin-left: 0; }
  .hub-hero__actions { display: none; }
  .hub-h2 em { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--link) !important; }
  .hub .section { padding: 0 0 8mm; }
  .demo-card { break-inside: avoid; box-shadow: none; border: 1px solid var(--line); }
  .demo-grid { gap: 6mm; }
  .tool { border: 1px solid var(--line); break-inside: avoid; }
}
/* phones and tablets without a keyboard: the shortcut tile has nothing to offer */
/* keyboard and browser full-screen tips do not apply on touch phones and small tablets */
@media (hover: none) and (pointer: coarse) and (max-width: 1023px) { .tool--keys, .tool--fs { display: none; } }
.tool__text, .demo-card__desc, .flow__meta { text-wrap: pretty; }
