/* ==========================================================================
   KROSS: Humanitarian Dialogue Lab
   Landing page styles. Palette, type and mark mirror the KROSS app.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */

@font-face {
  font-family: 'Google Sans Flex Variable';
  src: url('assets/fonts/google-sans-flex.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('assets/fonts/dm-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('assets/fonts/dm-sans-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --bg: #060807;
  --surface: #142019;
  --raised: #1b2a21;
  --hover: #22352b;
  --accent: #8bad53;
  --accent-hover: #d7f5a9;
  --border: #304237;
  --border-strong: #415749;
  --border-accent: #9ac86a;
  --text: #eef3ef;
  --text-2: #9cb0a2;

  --font-head: 'Google Sans Flex Variable', 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --header-h: 78px;
  --radius: 18px;
  --screen-view-h: clamp(300px, 32vw, 440px);
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* soft moss light in the upper page */
body::before {
  content: '';
  position: fixed;
  inset: -15%;
  z-index: -1;
  background:
    radial-gradient(58rem 34rem at 82% -6%, rgba(139, 173, 83, 0.16), transparent 68%),
    radial-gradient(46rem 30rem at 6% 14%, rgba(139, 173, 83, 0.08), transparent 70%),
    radial-gradient(52rem 36rem at 78% 70%, rgba(139, 173, 83, 0.07), transparent 72%);
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

html.js body::before {
  animation: ambient-drift 26s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate3d(-2.5%, 2%, 0) scale(1.07);
    opacity: 1;
  }
  100% {
    transform: translate3d(2%, -2%, 0) scale(1.03);
    opacity: 0.92;
  }
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.65rem, 5.6vw, 4.55rem);
  line-height: 1.03;
  letter-spacing: -0.028em;
}

h2 {
  font-size: clamp(1.95rem, 3.4vw, 2.9rem);
}

h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  letter-spacing: -0.012em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent-hover);
  text-decoration-color: rgba(215, 245, 169, 0.4);
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(139, 173, 83, 0.35);
  color: var(--text);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4.5rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s ease,
    border-bottom-color 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 8, 7, 0.92) 0%,
    rgba(6, 8, 7, 0.65) 60%,
    rgba(6, 8, 7, 0) 100%
  );
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.site-header.is-scrolled {
  background-color: rgba(6, 8, 7, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.site-header.is-scrolled::before {
  opacity: 0;
}

html.no-js .site-header {
  background-color: rgba(6, 8, 7, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.15rem var(--gutter);
  transition: padding 0.3s ease;
}

.site-header.is-scrolled .header-inner {
  padding-top: 5px;
  padding-bottom: 5px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  transition: opacity 0.15s;
}

.brand:hover {
  opacity: 0.95;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, width 0.2s ease, height 0.2s ease, border-radius 0.2s ease;
  flex: none;
}

.site-header .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 5px;
}

.site-header .brand-mark svg {
  width: 12px;
  height: 12px;
}

.brand:hover .brand-mark {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.22);
}

.brand-name {
  display: block;
  font-size: 1.05rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.8vw, 1.75rem);
  margin-left: auto;
}

.main-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.28rem 0.1rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition:
    color 0.25s ease,
    border-bottom-color 0.25s ease,
    font-size 0.3s ease,
    font-weight 0.3s ease;
}

.site-header.is-scrolled .main-nav a {
  font-size: 0.85rem;
  font-weight: 600;
}

.main-nav a:hover,
.main-nav a.is-active,
.main-nav a[aria-current="true"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.25s ease;
}

.btn-primary,
.scenario-start-btn {
  background: #ffffff;
  color: #0b120c;
  border-color: #ffffff;
}

.btn-primary:hover,
.scenario-start-btn:hover {
  background: #e6eae7;
  color: #0b120c;
  border-color: #e6eae7;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--raised);
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.62rem 1.25rem;
  font-size: 0.92rem;
  transition:
    padding 0.3s ease,
    font-size 0.3s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.site-header.is-scrolled .btn-small {
  padding: 0.35rem 0.95rem;
  font-size: 0.82rem;
}

.menu-toggle {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-2);
  background: rgba(27, 42, 33, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  display: none;
}

.menu-toggle:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--border-strong);
}

