@import "./tokens.css";

/* ============================================================
   Agents OS page (/agents/) — same machined-plate language as
   the home page: hairlines, rivets, stamped numbers, safety-
   orange accent. This page does not load packages.css (keeps the
   request list short), so the few plate rules it needs are
   repeated here under .aos-*.

   Page order: hero → story (one icon cluster + one problem block +
   one solution block + scroll-driven before/after) → agents (three cards) →
   specification (five items + dashboard screens) → pricing →
   FAQ → apply.
   ============================================================ */

:root {
  /* sticky offsets: base.css header is 56px; the section nav below it */
  --aos-header-h: 56px;
  --aos-secnav-h: 44px;

  /* one accent per agent (card top border, chip, bullet dots) */
  --ag-finance: #0E7C66;                 /* Dana — teal (matches her character) */
  --ag-finance-tint: rgba(14, 124, 102, 0.13);
  --ag-assistant: #1F5FA8;               /* Salem — blue */
  --ag-assistant-tint: rgba(31, 95, 168, 0.12);
  --ag-custom: #B74A0A;                  /* Custom Agent — orange (matches the zain.webp character) */
  --ag-custom-tint: rgba(242, 106, 27, 0.14);

  --aos-problem: #A32D2D;
  --aos-solution: #1F6B3A;
}

/* any element tagged with data-agent gets its colour pair */
[data-agent="finance"]   { --ag-c: var(--ag-finance);   --ag-tint: var(--ag-finance-tint); }
[data-agent="assistant"] { --ag-c: var(--ag-assistant); --ag-tint: var(--ag-assistant-tint); }
[data-agent="custom"]    { --ag-c: var(--ag-custom);    --ag-tint: var(--ag-custom-tint); }

/* ---- header nav (shared shape, only used on this page) ------------- */

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: 0.75rem;
}

.site-nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  color: var(--accent-ink);
  border-color: var(--hairline);
  outline: none;
}

.site-nav-link--active {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
}

header .logo a { display: flex; align-items: center; }
header .logo img { height: 40px; width: auto; }

@media (max-width: 479px) {
  .site-nav { margin-inline-start: 0.25rem; }
  .site-nav-link { font-size: 0.78rem; padding: 0.3rem 0.4rem; }
  header .logo img { height: 32px; }
}

/* ============================================================
   Sticky section navigation (under the sticky site header)
   ============================================================ */

.aos-secnav {
  position: sticky;
  top: var(--aos-header-h);
  z-index: 90;
  height: var(--aos-secnav-h);
  background-color: var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.aos-secnav-track {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.aos-secnav-track::-webkit-scrollbar { display: none; }
/* centre when there is room, stay scrollable (not clipped) when there is not */
.aos-secnav-track::before,
.aos-secnav-track::after { content: ""; flex: 0 0 auto; margin: auto; }

.aos-secnav-link {
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.aos-secnav-link:hover { color: var(--accent-ink); }
.aos-secnav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.aos-secnav-link[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .aos-secnav-track { scroll-behavior: auto; }
}

/* ---- shared section chrome ---------------------------------------- */

.aos-body section {
  padding: 4rem 1.25rem 4.5rem;
  border-top: 1px solid var(--hairline);
  /* in-page links land below the sticky header + section nav */
  scroll-margin-top: calc(var(--aos-header-h) + var(--aos-secnav-h) + 0.5rem);
}

/* invisible anchor rows inside a section (Problem / Solution targets) */
.aos-anchor {
  display: block;
  height: 0;
  scroll-margin-top: calc(var(--aos-header-h) + var(--aos-secnav-h) + 1rem);
}

#aos-hero { border-top: none; }

.aos-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.aos-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  text-align: center;
  margin: 0 0 0.6rem;
  color: var(--ink);
}

.aos-sub {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.7;
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 2.25rem;
}

/* eyebrow + title + one-line subtitle, used at the top of every section */
.aos-sec-head { text-align: center; margin: 0 auto 2rem; }
.aos-sec-head .aos-sub { margin-bottom: 0; }
.aos-sec-head--minor { margin: 2.75rem auto 1.5rem; }
.aos-sec-head--minor h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  margin: 0 0 0.4rem;
}

.aos-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 0.5rem;
}
.aos-eyebrow--problem { color: var(--aos-problem); }
.aos-eyebrow--solution { color: var(--aos-solution); }

