/*
 * AutomateX — single public page.
 * Self-contained: system fonts only, no external asset, no tracking.
 * Palette aligned with the app (tailwind.config.js: primary blue / secondary slate).
 */

:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;
  --night: #0f172a;
  --night-soft: #1e293b;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: 68rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

a:hover {
  color: #1e40af;
}

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

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.05em 0.35em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--night);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

/* ---------------------------------------------------------------- header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.5rem;
}

.brand-mark {
  border-radius: 6px;
  display: block;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-baseline {
  color: var(--muted);
  font-size: 0.875rem;
  border-left: 1px solid var(--line);
  padding-left: 0.75rem;
}

/*
 * Under 640px the baseline used to be `display: none`, which dropped the only
 * sentence saying WHO the page is for on the very devices that need it most.
 * It now wraps under the brand name instead: smaller, no left rule.
 */
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .brand-baseline {
    display: block;
    flex-basis: 100%;
    font-size: 0.8125rem;
    border-left: 0;
    padding-left: 0;
  }
}

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

.hero {
  background: linear-gradient(180deg, var(--night) 0%, #16233c 100%);
  color: #f1f5f9;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
}

.hero .lead {
  font-size: clamp(1.0625rem, 2.1vw, 1.25rem);
  color: #cbd5e1;
  max-width: 62ch;
  margin: 0 0 2rem;
}

.pledge {
  display: inline-block;
  margin: 0;
  padding: 0.6rem 1.1rem;
  border: 1px solid #33507f;
  border-left: 3px solid #60a5fa;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.12);
  color: #dbeafe;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ------------------------------------------------------------------- cta */

/*
 * ONE offer, written three times (hero, under the video, end of page). Never
 * two competing calls to action on the same screen.
 * Tap target: 44px minimum height (WCAG 2.5.5 / 2.5.8).
 */
.cta {
  margin: 2rem 0 0;
}

.cta-link {
  display: inline-block;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.55;
  text-decoration: none;
}

.cta-link:hover {
  background: #1e40af;
  color: #ffffff;
}

.cta-note {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.hero .cta-link {
  background: #2563eb;
}

.hero .cta-link:hover {
  background: #3b82f6;
}

.hero .cta-note {
  color: #cbd5e1;
  max-width: 62ch;
}

/* -------------------------------------------------------------- sections */

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}

.section h1,
.section h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.125rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 2rem;
}

.section--video {
  background: var(--surface-alt);
}

/* Compact band, used by the ecosystem answer promoted just under the hero. */
.section--band {
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0;
}

.section--band h2 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  margin: 0;
}

/* -------------------------------------------------------------- chapters */

.chapters {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.chapters li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.chapters li:not(:last-child)::after {
  content: "\00b7";
  margin-left: 0.9rem;
  color: var(--muted);
}

.chapter-time {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.chapters-note {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------------------------------------------------------------- player */

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #1e293b;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1d3a6e 100%);
}

.player iframe,
.player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/*
 * Pending state, shown while the recording does not exist yet. It keeps the
 * exact 16/9 footprint of the real player so publishing the video reflows
 * nothing on the page.
 */
.player--pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.player-pending-title {
  margin: 0;
  color: #f8fafc;
  font-size: 1.25rem;
  font-weight: 600;
}

.player-pending-body {
  margin: 0;
  max-width: 52ch;
  color: #cbd5e1;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.player-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: transparent;
  border: 0;
  color: #f8fafc;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.player-facade:hover .player-play {
  background: var(--accent);
  transform: scale(1.05);
}

.player-play {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: block;
  position: relative;
  transition: background 150ms ease, transform 150ms ease;
}

.player-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 0.85rem 0 0.85rem 1.4rem;
  border-color: transparent transparent transparent #ffffff;
}

.player-label {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.player-duration {
  font-size: 0.875rem;
  color: #94a3b8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: #fecaca;
  font-size: 0.9375rem;
}

.player-notice {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.player-fallback {
  margin-left: 0.35rem;
  white-space: nowrap;
}

.player-inspect {
  margin: 0.75rem 0 0;
  max-width: 66ch;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

/* ----------------------------------------------------------------- cards */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  counter-reset: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1.75rem;
}

.card-kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.card h3 {
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.75rem;
}

.card-lead {
  margin: 0 0 0.9rem;
  color: var(--ink);
  font-size: 1rem;
}

.card-body {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.card-body:last-child {
  margin-bottom: 0;
}

/* Reserved for the classeur screenshot (see the comment in index.html). */
.shot {
  margin: 2rem 0 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.shot figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------------------------------------------------------------- proofs */

.section--proof {
  background: var(--surface-alt);
}

.proofs {
  margin: 2rem 0 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.proof {
  border-left: 3px solid var(--line);
  padding-left: 1.25rem;
}

.proof dt {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.proof dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9688rem;
}

/* ------------------------------------------------------------ ecosystems */

.eco-pairs {
  list-style: none;
  margin: 2rem 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
}

.eco-pairs li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.eco-pairs em {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.eco-note {
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0;
}

/* Compact variant: same wording, less air, because it sits under the hero. */
.section--band .eco-pairs {
  margin: 0.85rem 0 0.6rem;
  gap: 0.4rem 2rem;
}

.section--band .eco-pairs li {
  font-size: 1.0625rem;
}

.section--band .eco-note {
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------- faq */

.faq {
  margin-top: 2rem;
  max-width: 62ch;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding: 0.9rem 0;
  font-weight: 600;
  list-style-position: outside;
}

.faq summary:hover {
  color: var(--accent);
}

.faq details p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.9688rem;
}

/* ---------------------------------------------------------------- status */

.section--status {
  background: var(--surface-alt);
}

.status-text {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------- contact */

.section--contact {
  background: var(--accent-soft);
  text-align: center;
}

.contact-pitch {
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 auto 1.75rem;
}

/* The contact section carries the same .cta block as the hero, nothing else. */
.section--contact .cta {
  margin-top: 0;
}

.section--contact .cta-note {
  max-width: 54ch;
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------------------------------- legal */

.section--legal {
  border-bottom: 0;
}

.legal-grid {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.75rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.legal-grid h3 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.legal-grid p {
  margin: 0 0 0.75rem;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: var(--night);
  color: #94a3b8;
  padding: 2rem 0;
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p {
  margin: 0;
}

.site-footer a {
  color: #bfdbfe;
}

.site-footer span {
  margin: 0 0.5rem;
  color: #475569;
}
