/* Scene 3 -- "One filter, one feature map."
   All colours from editorial palette tokens defined in css/style.css. */

.s3-root { position: relative; }

.s3-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s3-hero { margin-bottom: 6px; }

/* ---- Top row: input picker + input canvas ----------------------------- */

.s3-top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 4px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 4px;
}

.s3-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.s3-picker-label { white-space: nowrap; }

.s3-select {
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 3px 8px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.s3-select:hover { border-color: var(--ink-secondary); }

.s3-input-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.s3-input-cap {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-secondary);
}

.s3-input-host {
  width: 140px;
  height: 140px;
  border: 1px solid var(--rule);
  background: var(--card-bg);
}

/* ---- Gallery: 4 columns x 2 rows ------------------------------------- */

.s3-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 980px) {
  .s3-gallery { grid-template-columns: repeat(2, 1fr); }
}

.s3-fcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 12px;
  cursor: pointer;
  transition: transform 140ms ease-out, border-color 140ms ease-out, box-shadow 140ms ease-out;
}

.s3-fcard:focus { outline: none; }

.s3-fcard:hover,
.s3-fcard:focus-visible {
  transform: translateY(-2px);
  border-color: var(--ink-secondary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.s3-fcard-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.s3-kernel-host {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border: 1px solid var(--rule);
  background: var(--card-bg);
}

.s3-fcard-name {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
}

.s3-fmap-host {
  width: 140px;
  height: 140px;
  align-self: center;
  border: 1px solid var(--rule);
  background: var(--card-bg);
}

/* ---- Caption / footnote ---------------------------------------------- */

.s3-caption {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-style: italic;
  font-size: 14.5px;
  color: var(--ink);
  text-align: center;
  margin-top: 10px;
}

/* ---- Modal overlay --------------------------------------------------- */

.s3-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.s3-overlay.hidden {
  display: none;
}

.s3-modal {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 24px 28px 28px;
  max-width: 880px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.s3-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  color: var(--ink-secondary);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}
.s3-modal-close:hover { color: var(--ink); }

.s3-modal-grid {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 28px;
  align-items: center;
}

.s3-modal-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.s3-modal-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}

.s3-modal-fname {
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
}

.s3-modal-col .canvas-host {
  border: 1px solid var(--rule);
  background: var(--card-bg);
}
