@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Caveat:wght@500;600&display=swap');

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: #0a0a0a;
  color: #e0e0e0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── Hero ─── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  text-align: center;
  padding: 4rem 2rem 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #888;
  max-width: 560px;
}

.hero-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #666;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta .dot { color: #333; }

.clock {
  color: #06b6d4;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ─── Controls bar ─── */
.controls {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ─── Tabs + hand-drawn hints ─── */
.tab-bar {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.tab-hints {
  display: flex;
  justify-content: center;
  pointer-events: none;
  color: #e879f9;
}

.tab-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
}

.hint-text {
  font-family: 'Caveat', 'Kalam', cursive;
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.05;
  color: inherit;
  white-space: nowrap;
  transform: rotate(-2deg);
}

.hint-arrow {
  width: 44px;
  height: 34px;
  stroke: currentColor;
  fill: none;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 2px;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 999px;
  padding: 4px;
}

.tab { text-align: center; }

.tab {
  background: transparent;
  border: none;
  color: #888;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease, background 0.2s ease;
}

.tab:hover { color: #e0e0e0; }

.tab.is-active {
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  color: #fff;
}

/* ─── Filter bar ─── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

#filter-categories { display: contents; }

.filter-chip {
  background: #111;
  border: 1px solid #222;
  border-radius: 999px;
  color: #aaa;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.filter-chip:hover { color: #fff; border-color: #444; }

.filter-chip.is-active {
  background: #1a1a1a;
  color: #fff;
  border-color: #a855f7;
}

/* ─── View container ─── */
.roadmap {
  padding: 0 2rem 5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.view[hidden] { display: none; }

.loading {
  color: #666;
  text-align: center;
  padding: 3rem 0;
}

/* ─── Card grid view ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  background: #111;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #222;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: transparent;
  outline: none;
}

.card:hover::before, .card:focus-visible::before { opacity: 1; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-title { font-size: 1.1rem; font-weight: 600; color: #e0e0e0; }

.card-category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  color: #a855f7;
  border: 1px solid #a855f744;
}

.card-summary { color: #999; font-size: 0.9rem; flex: 1; }

.card-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #888;
  font-family: ui-monospace, 'Cascadia Code', monospace;
}

.card-date-label { color: #555; margin-right: 0.25rem; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

/* ─── Pills ─── */
.pill {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 999px;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  color: #aaa;
  white-space: nowrap;
}

.pill-status-active, .pill-status-in-progress {
  color: #22c55e;
  border-color: #22c55e55;
  background: #22c55e11;
}

.pill-status-planned {
  color: #3b82f6;
  border-color: #3b82f655;
  background: #3b82f611;
}

.pill-status-done, .pill-status-completed {
  color: #888;
  border-color: #44444488;
}

.pill-overdue { color: #ef4444; border-color: #ef444455; background: #ef444411; }
.pill-soon    { color: #f59e0b; border-color: #f59e0b55; background: #f59e0b11; }

/* ─── Board (swimlane) view ─── */
.board {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.swimlane {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-radius: 14px;
  overflow: hidden;
}

.swimlane-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #111 0%, #0d0d0d 100%);
}

.swimlane-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e0e0e0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.swimlane-marker {
  width: 6px; height: 24px;
  border-radius: 3px;
  background: linear-gradient(180deg, #a855f7, #06b6d4);
  flex-shrink: 0;
}

.swimlane-count { font-size: 0.75rem; color: #666; }

.swimlane-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #1a1a1a;
}

.lane-column {
  background: #0a0a0a;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 120px;
}

.lane-column-header {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #1e1e1e;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lane-column[data-status="planned"] .lane-column-header { color: #3b82f6; }
.lane-column[data-status="in-progress"] .lane-column-header { color: #22c55e; }
.lane-column[data-status="done"] .lane-column-header { color: #888; }

.lane-column-count {
  background: #161616;
  color: #aaa;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  font-family: ui-monospace, monospace;
}

.lane-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  text-align: left;
  font: inherit;
  color: inherit;
}

.lane-card:hover, .lane-card:focus-visible {
  border-color: #a855f7aa;
  transform: translateY(-2px);
  outline: none;
}

.lane-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 0.4rem;
}

.lane-card-summary {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lane-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.lane-card-date {
  font-size: 0.7rem;
  color: #666;
  font-family: ui-monospace, monospace;
}

.lane-empty {
  font-size: 0.8rem;
  color: #333;
  font-style: italic;
  padding: 0.5rem 0;
  text-align: center;
}

/* ─── List view ─── */
.list-wrap {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  overflow-x: auto;
}

.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.list-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #1a1a1a;
  background: #111;
  white-space: nowrap;
}

.list-table thead th.col-center { text-align: center; }

.list-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.list-table tbody tr:hover { background: #121212; }

.list-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #141414;
  color: #ccc;
  vertical-align: middle;
}

.list-table tbody tr:last-child td { border-bottom: none; }

.list-table .col-center { text-align: center; }

.list-item-title {
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 0.2rem;
}

.list-item-summary {
  font-size: 0.8rem;
  color: #888;
  max-width: 400px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-date {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: #999;
  white-space: nowrap;
}

.list-date.muted { color: #444; }

.list-count {
  font-family: ui-monospace, monospace;
  color: #888;
  font-size: 0.85rem;
}

/* ─── Modal ─── */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 50;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: #111;
  border: 1px solid #222;
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.25rem 2rem 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #888;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
}

.modal-close:hover { color: #fff; }

.modal-header {
  border-bottom: 1px solid #222;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.modal-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #a855f7;
  border: 1px solid #a855f744;
  margin-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.modal-summary { color: #999; font-size: 0.95rem; margin-bottom: 0.75rem; }

.modal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #888;
  font-family: ui-monospace, monospace;
}

.modal-date-label {
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
  margin-right: 0.3rem;
}

.modal-body { display: flex; flex-direction: column; gap: 1.5rem; }

.block { display: flex; flex-direction: column; gap: 0.5rem; }

.block-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}

.task-list, .child-list, .people-list, .deadline-list, .section-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-item, .child-item, .people-item, .deadline-item {
  background: #161616;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: #ccc;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.task-main { flex: 1; min-width: 0; }

.task-title { color: #e0e0e0; }

.task-dates {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: #777;
  font-family: ui-monospace, monospace;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.task-status { flex-shrink: 0; }

.people-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, #a855f733, #06b6d433);
  border: 1px solid #333;
  color: #e0e0e0;
  flex-shrink: 0;
}

.people-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.people-name { color: #e0e0e0; font-weight: 500; }

.people-note { color: #888; font-size: 0.8rem; }

.section-block {
  background: #141414;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 1rem 1.25rem;
}

.section-block-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 0.75rem;
}

.empty-note {
  color: #555;
  font-size: 0.85rem;
  font-style: italic;
}

/* ─── Footer ─── */
.site-footer {
  text-align: center;
  padding: 3rem 2rem 2.5rem;
  color: #666;
  font-size: 0.85rem;
  border-top: 1px solid #1a1a1a;
}

.footer-brand {
  color: #e0e0e0;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin-bottom: 1.75rem;
}

.footer-offices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto 1.75rem;
}

.office {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  text-align: left;
}

.office-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a855f7;
  margin-bottom: 0.35rem;
}

.office-city { color: #e0e0e0; font-weight: 500; font-size: 0.9rem; }

.office-street { color: #888; font-size: 0.82rem; }

.footer-contact a {
  color: #06b6d4;
  text-decoration: none;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.85rem;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.footer-contact a:hover { color: #22d3ee; border-bottom-color: #22d3ee55; }

.footer-updated {
  margin-top: 1.25rem;
  color: #444;
  font-size: 0.72rem;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  letter-spacing: 0.02em;
}

.list-row-context { color: #666; }

@media (max-width: 520px) {
  .footer-offices { grid-template-columns: 1fr; }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .swimlane-body { grid-template-columns: 1fr; }
  .lane-column { border-bottom: 1px solid #1a1a1a; }
  .lane-column:last-child { border-bottom: none; }
  .list-item-summary { max-width: 200px; }
}

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .controls { flex-direction: column; align-items: stretch; }
  .tabs { justify-content: center; }
  .filter-bar { justify-content: center; }
  .modal { padding: 1rem; }
  .modal-panel { padding: 2rem 1.25rem 1.5rem; }
  .hero h1 { font-size: 2.2rem; }
}
