/* ============================================================
   Neural Floorplan. Header, hero, footer, base typography, and the
   common case-study components (.text, .section-title, tables,
   references, arch-box) come from the shared subpage system
   (shared/site.css). This file keeps the project's bespoke
   components: strategy cards, phase blocks, primitive grids, the
   D3 decoder diagram, result rows, settings table, and image grids.
   ============================================================ */

/*-----------------------------------------------------------------*/
/* Hero action button                                               */
/*-----------------------------------------------------------------*/

/* "Open interactive demo" button, sitting directly below the hero title.
   Matches .btn-map on the No True North subpage. */
.hero-actions { margin-top: var(--space-3); }
.btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.78rem 1.7rem;
  font-size: calc(var(--fs-small) * 1.2);
  font-weight: var(--w-medium);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn-demo:hover { background: var(--bg-elev); border-color: var(--accent); color: var(--accent-strong); }

/* What the visitor is actually about to open. The stage-by-stage walkthrough
   is real pipeline output, but it is replayed rather than inferred live, and
   saying so here costs one line and prevents the demo from over-promising
   before it has loaded. */
.hero-actions__note {
  margin: var(--space-2) 0 0;
  max-width: 46ch;
  font-size: var(--fs-meta);
  line-height: 1.6;
  color: var(--ink-3);
}

/*-----------------------------------------------------------------*/
/* Status badges                                                    */
/*-----------------------------------------------------------------*/

.status-badge {
  display: inline-block;
  font-size: clamp(9px, 1.2vw, 11px);
  font-weight: bold;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 2px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
}

.status-done    { background: #edfaed; color: #276749; }
.status-planned { background: #f2f2f2; color: #888;    }

/*-----------------------------------------------------------------*/
/* Section Titles & Body Text                                       */
/*-----------------------------------------------------------------*/

.section-title {
  font-size: clamp(12px, 2.5vw, 25px);
  font-weight: bold;
  margin: 90px 0 20px 0;
  color: black;
}

.subsection-title {
  font-size: clamp(11px, 2vw, 20px);
  font-weight: bold;
  margin: 44px 0 14px 0;
  color: #222;
}

.text {
  font-size: clamp(10px, 1.6vw, 16px);
  line-height: 1.6;
  color: #636363;
  text-align: justify;
}

.text code, code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background: #f2f2f2;
  padding: 1px 4px;
  border-radius: 2px;
  color: #333;
}

/*-----------------------------------------------------------------*/
/* Pipeline ordered list — two-column (title | description)        */
/*-----------------------------------------------------------------*/

.pipeline-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  counter-reset: pipeline-counter;
}

.pipeline-list li {
  display: grid;
  grid-template-columns: 2.4em clamp(130px, 21%, 210px) 1fr;
  gap: 0 14px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid #f0f0f0;
  counter-increment: pipeline-counter;
}

.pipeline-list li:last-child {
  border-bottom: none;
}

.pipeline-list li::before {
  content: counter(pipeline-counter, decimal-leading-zero);
  font-weight: bold;
  color: #ccc;
  font-size: clamp(9px, 1.1vw, 11px);
  padding-top: 1px;
}

.pl-title {
  font-size: clamp(10px, 1.5vw, 15px);
  font-weight: bold;
  color: #222;
  line-height: 1.45;
}

.pl-desc {
  font-size: clamp(9px, 1.35vw, 13px);
  color: #666;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .pipeline-list li {
    grid-template-columns: 2.4em 1fr;
    grid-template-rows: auto auto;
    gap: 0 10px;
  }
  .pl-title { grid-column: 2; grid-row: 1; }
  .pl-desc  { grid-column: 2; grid-row: 2; margin-top: 2px; }
}

/*-----------------------------------------------------------------*/
/* Uniform content boxes (arch-box, settings, strategy)           */
/*-----------------------------------------------------------------*/

.arch-box {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 16px 20px;
  margin: 20px 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(9px, 1.35vw, 13px);
  color: #444;
  line-height: 1.6;
}

