/* ==========================================================================
   RVThere Labs — page-specific components
   ========================================================================== */

/* --- Home: timeline ----------------------------------------------------- */

.timeline {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.timeline > * {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 760px) {
  .timeline { grid-template-columns: repeat(4, 1fr); }

  .timeline > * {
    padding: 26px 24px 30px 0;
    border-right: 1px solid var(--rule);
    border-bottom: 0;
  }

  .timeline > *:last-child { border-right: 0; }
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent);
  margin-bottom: 10px;
}

.timeline__title { font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.timeline__desc { font-size: var(--text-sm); line-height: 1.55; color: var(--text-muted); }

/* --- Home: product dialog ----------------------------------------------- */

.dialog {
  border: 1px solid var(--rule-mid);
  border-radius: 18px;
  background: var(--ink-raised);
  color: var(--text);
  padding: 0;
  width: min(680px, calc(100vw - 32px));
  max-height: min(84vh, 780px);
  overflow: auto;
  overscroll-behavior: contain;
}

.dialog::backdrop {
  background: rgba(4, 4, 6, .72);
  backdrop-filter: blur(8px);
}

.dialog__inner { padding: clamp(26px, 4vw, 42px); }

.dialog__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.dialog__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--rule-mid);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.dialog__close:hover { border-color: var(--text); color: var(--text); }

.dialog h2 {
  font-size: clamp(24px, 1.2rem + 1.6vw, 32px);
  margin-bottom: 6px;
}

.dialog__tagline {
  font-size: var(--text-base);
  color: var(--accent);
  margin-bottom: 20px;
}

.dialog__desc {
  font-size: var(--text-base);
  line-height: 1.7;
  color: #C6C9D0;
  margin-bottom: 30px;
}

.layer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 30px;
}

.layer {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 13px 17px;
  background: rgba(255, 255, 255, .02);
}

.layer::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.layer__name { font-size: 14px; font-weight: 500; }
.layer__role { font-size: var(--text-sm); color: var(--text-muted); margin-left: auto; }

/* --- Home: centrepiece banner ------------------------------------------- */

.centrepiece {
  display: block;
  border: 1px solid var(--accent-line);
  border-radius: 22px;
  padding: clamp(38px, 5vw, 68px);
  background:
    radial-gradient(ellipse 70% 120% at 82% 0%, rgba(77, 163, 255, .12), transparent 62%),
    var(--ink-raised);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.centrepiece:hover {
  border-color: rgba(77, 163, 255, .68);
  transform: translateY(-2px);
}

.centrepiece__grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.centrepiece h2 {
  font-size: clamp(28px, 1.4rem + 2vw, 42px);
  margin: 16px 0 14px;
}

/* --- Atlas OS: knowledge graph ------------------------------------------ */

.graph-layout {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

@media (min-width: 940px) {
  .graph-layout { grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); }
}

.graph {
  border: 1px solid var(--rule);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(77, 163, 255, .05), transparent 70%),
    var(--ink-sunken);
  padding: 12px;
}

.graph svg { display: block; width: 100%; height: auto; }

.graph__node { cursor: pointer; }

.graph__node circle {
  transition: fill var(--dur) var(--ease), stroke var(--dur) var(--ease);
}

.graph__node:hover circle { stroke: var(--accent); }
.graph__node text { pointer-events: none; user-select: none; }
.graph__node:focus { outline: none; }
.graph__node:focus-visible circle { stroke: var(--accent); stroke-width: 2.5; }

.graph__edge { transition: stroke var(--dur) var(--ease); }

.detail {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ink-raised);
  padding: clamp(24px, 3vw, 34px);
  position: sticky;
  top: 102px;
}

.detail__kind {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.detail h2 {
  font-size: clamp(22px, 1.1rem + 1vw, 28px);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.1;
  margin: 10px 0 18px;
}

.detail p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.detail__label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }

.chips li {
  font-size: var(--text-meta);
  color: var(--text-muted);
  border: 1px solid var(--rule-mid);
  border-radius: 999px;
  padding: 5px 12px;
}

