/* crewdyne.com landing page. Colours are the roles in tokens.css; sizes follow packages/ui
   (spacing 4/8/12/16/24/32/48, radius 2/4/6, 44px targets). No inline styles: the CSP is
   style-src 'self'. */

:root {
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --target: 44px;
  --gutter: clamp(16px, 4vw, 48px);
  /* Decorative edges and dots in the product shot; never text. */
  --label-blue: #2f5bd3;
  --label-purple: #7a3fc2;
  --label-teal: #0f7b80;
  --label-grey: #5b6470;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 16px/22px var(--font-sans);
  overflow-wrap: break-word;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
pre:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Type */
.t-heading {
  font: 600 18px/24px var(--font-sans);
}
.t-body {
  font: 400 16px/22px var(--font-sans);
}
.t-sm {
  font: 400 14px/20px var(--font-sans);
}
.t-label {
  font: 600 14px/18px var(--font-sans);
}
.t-cap {
  font: 400 12px/16px var(--font-sans);
}
.t-key {
  font: 500 12px/16px var(--font-mono);
  letter-spacing: 0.02em;
}
.muted {
  color: var(--text-muted);
}
.warn {
  color: var(--warning);
}

.h2 {
  font: 700 clamp(28px, 4vw, 40px) / 1.1 var(--font-sans);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  font: 400 18px/28px var(--font-sans);
  color: var(--text-muted);
  text-wrap: pretty;
}

.eyebrow {
  font: 500 12px/16px var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.eyebrow-primary {
  color: var(--primary);
}
.eyebrow-agent {
  color: var(--agent);
}

.visually-hidden,
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 20;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}
.skip-link:focus {
  top: 8px;
}

/* Layout */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap-narrow {
  max-width: 880px;
}

.sec {
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.sec-surface {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sec-faq {
  padding-top: clamp(56px, 8vw, 96px);
}
.sec-head {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-12,
.stack-24,
.stack-32,
.stack-48 {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stack-12 {
  gap: 12px;
}
.stack-24 {
  gap: 24px;
}
.stack-32 {
  gap: 32px;
}
.stack-48 {
  gap: 48px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-340 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

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

@media (max-width: 759px) {
  .grid,
  .grid-340,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--target);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: 600 14px/18px var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
}
a.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: var(--target);
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font: 400 16px/22px var(--font-sans);
}
.input::placeholder {
  color: var(--text-muted);
}

.code {
  margin: 0;
  padding: 16px;
  max-width: 100%;
  overflow-x: auto;
  background: var(--surface-sunken);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font: 400 14px/22px var(--font-mono);
  white-space: pre;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--text);
  font: 700 20px/24px var(--font-sans);
  letter-spacing: -0.01em;
}
a.brand:hover {
  text-decoration: none;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 12px;
  color: var(--text-muted);
  font: 600 14px/18px var(--font-sans);
}

@media (max-width: 759px) {
  /* The in-page links live in the footer too; keep the header to the two actions. */
  .site-header {
    position: static;
  }
  .nav-link {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero-copy {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.hero-copy .eyebrow-agent {
  padding: 2px 8px;
  background: var(--agent-subtle);
  border: 1px solid var(--agent);
  border-radius: var(--radius-sm);
  text-transform: none;
}
.hero-title {
  font: 700 clamp(38px, 6.4vw, 68px) / 1.04 var(--font-sans);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-lede {
  max-width: 620px;
}
.hero-form {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Waitlist form */
.waitlist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.waitlist-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.waitlist-row .btn {
  flex: 0 0 auto;
}
/* Always rendered (never display: none): a live region that appears and fills in the same update
   often isn't announced. One line is reserved so the layout doesn't jump when text arrives. */
.waitlist-status {
  min-height: 20px;
  font: 400 14px/20px var(--font-sans);
}

@media (max-width: 420px) {
  .waitlist-row .btn {
    flex: 1 1 100%;
  }
}

/* Product shot */
.shot {
  margin: clamp(40px, 6vw, 72px) 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shot-board {
  overflow: hidden;
}
.shot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.shot-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.shot-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--background);
}

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

.column {
  min-width: 0;
  overflow: hidden;
  background: var(--surface-sunken);
  border-radius: var(--radius-lg);
}
.column-edge {
  height: 3px;
}
.edge-grey {
  background: var(--label-grey);
}
.edge-blue {
  background: var(--label-blue);
}
.edge-agent {
  background: var(--agent);
}
.edge-purple {
  background: var(--label-purple);
}
.column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px 8px;
}
.column-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px 8px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.card-agent {
  background: var(--agent-subtle);
  border-color: var(--agent);
}
.card-title {
  font: 400 16px/22px var(--font-sans);
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.claim {
  color: var(--agent);
  font-weight: 600;
}
.key-pr {
  color: var(--primary);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-blue {
  background: var(--label-blue);
}
.dot-purple {
  background: var(--label-purple);
}
.dot-teal {
  background: var(--label-teal);
}

/* Avatars: people are round, agents are rounded squares with an "AI" badge. */
.avatars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--text);
  font: 600 11px/1 var(--font-sans);
}
.avatar-sm {
  width: 20px;
  height: 20px;
  font-size: 9px;
}
.avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.avatar-agent {
  border-radius: var(--radius-md);
  background: var(--agent);
  color: var(--on-agent);
}
.avatar-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 0 2px;
  background: var(--surface);
  color: var(--agent);
  border: 1px solid var(--agent);
  border-radius: var(--radius-sm);
  font: 700 7px/9px var(--font-sans);
}

/* How it works */
.step {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 24px 24px;
}
.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.step-grey::before {
  background: var(--label-grey);
}
.step-agent::before {
  background: var(--agent);
}
.step-purple::before {
  background: var(--label-purple);
}

/* Agents */
.agent-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  min-width: 0;
}
.agent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.agent-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.badge {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.badge-success {
  background: var(--success-subtle);
  color: var(--success);
}
.agent-scopes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.scope-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.scope {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.icon {
  flex: none;
  margin-top: 3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-yes {
  color: var(--success);
}
.icon-no {
  color: var(--danger);
}
.not-allowed {
  color: var(--danger);
}

/* Features */
.feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}

/* FAQ */
.faq-list {
  border-bottom: 1px solid var(--border);
}
.faq {
  border-top: 1px solid var(--border);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--target);
  padding: 12px 0;
  font: 600 18px/24px var(--font-sans);
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--text-muted);
  font: 400 24px/24px var(--font-mono);
}
.faq[open] summary::after {
  content: '\2212';
}
.faq p {
  max-width: 68ch;
  margin: 0 0 16px;
}

/* Final call to action */
.cta {
  background: var(--primary-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-title {
  max-width: 640px;
}
.cta-lede {
  max-width: 560px;
  color: var(--text);
}
.cta-form {
  width: 100%;
  max-width: 540px;
}

/* Footer */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 48px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 420px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-nav h2 {
  margin-bottom: 4px;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font: 400 14px/20px var(--font-sans);
}

@media (max-width: 759px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