.arch-box b {
  font-size: clamp(10px, 1.45vw, 14px);
  color: #111;
  display: block;
  margin-bottom: 10px;
}

/*-----------------------------------------------------------------*/
/* Raster-to-Graph settings — two-column, no grid lines            */
/*-----------------------------------------------------------------*/

.settings-table {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.settings-row {
  display: table-row;
}

.settings-key,
.settings-val,
.settings-desc {
  display: table-cell;
  padding: 4px 0;
  line-height: 1.55;
  vertical-align: top;
  color: #111;
}

.settings-key {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(8px, 1.2vw, 12px);
  font-weight: bold;
  padding-right: 16px;
  width: 38%;
  white-space: nowrap;
}

.settings-val {
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(8px, 1.2vw, 12px);
  padding-right: 20px;
  width: 12%;
  white-space: nowrap;
}

.settings-desc {
  font-family: Helvetica, Arial, sans-serif;
  font-size: clamp(8px, 1.15vw, 11px);
  color: #444;
}

/*-----------------------------------------------------------------*/
/* Image Grids                                                      */
/*-----------------------------------------------------------------*/

.image-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.image-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}

/* 3-column: two images + text panel */
.image-3col-compare {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 16px;
  margin: 20px 0;
  align-items: stretch;
}

.image-3col-compare .img-card img {
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

/* 1×6 horizontal augmentation strip */
.image-6strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.image-6strip .img-card img {
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

.image-6strip .img-label {
  font-size: clamp(7px, 0.9vw, 9px);
}

@media (max-width: 640px) {
  .image-3col          { grid-template-columns: 1fr 1fr; }
  .image-4col          { grid-template-columns: 1fr 1fr; }
  .image-6strip        { grid-template-columns: repeat(3, 1fr); }
}

/*-----------------------------------------------------------------*/
/* Decoder diagram container                                       */
/*-----------------------------------------------------------------*/

.decoder-diagram {
  width: 100%;
  margin: 24px 0 8px 0;
  overflow-x: auto;
}

.decoder-diagram svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 180px;
}

.img-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.img-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Force square crop on images; aspect-ratio on img keeps label visible outside */
.process-grid .img-card img,
.image-4col .img-card img {
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

/* Decoder + FloorplanDecoder side by side */
.arch-side-by-side {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
  margin: 16px 0 8px 0;
}

.arch-side-by-side .decoder-diagram {
  margin: 0;
  max-width: 340px;
}

@media (max-width: 640px) {
  .arch-side-by-side {
    grid-template-columns: 1fr;
  }
  .arch-side-by-side .decoder-diagram {
    max-width: 100%;
  }
}

.img-label {
  font-size: clamp(9px, 1.2vw, 11px);
  color: #888;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/*-----------------------------------------------------------------*/
/* Result rows                                                     */
/*-----------------------------------------------------------------*/

.result-row {
  margin: 32px 0;
}

.result-row-label {
  font-size: clamp(9px, 1.3vw, 12px);
  color: #aaa;
  margin-bottom: 8px;
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/*-----------------------------------------------------------------*/
/* Technical table                                                 */
/*-----------------------------------------------------------------*/

.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: clamp(9px, 1.4vw, 13px);
}

.tech-table tbody tr {
  border-bottom: 1px solid #eee;
}

.tech-table tbody tr:first-child {
  border-top: 1px solid #e0e0e0;
}

.tech-table td {
  padding: 7px 12px;
  color: #636363;
  vertical-align: top;
  line-height: 1.45;
}

.tech-table td:first-child {
  font-weight: bold;
  color: #333;
  width: 26%;
  white-space: nowrap;
}

/*-----------------------------------------------------------------*/
/* Two-model strategy grid                                         */
/*-----------------------------------------------------------------*/

.strategy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 16px 0;
}

.strategy-card {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 18px 20px;
}

.strategy-card-title {
  font-size: clamp(10px, 1.6vw, 15px);
  font-weight: bold;
  margin-bottom: 10px;
  color: #222;
}

.strategy-card-body {
  font-size: clamp(9px, 1.35vw, 13px);
  color: #555;
  line-height: 1.6;
}

.strategy-card-img {
  margin-top: 14px;
}

.strategy-card-img-frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  width: 100%;
}

.strategy-card-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*-----------------------------------------------------------------*/
/* Vectorization subsection with right-side image                  */
/*-----------------------------------------------------------------*/

.subsection-with-image {
  display: grid;
  grid-template-columns: 1fr minmax(0, clamp(180px, 28%, 280px));
  gap: 24px;
  align-items: start;
  margin: 28px 0 8px 0;
}

.subsection-with-image .subsection-title {
  margin-top: 0;
}

.subsection-img {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}

.subsection-img img,
.subsection-img .placeholder-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.subsection-img .placeholder-img {
  aspect-ratio: 3 / 2;
}

@media (max-width: 640px) {
  .subsection-with-image {
    grid-template-columns: 1fr;
  }
}

/*-----------------------------------------------------------------*/
/* Semantic primitive intro grid — equal-height image cells        */
/*-----------------------------------------------------------------*/

.primitive-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
  align-items: stretch;
}

