/* Lumafield — Agent walkthrough interactive module */

@font-face {
  font-family: "Monument Grotesk";
  src: url("fonts/MonumentGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Monument Grotesk";
  src: url("fonts/MonumentGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Monument Grotesk Semi-Mono";
  src: url("fonts/MonumentGroteskSemiMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

#lf-walkthrough-module {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 8fr;
  gap: 24px 64px;
  align-items: start;
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 48px;
  box-sizing: border-box;
  background: #000;
  color: #fff;
  font-family: "Monument Grotesk", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
#lf-walkthrough-module *,
#lf-walkthrough-module *::before,
#lf-walkthrough-module *::after { box-sizing: inherit; }

/* ---- Left rail: titles + accordion bodies ---- */

.lf-wt-item { border-top: 1px solid #242424; }
.lf-wt-item:last-child { border-bottom: 1px solid #242424; }

.lf-wt-title {
  display: flex;
  align-items: baseline;
  gap: 18px;
  width: 100%;
  padding: 17px 0 15px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #7e7e7e;
  cursor: pointer;
  transition: color 0.25s ease;
}
.lf-wt-title:hover { color: #c9c9c9; }
.lf-wt-item.lf-open .lf-wt-title { color: #fff; cursor: default; }
.lf-wt-title:focus-visible {
  outline: 1px dashed #ffe25a;
  outline-offset: 3px;
}

.lf-wt-idx {
  font-family: "Monument Grotesk Semi-Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #565656;
  min-width: 22px;
  transition: color 0.25s ease;
}
.lf-wt-item.lf-open .lf-wt-idx { color: #ffe25a; }

/* Countdown bar: a hairline under the active title that fills while the
   walkthrough is auto-advancing; gone once the user takes over. */
.lf-wt-bar {
  height: 2px;
  margin-bottom: -2px;
  background: transparent;
  overflow: hidden;
}
.lf-wt-bar i {
  display: block;
  height: 100%;
  background: #ffe25a;
  transform: scaleX(0);
  transform-origin: left center;
}
#lf-walkthrough-module:not(.lf-wt-auto) .lf-wt-bar,
.lf-wt-item:not(.lf-open) .lf-wt-bar i { visibility: hidden; }

/* Accordion body: grid-rows 0fr -> 1fr gives smooth height animation
   without measuring content. */
.lf-wt-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lf-wt-item.lf-open .lf-wt-body { grid-template-rows: 1fr; }
.lf-wt-body-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.lf-wt-item.lf-open .lf-wt-body-inner {
  opacity: 1;
  transition: opacity 0.45s ease 0.15s;
}
.lf-wt-body-inner p {
  margin: 0 0 14px;
  padding-right: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: #b9b9b9;
}
.lf-wt-body-inner p:first-child { margin-top: 16px; }
.lf-wt-body-inner p:last-child { padding-bottom: 22px; }

/* ---- Right: 16:9 media panel with crossfading frames ---- */

.lf-wt-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  overflow: hidden;
}
.lf-wt-frame {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.lf-wt-frame.lf-front { opacity: 1; }
.lf-wt-frame iframe,
.lf-wt-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
/* Supplied assets should be 16:9; if one isn't, letterbox it on the dark
   panel rather than cropping (diagrams especially). Videos stay full-bleed. */
.lf-wt-frame img { object-fit: contain; }
.lf-wt-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lf-wt-placeholder span {
  font-family: "Monument Grotesk Semi-Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4e4e4e;
}

/* ---- Narrow screens: media on top, accordion below ---- */

@media (max-width: 760px) {
  #lf-walkthrough-module {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 20px 32px;
  }
  .lf-wt-media { order: -1; }
  .lf-wt-title { font-size: 17px; padding: 15px 0 13px; }
  .lf-wt-body-inner p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .lf-wt-body,
  .lf-wt-body-inner,
  .lf-wt-frame,
  .lf-wt-title,
  .lf-wt-idx { transition: none; }
}
