/**
 * FILE: backend/public/static/css/landing-agents.css
 * PURPOSE: Styles for the DevOpser Agents landing page (landing-builder.ejs)
 * DESCRIPTION: DevOpser brand dark marketing identity (#000 ground, #1e1e1e
 *              hero gradient end, #282828 cards, brand pink #ED166C). System
 *              font stacks only (CSP font-src 'self'); monospace utility voice
 *              for labels, hints, and endpoints. Signature elements: the hero
 *              URL form (the funnel's step 1) beside the gap chart — your
 *              page's outline measured against the pages beating it.
 */

/* ------------------------------------------------------------------ */
/* Tokens                                                              */
/* ------------------------------------------------------------------ */

:root {
  --dv-ink: #000;            /* page ground */
  --dv-section: #1e1e1e;     /* section ground / hero gradient end */
  --dv-panel: #282828;       /* card surface */
  --dv-panel-2: #333333;     /* raised surface, inputs, secondary buttons */
  --dv-panel-hover: #3d3d3d; /* input/button hover */
  --dv-line: #444;           /* borders */
  --dv-line-soft: #444;
  --dv-snow: #fff;           /* primary text */
  --dv-slate: #ccc;          /* secondary text */
  --dv-muted: #888;          /* muted / footer text */
  --dv-iris: #ED166C;        /* brand pink accent */
  --dv-violet: #c41058;      /* gradient partner */
  --dv-signal: #10b981;      /* live/available */
  --dv-danger: #ff6b6b;
  --dv-grad: linear-gradient(135deg, #ED166C 0%, #c41058 100%);
  --dv-grad-hover: linear-gradient(135deg, #c41058 0%, #a00d48 100%);
  --dv-focus-ring: 0 0 0 3px rgba(237, 22, 108, 0.15);
  --dv-radius: 12px;
  --dv-radius-sm: 8px;
  --dv-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --dv-font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Segoe UI Mono',
    Menlo, Consolas, monospace;
  --dv-maxw: 1160px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

.dv-body {
  font-family: var(--dv-font-body);
  background: var(--dv-ink);
  color: var(--dv-snow);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Guide hero gradient (#000 -> #1e1e1e) behind the hero, returning to the
     page ground below it. No accent wash: pink means "this is the gap" on this
     page, and an ambient glow would spend that meaning on decoration. */
  background-image: linear-gradient(180deg, #000 0%, #1e1e1e 55%, #000 100%);
  background-size: 100% 140vh;
  background-repeat: no-repeat;
}

/* Accessibility helpers */

.dv-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;
}

.dv-skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--dv-panel-2);
  color: var(--dv-snow);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.dv-skip:focus {
  top: 12px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--dv-focus-ring);
}

/* ------------------------------------------------------------------ */
/* Shared primitives                                                   */
/* ------------------------------------------------------------------ */

.dv-eyebrow {
  font-family: var(--dv-font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dv-iris);
  margin-bottom: 14px;
}

.dv-h1 {
  font-size: clamp(1.75rem, 4.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.dv-h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.dv-grad {
  background: var(--dv-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.dv-lede {
  font-size: 1.08rem;
  color: var(--dv-slate);
  max-width: 34rem;
  margin-bottom: 28px;
}

.dv-section-sub {
  color: var(--dv-slate);
  max-width: 36rem;
}

/* Buttons */

.dv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  color: var(--dv-snow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, opacity 0.2s ease;
}

.dv-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.dv-btn-primary {
  background: var(--dv-grad);
  box-shadow: 0 4px 12px rgba(237, 22, 108, 0.3);
}

.dv-btn-primary:hover:not(:disabled) {
  background: var(--dv-grad-hover);
  transform: translateY(-2px);
}

.dv-btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.dv-btn-ghost {
  background: var(--dv-panel-2);
  border-color: var(--dv-line);
  color: var(--dv-slate);
}

.dv-btn-ghost:hover:not(:disabled) {
  background: var(--dv-panel-hover);
  color: var(--dv-snow);
}

.dv-btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.dv-btn-block {
  width: 100%;
}

/* Status + chips */

.dv-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--dv-font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
}

.dv-status-live {
  color: var(--dv-signal);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.dv-status-soon {
  color: var(--dv-muted);
  background: rgba(136, 136, 136, 0.08);
  border: 1px solid var(--dv-line);
}

.dv-livedot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dv-signal);
  flex-shrink: 0;
  animation: dv-pulse 2.2s ease-in-out infinite;
}

@keyframes dv-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

/* Form errors */

.dv-form-error {
  color: var(--dv-danger);
  font-size: 0.88rem;
  margin-top: 10px;
}

.dv-form-error[hidden] {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Nav                                                                 */
/* ------------------------------------------------------------------ */

.dv-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--dv-line);
}

.dv-nav-inner {
  max-width: var(--dv-maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.dv-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.dv-wordmark-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dv-snow);
}

.dv-wordmark-tag {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dv-iris);
}

.dv-nav-links {
  display: flex;
  gap: 22px;
  margin-left: 8px;
}

.dv-nav-links a,
.dv-nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.dv-nav-links a:hover,
.dv-nav-link:hover {
  color: var(--dv-snow);
}

.dv-nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dv-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--dv-grad);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.dv-hero {
  max-width: var(--dv-maxw);
  margin: 0 auto;
  padding: 80px 24px 96px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: start;
}

/* URL form — the signature element (it IS the funnel's step 1) */

.dv-urlform {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: var(--dv-panel);
  border: 1px solid var(--dv-line);
  border-radius: var(--dv-radius);
  padding: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dv-urlform:focus-within {
  border-color: var(--dv-iris);
  box-shadow: var(--dv-focus-ring), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dv-urlform-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--dv-snow);
  font-family: var(--dv-font-mono);
  font-size: 1rem;
  padding: 0 8px 0 12px;
}

.dv-urlform-input:focus-visible {
  /* ring is drawn on .dv-urlform via :focus-within */
  box-shadow: none;
}

.dv-urlform-input::placeholder {
  color: #666;
}

.dv-urlform-hint {
  font-family: var(--dv-font-mono);
  font-size: 0.74rem;
  color: var(--dv-muted);
  margin-top: 10px;
}

/* Outcome anchors — what the team delivers, pointing into the page */

.dv-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.dv-outcome {
  font-size: 0.84rem;
  color: var(--dv-slate);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--dv-line);
  border-radius: 999px;
  padding: 7px 15px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dv-outcome:hover {
  color: var(--dv-snow);
  border-color: var(--dv-iris);
  background: rgba(237, 22, 108, 0.08);
}

/* Hero visual slot */

.dv-hero-preview {
  position: relative;
  min-height: 420px;
}

/* ------------------------------------------------------------------ */
/* The gap chart (hero empty state) — the signature element             */
/*                                                                      */
/* Each bar is one heading in a page's outline; the indent encodes the   */
/* heading level, so a column is literally that page's shape. Grey is    */
/* substance both pages have; pink is a section the competitors cover    */
/* and yours does not. Pink carries exactly one meaning on this page —   */
/* "this is the gap" — which is why the CTA that closes it is also pink. */
/* ------------------------------------------------------------------ */

.dv-gap {
  margin: 0;
  border: 1px solid var(--dv-line);
  border-radius: var(--dv-radius);
  padding: 22px 22px 18px;
  background: rgba(30, 30, 30, 0.55);
}

.dv-gap-cap {
  font-family: var(--dv-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dv-muted);
  margin-bottom: 20px;
}

.dv-gap-cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}