@media (max-width: 640px) {
  .primitive-intro-grid { grid-template-columns: 1fr; }
}

.primitive-pair-cell {
  display: flex;
  flex-direction: column;
}

.primitive-pair-img {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 12px;
  min-height: 160px;
}

.primitive-pair-img img {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/*-----------------------------------------------------------------*/
/* Phase 4 sample process grid (2 rows x 4 cols)                  */
/*-----------------------------------------------------------------*/

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 36px 0;
}

@media (max-width: 640px) {
  .process-grid { grid-template-columns: 1fr 1fr; }
}

/*-----------------------------------------------------------------*/
/* Development phase blocks                                        */
/*-----------------------------------------------------------------*/

/* 3-column equal-height grid for Phases 1–3 */
.phase-blocks-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
  align-items: stretch;
}

@media (max-width: 640px) {
  .phase-blocks-3col { grid-template-columns: 1fr; }
}

.phase-block-equal {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
}

.phase-block-equal .subsection-title {
  margin-top: 0;
  font-size: clamp(10px, 1.5vw, 15px);
  margin-bottom: 10px;
}

/* Push phase image to bottom of card regardless of text length */
.phase-block-equal .img-card {
  margin-top: auto;
  padding-top: 14px;
}

/* Full-width Phase 4 block */
.phase-block-current {
  background: #f6fdf8;
  border: 1px solid #276749;
  border-radius: 3px;
  padding: clamp(16px, 2.5vw, 24px);
  margin: 20px 0;
}

.phase-block-current .subsection-title {
  margin-top: 0;
}

/*-----------------------------------------------------------------*/
/* Section separator                                               */
/*-----------------------------------------------------------------*/

.section-separator {
  border: none;
  border-top: 2px solid #c8c8c8;
  margin: 120px 0 60px 0;
}

/*-----------------------------------------------------------------*/
/* Current limitations list                                        */
/*-----------------------------------------------------------------*/

.limitations-list {
  margin: 16px 0 0 20px;
  padding: 0;
  font-size: clamp(10px, 1.5vw, 15px);
  color: #555;
  line-height: 1.7;
}

.limitations-list li {
  margin-bottom: 10px;
}

/*-----------------------------------------------------------------*/
/* References list                                                 */
/*-----------------------------------------------------------------*/

.references-list {
  margin: 20px 0 0 20px;
  padding: 0;
  font-size: clamp(9px, 1.3vw, 13px);
  color: #555;
  line-height: 1.75;
}

.references-list li + li {
  margin-top: 22px;
}

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

.footer {
  font-size: clamp(10px, 1.5vw, 15px);
  line-height: 1.5;
  height: 200px;
  margin: 100px 0 0 0;
  color: #636363;
}