.aos-caption {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
  opacity: 0.8;
  margin: 1.25rem auto 0;
  max-width: 40rem;
}

/* short bullet lists used across story, agents and specification */
.aos-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.aos-bullets li {
  position: relative;
  padding-inline-start: 1.1em;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
}
.aos-bullets li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.58em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-ink);
  opacity: 0.8;
}

/* ---- plate (copy of packages.css .plate, scoped) ------------------- */

.plate {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 1.75rem 1.5rem 1.5rem;
  background-color: var(--plate-bg);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background-image:
    radial-gradient(circle 2.5px, var(--hairline) 0 2.5px, transparent 2.5px),
    radial-gradient(circle 2.5px, var(--hairline) 0 2.5px, transparent 2.5px),
    radial-gradient(circle 2.5px, var(--hairline) 0 2.5px, transparent 2.5px),
    radial-gradient(circle 2.5px, var(--hairline) 0 2.5px, transparent 2.5px);
  background-repeat: no-repeat;
  background-size: 5px 5px;
  background-position:
    10px 10px,
    calc(100% - 10px) 10px,
    10px calc(100% - 10px),
    calc(100% - 10px) calc(100% - 10px);
}

.plate-featured {
  border-top: 2px solid var(--accent);
  padding-top: calc(1.75rem - 1px);
}

/* ============================================================
   0. Hero + page map
   ============================================================ */

#aos-hero {
  min-height: calc(70svh - var(--aos-header-h) - var(--aos-secnav-h));
  display: flex;
  align-items: center;
}

.aos-hero-inner {
  text-align: center;
  max-width: 760px;
}

.aos-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 1rem;
}

#aos-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.aos-promise {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  line-height: 1.65;
  max-width: 40rem;
  margin: 0 auto;
}

/* hero-cta/.hero-btn come from hero.css on the home page; this page does
   not load hero.css, so the button rules are repeated here. */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.hero-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 2px;
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.hero-btn-primary { color: var(--ink); background-color: var(--accent); border: 1px solid var(--accent); }
.hero-btn-primary:hover { opacity: 0.9; }
.hero-btn-secondary { color: var(--ink); background-color: transparent; border: 1px solid var(--ink); }
.hero-btn-secondary:hover { background-color: rgba(26, 26, 28, 0.06); }

.aos-hero-note {
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 0.85rem;
  margin: 1.5rem auto 0;
}

/* ============================================================
   1. Story — one icon cluster + one problem block + one solution
      block, then the scroll-pinned before/after
   ============================================================ */

/* cluster on the start side, the two text blocks on the end side;
   stacked (cluster first) under 768px. Never a horizontal scroller. */
.aos-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  align-items: center;
  max-width: 940px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .aos-story-grid { grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr); gap: 2.5rem; }
}

/* the three isometric icons as ONE triangle: top icon centred over
   two bottom icons that overlap each other slightly (negative gaps) */
.aos-cluster {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 320px);
  margin: 0 auto;
  padding-top: 0.25rem;
  justify-items: center;
}
.aos-iso {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}
.aos-iso--top   { grid-column: 1 / -1; z-index: 3; }
.aos-iso--left  { justify-self: end;   margin-top: -1.9rem; margin-inline-end: -0.9rem;   z-index: 2; }
.aos-iso--right { justify-self: start; margin-top: -1.9rem; margin-inline-start: -0.9rem; z-index: 1; }
.aos-iso-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