/* ---------- Shared section pieces ---------- */

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

#scenarios,
#trainer-mode,
#debrief {
  background-color: #0b120c;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-lede,
.lede {
  color: var(--text-2);
  font-size: clamp(1.05rem, 1.45vw, 1.24rem);
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1.15rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.fine-print {
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 52rem;
}

/* ---------- Hero ---------- */

.hero {
  padding: calc(var(--header-h) + clamp(3.5rem, 9vh, 6.5rem)) 0 clamp(4rem, 8vw, 7rem);
  scroll-margin-top: var(--header-h);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(2.5rem, 5vw, 4.25rem);
  align-items: center;
}

.hero-copy .lede {
  margin-bottom: 2.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 0;
}

/* framed app window with the slowly scrolling real screenshot */
.hero-window {
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 44px 90px rgba(0, 0, 0, 0.5);
  transform: translate3d(
    calc(var(--parallax-x, 0px) * 0.55),
    calc(var(--parallax-y, 0px) * 0.55),
    0
  );
  transition: transform 0.6s ease;
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--raised);
}

.window-chrome .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-chrome .dot:first-child {
  background: var(--accent);
}

.window-title {
  margin-left: 0.65rem;
  color: var(--text-2);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-screen {
  position: relative;
  height: var(--screen-view-h);
  overflow: hidden;
  background: var(--raised);
}

img.screen-scroll {
  display: block;
  width: 100%;
  height: auto;
  min-height: calc(var(--screen-view-h) + 40px);
  object-fit: cover;
  object-position: top center;
  transform: translate3d(0, var(--hero-scroll-y, 0px), 0);
  will-change: transform;
}

.window-caption {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.15rem 1.15rem;
  color: var(--text-2);
  font-size: 0.86rem;
}

.caption-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- Scenarios layout & folding fan ---------- */

.scenarios-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.scenarios-copy {
  display: flex;
  flex-direction: column;
}

.scenarios-copy h2 {
  margin-bottom: 0.9rem;
}

.scenarios-copy .section-lede {
  margin-bottom: 2rem;
  max-width: 34rem;
}

.scenarios-copy .fine-print {
  margin: 0;
  max-width: 32rem;
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.5;
}

.scenarios-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0.5rem 2.25rem;
  perspective: 1200px;
}

.card-fan {
  --fan-offset: clamp(72px, 8.5vw, 105px);
  --fan-angle: 5.5deg;
  --fan-progress: 0;
  display: grid;
  grid-template-columns: 1fr;
  place-items: stretch center;
  position: relative;
  width: 100%;
  max-width: 295px;
}

.scenario-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.35s ease,
              box-shadow 0.35s ease;
}

.card-fan .scenario-card {
  grid-area: 1 / 1;
  width: 100%;
  max-width: 295px;
  height: 100%;
  min-height: 365px;
  transform-origin: 50% 90%;
  will-change: transform;
}

/* Stacking depths */
.card-fan .card-left {
  z-index: 1;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  transform: translate3d(
    calc(-1 * var(--fan-offset) * var(--fan-progress)),
    calc(12px * var(--fan-progress)),
    0
  ) rotate(calc(-1 * var(--fan-angle) * var(--fan-progress)));
}

.card-fan .card-center {
  z-index: 3;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  transform: translate3d(0, calc(-6px * var(--fan-progress)), 0) rotate(0deg);
}

.card-fan .card-right {
  z-index: 2;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  transform: translate3d(
    calc(var(--fan-offset) * var(--fan-progress)),
    calc(12px * var(--fan-progress)),
    0
  ) rotate(calc(var(--fan-angle) * var(--fan-progress)));
}

/* Fallback for no-js */
html.no-js .card-fan,
html:not(.js) .card-fan {
  --fan-progress: 1;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--raised);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(var(--parallax-x, 0px), var(--parallax-y, 0px), 0) scale(1.1);
  transition: transform 0.55s ease;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.2rem 1.25rem 1.4rem;
}

.card-body h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.3;
}

.card-body p:last-child {
  margin: 0;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.45;
}

