/* Agent Rooms signed-out pages: the landing page (/), invite-only, and the GitHub App setup page the server renders.
   The board's tokens (web/board.css): near-black panels, a mint accent and forest tints. System fonts, no external
   assets. The landing's live chart is the board's own component (web/timeline/timeline.css), restyled only below. */

:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #171a1e;
  --raised: #1f2328;
  --line: #2d3339;
  --soft: #20252a;
  --text: #edf1f2;
  --body: #b9c1c7;
  --muted: #939aa3;
  --dim: #858d95;
  --accent: #a8e0cd;
  --accent-hover: #c5eddc;
  --accent-ink: #18362c;
  --forest: #1e2a26;
  --forest-line: #2c3e36;
  --work: #7fd6b0;
  --need: #f0c36d;
  --radius: 12px;
  --wrap: 1200px;
  --gutter: 32px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  overflow-x: hidden; /* decorative glows never make the page scroll sideways */
  overflow-x: clip;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden; /* decorative glows never make the page scroll sideways */
  overflow-x: clip;
  background:
    radial-gradient(1000px 620px at 82% 6%, rgba(127, 214, 176, 0.075), transparent 70%),
    radial-gradient(760px 520px at 4% -12%, rgba(38, 74, 60, 0.42), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 30;
  padding: 0.5rem 0.8rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.skip:focus {
  top: 0.75rem;
}

/* ---- buttons ------------------------------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px rgba(168, 224, 205, 0.4), 0 10px 28px -10px rgba(127, 214, 176, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: #4a535b;
  color: var(--text);
}

.btn-small {
  min-height: 34px;
  padding: 0 0.85rem;
  border-radius: 8px;
  font-size: 13.5px;
}

.btn .arrow {
  transition: transform 0.15s ease;
}

.btn:hover .arrow {
  transform: translateX(2px);
}

.icon {
  display: block;
  flex: 0 0 auto;
}

/* ---- the signed-out shell: header, main, footer ---------------------------------------------------------------- */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header,
.site-footer,
.hero,
.proof,
.hero-wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.015em;
  text-decoration: none;
}

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

.logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.site-nav .btn {
  margin-left: 0.5rem;
}

main {
  flex: 1;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--soft);
  color: var(--muted);
  font-size: 13.5px;
}

.site-footer a {
  color: var(--body);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

/* ---- hero --------------------------------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 28rem) minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: 3.5rem;
  min-height: min(calc(100vh - 64px), 880px); /* the hero fills the window; the next section starts below the fold */
  min-height: min(calc(100svh - 64px), 880px);
  padding: 2rem 0 2.5rem;
}

/* a faint grid behind the hero, fading out from the chart */
.hero::before {
  content: "";
  position: absolute;
  inset: -64px 0 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 55% 65% at 68% 38%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 55% 65% at 68% 38%, #000 10%, transparent 72%);
  pointer-events: none;
}

.hero-copy {
  container-type: inline-size;
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem 0.3rem 0.65rem;
  border: 1px solid var(--forest-line);
  border-radius: 999px;
  background: rgba(30, 42, 38, 0.65);
  color: var(--accent);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.005em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--work);
  box-shadow: 0 0 0 3px rgba(127, 214, 176, 0.18);
}

.hero h1 {
  margin-top: 1.4rem;
  font-size: clamp(2.25rem, 12.2cqi, 4rem); /* sized by the copy column: about 55px beside the chart */
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero h1 .line {
  display: block;
  white-space: nowrap;
}

.hero h1 .accent {
  padding-bottom: 0.06em;
  background: linear-gradient(95deg, #d3f3e5 0%, #8fdcbb 48%, #5fbf98 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin-top: 1.25rem;
  max-width: 30rem;
  color: var(--body);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.actions-note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 13.5px;
  text-wrap: balance;
}

.notice {
  max-width: 26rem;
  margin-top: 1.25rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(240, 195, 109, 0.35);
  border-radius: 10px;
  background: rgba(240, 195, 109, 0.08);
  color: #f5dcac;
  font-size: 14px;
}

/* the phone's sign-in: a code from "Link a phone" on the board. A quiet third path on a computer, a box on a phone */
.code-signin {
  max-width: 26rem;
  margin-top: 2rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--soft);
}

.code-signin label {
  display: block;
  margin: 0 0.15rem 0.7rem;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.code-signin label strong {
  color: var(--text);
  font-weight: 600;
}

.code-signin label em {
  color: var(--body);
  font-style: normal;
  font-weight: 550;
}

.code-row {
  display: flex;
  gap: 0.5rem;
}

.code-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d0f11;
  font-family: var(--mono);
  font-size: 16px; /* 16px keeps phones from zooming in */
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.code-row input::placeholder {
  color: #69727a;
}

.code-row input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(168, 224, 205, 0.18);
}

/* ---- the live chart ------------------------------------------------------------------------------------------ */

.hero-demo {
  position: relative;
  min-width: 0;
}

.hero-demo::before {
  content: "";
  position: absolute;
  inset: -6% -4% 4%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(closest-side, rgba(127, 214, 176, 0.14), rgba(127, 214, 176, 0.04) 60%, transparent);
  filter: blur(24px);
  pointer-events: none;
}

.demo-shell {
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* the Live bar: the badge, the team's counts, and the chart's own type and grouping selects */
.demo-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 38px;
  padding: 0 0.1rem 0.45rem 0.3rem;
  font-size: 12.5px;
  color: var(--muted);
}

.demo-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.6rem 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(127, 214, 176, 0.1);
  color: var(--work);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--work);
}