/* 2.5D isometric icon: hue per business type via the three face variables */
.aos-iso svg { display: block; width: 112px; height: 112px; overflow: visible; animation: aos-float 4.2s ease-in-out infinite; }
.aos-iso[data-biz="retail"] svg { animation-delay: -1.4s; }
.aos-iso[data-biz="realestate"] svg { animation-delay: -2.8s; }
.aos-iso .iso-steam { animation: aos-steam 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
@keyframes aos-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-9px) rotate(-2deg); } }
@keyframes aos-steam { 0%, 100% { opacity: 0.25; transform: translateY(2px); } 50% { opacity: 0.85; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .aos-iso svg, .aos-iso .iso-steam { animation: none; } }

/* Icon colours live in the SVG fill attributes (coffee orange, retail
   blue, real estate green). Do not set fill here from a custom property:
   an unresolved var() makes fill fall back to black. */
.aos-iso .iso-steam { stroke: var(--muted, #8A8A8A); opacity: 0.7; }

/* the two text blocks: problem (red rule) and solution (green rule) */
.aos-story-blocks { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.aos-story-block {
  border: 1px solid var(--hairline);
  border-inline-start: 3px solid var(--aos-problem, #A32D2D);
  border-radius: 3px;
  background-color: var(--plate-bg);
  padding: 1rem 1.1rem 1.1rem;
  min-width: 0;
}
.aos-story-block--solution { border-inline-start-color: var(--aos-solution, #1F6B3A); }
.aos-story-block .aos-eyebrow { margin-bottom: 0.25rem; }
.aos-story-block h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
  color: var(--ink);
}
.aos-bullets--problem li::before { background-color: var(--aos-problem, #A32D2D); }

/* solution: the three agents once each, chip + one short outcome line */
.aos-agent-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1rem;
}
@media (min-width: 480px) { .aos-agent-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aos-agent-chips li {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink);
}
.aos-agent-chips .aos-chip { flex: 0 0 auto; margin-top: 2px; min-width: 3.6rem; justify-content: center; }
.aos-agent-chips li::before, .aos-agent-chips li::marker { content: none; }
.aos-chip-line { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* fail safe: a story string that did not load leaves its element empty;
   hide it (and a chip row without its name) instead of an empty box */
#aos-story [data-i18n]:empty { display: none; }
.aos-agent-chips li.is-empty, .aos-bullets li.is-empty, .aos-story-block.is-empty { display: none; }

/* agent chip (coloured per agent via data-agent) */
.aos-chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid var(--ag-c, var(--accent-ink, #1F3A5F));
  color: var(--ag-c, var(--accent-ink, #1F3A5F));
  background-color: var(--ag-tint, transparent);
}

/* before / after: paper pile (start side) tidies into a dashboard card.
   Progress is scroll-driven: agents-page.js sets --aos-p (0 = chaotic
   pile, 1 = tidy card, already eased) on #aosBa from the block's
   position in the viewport, so the visitor controls the speed. Each
   paper and bar derives its own progress from --aos-p with an offset,
   which gives the stagger. Logical direction: in RTL the pile is on
   the right and papers fly left.
   Fallbacks (tidy end state): no JS (html lacks .js-aos-scroll),
   reduced motion, or no scroll movement (JS adds .is-settled and the
   slow transitions below ease the pile into the card). */
.aos-ba {
  --aos-dir: 1;
  --aos-p: 0;
  --fly-x: calc(var(--aos-dir) * 240px);
  --fly-y: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  max-width: 820px;
  margin: 2.5rem auto 0;
  padding: 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background-color: var(--plate-bg);
}
[dir="rtl"] .aos-ba { --aos-dir: -1; }
.aos-ba-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 0.6rem;
}
.aos-ba-after .aos-ba-label { color: var(--aos-solution); }
.aos-ba-before .aos-ba-label { color: var(--aos-problem); }
.aos-ba-arrow { color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.aos-ba-arrow svg { display: block; }
[dir="rtl"] .aos-ba-arrow svg { transform: scaleX(-1); }

.aos-ba-pile {
  position: relative;
  height: 150px;
  border: 1px dashed var(--hairline);
  border-radius: 3px;
}
.aos-paper {
  position: absolute;
  left: calc(50% - 37px);
  top: calc(50% - 22px);
  width: 74px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: var(--muted);
  background-color: #fff;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  /* per-paper progress: starts at --po, finishes at --po + 0.55 */
  --pp: clamp(0, calc((var(--aos-p) - var(--po)) / 0.55), 1);
  transform:
    translate(
      calc(var(--x) + (var(--fly-x) - var(--x)) * var(--pp)),
      calc(var(--y) + (var(--fly-y) - var(--y)) * var(--pp))
    )
    rotate(calc(var(--r) * (1 - var(--pp))))
    scale(calc(1 - 0.45 * var(--pp)));
  opacity: calc(1 - var(--pp));
}
/* --po: stagger offset along the scroll progress; --d: transition delay
   used only by the no-scroll fallback (≥ 400 ms steps) */
.aos-paper.p1 { --x: -46px; --y: -38px; --r: -14deg; --po: 0;    --d: 0ms; }
.aos-paper.p2 { --x:  34px; --y: -30px; --r:  11deg; --po: 0.07; --d: 400ms; }
.aos-paper.p3 { --x: -22px; --y:  -4px; --r:   6deg; --po: 0.14; --d: 800ms; }
.aos-paper.p4 { --x:  48px; --y:  14px; --r: -19deg; --po: 0.21; --d: 1200ms; }
.aos-paper.p5 { --x: -52px; --y:  30px; --r:  17deg; --po: 0.28; --d: 1600ms; }
.aos-paper.p6 { --x:  10px; --y:  40px; --r:  -4deg; --po: 0.35; --d: 2000ms; }

/* no-scroll fallback: ease slowly into the tidy state (2.7 s per paper,
   400 ms stagger; 3x the old 900 ms one-shot) */
.aos-ba.is-settled { --aos-p: 1; }
.aos-ba.is-settled .aos-paper {
  transition: transform 2700ms cubic-bezier(0.4, 0, 0.2, 1) var(--d), opacity 2700ms ease var(--d);
}

.aos-ba-card {
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background-color: var(--bg);
  padding: 0.9rem 1rem 1rem;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.aos-ba-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hairline);
}
.aos-ba-dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--accent); }
.aos-ba-row { display: flex; flex-direction: column; gap: 0.3rem; font-family: var(--font-body); font-size: 0.78rem; color: var(--muted); }
.aos-ba-row i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background-color: var(--accent);
  /* bars grow in the second half of the scroll progress, one after another */
  --bp: clamp(0, calc((var(--aos-p) - var(--po)) / 0.3), 1);
  transform: scaleX(var(--bp));
  transform-origin: left center;
}
[dir="rtl"] .aos-ba-row i { transform-origin: right center; }
.aos-ba-row.r1 i { width: 72%; --po: 0.45; --d: 1500ms; }
.aos-ba-row.r2 i { width: 50%; --po: 0.55; --d: 1950ms; background-color: var(--ag-assistant); }
.aos-ba-row.r3 i { width: 36%; --po: 0.65; --d: 2400ms; background-color: var(--ag-finance); }
.aos-ba.is-settled .aos-ba-row i {
  transition: transform 2100ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--d);
}

/* without JS the progress variable never arrives: show the finished state */
html:not(.js-aos-scroll) .aos-ba { --aos-p: 1; }

@media (max-width: 639px) {
  .aos-ba { grid-template-columns: 1fr; --fly-x: 0px; --fly-y: 230px; }
  .aos-ba-arrow svg, [dir="rtl"] .aos-ba-arrow svg { transform: rotate(90deg); }
  .aos-ba-pile { height: 130px; }
  .aos-ba-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .aos-ba, .aos-ba.is-settled { --aos-p: 1; }
  .aos-paper, .aos-ba-row i { transition: none !important; }
}

/* ============================================================
   2. Agents — character cards
   ============================================================ */

.aos-agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .aos-agent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .aos-agent-grid { grid-template-columns: repeat(3, 1fr); } }
.aos-agent-grid { max-width: 1200px; margin-inline: auto; }
.aos-agent-wa { max-width: 880px; margin: 1.25rem auto 0; text-align: center; color: var(--muted); }

.aos-agent {
  border-top: 3px solid var(--ag-c, var(--accent));
  padding-top: calc(1.5rem - 2px);
}
.aos-agent h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
  text-align: center;
  color: var(--ink);
}
.aos-agent-role {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  margin: -0.55rem 0 0;
}
.aos-agent-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ag-c, var(--muted));
  margin: 0.25rem 0 -0.5rem;
}
.aos-agent-list li { font-size: 0.9rem; }
.aos-agent-list li::before { background-color: var(--ag-c, var(--accent-ink)); }
.aos-agent-statusline { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; margin: 0; }
.aos-status-text { display: block; color: var(--muted); font-family: var(--font-body); font-size: 0.82rem; line-height: 1.5; }

.aos-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 2px 10px;
  border: 1px solid var(--hairline);
  color: var(--muted);
}
.aos-badge--built { color: #1F6B3A; border-color: #1F6B3A; }
.aos-badge--per { color: var(--accent-ink); border-color: var(--accent-ink); }
.aos-badge--planned { color: var(--muted); border-style: dashed; }

/* character image (640x640) in a tinted disc; the initial letter shows
   only when agents-page.js marks the figure .is-missing */
.aos-char {
  position: relative;
  width: 112px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--ag-tint, var(--bg));
  border: 1px solid var(--hairline);
}
.aos-char-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aos-char-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  color: var(--ag-c, var(--accent-ink));
}
.aos-char.is-missing .aos-char-img { display: none; }
.aos-char.is-missing .aos-char-fallback { display: flex; }