.dv-gap-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Your column sits apart from the field it is being measured against. */
.dv-gap-col-yours {
  padding-right: 14px;
  margin-right: 4px;
  border-right: 1px solid var(--dv-line);
}

.dv-gap-who {
  font-family: var(--dv-font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dv-muted);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dv-gap-col-yours .dv-gap-who {
  color: var(--dv-slate);
}

.dv-gap-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 5px;
  min-height: 132px;
}

.dv-gap-bar {
  display: block;
  height: 7px;
  border-radius: 3px;
  background: var(--dv-line);
  animation: dv-gap-rise 460ms cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

.dv-gap-bar.l1 { width: 100%; }
.dv-gap-bar.l2 { width: 84%; margin-left: 16%; }
.dv-gap-bar.l3 { width: 66%; margin-left: 34%; }

.dv-gap-bar.is-gap {
  background: var(--dv-iris);
}

/* One orchestrated entrance: the outlines build top-down, so the eye reads
   the competitors filling in past where your column stops. */
.dv-gap-bar:nth-child(1) { animation-delay: 40ms; }
.dv-gap-bar:nth-child(2) { animation-delay: 90ms; }
.dv-gap-bar:nth-child(3) { animation-delay: 140ms; }
.dv-gap-bar:nth-child(4) { animation-delay: 190ms; }
.dv-gap-bar:nth-child(5) { animation-delay: 240ms; }
.dv-gap-bar:nth-child(6) { animation-delay: 290ms; }
.dv-gap-bar:nth-child(7) { animation-delay: 340ms; }
.dv-gap-bar:nth-child(8) { animation-delay: 390ms; }
.dv-gap-bar:nth-child(9) { animation-delay: 440ms; }

@keyframes dv-gap-rise {
  from { opacity: 0; transform: translateY(6px) scaleX(0.86); transform-origin: left; }
  to   { opacity: 1; transform: none; }
}

.dv-gap-count {
  margin-top: 12px;
  font-family: var(--dv-font-mono);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--dv-snow);
  line-height: 1.2;
}

.dv-gap-col-yours .dv-gap-count {
  color: var(--dv-slate);
}

.dv-gap-unit {
  display: block;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dv-muted);
  margin-top: 3px;
}

