/* Taskwright AI — documentation site. On-brand with the desktop app's dark theme. */

:root {
  --bg: #0e1117;
  --bg-elev: #161b22;
  --bg-card: #1c2430;
  --bg-card-hover: #222c3a;
  --border: #2a3340;
  --border-soft: #232b36;
  --text: #e6edf3;
  --text-dim: #8b97a7;
  --text-faint: #5c6675;
  --accent: #5b8cff;
  --accent-2: #6f9bff;
  --accent-dim: #2d4373;
  --green: #3fb950;
  --amber: #d29922;
  --radius: 12px;
  --maxw: 1080px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  color: #cdd9e5;
}

.brand-mark {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(14, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}
.nav-brand:hover {
  text-decoration: none;
}
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-gh {
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 40px) clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-inner {
  min-width: 0;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(91, 140, 255, 0.1);
  border: 1px solid var(--accent-dim);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #fff, #b9c4d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-dim);
  margin: 0 0 28px;
}
.lede strong {
  color: var(--text);
  font-weight: 600;
}
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-2);
}
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--bg-elev);
}
.btn-ghost:hover {
  background: var(--bg-card);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badges img {
  height: 20px;
}

/* Board preview (CSS only) */
.board-preview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.bp-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bp-h {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-faint);
  white-space: nowrap;
}
.bp-card {
  height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}
.bp-running .bp-h {
  color: var(--accent);
}
.bp-busy {
  border-color: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
.bp-done {
  border-left: 3px solid var(--green);
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 40px);
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: 72px;
}
.section h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}
.section h3 {
  font-size: 17px;
  margin: 0 0 8px;
}
.section-sub {
  color: var(--text-dim);
  max-width: 72ch;
  margin: 0 0 28px;
}

/* Grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.feature:hover {
  background: var(--bg-card);
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.feature h3 {
  color: var(--text);
}
.feature p {
  color: var(--text-dim);
  margin: 0;
  font-size: 14.5px;
}

/* Download cards */
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.dl-card:hover {
  text-decoration: none;
  background: var(--bg-card);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.dl-os {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.dl-file {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 12.5px;
  color: var(--text-dim);
  word-break: break-all;
}
.dl-file small {
  color: var(--text-faint);
}
.dl-go {
  margin-top: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

/* Two-column layout */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

/* Steps */
.steps {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
}
.steps li {
  margin-bottom: 10px;
}
.steps strong {
  color: var(--text);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
}
th {
  background: var(--bg-elev);
  color: var(--text);
  font-size: 13px;
}
th small {
  color: var(--text-faint);
  font-weight: 400;
}
td {
  color: var(--text-dim);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--bg-elev);
}

/* Code block */
.code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 14px;
}
.code code {
  background: none;
  border: none;
  padding: 0;
  color: #cdd9e5;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre;
}

/* Notes */
.note {
  margin-top: 22px;
  background: rgba(210, 153, 34, 0.08);
  border: 1px solid rgba(210, 153, 34, 0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: #e8d6a8;
  font-size: 14px;
}
.note strong {
  color: #f3e3b8;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  margin-top: 24px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 14px;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-dim);
}
.footer-links a:hover {
  color: var(--text);
}
.muted {
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .board-preview {
    order: -1;
  }
  .cols-2 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
@media (max-width: 560px) {
  .nav-links {
    gap: 14px;
  }
  .nav-links a:not(.nav-gh) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition: none !important;
  }
}
