/* The Den Desk — local, responsive, and deliberately un-clever. */
:root {
  color-scheme: dark;
  --ink: #f7efe2;
  --muted: #d3c5b3;
  --night: #151b21;
  --panel: #202a32;
  --panel-2: #29363f;
  --line: #63727c;
  --amber: #ffb65a;
  --amber-dark: #452c13;
  --teal: #72d8c2;
  --focus: #fff07a;
  --danger: #ffd6d1;
  --danger-bg: #5a211e;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); line-height: 1.6; }
img { display: block; max-width: 100%; }
button, select { font: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 5;
  padding: .75rem 1rem;
  background: var(--focus);
  color: #111;
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.hero {
  display: grid;
  min-height: 72vh;
  align-items: end;
  background: #0f1419;
  border-bottom: 1px solid var(--line);
}
.hero img { width: 100%; height: 55vh; object-fit: cover; object-position: center 45%; }
.hero-copy { padding: clamp(2rem, 7vw, 6rem); max-width: 52rem; }
.hero h1 { margin: 0; font-size: clamp(3.2rem, 9vw, 8rem); line-height: .88; letter-spacing: -.055em; }
.hero-copy > p:last-child { max-width: 42rem; font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--muted); }

main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
section { padding: clamp(4rem, 9vw, 8rem) 0; border-bottom: 1px solid var(--line); }
h2 { margin: 0; font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1; letter-spacing: -.035em; }
h3 { line-height: 1.2; }
.eyebrow { margin: 0 0 .7rem; color: var(--amber); font-size: .78rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.section-heading { margin-bottom: 2.25rem; }

.loading-state, .error-state, .empty-state { grid-column: 1 / -1; padding: 1rem; border-radius: 10px; }
.loading-state { color: var(--muted); border: 1px dashed var(--line); }
.error-state { color: var(--danger); background: var(--danger-bg); border: 2px solid #e7867d; }
[hidden] { display: none !important; }

.team-grid, .task-grid { display: grid; gap: 1rem; }
.agent-card, .task-card {
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 35px rgb(0 0 0 / .18);
}
.agent-card { border-top: 5px solid var(--amber); }
.initials {
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #24180b;
  font-weight: 900;
}
.agent-card h3, .task-card h3 { margin: 1rem 0 .4rem; font-size: 1.35rem; }
.agent-role { color: var(--teal); font-weight: 800; }
.model-label { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; overflow-wrap: anywhere; }
.agent-bio, .task-card > p { color: var(--muted); }

.workflow-list { display: grid; gap: 1rem; padding: 0; list-style: none; counter-reset: stage; }
.workflow-list li { position: relative; padding: 1.35rem; border-left: 5px solid var(--amber); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; }
.workflow-list span { display: block; color: var(--amber); font-family: ui-monospace, monospace; }
.workflow-list strong { display: block; font-size: 1.35rem; }
.workflow-list small { color: var(--muted); font-size: .95rem; }

.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.filters legend { padding: 0 .4rem; color: var(--amber); font-weight: 900; }
.control { display: grid; flex: 1 1 13rem; gap: .35rem; }
.control label { font-weight: 800; }
select, button { min-height: 3rem; border: 2px solid #8797a1; border-radius: 9px; }
select { width: 100%; padding: .55rem 2.5rem .55rem .75rem; background: #12191e; color: var(--ink); }
button { padding: .55rem 1rem; background: var(--amber); color: #24180b; font-weight: 900; cursor: pointer; }
button:disabled { opacity: .58; cursor: not-allowed; }
#result-status { min-height: 1.6em; color: var(--teal); font-weight: 800; }
.status-badge { display: inline-block; width: fit-content; margin: 0; padding: .18rem .65rem; border: 2px solid currentColor; border-radius: 999px; color: var(--ink) !important; font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status-research { background: #28506a; }
.status-build { background: #5c3b14; }
.status-review { background: #4d3768; }
.status-integrate { background: #245442; }
.specialist-label { font-weight: 800; }

footer { padding: 3rem 1rem; text-align: center; color: var(--muted); }

@media (min-width: 640px) {
  .hero { grid-template-columns: minmax(18rem, .85fr) minmax(24rem, 1.15fr); align-items: stretch; }
  .hero-copy { align-self: center; }
  .hero img { height: 72vh; }
  .team-grid, .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .task-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workflow-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workflow-list li:not(:last-child)::after { content: "→"; position: absolute; right: -1.1rem; top: 50%; z-index: 1; color: var(--amber); font-size: 1.6rem; transform: translateY(-50%); }
}

@media (max-width: 640px) {
  main { width: min(100% - 1.25rem, 1180px); }
  .hero-copy { order: 2; }
  .hero img { order: 1; height: 52vh; }
  .filters { align-items: stretch; flex-direction: column; }
  .filters > * { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