/* --- AI Factory: pipeline ----------------------------------------------- */

.pipeline {
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--ink-sunken);
  overflow: hidden;
}

.pipeline__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-dim);
  letter-spacing: .06em;
}

.pipeline__canvas { padding: 14px; overflow-x: auto; }
.pipeline__canvas svg { display: block; min-width: 780px; width: 100%; height: auto; }

.dag-node rect { transition: stroke var(--dur) var(--ease), fill var(--dur) var(--ease); }
.dag-node:hover rect { stroke: var(--accent); fill: var(--ink-raised-2); }
.dag-node text { pointer-events: none; user-select: none; }

.flow-dot { fill: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .flow-dot { display: none; }
}

/* Activity feed */
.feed-layout {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 900px) {
  .feed-layout { grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); }
}

.feed {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ink-raised);
  overflow: hidden;
}

.feed__head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.feed__list { list-style: none; margin: 0; padding: 6px 0; }

.feed__list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
  padding: 10px 20px;
  font-size: var(--text-sm);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.feed__list li:last-child { border-bottom: 0; }

.feed__time {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-dim);
  width: 34px;
  flex-shrink: 0;
}

.feed__agent {
  font-weight: 600;
  color: var(--accent-bright);
  width: 118px;
  flex-shrink: 0;
}

.feed__msg { color: var(--text-muted); flex: 1 1 240px; }

.stat-stack { display: grid; gap: 16px; align-content: start; }

.stat {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ink-raised);
  padding: 26px;
}

.stat__val {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 6px;
}

/* --- Consulting: phases + case studies ---------------------------------- */

.phase {
  border-left: 2px solid var(--accent-line);
  padding: 4px 0 28px 26px;
  position: relative;
}

.phase:last-child { padding-bottom: 0; }

.phase::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--ink);
}

.phase__name {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.phase p { font-size: 14.5px; line-height: 1.68; color: var(--text-muted); }

.case { display: flex; flex-direction: column; gap: 12px; }

.case__client {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.case__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.case__body { font-size: 14px; line-height: 1.62; color: var(--text-muted); flex: 1; margin: 0; }

.case__figures {
  display: flex;
  gap: 26px;
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  margin-top: 4px;
}

.figure__val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.02em;
}

.figure__label { font-size: var(--text-meta); color: var(--text-dim); margin-top: 2px; }

/* --- Open source: repos + roadmap --------------------------------------- */

.repo__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.repo__name { font-family: var(--font-mono); font-size: 14.5px; color: var(--text); }
.repo__lang { font-size: var(--text-meta); color: var(--text-dim); }

.repo__foot {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--text-dim);
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}

.badge {
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid currentColor;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.badge--active { color: var(--mint); }
.badge--beta { color: var(--amber); }

.roadmap { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

.roadmap th,
.roadmap td {
  border: 1px solid var(--rule);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.roadmap thead th {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 400;
  background: rgba(255, 255, 255, .02);
}

.roadmap tbody th {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent);
  white-space: nowrap;
}

.roadmap td { color: var(--text-muted); }
.roadmap td:empty::after { content: '·'; color: var(--text-dim); }

.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 680px; }

/* --- Contact ------------------------------------------------------------ */

.contact-layout { display: grid; gap: clamp(36px, 5vw, 72px); align-items: start; }

@media (min-width: 900px) {
  .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); }
}

.people { border-top: 1px solid var(--rule); margin: 34px 0; }

.people__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
}

.people__role {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.inbox { display: flex; flex-direction: column; gap: 12px; }

.inbox__row { display: flex; justify-content: space-between; gap: 18px; font-size: 14.5px; flex-wrap: wrap; }
.inbox__label { font-family: var(--font-mono); font-size: var(--text-meta); color: var(--text-dim); }
.inbox__row a { color: var(--accent); }

.form {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ink-raised);
  padding: clamp(24px, 3vw, 34px);
  display: grid;
  gap: 14px;
}

