/* ==========================================================================
   Axon Automator: site styles
   Colours match the app's own theme (ui_qt/theme.py): blue accent, purple share.
   ========================================================================== */

:root {
  --bg: #0b0d11;
  --bg-2: #101319;
  --surface: #161a21;
  --surface-2: #1e2128;
  --border: #252b35;
  --border-strong: #333a45;

  --text: #e7e9ee;
  --muted: #a3aab5;
  --faint: #7f8792;

  --accent: #4f8cff;
  --accent-hover: #7aa8ff;
  --accent-2: #7c5cff;
  --btn: #2a64e6;        /* deeper than --accent so white text passes AA */
  --btn-hover: #2459d6;

  --radius: 14px;
  --radius-lg: 20px;
  --container: 1120px;
  --gutter: clamp(16px, 5vw, 32px);
  --header-h: 68px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

p { margin: 0 0 1em; }

strong { color: var(--text); font-weight: 600; }

kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.8125em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

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

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--btn);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn svg { flex: none; width: 20px; height: 20px; }

.btn-primary {
  background: var(--btn);
  color: #fff;
  box-shadow: 0 8px 24px -10px rgba(42, 100, 230, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover {
  background: var(--btn-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -10px rgba(79, 140, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: #4a5462;
  color: var(--text);
  transform: translateY(-1px);
}

.btn-lg { min-height: 56px; padding: 14px 28px; border-radius: 14px; font-size: 1.0625rem; }
.btn-sm { min-height: 38px; padding: 8px 16px; border-radius: 10px; font-size: 0.9375rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 17, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { border-radius: 7px; }

.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav ul a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav ul a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.7);
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav ul a { padding: 12px; font-size: 1rem; }
  .js .site-nav .btn { width: 100%; min-height: 48px; }

  /* Without JS the links simply wrap under the logo. */
  html:not(.js) .header-inner { flex-wrap: wrap; height: auto; padding-block: 12px; }
  html:not(.js) .site-nav { flex-wrap: wrap; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 104px) clamp(64px, 8vw, 96px);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -260px;
  left: 50%;
  width: min(1200px, 160vw);
  height: 900px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 42% 40%, rgba(79, 140, 255, 0.30), transparent),
    radial-gradient(closest-side at 66% 55%, rgba(124, 92, 255, 0.22), transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-title { max-width: 920px; margin: 0 auto 20px; }

.hero-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 8px;
  border: 1px solid rgba(79, 140, 255, 0.3);
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.08);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
}
.hero-name img { border-radius: 6px; }

.hero-tagline {
  display: block;
  font-size: clamp(2.5rem, 7.5vw, 4.75rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 35%, #b6c2d9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (forced-colors: active) {
  .hero-tagline { background: none; color: CanvasText; }
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
}

.hero-meta {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 0.875rem;
}

.hero-shot { max-width: 1000px; margin: clamp(48px, 7vw, 72px) auto 0; }

.window {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow:
    0 40px 100px -30px rgba(0, 0, 0, 0.85),
    0 0 140px -30px rgba(79, 140, 255, 0.45);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 14px;
  background: #111419;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.75rem;
}
.window-title { display: inline-flex; align-items: center; gap: 8px; }
.window-title img { border-radius: 3px; }
.window-controls { width: 64px; height: 12px; }

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

.section { padding-block: clamp(72px, 10vw, 120px); }

.section-alt {
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 85%);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section-head { max-width: 680px; margin-bottom: clamp(40px, 6vw, 56px); }


.sub-heading { margin-bottom: 24px; font-size: 1.375rem; }

/* ---------- What it does: 3-step flow ---------- */

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 0 0 clamp(64px, 9vw, 96px);
  padding: 0;
  list-style: none;
}

.flow li {
  position: relative;
  padding: 28px 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}

/* Arrow between steps */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -25px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}

.flow-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(79, 140, 255, 0.7);
}
.flow-icon svg { width: 24px; height: 24px; }