.card-meta {
  margin: 0;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Scenario builder ---------- */

.builder-scroller {
  position: relative;
}

html.js .builder-scroller {
  min-height: 240vh;
}

.builder-sticky {
  width: 100%;
}

html.js .builder-sticky {
  position: sticky;
  top: max(76px, calc(50vh - 210px));
  z-index: 5;
}

@media (max-height: 600px) {
  html.js .builder-scroller {
    min-height: auto;
  }

  html.js .builder-sticky {
    position: static;
  }
}

.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 4.5vw, 3.75rem);
  align-items: center;
}

.step-nav {
  display: grid;
  gap: 1.15rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  padding: 1.25rem 1.4rem;
  background: rgba(20, 32, 25, 0.45);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  position: relative;
  width: 100%;
}

.step-item:hover {
  background: rgba(34, 53, 43, 0.6);
  border-color: var(--border-strong);
}

.step-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.step-item.is-active {
  background: rgba(27, 42, 33, 0.85);
  border: 1px solid var(--border-accent);
  border-color: var(--border-accent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.step-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-2);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--surface);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.step-item.is-active .step-num {
  background: var(--accent);
  color: #0b120c;
  border-color: var(--accent);
}

.step-content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: var(--text);
}

.step-content p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

.step-item.is-active .step-content p {
  color: var(--text);
}

.builder-visuals {
  position: relative;
  width: 100%;
}

.shot-frame {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  aspect-ratio: 1440 / 960;
  width: 100%;
  transition: aspect-ratio 0.35s ease;
}

.shot-frame[data-step="2"],
.shot-frame.is-step-2 {
  aspect-ratio: 2368 / 1200;
}

.shot-panel {
  width: 100%;
  height: 100%;
  display: none;
}

.shot-panel.is-active {
  display: block;
  animation: panel-fade 0.25s ease-out;
}