.form__pair { display: grid; gap: 14px; }

@media (min-width: 560px) {
  .form__pair { grid-template-columns: 1fr 1fr; }
}

.field { display: grid; gap: 7px; }

.field label {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field input,
.field textarea {
  width: 100%;
  background: var(--ink-sunken);
  border: 1px solid var(--rule-mid);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea { resize: vertical; min-height: 130px; }

.form__note { font-size: var(--text-meta); color: var(--text-dim); }

.form-success {
  border: 1px solid var(--accent-line);
  border-radius: 16px;
  background: var(--accent-wash);
  padding: clamp(26px, 4vw, 40px);
  text-align: center;
}

.form-success h2 { font-size: 24px; margin-bottom: 12px; }
.form-success p { font-size: 14.5px; color: var(--text-muted); margin-bottom: 22px; }

/* Honeypot — off-screen for sighted users, hidden from assistive tech. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Blog: featured post ------------------------------------------------ */

.featured {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
  border: 1px solid var(--rule-mid);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 52px);
  background:
    radial-gradient(ellipse 60% 100% at 88% 10%, rgba(77, 163, 255, .10), transparent 62%),
    var(--ink-raised);
}

@media (min-width: 900px) {
  .featured { grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); }
}

.featured h2 { font-size: clamp(24px, 1.2rem + 1.6vw, 34px); margin: 16px 0 14px; }
.featured p { font-size: 15px; line-height: 1.68; color: var(--text-muted); margin-bottom: 22px; }

.code {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--ink-sunken);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  overflow-x: auto;
  color: var(--text-muted);
}

.code .c { color: var(--text-dim); }
.code .k { color: var(--violet); }
.code .f { color: var(--accent-bright); }
.code .s { color: var(--mint); }

/* --- Careers ------------------------------------------------------------ */

.role__team { color: var(--text-muted); }
.role__loc { color: var(--text-dim); }

/* --- Blog post + comments ----------------------------------------------- */

.post-head { padding-block: clamp(48px, 3rem + 3.5vw, 92px) clamp(24px, 2vw, 40px); }
.post-head h1 { font-size: var(--text-h1); margin: 16px 0 20px; }

.post-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--text-dim);
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}

.draft-note {
  border: 1px dashed var(--amber);
  border-radius: 12px;
  background: rgba(232, 178, 92, .07);
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.draft-note strong { color: var(--amber); }

.comments { border-top: 1px solid var(--rule); padding-top: clamp(30px, 3vw, 48px); }

.comment-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 14px; }

.comment {
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--ink-raised);
  padding: 20px 22px;
}

.comment__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 9px;
}

.comment__author { font-size: 15px; font-weight: 600; }
.comment__date { font-family: var(--font-mono); font-size: var(--text-micro); color: var(--text-dim); }

.comment__body {
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--text-muted);
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-error { color: var(--text-dim); font-size: 14px; }

.comment-status {
  margin: 14px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid var(--rule-mid);
}

.comment-status[hidden] { display: none; }
.comment-status.is-good { border-color: var(--mint); background: rgba(95, 199, 154, .10); color: var(--text); }
.comment-status.is-bad  { border-color: var(--rose); background: rgba(224, 123, 156, .10); color: var(--text); }

.moderation-note {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-dim);
  margin-top: 12px;
}

/* --- Downloads ----------------------------------------------------------- */

.download-list { display: grid; gap: 14px; }

.download {
  display: grid;
  gap: 12px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--ink-raised);
  padding: 24px 26px;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.download:hover { border-color: var(--accent-line); transform: translateY(-2px); }

.download__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: baseline;
}

.download__cat {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 3px 10px;
}

.download__meta { font-family: var(--font-mono); font-size: var(--text-micro); color: var(--text-dim); }

.download__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.download__desc {
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--text-muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.download__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 15px;
}

.download__file {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--text-dim);
  overflow-wrap: anywhere;
  min-width: 0;
}

.download__btn { padding: 10px 22px; font-size: 14px; flex-shrink: 0; }