/* one ring each time the team changes (landing.js adds .ping), animating only transform and opacity: an idle page
   repaints nothing */
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--work);
  opacity: 0;
}

.live-dot.ping::after {
  animation: live-ping 1.6s cubic-bezier(0, 0, 0.2, 1) 1;
}

@keyframes live-ping {
  0% { transform: scale(1); opacity: 0.75; }
  100% { transform: scale(3.4); opacity: 0; }
}

.demo-live[data-live="false"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.demo-live[data-live="false"] .live-dot {
  background: var(--muted);
}

.demo-live[data-live="false"] .live-dot::after {
  animation: none;
}

.demo-summary {
  color: #cfd6db;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.demo-summary b {
  padding: 0 3px;
  border-radius: 4px;
  font-weight: 650;
}

.demo-summary b.bump {
  animation: count-bump 1.2s ease-out;
}

@keyframes count-bump {
  0% { background: rgba(240, 195, 109, 0.3); }
  100% { background: transparent; }
}

.demo-summary .work {
  color: var(--work);
}

.demo-summary .need {
  color: var(--need);
}

.demo-tools {
  display: flex;
  margin-left: auto;
}

.demo-tools .tl-head-bare {
  gap: 6px;
}

.demo-tools .tl-select {
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 12.5px;
}

.demo-tools .tl-select:nth-child(3) {
  display: none; /* lane order: an app setting, not something a first look needs */
}

/* the component itself: the board's chart, only fitted into the shell */
.hero-timeline {
  min-height: 381px; /* its height before the module runs, so nothing below jumps */
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* the board's type */
}

.hero-timeline.is-ready {
  min-height: 0;
}

.hero-timeline.tl-card {
  border-radius: 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.hero-timeline .tl-legend {
  gap: 4px 8px;
  padding: 8px 12px 10px;
}

.hero-demo figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  text-wrap: balance;
}

/* ---- what ships today ------------------------------------------------------------------------------------------ */

.proof {
  padding: 3rem 0 4.5rem;
}

.section-head {
  margin-bottom: 1.75rem;
}

.kicker {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2 {
  margin-top: 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.feature {
  padding: 1.5rem 1.5rem 1.65rem;
  background: linear-gradient(180deg, #15181b, #131619);
  transition: background-color 0.2s ease;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  border: 1px solid var(--forest-line);
  border-radius: 10px;
  background: var(--forest);
  color: var(--accent);
}

.feature-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.feature h3 {
  margin-bottom: 0.35rem;
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -0.012em;
}

.feature p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.feature p strong {
  color: var(--body);
  font-weight: 600;
}

.feature code {
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--raised);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
}

.feature a {
  color: var(--body);
  text-decoration-color: rgba(168, 224, 205, 0.5);
}

.feature a:hover {
  color: var(--accent);
}

.coming {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 0.9rem 1.15rem;
  border: 1px dashed #373e45;
  border-radius: 14px;
  color: var(--muted);
  font-size: 14.5px;
}

.coming p {
  text-wrap: balance;
}

.coming strong {
  color: var(--body);
  font-weight: 600;
}

.tag {
  flex: none;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--raised);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- invite-only and GitHub App setup ------------------------------------------------------------------------ */

.hero-wrap {
  flex: 1;
  padding: 3rem 0;
}

.invite-card {
  max-width: 36rem;
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.invite-card h1 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.invite-card p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.invite-card .actions {
  margin-top: 1.4rem;
}

/* ---- narrower windows -------------------------------------------------------------------------------------- */

/* a narrower Mac app window: still side by side, the copy column a little narrower */
@media (min-width: 921px) and (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 24rem) minmax(0, 1fr);
    gap: 2.5rem;
  }

  .lede {
    font-size: 17px;
  }
}

@media (max-width: 1180px) {
  .hero-demo::before {
    inset: -6% 0 4%;
  }
}

/* stacked: the copy centred above the chart */
@media (max-width: 920px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding-top: 2.25rem;
  }

  .hero-copy {
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
    text-align: center;
  }

  .lede,
  .notice,
  .code-signin {
    margin-inline: auto;
  }

  .lede {
    text-wrap: balance; /* centred lines of even length, no orphan */
  }

  .actions {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  .nav-link {
    display: none;
  }

  .hero {
    gap: 2rem;
    min-height: 0;
    padding: 1.5rem 0 2.5rem;
  }

  .hero h1 {
    margin-top: 1.1rem;
  }

  .lede {
    font-size: 17px;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .code-signin {
    margin-top: 1.5rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(23, 26, 30, 0.72);
    text-align: left;
  }

  .demo-shell {
    padding: 5px;
    border-radius: 16px;
  }

  .demo-bar {
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 2px;
  }

  .demo-tools {
    flex-basis: 100%;
    margin-left: 0;
  }

  .demo-tools .tl-head-bare {
    flex: 1;
    flex-wrap: nowrap;
  }

  .demo-tools .tl-tools {
    flex: 1;
    flex-wrap: nowrap;
  }

  .demo-tools .tl-select {
    flex: 1;
  }

  .hero-timeline .tl-legend {
    gap: 4px;
    padding: 8px 8px 10px; /* the four states on one row */
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
    align-items: start;
    padding: 1.25rem 1.25rem 1.35rem;
  }

  .feature-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .feature h3 {
    margin-top: 9px;
  }

  .coming {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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