@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Saira SemiCondensed';
  src: url('../fonts/SairaSemiCondensed-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  scrollbar-color: #2f3b58 #0a0e1a;
}

html {
  scroll-behavior: smooth;
}

/* ---- scroll-snap sections ---- */
.scroll-track {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.scroll-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (max-width: 767px) {
  .scroll-track {
    scroll-snap-type: y proximity;
  }
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0a0e1a;
}
::-webkit-scrollbar-thumb {
  background: #232d47;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2f4d7a;
}

/* ---- checkerboard viewport backdrop, echoes the app's transparent canvas ---- */
.canvas-grid {
  background-image:
    linear-gradient(45deg, #131a2b 25%, transparent 25%),
    linear-gradient(-45deg, #131a2b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #131a2b 75%),
    linear-gradient(-45deg, transparent 75%, #131a2b 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0px;
  background-color: #0e1422;
}

.dot-grid {
  background-image: radial-gradient(circle, #232d47 1px, transparent 1px);
  background-size: 18px 18px;
}

/* ---- reveal-on-scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- nav dots ---- */
.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #232d47;
  transition: all 0.3s ease;
}
.nav-dot.is-active {
  background: #5b8ec9;
  height: 22px;
  box-shadow: 0 0 12px rgba(91, 142, 201, 0.6);
}

/* ---- dashed safe-area style borders (from the app's title/action safe guides) ---- */
.safe-outline-yellow {
  border: 1px dashed #d9c34a;
}
.safe-outline-red {
  border: 1px dashed #c1584f;
}

/* ---- studio app: Hierarchy/Timeline shared selection state ---- */
.hierarchy-row.is-selected,
.timeline-row-label.is-selected {
  background-color: rgba(58, 95, 146, 0.35);
}
.timeline-clip.is-selected {
  outline: 2px solid #5b8ec9;
  outline-offset: -1px;
}

/* number inputs everywhere in the studio app */
.field-input {
  background: #05070d;
  border: 1px solid #212a42;
  border-radius: 3px;
  color: #eef1f7;
  font-family: 'Saira SemiCondensed', monospace;
  font-size: 11px;
  padding: 2px 4px;
  width: 100%;
}
.field-input:focus {
  outline: none;
  border-color: #4a76ad;
}

/* ---- tour page: full-frame screenshot bezel, echoes the app's own viewport chrome ---- */
.showcase-frame {
  position: relative;
  background: #0a0e1a;
  border: 1px solid var(--cat, #212a42);
  padding: clamp(8px, 1.2vw, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease;
}
.showcase-frame[hidden] {
  display: none;
}
.showcase-frame img {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
}
.showcase-frame .corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid #d9c34a;
  opacity: 0.8;
}
.showcase-frame .corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.showcase-frame .corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.showcase-frame .corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.showcase-frame .corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.showcase-frame .tag {
  position: absolute;
  bottom: 10px;
  right: 16px;
  max-width: 65%;
  text-align: right;
  font-family: 'Saira SemiCondensed', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #9aa6bd;
  background: rgba(5, 7, 13, 0.7);
  padding: 3px 7px;
  pointer-events: none;
}
.showcase-frame .rec {
  position: absolute;
  top: 10px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Saira SemiCondensed', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #c1584f;
}
.showcase-frame .rec .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #c1584f;
  box-shadow: 0 0 8px 1px #c1584f;
}

/* ---- feature tour: category card grid ---- */
.feature-card {
  display: flex;
  flex-direction: column;
  background: #0d1220;
  border: 1px solid #212a42;
  border-left: 3px solid var(--cat, #5b8ec9);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  /* button reset — these cards are <button>s so the detail panel opens without a page navigation */
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.feature-card:hover {
  border-color: var(--cat, #5b8ec9);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.55);
  text-decoration: none;
}
.feature-card:focus-visible {
  outline: 2px solid var(--cat, #5b8ec9);
  outline-offset: 2px;
}
.feature-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  background: #131a2b;
  border-bottom: 1px solid #212a42;
  display: block;
}
.feature-card-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-card-thumb-empty::after {
  content: "No capture yet";
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #606c87;
}
.feature-card-body {
  padding: 14px 16px 16px;
}
.feature-card-body h3 {
  margin: 0 0 6px;
  font-family: 'Saira SemiCondensed', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: #eef1f7;
  line-height: 1.25;
}
.feature-card-body p {
  margin: 0;
  color: #9aa6bd;
  font-size: 0.85rem;
  line-height: 1.45;
}

/* ---- feature detail page ---- */
.eli5-callout {
  margin: 0;
  background: #0d1220;
  border: 1px solid #212a42;
  border-left: 4px solid var(--cat, #5b8ec9);
  border-radius: 10px;
  padding: 20px 24px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #eef1f7;
}
.eli5-tag {
  display: block;
  font-family: 'Saira SemiCondensed', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #606c87;
  margin-bottom: 8px;
}

.info-panel {
  background: #0d1220;
  border: 1px solid #212a42;
  border-radius: 10px;
  padding: 20px 22px;
}
.info-panel h2 {
  font-family: 'Saira SemiCondensed', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #606c87;
  margin: 0 0 14px;
}
.info-panel ol {
  margin: 0;
  padding-left: 1.2em;
  color: #eef1f7;
}
.info-panel ol li {
  margin-bottom: 9px;
  line-height: 1.45;
}
.info-panel ol li:last-child { margin-bottom: 0; }

.menu-path {
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  background: #05070d;
  border: 1px solid #212a42;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: #8db4de;
  word-break: break-word;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: #131a2b;
  border: 1px solid #212a42;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  color: #eef1f7;
}

/* animated marching-ants record dot */
@keyframes pulse-rec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.pulse-rec {
  animation: pulse-rec 1.6s ease-in-out infinite;
}

/* ---- feature detail panel (opened from a card, no page navigation) ---- */
.feature-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 40px);
}
.feature-modal[hidden] {
  display: none;
}
.feature-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(4px);
}
.feature-modal-panel {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  overflow-y: auto;
  background: #0a0e1a;
  border: 1px solid #212a42;
  border-radius: 14px;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7);
  animation: modal-in 0.2s cubic-bezier(0.19, 1, 0.22, 1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .feature-modal-panel { animation: none; }
}
.feature-modal-topbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px 0;
  background: linear-gradient(#0a0e1a 65%, transparent);
}
.feature-modal-close {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #131a2b;
  border: 1px solid #212a42;
  border-radius: 999px;
  color: #9aa6bd;
  cursor: pointer;
}
.feature-modal-close:hover {
  color: #eef1f7;
  border-color: #5b8ec9;
}
.feature-modal-close:focus-visible {
  outline: 2px solid #5b8ec9;
  outline-offset: 2px;
}
.feature-modal-scroll {
  padding: 8px clamp(20px, 4vw, 48px) 44px;
}
.feature-modal-tag {
  display: inline-block;
  font-family: 'Saira SemiCondensed', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--cat, #5b8ec9);
  color: var(--cat, #5b8ec9);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 14px;
}
.feature-modal-heading {
  font-family: 'Saira SemiCondensed', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  line-height: 1.15;
  color: #eef1f7;
  margin: 0 0 20px;
}