/* ============================================================
   3. Specification — five compact items + dashboard screens
   ============================================================ */

.aos-spec-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 640px) { .aos-spec-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } }
@media (min-width: 1000px) { .aos-spec-grid { grid-template-columns: repeat(5, 1fr); } }

.aos-spec-item {
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--accent);
  border-radius: 3px;
  background-color: var(--bg);
  padding: 0.8rem 0.9rem 0.85rem;
  min-width: 0;
}
.aos-spec-item h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.25rem;
}
.aos-spec-item p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.aos-demo-block { margin-top: 2rem; }

/* tabs */
.aos-demo-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.aos-demo-tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.aos-demo-tab:hover, .aos-demo-tab:focus-visible { color: var(--accent-ink); border-color: var(--accent); outline: none; }
.aos-demo-tab[aria-selected="true"] { color: var(--ink); background-color: var(--accent); border-color: var(--accent); }

.aos-demo-playpause {
  width: 34px;
  height: 34px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 0.4rem;
}
.aos-demo-playpause:hover, .aos-demo-playpause:focus-visible { border-color: var(--accent); outline: none; }
/* pause icon by default; play triangle when paused (aria-pressed=true) */
.aos-pp-icon { width: 10px; height: 12px; border-inline: 3px solid var(--muted); box-sizing: border-box; }
.aos-demo-playpause[aria-pressed="true"] .aos-pp-icon {
  width: 0; height: 0; border: none;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-inline-start: 10px solid var(--muted);
}