@keyframes panel-fade {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

.shot-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* no-js fallback */
html.no-js .shot-panel.is-active,
html:not(.js) .shot-panel.is-active {
  display: block;
}

/* ---------- Trainer mode ---------- */

.trainer-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.trainer-copy {
  display: flex;
  flex-direction: column;
}

.trainer-copy h2 {
  margin-bottom: 0.9rem;
}

.trainer-copy .section-lede {
  margin-bottom: 2.25rem;
  max-width: 36rem;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.65rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
}

.feature-icon-badge {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(139, 173, 83, 0.12);
  border: 1px solid rgba(139, 173, 83, 0.25);
  color: var(--accent);
  flex: none;
  margin-top: 0.15rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.feature-list li:hover .feature-icon-badge {
  transform: scale(1.05);
  border-color: var(--accent);
  background: rgba(139, 173, 83, 0.2);
}

.eye-lid,
.eye-pupil {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.compass-needle {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s ease;
}

.dial-track {
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.feature-list li:hover .dial-track {
  opacity: 0.85;
}

.dial-slider {
  transition: transform 0.2s ease;
}

.feature-list li:hover .eye-lid,
.feature-list li:focus-within .eye-lid {
  animation: eye-blink 1.2s ease-in-out infinite;
}

.feature-list li:hover .eye-pupil,
.feature-list li:focus-within .eye-pupil {
  animation: eye-pupil-blink 1.2s ease-in-out infinite;
}

.feature-list li:hover .compass-needle,
.feature-list li:focus-within .compass-needle {
  animation: compass-turn 1.4s ease-in-out infinite;
}

.feature-list li:hover .dial-slider-1,
.feature-list li:focus-within .dial-slider-1 {
  animation: dial-slider-1 1.2s ease-in-out infinite;
}

.feature-list li:hover .dial-slider-2,
.feature-list li:focus-within .dial-slider-2 {
  animation: dial-slider-2 1.4s ease-in-out infinite;
}

.feature-list li:hover .dial-slider-3,
.feature-list li:focus-within .dial-slider-3 {
  animation: dial-slider-3 1.1s ease-in-out infinite;
}

@keyframes eye-blink {
  0%, 100% {
    transform: scaleY(1);
  }
  20% {
    transform: scaleY(1);
  }
  40% {
    transform: scaleY(0.08);
  }
  60% {
    transform: scaleY(1);
  }
}

@keyframes eye-pupil-blink {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  20% {
    transform: scale(1);
    opacity: 1;
  }
  40% {
    transform: scale(0.1);
    opacity: 0;
  }
  60% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes compass-turn {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(48deg);
  }
  75% {
    transform: rotate(-44deg);
  }
}

@keyframes dial-slider-1 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes dial-slider-2 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@keyframes dial-slider-3 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

.feature-item-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.feature-item-body p {
  color: var(--text-2);
  margin: 0;
  max-width: 32rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.preview-card {
  background: linear-gradient(165deg, var(--surface), var(--raised));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.35rem);
}

.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.65rem;
  padding: 0.38rem 0.95rem;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.preview-body {
  display: grid;
  gap: 1.65rem;
}

.twist-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.25rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(6, 8, 7, 0.5);
}

.twist-row p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill-quiet {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
  letter-spacing: 0.05em;
  text-transform: none;
  font-size: 0.85rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dials {
  display: grid;
  gap: 1.35rem;
}

.dial-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.98rem;
}

.dial-state {
  color: var(--text-2);
  font-size: 0.84rem;
}

.dial-track {
  position: relative;
  height: 8px;
  margin-top: 0.65rem;
  border-radius: 999px;
  background: var(--hover);
}

.dial-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.dial-thumb {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--surface);
  transform: translate(-50%, -50%);
}

.dial:nth-child(1) .dial-fill {
  animation: dial-fill-trust 4s ease-in-out infinite alternate;
}

.dial:nth-child(1) .dial-thumb {
  animation: dial-thumb-trust 4s ease-in-out infinite alternate;
}

.dial:nth-child(2) .dial-fill {
  animation: dial-fill-rigidity 5.2s ease-in-out infinite alternate 0.6s;
}

.dial:nth-child(2) .dial-thumb {
  animation: dial-thumb-rigidity 5.2s ease-in-out infinite alternate 0.6s;
}

.dial:nth-child(3) .dial-fill {
  animation: dial-fill-hostility 4.4s ease-in-out infinite alternate 1.2s;
}

.dial:nth-child(3) .dial-thumb {
  animation: dial-thumb-hostility 4.4s ease-in-out infinite alternate 1.2s;
}

@keyframes dial-fill-trust {
  0% {
    width: 56%;
  }
  100% {
    width: 68%;
  }
}

@keyframes dial-thumb-trust {
  0% {
    left: 56%;
  }
  100% {
    left: 68%;
  }
}

@keyframes dial-fill-rigidity {
  0% {
    width: 40%;
  }
  100% {
    width: 48%;
  }
}

@keyframes dial-thumb-rigidity {
  0% {
    left: 40%;
  }
  100% {
    left: 48%;
  }
}

@keyframes dial-fill-hostility {
  0% {
    width: 33%;
  }
  100% {
    width: 23%;
  }
}

@keyframes dial-thumb-hostility {
  0% {
    left: 33%;
  }
  100% {
    left: 23%;
  }
}

.preview-log {
  display: grid;
  gap: 0.55rem;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(6, 8, 7, 0.45);
}

.log-line {
  color: var(--text-2);
  font-size: 0.9rem;
}

.log-line::before {
  content: '·';
  color: var(--accent);
  margin-right: 0.55rem;
}

/* ---------- Engine ---------- */

.principles {
  margin: -1rem 0 clamp(2.5rem, 5vw, 3.75rem);
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.15rem;
  max-width: 54rem;
}

.principles li {
  position: relative;
  padding-left: 1.85rem;
  font-family: var(--font-head);
  font-size: clamp(1.12rem, 1.75vw, 1.42rem);
  line-height: 1.45;
  letter-spacing: -0.012em;
}

.principles li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 3px;
  background: var(--accent);
}

.engine-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.65rem;
}

.engine-step {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.65rem 1.5rem 1.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.engine-step p:last-child {
  margin: 0;
  color: var(--text-2);
  font-size: 0.98rem;
}

.step-index {
  margin: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.flow-connector {
  width: 58px;
  height: 26px;
  align-self: center;
  overflow: visible;
}

.flow-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 7 11;
  animation: flow-dash 2.6s linear infinite;
}

.flow-head {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}

@keyframes flow-dash {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -36;
  }
}

