/*
 * trajecten-prototype.css — v3
 * ─────────────────────────────────────────────────────────────────
 * Styles for the Trajecten landing UX prototype.
 * All tokens from survey-shared.css — no new :root variables added.
 *
 * Layout: row list (Option B) with active/archived split,
 *         search field, auto-filter chips, sort hint.
 * Aesthetic: editorial brutal — sharp corners, flat fills, hard accents.
 */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Prototype banner ────────────────────────────────────────────── */
.proto-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--amber-soft);
  border-bottom: 2px solid var(--amber-border);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 24px;
}
.proto-banner svg { width: 15px; height: 15px; flex-shrink: 0; stroke: var(--amber); }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
  padding: 72px 40px 32px;
  max-width: 900px;
  margin: 20px auto 0;
}
.hero-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 10px;
  animation: fadeInUp .3s ease-out both;
}
.hero h1 {
  font-size: 34px; font-weight: 700; margin-bottom: 14px;
  animation: fadeInUp .35s .05s ease-out both;
}
.hero-tagline {
  font-size: 16px; color: var(--text-muted); max-width: 560px; line-height: 1.8;
  animation: fadeInUp .35s .1s ease-out both;
}

/* ── Controls bar (search + filters + sort) ──────────────────────── */
.traject-controls {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp .35s .12s ease-out both;
}

/* Search */
.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  stroke: var(--charcoal-60);
  pointer-events: none;
}
.search-field {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-family: 'Epilogue', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 0;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-field:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.search-field::placeholder { color: var(--charcoal-60); }
/* Remove default browser search clear button */
.search-field::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Stage filter + sort dropdowns */
.filter-select {
  font-family: 'Epilogue', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 0;
  padding: 7px 28px 7px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7a90' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.filter-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.filter-select:hover { border-color: var(--teal-mid); }

.sort-select { margin-left: auto; }

/* ── Traject list container ──────────────────────────────────────── */
.traject-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

/* ── Section header ("Actieve trajecten · 3") ────────────────────── */
.traject-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--charcoal-60);
}
.section-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--teal-soft);
  color: var(--teal-dark);
  border: 1.5px solid var(--teal-mid);
  border-radius: 2px;
  padding: 1px 7px;
  letter-spacing: .04em;
}

.traject-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Traject row ─────────────────────────────────────────────────── */
.traject-row {
  position: relative;          /* for overlay link */
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease-out, box-shadow .2s ease-out, border-left-color .2s ease;
  animation: fadeInUp .35s ease-out both;
  animation-delay: calc(var(--card-i, 0) * 70ms + 150ms);
}
.traject-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.traject-row--amber:hover { border-left-color: var(--amber); }
.traject-row--teal:hover  { border-left-color: var(--teal);  }
.traject-row--grey:hover  { border-left-color: var(--charcoal-60); }

/* ── Row: clickable link area (icon + body) ──────────────────────── */
/*
 * Using display:contents on the <a> so icon+body participate in the
 * parent grid directly. The link covers both cells, making them
 * navigable to the traject detail page.
 */
.traject-row-link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