/* frames */
.aos-demo-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  justify-items: center;
}
@media (min-width: 900px) {
  .aos-demo-stage { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
}

.aos-frame {
  margin: 0;
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background-color: var(--plate-bg);
  overflow: hidden;
}
.aos-frame--browser { max-width: 820px; }
.aos-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
  direction: ltr;
}
.aos-frame-bar span { width: 9px; height: 9px; border-radius: 50%; background-color: var(--hairline); }
.aos-frame-url {
  flex: 1;
  margin-left: 8px;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--muted);
  background-color: var(--bg);
  border-radius: 3px;
  padding: 2px 8px;
  text-align: left;
}

/* Each screen slot has a fixed aspect ratio (browser 16:10, phone
   1170:2532) and the image is object-fit: contain anchored to the top,
   so the WHOLE screenshot is always visible — never zoomed, never
   cropped — and swapping images never shifts layout. */
.aos-frame-screen {
  position: relative;
  background-color: var(--bg);
  overflow: hidden;
}
.aos-frame-screen img.aos-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
}
.aos-browser-screen { aspect-ratio: 16 / 10; }

.aos-frame--phone {
  max-width: 230px;
  border-radius: 28px;
  border: 6px solid var(--ink);
  background-color: var(--ink);
  display: flex;
  flex-direction: column;
}
/* real status-bar bezel: holds the notch, never overlaps the screenshot */
.aos-phone-statusbar {
  position: relative;
  height: 26px;
  flex-shrink: 0;
  background-color: var(--bg);
  border-radius: 22px 22px 0 0;
}
.aos-phone-notch {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 16px;
  border-radius: 10px;
  background-color: var(--ink);
}
.aos-phone-screen { aspect-ratio: 1170 / 2532; width: 100%; }
.aos-phone-homebar {
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  border-radius: 0 0 22px 22px;
}
.aos-phone-homebar span { width: 38%; height: 4px; border-radius: 2px; background-color: var(--ink); opacity: 0.45; }
.aos-phone-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
}
.aos-demo-caption { margin-top: 1.5rem; font-style: italic; }