/* ---------- Debrief ---------- */

.debrief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}

.debrief-block {
  min-width: 0;
}

.debrief-block h3 {
  font-size: 1.08rem;
  margin-bottom: 0.95rem;
}

.skills {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.15rem;
}

.skill-head {
  font-size: 0.95rem;
  color: var(--text);
}

.skill-track {
  height: 8px;
  margin-top: 0.5rem;
  border-radius: 999px;
  background: var(--hover);
}

.skill-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.moment {
  margin: 0 0 1.15rem;
  padding: 0.35rem 0 0.35rem 1.15rem;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-style: italic;
  font-size: 1.02rem;
}

.moment cite {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-2);
  font-style: normal;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.try-instead,
.next-focus {
  margin: 0;
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(6, 8, 7, 0.45);
  color: var(--text);
}

.interest-label {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.interest-label + .interest-list {
  margin-bottom: 1.25rem;
}

.interest-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-2);
}

.interest-missed {
  list-style: '• ';
  padding-left: 1.35rem;
}

.coach-line {
  padding: 1.05rem 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(6, 8, 7, 0.45);
  font-size: 1.02rem;
}

.coach-prompt {
  display: inline-block;
  margin-right: 0.65rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 0.12em;
}

/* ---------- Final CTA section ---------- */

.section-cta {
  text-align: center;
  padding: clamp(4.5rem, 9vw, 7rem) 0;
}

.cta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 44rem;
  margin: 0 auto;
}

.cta-container h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  margin: 0 0 1rem;
}

.cta-lede {
  margin: 0 0 2rem;
  text-align: center;
}

.cta-actions {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background-color: #0a0f0d;
  border-top: 1px solid var(--border);
  padding: clamp(2.75rem, 5vw, 4rem) 0 clamp(2.5rem, 4vw, 3.5rem);
  scroll-margin-top: var(--header-h);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.75rem 1rem;
}

.footer-brand .brand {
  margin-bottom: 0.65rem;
}

.footer-tag {
  color: var(--text-2);
  margin: 0.65rem 0 0;
  max-width: 30rem;
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
  justify-self: end;
  align-self: start;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #fff;
  transition: background-color 0.2s ease;
}

.footer-socials a:hover {
  background-color: var(--surface);
}

.footer-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.15rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.footer-links a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
}

.footer-note {
  grid-column: 1 / -1;
  margin: 0;
}

/* ---------- Privacy page ---------- */