.flow-step {
  display: block;
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.flow h3 { margin-bottom: 6px; }
.flow p { margin: 0; color: var(--muted); }

@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; gap: 36px; }
  .flow li:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }
}

/* ---------- Feature grid ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.feature:hover { border-color: #3a4352; background: #181c24; }

.feature h4 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border: 1px solid rgba(79, 140, 255, 0.25);
  border-radius: 12px;
  background: rgba(79, 140, 255, 0.1);
  color: var(--accent);
}
.icon svg { width: 22px; height: 22px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ---------- Tutorial ---------- */

.tutorial-list {
  display: grid;
  gap: clamp(48px, 7vw, 80px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tutorial-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}
.tutorial-step:nth-child(even) .tutorial-text { order: 2; }

.tutorial-text p { color: var(--muted); }
.tutorial-text p:last-child { margin-bottom: 0; }
.tutorial-text .note {
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: rgba(79, 140, 255, 0.07);
  font-size: 0.9375rem;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--btn);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 24px -10px rgba(42, 100, 230, 0.8);
}

@media (max-width: 760px) {
  .tutorial-step { grid-template-columns: 1fr; }
  .tutorial-step:nth-child(even) .tutorial-text { order: 0; }
}

/* ---------- Image slots (show a labelled placeholder until the file exists) ---------- */

.slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(255, 255, 255, 0.018) 12px 24px),
    var(--bg-2);
}
.slot.is-loaded { border-style: solid; border-color: var(--border); }

.slot-label {
  padding: 16px;
  color: var(--faint);
  font-size: 0.8125rem;
  text-align: center;
  word-break: break-all;
}

.slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface);
}
.slot.is-empty img { display: none; }

.slot-hero { aspect-ratio: 16 / 10; border: 0; border-radius: 0; }
.slot-hero img { object-fit: cover; }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; margin-top: clamp(72px, 10vw, 112px); }

.faq details {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.faq details[open] { border-color: var(--border-strong); }

.faq summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  border-radius: 12px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 24px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: #fff; }
.faq summary:focus-visible { outline-offset: -2px; }

.faq details p { margin: 0; padding: 0 20px 20px; color: var(--muted); }

/* ---------- Creators ---------- */

.creators {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 940px;
}

.creator {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 2.25rem;
  font-weight: 700;
  box-shadow: 0 0 0 4px var(--bg-2), 0 0 0 5px var(--border-strong);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.is-empty img { display: none; }

.creator h3 { margin-bottom: 4px; font-size: 1.5rem; }
.creator-role { margin-bottom: 14px; color: var(--accent); font-size: 0.9375rem; font-weight: 600; }
.creator-bio { margin: 0; color: var(--muted); }

.creator-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.creator-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.creator-links a:hover { border-color: var(--accent); background: rgba(79, 140, 255, 0.08); color: var(--text); }

@media (max-width: 720px) {
  .creators { grid-template-columns: 1fr; }
}

/* ---------- Final CTA ---------- */

.cta-band { padding-block: 0 clamp(72px, 10vw, 120px); }

.cta-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(44px, 8vw, 80px) clamp(20px, 5vw, 48px);
  border: 1px solid rgba(79, 140, 255, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(79, 140, 255, 0.24), transparent 70%),
    radial-gradient(ellipse 50% 60% at 100% 100%, rgba(124, 92, 255, 0.18), transparent 70%),
    var(--surface);
  text-align: center;
}
.cta-card h2 { margin-bottom: 10px; }

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

.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 40px;
}

.footer-brand p { margin: 10px 0 0; }

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }

.disclaimer {
  flex-basis: 100%;
  margin: 4px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--d, 0) * 80ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn,
  .feature,
  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after,
  .faq summary::after { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- Download counter ---------- */

.dl-counter {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 20px;
}

.dl-counter-digits {
  display: flex;
  gap: clamp(4px, 1vw, 10px);
}

.dl-counter-digits span {
  flex: 1 1 0;
  min-width: 0;
  padding-block: clamp(7px, 1.4vw, 12px);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: clamp(1rem, 3.4vw, 2rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
}

.dl-counter-label {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}