/* ============================================================
   4. Pricing (rendered)
   ============================================================ */

.aos-draft-flag {
  display: table;
  margin: -1.25rem auto 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px dashed var(--accent-ink);
  border-radius: 2px;
  padding: 3px 10px;
}

.aos-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 0 auto 1.75rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background-color: var(--bg);
  max-width: 640px;
  font-family: var(--font-body);
}
.aos-setup .label { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.aos-setup .amount { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.aos-setup .cur { font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; color: var(--accent-ink); letter-spacing: 0.06em; }
.aos-setup .note { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 0.82rem; }

.aos-plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) { .aos-plans { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.aos-plan { cursor: pointer; transition: border-color 150ms ease; }
.aos-plan:hover { border-color: var(--accent); }
.aos-plan.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.aos-plan h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin: 0; }
.aos-plan .tagline { font-family: var(--font-body); color: var(--muted); font-size: 0.85rem; margin: -0.4rem 0 0; }
.aos-plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; }
.aos-plan li {
  position: relative;
  padding-inline-start: 1.1em;
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.aos-plan li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.6em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background-color: var(--accent-ink);
  opacity: 0.7;
}
.aos-plan .price {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline);
}
.aos-plan .price .cur { font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.06em; color: var(--accent-ink); opacity: 0.85; }
.aos-plan .price .num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.aos-plan .price .per { font-family: var(--font-body); font-size: 0.85rem; color: var(--muted); }
.aos-plan .select-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  background-color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
  transition: opacity 150ms ease;
}
.aos-plan .select-btn:hover { opacity: 0.9; }
.aos-plan.is-selected .select-btn { background-color: transparent; color: var(--accent-ink); }

.aos-pilot {
  margin: 1.5rem auto 0;
  max-width: 760px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--accent-ink);
  border-radius: 3px;
  font-family: var(--font-body);
}
.aos-pilot .label { font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); letter-spacing: 0.04em; }
.aos-pilot .text { flex: 1 1 320px; font-size: 0.9rem; line-height: 1.55; }
.aos-pilot .select-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.55rem 1rem;
  cursor: pointer;
}
.aos-pilot .select-btn:hover, .aos-pilot.is-selected .select-btn { border-color: var(--accent); color: var(--accent-ink); }