.privacy-main {
  padding-top: calc(var(--header-h) + 2.5rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.privacy-container {
  max-width: 76ch;
}

.privacy-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.privacy-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.5rem 0 0.85rem;
}

.privacy-date {
  color: var(--text-2);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.privacy-intro {
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0;
}

.privacy-callout {
  background: rgba(220, 160, 40, 0.08);
  border: 1px solid rgba(220, 160, 40, 0.25);
  border-left: 3px solid #dca028;
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0 2rem;
}

.privacy-callout p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.privacy-content h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  letter-spacing: -0.02em;
  margin: 2.75rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.privacy-content p {
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.68;
  margin: 0 0 1.25rem;
}

.privacy-content p strong {
  color: var(--text);
}

.privacy-content ul {
  margin: 0 0 1.5rem;
  padding-left: 1.4rem;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.privacy-content li {
  line-height: 1.6;
}

.privacy-content li strong {
  color: var(--text);
}

.privacy-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.privacy-content a:hover {
  color: var(--accent-hover);
}

.privacy-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  background: var(--raised);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--text);
  border: 1px solid var(--border);
}

/* ---------- Motion control ---------- */

/* slow, bounded loops: hero screenshot drift (img.screen-scroll) + engine
   connector dashes (.flow-line). Both are paused below. */

html.no-js body::before,
html:not(.js) body::before,
html.no-js *,
html.no-js *::before,
html.no-js *::after,
html:not(.js) *,
html:not(.js) *::before,
html:not(.js) *::after {
  animation: none !important;
  transition: none !important;
}

/* paused state: the script toggles .motion-paused on <html> */
html.motion-paused,
html.motion-paused body::before,
html.motion-paused *::before,
html.motion-paused *::after {
  animation-play-state: paused !important;
}

html.motion-paused * {
  animation-play-state: paused !important;
  transition: none !important;
}

html.motion-paused {
  scroll-behavior: auto;
}

html.motion-paused body::before,
html.motion-paused .hero-window,
html.motion-paused .card-media img,
html.motion-paused .parallax-layer {
  transform: none !important;
}

/* off-screen state: the script toggles .is-offscreen on [data-animated] */
[data-animated].is-offscreen,
[data-animated].is-offscreen *,
[data-animated].is-offscreen *::before,
[data-animated].is-offscreen *::after {
  animation-play-state: paused !important;
}

/* reduced motion: no animation, no transition, no smooth scroll, no parallax */
@media (prefers-reduced-motion: reduce) {
  body::before,
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto !important;
  }

  body::before,
  .hero-window,
  img.screen-scroll,
  .card-media img,
  .parallax-layer {
    transform: none !important;
  }

  .btn-primary:hover,
  .btn-ghost:hover,
  .scenario-card:hover {
    transform: none;
  }

  .card-fan {
    --fan-progress: 1 !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .engine-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-connector {
    display: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .scenarios-layout,
  .builder-layout,
  .trainer-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .scenarios-stage {
    padding: 2.25rem 0.5rem 2.75rem;
  }

  .card-fan {
    max-width: 280px;
    --fan-offset: clamp(52px, 9vw, 80px);
    --fan-angle: 5deg;
  }

  .card-fan .scenario-card {
    max-width: 280px;
    min-height: 350px;
  }

  .builder-visuals {
    order: 2;
  }

  .shot-figure-secondary {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: calc(100% - 0.35rem);
    left: var(--gutter);
    right: var(--gutter);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 16px;
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.55);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a,
  .site-header.is-scrolled .main-nav a {
    padding: 0.72rem 0.95rem;
    border: 0;
    border-radius: 10px;
    font-size: 1.02rem;
    font-weight: 400;
  }

  .main-nav a:hover {
    background: var(--hover);
    color: var(--text);
  }

  .main-nav a.is-active,
  .main-nav a[aria-current="true"] {
    background: rgba(139, 173, 83, 0.18);
    color: var(--text);
  }
}

@media (max-width: 760px) {
  .debrief-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .engine-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .engine-step {
    border-left: 3px solid var(--accent);
    border-radius: 12px;
  }
}

@media (max-width: 620px) {
  .scenarios-stage {
    padding: 1.5rem 0.25rem 2.25rem;
  }

  .card-fan {
    max-width: clamp(220px, 62vw, 260px);
    --fan-offset: clamp(24px, 6vw, 36px);
    --fan-angle: 4deg;
  }

  .card-fan .scenario-card {
    max-width: clamp(220px, 62vw, 260px);
    min-height: 320px;
  }

  .card-body {
    padding: 1.15rem 1.25rem 1.35rem;
  }

  .card-body h3 {
    font-size: 1.05rem;
  }

  body {
    font-size: 1.02rem;
  }

  .header-inner {
    gap: 0.85rem;
  }

  .brand {
    gap: 0.55rem;
  }

  .brand-name {
    letter-spacing: 0.12em;
    font-size: 0.92rem;
  }

  .header-actions {
    gap: 0.6rem;
  }

  .menu-toggle {
    padding: 0.52rem 0.85rem;
    font-size: 0.82rem;
  }

  .btn-small {
    padding: 0.55rem 0.95rem;
    font-size: 0.88rem;
  }

  .site-header.is-scrolled .menu-toggle {
    padding: 0.32rem 0.82rem;
    font-size: 0.8rem;
  }

  .site-header.is-scrolled .btn-small {
    padding: 0.32rem 0.82rem;
    font-size: 0.8rem;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (max-width: 430px) {
  /* keep the mark and the controls; the wordmark stays available to
     assistive technology but takes no horizontal space */
  .brand-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .header-inner {
    gap: 0.75rem;
  }
}
