/* Reset, the fixed 1920x1080 stage, chrome (header/nav/footer) and slide transitions. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/Inter-Regular.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/Inter-Regular-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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/Inter-Medium.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/Inter-Medium-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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/Inter-SemiBold.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/Inter-SemiBold-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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/Inter-Bold.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/Inter-Bold-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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* the stage never scrolls — that is the whole point */
  background: #000;
}

body {
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: default;
}

body.cursor-hidden {
  cursor: none;
}

/* ─── The stage ────────────────────────────────────────────────────────────────
   Everything is authored in a fixed 1920x1080 coordinate space and scaled by a
   single transform. That keeps every stroke vector-sharp at 4K and guarantees no
   layout ever reflows into a scrollbar. */
#stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  background: var(--card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.hdr {
  flex: 0 0 96px;
  height: 96px;
  display: flex;
  align-items: center;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: relative;
  z-index: 20;
}

.hdr-brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
}
.hdr-brand img.tt {
  height: 30px;
  display: block;
}
.hdr-brand .sep {
  width: 1px;
  height: 34px;
  background: var(--line);
}
/* The official OPC UA logo is a long 5.4:1 lockup, so it is sized to sit level
   with the TEEPTRAK wordmark rather than dominate it. */
.hdr-brand img.opc {
  height: 27px;
  display: block;
}

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  font: 500 19px/1 var(--font);
  color: var(--muted);
  padding: 12px 16px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 180ms var(--ease), background 180ms var(--ease);
  white-space: nowrap;
}
.tab:hover {
  color: var(--slate);
  background: var(--bg);
}
.tab[aria-selected="true"] {
  color: var(--ink);
  font-weight: 600;
}
.tab::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 260ms var(--ease);
}
.tab[aria-selected="true"]::after {
  transform: scaleX(1);
}

/* Attract-mode progress: the underline fills left to right over the dwell time. */
.tab .dwell {
  position: absolute;
  left: 16px;
  bottom: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--red);
  width: 0;
  opacity: 0;
}
body.attract .tab[aria-selected="true"]::after {
  transform: scaleX(0);
}
body.attract .tab[aria-selected="true"] .dwell {
  opacity: 1;
}

/* ─── Language picker ──────────────────────────────────────────────────────── */
.lang {
  position: relative;
  flex: 0 0 auto;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  font: 500 17px/1 var(--font);
  color: var(--slate);
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.lang-btn:hover {
  border-color: var(--muted);
  background: var(--bg);
}
.lang-btn img {
  width: 26px;
  height: 17.3px;
  display: block;
  border-radius: 2px;
}
.lang-btn .chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 208px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 40;
}
.lang-menu[data-open="true"] {
  display: block;
  animation: pop 200ms var(--ease) both;
}
.lang-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: 500 18px/1 var(--font);
  color: var(--ink);
  text-align: left;
}
.lang-opt:hover {
  background: var(--bg);
}
.lang-opt[aria-selected="true"] {
  background: var(--red-soft);
  color: var(--red-dark);
  font-weight: 600;
}
.lang-opt img {
  width: 26px;
  height: 17.3px;
  border-radius: 2px;
  display: block;
}

/* ─── Slides ───────────────────────────────────────────────────────────────── */
.deck {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 40px 72px 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity var(--slide-in) var(--ease), transform var(--slide-in) var(--ease),
    visibility 0s linear var(--slide-in);
  background: var(--card);
}

.slide[data-active="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--slide-in) var(--ease), transform var(--slide-in) var(--ease),
    visibility 0s;
}

/* Off-screen slides must not burn CPU for eight hours on a booth machine. */
.slide:not([data-active="true"]) * {
  animation-play-state: paused !important;
}

/* ─── Shared slide typography ──────────────────────────────────────────────── */
.s-title {
  font: 700 62px/1.1 var(--font);
  letter-spacing: -1.4px;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.s-title em {
  font-style: normal;
  color: var(--red);
}
.s-sub {
  font: 400 29px/1.4 var(--font);
  color: var(--slate);
  margin: 18px 0 0;
  max-width: 1180px;
  text-wrap: balance;
}
.s-head {
  flex: 0 0 auto;
}
.s-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 17px/1 var(--font);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  padding: 9px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.ftr {
  flex: 0 0 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  border-top: 1px solid var(--line);
  font: 500 16px/1 var(--font);
  color: var(--muted);
  background: var(--card);
  z-index: 20;
}
.ftr .dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.ftr .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: background 220ms var(--ease), transform 220ms var(--ease);
}
.ftr .dot[data-on="true"] {
  background: var(--red);
  transform: scale(1.45);
}

/* ─── Shortcut overlay (press ?) ───────────────────────────────────────────── */
.help {
  position: absolute;
  inset: 0;
  background: rgba(35, 33, 32, 0.62);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}
.help[data-open="true"] {
  display: flex;
  animation: fade 200ms var(--ease) both;
}
.help-panel {
  background: var(--card);
  border-radius: 22px;
  padding: 44px 52px;
  box-shadow: var(--shadow-lg);
  min-width: 620px;
}
.help-panel h2 {
  font: 700 34px/1.2 var(--font);
  margin: 0 0 26px;
}
.help-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 21px;
  color: var(--slate);
}
.help-row:first-of-type {
  border-top: 0;
}
kbd {
  font: 600 17px/1 var(--mono);
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 7px;
  padding: 7px 11px;
  color: var(--ink);
  min-width: 40px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  body.respect-motion * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