.aos-addons { max-width: 760px; margin: 2.25rem auto 0; }
.aos-addons h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin: 0 0 0.6rem; text-align: center; }
.aos-addons ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: 3px; }
.aos-addons li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-body);
  font-size: 0.92rem;
}
.aos-addons li:last-child { border-bottom: none; }
.aos-addons .amt { font-family: var(--font-display); font-weight: 700; color: var(--accent-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aos-addons .amt small { font-family: var(--font-body); font-weight: 400; color: var(--muted); margin-inline-end: 0.3rem; }
.aos-addons .aos-caption { margin-top: 0.75rem; }

.aos-fine {
  list-style: none;
  margin: 2rem auto 0;
  padding: 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.aos-fine li {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  padding-inline-start: 0.75rem;
  border-inline-start: 2px solid var(--hairline);
  line-height: 1.5;
}

/* ============================================================
   5. FAQ
   ============================================================ */

.aos-faq-inner { max-width: 760px; }
.aos-q {
  border: 1px solid var(--hairline);
  border-radius: 3px;
  background-color: var(--plate-bg);
  margin-bottom: 0.6rem;
}
.aos-q summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.aos-q summary::-webkit-details-marker { display: none; }
.aos-q summary::after {
  content: "+";
  font-family: var(--font-display);
  color: var(--accent-ink);
  font-size: 1.2rem;
  line-height: 1;
}
.aos-q[open] summary::after { content: "−"; }
.aos-q summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.aos-q p {
  margin: 0;
  padding: 0 1.1rem 1rem;
  font-family: var(--font-body);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ============================================================
   6. Apply form — extends form.css (.field, .order-*)
   ============================================================ */

#aos-apply .order-inner { max-width: 640px; margin: 0 auto; }
#aos-apply .aos-sec-head .order-sub { margin-bottom: 0; }
.aos-form { display: flex; flex-direction: column; gap: 1.4rem; }
.field-hint { font-family: var(--font-body); color: var(--muted); font-size: 0.78rem; margin: 0; }
.aos-count { text-align: end; }
.field input[type="email"] {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background-color: transparent;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input[type="email"]:focus { border-color: var(--accent); }

.aos-checks { border: 1px solid var(--hairline); border-radius: 3px; padding: 0.8rem 0.9rem 0.6rem; gap: 0.5rem; }
.aos-checks legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0 0.4rem;
}
.aos-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  line-height: 1.5;
}
.aos-check input { margin-top: 0.3em; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.aos-radios { flex-direction: row; flex-wrap: wrap; gap: 1.5rem; }
.aos-consent { font-size: 0.85rem; color: var(--muted); }

/* honeypot: off-screen, never display:none (some bots skip hidden inputs) */
.aos-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

.order-submit[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* ============================================================
   Scroll fade-in. Elements carry .aos-reveal; agents-page.js adds
   "js-aos-reveal" to <html> only once it is running, so content is
   fully visible with JS off, and the reduced-motion query removes
   the hidden state entirely. Transform + opacity only → no layout
   shift. --aos-d is the per-element stagger set by JS.
   ============================================================ */

.aos-reveal { --aos-d: 0ms; }
.js-aos-reveal .aos-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 550ms ease var(--aos-d), transform 550ms cubic-bezier(0.2, 0.7, 0.2, 1) var(--aos-d);
}
.js-aos-reveal .aos-reveal.in { opacity: 1; transform: none; }

/* story section: every timed animation here is at least 3x slower
   (reveal 1650 ms instead of 550 ms; JS uses the 400 ms stagger from
   data-stagger on .aos-story-grid) */
.js-aos-reveal #aos-story .aos-reveal {
  transition-duration: 1650ms, 1650ms;
}

@media (prefers-reduced-motion: reduce) {
  .js-aos-reveal .aos-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- mobile compaction -------------------------------------------- */

@media (max-width: 479px) {
  .aos-body section { padding: 2.25rem 1rem 2.5rem; }
  .aos-sub { margin-bottom: 1.4rem; font-size: 0.88rem; }
  .aos-sec-head { margin-bottom: 1.4rem; }
  .plate { padding: 1.1rem 1rem 1rem; }
  .aos-agent { padding-top: calc(1.1rem - 2px); }
  .aos-plan .price .num { font-size: 1.6rem; }
  .aos-plan .select-btn, .aos-pilot .select-btn { width: 100%; }
  .aos-frame--phone { max-width: 190px; }
  .aos-secnav-track { padding: 0 0.75rem; }
  .aos-secnav-link { font-size: 0.78rem; padding: 0.35rem 0.55rem; }
  .aos-story-block { padding: 0.85rem 0.9rem 0.95rem; }
  .aos-cluster { width: min(100%, 280px); }
  .aos-iso svg { width: 92px; height: 92px; }
  .aos-iso--left, .aos-iso--right { margin-top: -1.5rem; }
  .aos-ba { padding: 1rem; }
  .aos-char { width: 96px; }
}

/* the hidden attribute must win over component display rules (carousel slides, phone note, pilot line) */
[hidden] { display: none !important; }

/* Before/after: while JS is on, the block is pinned under the sticky bars and the
   visitor's scroll drives the progress slowly (about two screens of travel). */
.js-aos-scroll .aos-ba-track { position: relative; height: 210vh; }
.js-aos-scroll .aos-ba-track > .aos-ba { position: sticky; top: var(--aos-pin, 130px); }
@media (max-width: 640px) { .js-aos-scroll .aos-ba-track { height: 190vh; } }

/* cluster: keep the coffee label clear of the two bottom icons and make the triangle bigger */
.aos-iso--left  { margin-top: 0.5rem; }
.aos-iso--right { margin-top: 0.5rem; }
@media (min-width: 768px) {
  .aos-cluster { width: min(100%, 400px); }
  .aos-iso svg { width: 150px; height: 150px; }
  .aos-iso--left  { margin-inline-end: -1.1rem; }
  .aos-iso--right { margin-inline-start: -1.1rem; }
  .aos-iso-label { font-size: 0.85rem; }
}

/* setup block: free first report + guarantee lines */
.aos-setup .free, .aos-setup .guar { flex-basis: 100%; text-align: center; margin: 0.25rem 0 0; font-size: 0.92rem; line-height: 1.5; }
.aos-setup .free { color: var(--ink); font-weight: 600; }
.aos-setup .guar { color: var(--muted); }

/* trust section */
#aos-trust { padding: 4rem 0; border-top: 1px solid var(--hairline); }
.aos-trust-grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .aos-trust-grid { grid-template-columns: repeat(2, 1fr); } }
.aos-trust-card { border: 1px solid var(--hairline); background: var(--plate-bg); border-radius: 3px; padding: 1.2rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.aos-trust-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0; }
.aos-trust-card p { margin: 0; font-size: 0.93rem; line-height: 1.6; color: var(--ink); }
.aos-trust-card--data { border-inline-start: 3px solid var(--accent); }
.aos-trust-list { margin: 0; padding-inline-start: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.93rem; line-height: 1.55; }
.aos-trust-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--plate-bg); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.aos-trust-cta { align-self: flex-start; margin-top: 0.4rem; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; color: var(--plate-bg); background: var(--accent); border-radius: 2px; padding: 0.55rem 0.9rem; text-decoration: none; }
.aos-trust-cta:hover { filter: brightness(0.95); }

.aos-hero-cta + .aos-hero-note + .made-badge { margin-top: 0.9rem; }
.aos-trust-head { display: flex; align-items: center; gap: 0.75rem; }
.aos-trust-flag { width: 40px; height: 20px; display: block; }