.dv-gap-key {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--dv-line);
  font-size: 0.86rem;
  color: var(--dv-slate);
}

.dv-gap-swatch {
  width: 22px;
  height: 7px;
  border-radius: 3px;
  background: var(--dv-iris);
  flex-shrink: 0;
}

.dv-gap-note {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--dv-muted);
}

@media (max-width: 560px) {
  .dv-gap-cols {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 7px;
  }

  .dv-gap-stack { min-height: 104px; }
  .dv-gap-bar { height: 6px; }
  .dv-gap-count { font-size: 0.86rem; }
  .dv-gap-col-yours { padding-right: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .dv-gap-bar {
    animation: none;
  }
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.dv-section {
  max-width: var(--dv-maxw);
  margin: 0 auto;
  padding: 80px 24px;
}

.dv-section-head {
  margin-bottom: 44px;
}

/* Workflows */

.dv-workflows {
  border-top: 1px solid var(--dv-line-soft);
}

.dv-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.dv-workflow-card {
  background: var(--dv-panel);
  border: 1px solid var(--dv-line);
  border-radius: var(--dv-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dv-workflow-card.is-available {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dv-workflow-card.is-available:hover {
  transform: translateY(-4px);
}

.dv-workflow-card.is-teased {
  background: transparent;
}

.dv-workflow-card.is-teased .dv-workflow-title,
.dv-workflow-card.is-teased .dv-workflow-desc {
  opacity: 0.8;
}

.dv-workflow-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dv-workflow-desc {
  color: var(--dv-slate);
  font-size: 0.9rem;
  flex: 1;
}

.dv-workflow-tease {
  font-size: 0.82rem;
  color: var(--dv-muted);
  border-top: 1px dashed var(--dv-line);
  padding-top: 12px;
  opacity: 0.85;
}

/* How it works */

.dv-how {
  border-top: 1px solid var(--dv-line-soft);
}

.dv-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  counter-reset: dv-step;
}

.dv-step {
  position: relative;
  background: var(--dv-panel);
  border: 1px solid var(--dv-line);
  border-radius: var(--dv-radius);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dv-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dv-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-family: var(--dv-font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--dv-grad);
  margin-bottom: 14px;
}

.dv-step-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 7px;
}

.dv-step-body {
  color: var(--dv-slate);
  font-size: 0.9rem;
}

/* Publish + paperclip */

.dv-publish {
  border-top: 1px solid var(--dv-line-soft);
}

.dv-publish-card {
  background: var(--dv-panel);
  border: 1px solid var(--dv-line);
  border-radius: 16px;
  padding: 44px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 44px;
  align-items: center;
}

.dv-paperclip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 26px;
  background: var(--dv-panel-2);
  border: 1px solid var(--dv-line-soft);
  border-radius: var(--dv-radius-sm);
  padding: 18px;
}

.dv-paperclip-icon {
  color: var(--dv-iris);
  flex-shrink: 0;
  margin-top: 2px;
}

.dv-paperclip-title {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.dv-paperclip-body {
  color: var(--dv-slate);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.dv-endpoint,
.dv-channel code {
  font-family: var(--dv-font-mono);
  font-size: 0.76rem;
  color: var(--dv-iris);
  background: rgba(237, 22, 108, 0.08);
  border: 1px solid rgba(237, 22, 108, 0.25);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}

.dv-channel-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dv-channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--dv-panel-2);
  border: 1px solid var(--dv-line-soft);
  border-radius: var(--dv-radius-sm);
  padding: 13px 16px;
  min-width: 0;
}

.dv-channel code {
  overflow: hidden;
  text-overflow: ellipsis;
}

.dv-channel-key {
  font-weight: 600;
  font-size: 0.88rem;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.dv-footer {
  border-top: 1px solid var(--dv-line);
  padding: 40px 24px 52px;
}

.dv-footer-inner {
  max-width: var(--dv-maxw);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.dv-footer-note {
  color: var(--dv-muted);
  font-size: 0.82rem;
  margin-top: 8px;
}

.dv-footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.dv-footer-links a {
  color: var(--dv-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.dv-footer-links a:hover {
  color: var(--dv-iris);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1020px) {
  .dv-hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .dv-hero-preview {
    min-height: 0;
  }

  .dv-publish-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 28px;
  }
}

@media (max-width: 720px) {
  .dv-nav-links {
    display: none;
  }

  .dv-nav-inner {
    padding: 12px 18px;
    gap: 16px;
  }

  .dv-section {
    padding: 40px 18px;
  }

  .dv-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dv-urlform {
    flex-direction: column;
    padding: 12px;
  }

  .dv-urlform-input {
    padding: 10px 8px;
  }

  .dv-urlform-hint {
    text-align: center;
  }

  .dv-channel {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .dv-footer {
    padding: 32px 18px 40px;
  }
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                      */
/* ------------------------------------------------------------------ */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