/* Icon and body are grid children via display:contents */
.traject-row-icon {
  width: 44px; height: 44px;
  margin: 20px 0 20px 20px;   /* left padding on icon since row has no padding */
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.traject-row:hover .traject-row-icon { transform: scale(1.05); }
.traject-row-icon svg { width: 22px; height: 22px; }
.traject-row-icon--amber { background: var(--amber-soft);        color: var(--amber);      }
.traject-row-icon--teal  { background: var(--teal-soft);         color: var(--teal-dark);  }
.traject-row-icon--grey  { background: var(--surface2, #efefed); color: var(--charcoal-60);}

.traject-row-body {
  padding: 20px 0;
  min-width: 0;
}
.traject-row-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 16px; font-weight: 600; color: var(--text);
  margin-bottom: 4px; word-break: break-word;
}
/* Underline hint on name when link area is hovered */
.traject-row:hover .traject-row-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.traject-row-client {
  font-size: 13px; color: var(--text-muted);
}

/* ── Row: stage pill + phase ─────────────────────────────────────── */
.traject-row-stage {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 5px; white-space: nowrap; padding: 20px 0;
}
.stage-pill {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 2px;
}
.stage-pill--amber {
  background: var(--amber-soft); color: var(--amber); border: 1.5px solid var(--amber-border);
}
.stage-pill--teal {
  background: var(--teal-soft); color: var(--teal-dark); border: 1.5px solid var(--teal-mid);
}
.stage-pill--grey {
  background: var(--surface2, #efefed); color: var(--charcoal-60); border: 1.5px solid var(--border);
}
.traject-row-phase {
  font-size: 11px; color: var(--charcoal-60); letter-spacing: .02em;
}

/* ── Row: CTA cell ───────────────────────────────────────────────── */
.traject-row-cta-cell {
  white-space: nowrap; text-align: right; padding: 20px 20px 20px 0;
}
.traject-cta {
  display: inline-block; font-size: 13px; font-weight: 600;
  text-decoration: none; padding: 8px 16px; border-radius: 0;
  border: 2px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.traject-cta--amber { background: var(--amber); color: #fff; }
.traject-cta--amber:hover {
  background: transparent; border-color: var(--amber); color: var(--amber); transform: translateY(-1px);
}
.traject-cta--teal { background: var(--teal); color: #fff; }
.traject-cta--teal:hover {
  background: transparent; border-color: var(--teal); color: var(--teal); transform: translateY(-1px);
}
.traject-status {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: .03em; padding: 8px 0; color: var(--text-muted); font-style: italic;
}

/* ── Active/Archived divider ─────────────────────────────────────── */
.traject-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 28px 0 16px;
}
.traject-divider::before,
.traject-divider::after {
  content: ''; flex: 1; height: 1.5px; background: var(--border);
}
.traject-divider span {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--charcoal-60);
  white-space: nowrap;
}

/* ── Archived hint row (reduced opacity, "peek") ─────────────────── */
.traject-archived-hint .traject-row {
  opacity: .55;
  transition: opacity .2s ease, transform .2s ease-out,
              box-shadow .2s ease-out, border-left-color .2s ease;
}
.traject-archived-hint .traject-row:hover {
  opacity: 1;
}

/* ── Hidden archived rows ────────────────────────────────────────── */
.archived-rest--hidden { display: none; }

/* ── "Toon meer" button ──────────────────────────────────────────── */
.show-archived-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 10px 16px;
  font-family: 'Epilogue', sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--charcoal-60);
  background: var(--surface2, #f5f5f3);
  border: 1.5px dashed var(--border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.show-archived-btn:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  background: var(--teal-soft);
}

/* ── Empty state ─────────────────────────────────────────────────── */
.traject-empty {
  font-size: 14px; color: var(--text-muted); padding: 24px 0; font-style: italic;
}

/* ── Pulse wave indicator ────────────────────────────────────────── */
/* Shown only on multi-wave (pulse) trajecten. Subtle — supplementary info. */
.pulse-waves {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pulse-dot--done    { background: var(--charcoal-60); opacity: .5; }
.pulse-dot--active  { background: var(--teal); }
.pulse-dot--pending { background: transparent; border: 1.5px solid var(--charcoal-60); opacity: .4; }
.pulse-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--teal-dark);
  margin-left: 2px;
}

/* ── Responsive: stack on narrow viewports ───────────────────────── */
@media (max-width: 680px) {
  .hero           { padding: 48px 20px 24px; }
  .traject-controls,
  .traject-list   { padding-left: 20px; padding-right: 20px; }

  .traject-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
  }
  .traject-row-stage {
    grid-column: 2;
    grid-row: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0; padding-bottom: 0;
    gap: 8px;
  }
  .traject-row-cta-cell {
    grid-column: 1 / -1;
    grid-row: 3;
    text-align: left;
    padding: 0 20px 16px 20px;
  }
}

/* ── Accessibility: reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero h1, .hero-tagline,
  .traject-controls, .traject-row { animation: none; }
}

/* (Story 15-8) The Survey Monitor lens chip (.sm-lens-chip, 32-1b) is retired —
   the trajecten phase board's Monitor lens replaces it. Rules removed. */
