/* case-study-addison.css
   Public Display of Appreciation: Addison Excavations (WO-02, WO-03, WO-04 visual overhaul).
   Uses the existing PDA tokens (colors_and_type.css via site.css). Scoped to .ae-*.
   Nothing is hidden until a script runs. Motion is optional polish and stops under reduced motion. */

/* The topographic contour lines: the hero's back plane, and the closing card's bookend. */
.ae-main { --ae-contour: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520' fill='none' stroke='%23C8D0E2' stroke-opacity='.13' stroke-width='1.2'%3E%3Cpath d='M-20 430C120 380 190 470 320 420S520 300 640 360 820 450 940 380'/%3E%3Cpath d='M-20 390C130 335 200 430 325 380S525 262 642 322 822 410 940 342'/%3E%3Cpath d='M-20 350C140 292 210 392 330 340S530 224 644 284 824 370 940 304'/%3E%3Cpath d='M-20 310C150 250 220 354 335 300S535 186 646 246 826 330 940 266'/%3E%3Cpath d='M-20 270C160 208 230 316 340 260S540 148 648 208 828 290 940 228'/%3E%3Cpath d='M-20 230C170 166 240 278 345 220S545 110 650 170 830 250 940 190'/%3E%3Cpath d='M-20 190C180 124 250 240 350 180S550 72 652 132 832 210 940 152'/%3E%3Cpath d='M-20 150C190 82 260 202 355 140S555 34 654 94 834 170 940 114'/%3E%3C/svg%3E"); }
.ae-wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.ae-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 8px; color: var(--pda-teal); text-underline-offset: 4px; }
.ae-main a:not(.btn) { text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.ae-hero { position: relative; overflow-x: clip; padding: 108px 0 76px; isolation: isolate; }
/* Topographic contour plane: a quiet nod to the work. Fixed height so it never shifts with the hero's text. */
.ae-contours {
  position: absolute; top: -60px; left: -5%; right: -5%; height: 640px; z-index: -1; pointer-events: none; opacity: .5;
  background-image: var(--ae-contour);
  background-size: 900px 520px; background-position: center top; background-repeat: repeat-x;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.ae-hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ae-logo { line-height: 0; margin: 28px 0 34px; width: min(420px, 78vw); }
.ae-logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.ae-hero .eyebrow { margin-bottom: 14px; }
.ae-hero h1 {
  font-family: var(--font-display); font-size: clamp(34px, 4.6vw, 60px); line-height: 1.06;
  letter-spacing: -.02em; font-weight: 600; margin: 0 0 22px; max-width: 920px; text-wrap: balance;
}
/* The PDA gradient as a stroke under the key phrase; the words stay solid white. */
.ae-hl {
  background-image: var(--pda-gradient); background-repeat: no-repeat; background-size: 100% .09em; background-position: 0 96%;
  padding-bottom: .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.ae-lead { font-size: 19px; line-height: 1.6; color: var(--fg-2); margin: 0 0 14px; max-width: 640px; text-wrap: pretty; }
/* Supporting line in the PDA gradient. Both ends of the gradient clear 6.5:1 on navy; solid teal where clipping is unsupported. */
.ae-support {
  width: fit-content; margin: 0 auto 30px; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2; font-weight: 600; letter-spacing: -.01em; color: var(--pda-teal);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ae-support {
    background-image: linear-gradient(90deg, #20C8A2 0%, #4FA0DA 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  }
}
.ae-actions { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; justify-content: center; }
.ae-textlink { color: var(--pda-teal); min-height: 44px; display: inline-flex; align-items: center; }

/* Hero metrics: numbers and labels only. The closed amount shares a frame with the total it belongs to. */
.ae-stats {
  list-style: none; padding: 0; margin: 56px auto 0; width: 100%; max-width: 1096px;
  display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 14px; text-align: left;
}
.ae-stat-pair { display: contents; }
.ae-stat-pair-list {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-2); border: 1px solid rgba(32, 200, 162, .4); border-radius: 16px; box-shadow: var(--shadow-2), var(--shadow-inset-line);
}
.ae-stats > .ae-stat { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 16px; box-shadow: var(--shadow-2), var(--shadow-inset-line); }
.ae-stat { padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.ae-stat-pair-list .ae-stat + .ae-stat { border-left: 1px solid var(--border-2); }
.ae-stat-num {
  display: block; font-family: var(--font-display); font-size: clamp(34px, 3.6vw, 48px); line-height: 1;
  font-weight: 600; letter-spacing: -.02em; color: var(--pda-teal); font-variant-numeric: lining-nums;
}
.ae-stat-lbl { display: block; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--fg-1); }

/* ---------- Shared section parts ---------- */
.ae-section { padding: 104px 0; }
.ae-section + .ae-section { border-top: 1px solid var(--border-1); }
/* Eyebrows: plain text, no leading rule. Full width of their column, so a centered intro centers them too. */
.ae-label {
  display: block; max-width: none !important; margin: 0 0 16px !important;
  font-size: 14px !important; line-height: 1.4 !important; letter-spacing: .04em; font-weight: 700; color: var(--pda-teal) !important;
}
.ae-section h2 {
  font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.02em;
  font-weight: 600; margin: 0 0 20px; text-wrap: balance;
}
.ae-section p { font-size: 18px; line-height: 1.7; color: var(--fg-2); margin: 0 0 16px; max-width: 62ch; text-wrap: pretty; }
.ae-intro { max-width: 780px; margin: 0 0 56px; }
.ae-intro--center { margin-left: auto; margin-right: auto; text-align: center; }
.ae-intro--center p { margin-left: auto; margin-right: auto; }
.ae-intro-lead { font-family: var(--font-display); font-size: clamp(20px, 2vw, 25px) !important; line-height: 1.4 !important; color: var(--fg-1) !important; }

.ae-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; }
.ae-split-text { grid-column: 1 / span 5; }
.ae-split-media { grid-column: 7 / -1; }
.ae-split--flip .ae-split-text { grid-column: 8 / -1; grid-row: 1; }
.ae-split--flip .ae-split-media { grid-column: 1 / span 6; grid-row: 1; }
.ae-photo { border: 1px solid var(--border-2); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-3); background: var(--bg-2); }
.ae-photo img { display: block; width: 100%; height: auto; }
.ae-photo--tall img { aspect-ratio: 5 / 4; object-fit: cover; }
.ae-biz .ae-photo--tall img { object-position: 18% 50%; }
.ae-pull {
  font-family: var(--font-display); font-size: clamp(22px, 2.2vw, 28px) !important; line-height: 1.3 !important;
  color: var(--fg-1) !important; letter-spacing: -.01em; margin: 30px 0 10px !important;
}
.ae-pull-cite { font-size: 15px !important; line-height: 1.55 !important; color: var(--fg-3) !important; margin: 0 !important; }

/* ---------- The opportunity: three comparisons in a zigzag ---------- */
.ae-ba-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; }
.ae-ba-row + .ae-ba-row { margin-top: 88px; }
.ae-ba-copy { grid-column: 1 / span 4; }
.ae-ba-row .ae-ba { grid-column: 5 / -1; }
.ae-ba-row--contact .ae-ba-copy { grid-column: 9 / -1; grid-row: 1; }
.ae-ba-row--contact .ae-ba { grid-column: 1 / span 8; grid-row: 1; }
.ae-ba-row--mobile .ae-ba-copy { grid-column: 2 / span 5; }
.ae-ba-row--mobile .ae-ba { grid-column: 8 / span 4; }
.ae-ba-copy h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; font-weight: 600; letter-spacing: -.015em; }
.ae-ba-copy p { margin: 0; font-size: 18px; }

.ae-ba { margin: 0; min-width: 0; }
.ae-ba-tags { display: flex; justify-content: space-between; margin: 0 2px 10px; }
.ae-ba-tag { font-size: 13px; letter-spacing: .06em; font-weight: 700; color: var(--fg-2); }
.ae-ba-tag--after { color: var(--pda-teal); }
.ae-ba-stage { position: relative; overflow: hidden; border: 1px solid var(--border-2); border-radius: 14px; background: #0b0e17; box-shadow: var(--shadow-3); }
.ae-ba-pic { display: block; }
.ae-ba-pic img { display: block; width: 100%; height: auto; }
.ae-ba-range, .ae-ba-line { display: none; }

/* Static fallback (no script): the two images side by side, under the Before and After labels. */
html:not(.ae-js) .ae-ba-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }

/* Live slider: one box, the "before" image clipped at the handle. Pointer, touch and keys come from the native range input. */
.ae-js .ae-ba-stage { aspect-ratio: var(--w) / var(--h); touch-action: pan-y; }
.ae-js .ae-ba--home .ae-ba-stage { --w: 1440; --h: 900; }
.ae-js .ae-ba--contact .ae-ba-stage { --w: 1200; --h: 750; }
.ae-js .ae-ba--mobile .ae-ba-stage { --w: 640; --h: 1543; }
.ae-js .ae-ba-pic { position: absolute; inset: 0; }
.ae-js .ae-ba-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.ae-js .ae-ba-pic--before { z-index: 1; clip-path: inset(0 calc(100% - var(--pos, 50) * 1%) 0 0); }
.ae-js .ae-ba-range { display: block; position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ae-js .ae-ba-line {
  display: block; position: absolute; top: 0; bottom: 0; left: calc(var(--pos, 50) * 1%); width: 2px; z-index: 3; pointer-events: none;
  background: #fff; box-shadow: 0 0 0 1px rgba(14, 18, 30, .55); translate: -1px 0;
}
.ae-ba-knob {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; translate: -50% -50%; border-radius: 50%;
  background: var(--bg-1); border: 2px solid #fff; box-shadow: var(--shadow-2);
}
.ae-ba-knob::before, .ae-ba-knob::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border: 2px solid #fff; border-width: 2px 2px 0 0; }
.ae-ba-knob::before { left: 9px; translate: 0 -50%; rotate: -135deg; }
.ae-ba-knob::after { right: 9px; translate: 0 -50%; rotate: 45deg; }
.ae-ba-stage:has(.ae-ba-range:focus-visible) { outline: 3px solid var(--pda-teal); outline-offset: 3px; }
.ae-ba-range:focus-visible ~ .ae-ba-line .ae-ba-knob { border-color: var(--pda-teal); outline: 3px solid var(--pda-teal); outline-offset: 3px; }
/* The phone comparison sits in a device frame. */
.ae-ba--mobile { max-width: 330px; justify-self: center; width: 100%; }
.ae-ba--mobile .ae-ba-stage { border: 7px solid #232a44; border-radius: 30px; }

/* ---------- The transformation: the centerpiece band ---------- */
.ae-transform {
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, #142236 0%, transparent 70%),
    linear-gradient(180deg, #0E121E 0%, #0f1828 50%, #0E121E 100%);
  scroll-margin-top: 72px;
}
.ae-pause {
  min-height: 44px; padding: 0 18px; border-radius: 9999px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--fg-1);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.ae-pause:hover { border-color: var(--pda-teal); }
.ae-pause:focus-visible { outline: 3px solid var(--pda-teal); outline-offset: 3px; }
.ae-flows { display: grid; gap: 64px; }
.ae-flow-block { min-width: 0; }
.ae-flow-block--from { max-width: 860px; width: 100%; margin: 0 auto; }
/* "From.." and "To.." sit above their boxes, large, with that diagram's Pause control on the same line. */
.ae-flow-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 18px; padding: 0 4px; }
.ae-flow-kicker {
  margin: 0; font-family: var(--font-display); font-size: clamp(32px, 3.6vw, 48px); line-height: 1.05;
  letter-spacing: -.02em; font-weight: 600; color: var(--fg-2);
}
.ae-flow-block--to .ae-flow-kicker { color: var(--pda-teal); }
.ae-flow { position: relative; border-radius: 22px; padding: 32px clamp(20px, 3.4vw, 44px); }

/* FROM: muted, dashed, compact. */
.ae-flow--from { background: #121725; border: 1px dashed var(--border-strong); box-sizing: border-box; }
.ae-track { position: relative; }
.ae-steps { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.ae-step { display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 0 6px; }
.ae-step-t { font-size: 15px; line-height: 1.25; font-weight: 700; color: var(--fg-2); text-wrap: balance; }
.ae-node {
  position: relative; z-index: 1; margin-top: 14px; flex: none; width: 28px; height: 28px; border-radius: 50%; box-sizing: border-box;
  background: var(--bg-1); border: 2px solid var(--border-strong);
}
.ae-rail {
  position: absolute; left: calc(50% / var(--n)); right: calc(50% / var(--n)); bottom: 14px; height: 0; container-type: inline-size; z-index: 2; pointer-events: none;
  border-top: 2px dashed var(--border-strong);
}
/* The leads. --t is the place on the rail (0 Website, 1/3 Contact Form, 2/3 Email, 1 Manual Follow-up), --f the fall
   into the lost zone, --w how full the waiting ring is. At rest (no script, reduced motion, off screen) they show the
   outcome: one lead reached follow-up, one slipped out under Email. */
@property --t { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --f { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --w { syntax: '<number>'; inherits: true; initial-value: 0; }
.ae-dot {
  --t: 1; --f: 0; --w: 0;
  position: absolute; left: -7px; top: -9px; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box;
  background: var(--fg-2); border: 2px solid var(--fg-2);
  translate: calc(var(--t) * 100cqw) calc(var(--f) * 50px);
}
.ae-dot.is-lost { --t: .6667; --f: 1; background-color: transparent; border: 2px dashed var(--fg-3); opacity: .55; }
/* The lag: a ring around the step fills while the lead sits there waiting on someone. */
.ae-dot::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; translate: -50% -50%; border-radius: 50%;
  background: conic-gradient(var(--status-warning) calc(var(--w) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}
.ae-zone { margin-top: 8px; height: 72px; border-radius: 12px; }
.ae-zone--lost { border: 1px dashed var(--border-2); background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(200, 208, 226, .03) 9px 10px); }
/* One 15 s loop while on screen: about 2.6 s waiting at each step, under a second to move on. The second lead runs
   half a loop behind, so the two are never on the same step; it waits at Email, then drops out. */
.ae-js .ae-flow.is-live .ae-dot { animation: ae-lag 15s var(--ease-in-out) infinite both, ae-wait 15s linear infinite both; }
.ae-js .ae-flow.is-live .ae-dot.is-lost { animation: ae-lag-lost 15s var(--ease-in-out) -7.5s infinite both, ae-wait-lost 15s linear -7.5s infinite both; }
.ae-js .ae-flow.is-live.is-paused .ae-dot { animation-play-state: paused; }
@keyframes ae-lag {
  0%          { --t: 0; opacity: 0; }
  2.67%, 20%  { --t: 0; opacity: 1; }
  26%, 43.33% { --t: .3333; }
  49.33%, 66.67% { --t: .6667; }
  72.67%, 90% { --t: 1; opacity: 1; }
  94%, 100%   { --t: 1; opacity: 0; }
}
@keyframes ae-wait {
  0%, 2.67% { --w: 0; } 20% { --w: 1; } 20.4%, 26% { --w: 0; } 43.33% { --w: 1; } 43.73%, 49.33% { --w: 0; }
  66.67% { --w: 1; } 67.07%, 72.67% { --w: 0; } 90% { --w: 1; } 90.4%, 100% { --w: 0; }
}
@keyframes ae-lag-lost {
  0%          { --t: 0; --f: 0; opacity: 0; background-color: var(--fg-2); border-color: var(--fg-2); }
  2.67%, 20%  { --t: 0; --f: 0; opacity: 1; }
  26%, 43.33% { --t: .3333; }
  49.33%, 66.67% { --t: .6667; --f: 0; opacity: 1; background-color: var(--fg-2); border-color: var(--fg-2); }
  73%, 88%    { --t: .6667; --f: 1; opacity: .55; background-color: transparent; border-color: var(--fg-3); }
  94%, 100%   { --t: .6667; --f: 1; opacity: 0; background-color: transparent; border-color: var(--fg-3); }
}
@keyframes ae-wait-lost {
  0%, 2.67% { --w: 0; } 20% { --w: 1; } 20.4%, 26% { --w: 0; } 43.33% { --w: 1; } 43.73%, 49.33% { --w: 0; }
  66.67% { --w: 1; } 67.07%, 100% { --w: 0; }
}

/* TO: the connected system. Six channels, curved paths, Addison's site at the hub, then CRM, then follow-up. */
.ae-flow--to {
  border: 1px solid rgba(32, 200, 162, .45);
  background:
    radial-gradient(ellipse 60% 70% at 55% 50%, #1a2a44 0%, transparent 70%),
    linear-gradient(160deg, #18233a 0%, #141d30 55%, #13262f 100%);
  box-shadow: var(--shadow-3), var(--shadow-inset-line);
}
/* Background texture on its own layer, under the content. */
.ae-flow--to::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(rgba(200, 208, 226, .07) 1px, transparent 1.2px) 0 0 / 22px 22px;
}
.ae-flow--to > * { position: relative; z-index: 1; }
.ae-omni { margin: 0; }
.ae-omni-stage { position: relative; width: 100%; aspect-ratio: 1100 / 520; container-type: inline-size; }
.ae-omni-paths { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ae-omni-paths--tall { display: none; }
.ae-beams path { fill: none; stroke: rgba(200, 208, 226, .2); stroke-width: 2; }
.ae-beams .ae-beam-main { stroke: #4FA0DA; stroke-width: 2.5; }
.ae-lights path { fill: none; stroke: url(#aeBeam); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 12 200; stroke-dashoffset: 12; }
.ae-omni-paths--tall .ae-lights path { stroke: url(#aeBeamTall); }
.ae-lights .ae-light-hub, .ae-lights .ae-light-crm { stroke-dasharray: 40 200; stroke-dashoffset: 40; }

.ae-chans, .ae-sys { list-style: none; margin: 0; padding: 0; }
.ae-chan {
  position: absolute; left: calc(var(--x) / 1100 * 100%); top: calc(var(--y) / 520 * 100%); width: calc(60 / 1100 * 100%);
  aspect-ratio: 1; translate: -50% -50%; z-index: 2;
}
.ae-chan-icon {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}
.ae-chan-icon svg { width: 52%; height: 52%; }
.ae-chan-lbl {
  position: absolute; right: calc(100% + 12px); top: 50%; translate: 0 -50%; white-space: nowrap;
  font-size: clamp(12px, 1.45cqw, 15px); font-weight: 600; color: var(--fg-1);
}
.ae-box {
  position: absolute; left: calc(var(--x) / 1100 * 100%); top: calc(var(--y) / 520 * 100%);
  width: calc(var(--w) / 1100 * 100%); height: calc(var(--h) / 520 * 100%); z-index: 2; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(6px, 1.1cqw, 12px); padding: clamp(6px, 1.2cqw, 14px) clamp(8px, 1.4cqw, 16px); text-align: center;
  border-radius: 16px; background: #0f1524; border: 1px solid rgba(79, 160, 218, .5); box-shadow: 0 16px 34px rgba(0, 0, 0, .45);
}
.ae-box-lbl { font-size: clamp(12px, 1.45cqw, 16px); line-height: 1.25; font-weight: 700; color: var(--fg-1); }
.ae-box--hub { border-color: rgba(32, 200, 162, .7); background: #101a2a; }
.ae-box--hub img { width: 82%; height: auto; }
.ae-box--crm { color: var(--pda-teal); }
.ae-box-icon { width: 30%; height: auto; }
.ae-rows { display: grid; gap: 7px; width: 82%; }
.ae-rows i { display: block; height: 9px; border-radius: 9999px; background: var(--pda-gradient); transform-origin: left center; }
.ae-rows i:nth-child(2) { width: 84%; }
.ae-rows i:nth-child(3) { width: 66%; }

/* Light runs along each path only while the diagram is on screen and not paused. Deterministic delays. */
.ae-js .ae-omni.is-live .ae-lights path { animation: ae-beam 4.8s linear calc(var(--i, 0) * .8s) infinite; }
.ae-js .ae-omni.is-live .ae-lights .ae-light-hub { animation: ae-beam-short .8s linear 1.92s infinite; }
.ae-js .ae-omni.is-live .ae-lights .ae-light-crm { animation: ae-beam-short .8s linear 2.4s infinite; }
.ae-js .ae-omni.is-live .ae-rows i { animation: ae-row 2.4s var(--ease-out) calc(2.88s + var(--j) * .8s) infinite both; }
.ae-js .ae-omni.is-live.is-paused .ae-lights path,
.ae-js .ae-omni.is-live.is-paused .ae-lights .ae-light-hub,
.ae-js .ae-omni.is-live.is-paused .ae-lights .ae-light-crm,
.ae-js .ae-omni.is-live.is-paused .ae-rows i { animation-play-state: paused; }
@keyframes ae-beam { 0% { stroke-dashoffset: 12; } 40%, 100% { stroke-dashoffset: -112; } }
@keyframes ae-beam-short { 0% { stroke-dashoffset: 40; } 60%, 100% { stroke-dashoffset: -140; } }
@keyframes ae-row { 0% { scale: .2 1; opacity: .45; } 22%, 100% { scale: 1 1; opacity: 1; } }

/* The CRM: three real screens. Default (no script): stacked rows, text beside each screenshot. With script: tabs. */
.ae-crm { margin-top: 96px; }
.ae-crm h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: clamp(26px, 2.8vw, 36px); line-height: 1.12; letter-spacing: -.015em; font-weight: 600; text-align: center; }
.ae-crm-lead { margin: 0 auto 32px !important; text-align: center; }
.ae-crm-grid { display: grid; gap: 48px; }
.ae-crm-col {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: "icon shot" "title shot" "tools shot";
  grid-template-rows: auto auto 1fr; column-gap: 36px; align-items: start;
}
.ae-crm-icon { grid-area: icon; width: 30px; height: 30px; color: var(--pda-teal); margin: 0 0 12px; }
.ae-crm-col h4 { grid-area: title; margin: 0 0 10px; font-family: var(--font-display); font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.ae-crm-col .ae-tools { grid-area: tools; }
.ae-tools { font-size: 15px; line-height: 1.6; color: var(--fg-2); }
/* Dot-separated lists that wrap cleanly: each item carries its dot on its left, the list sits one dot-width further
   left, and that strip is clipped, so no line ever starts or ends with a stray dot. The dot is silent to screen readers. */
.ae-tools, .ae-dots { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 0 -1.3em; padding: 0; list-style: none; clip-path: inset(0 0 0 1.3em); }
.ae-tools li, .ae-dots > span { position: relative; padding-left: 1.3em; white-space: nowrap; }
.ae-tools li::before, .ae-dots > span::before {
  content: "\00B7"; content: "\00B7" / ""; position: absolute; left: 0; width: 1.3em; text-align: center; color: var(--fg-3);
}
.ae-shot { grid-area: shot; margin: 0; }
.ae-shot .ae-frame { border: 1px solid var(--border-2); border-radius: 14px; overflow: hidden; background: #0b0e17; box-shadow: var(--shadow-3); }
.ae-shot img { display: block; width: 100%; height: auto; }

/* Tabbed (added by the script): one large screen at a time, chosen from three benefit tabs. */
.ae-crm-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.ae-crm-tab {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: start; text-align: left;
  min-height: 44px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border-2); background: var(--bg-2);
  color: var(--fg-1); font: inherit; cursor: pointer; transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.ae-crm-tab .ae-crm-icon { grid-area: auto; grid-column: 1; grid-row: 1 / span 2; margin: 2px 0 0; width: 26px; height: 26px; }
.ae-crm-tab-t { grid-column: 2; grid-row: 1; font-family: var(--font-display); font-size: 19px; line-height: 1.2; font-weight: 600; }
.ae-crm-tab-d { grid-column: 2; grid-row: 2; font-size: 13px; line-height: 1.45; color: var(--fg-3); }
.ae-crm-tab:hover { border-color: var(--border-strong); }
.ae-crm-tab[aria-selected="true"] { border-color: rgba(32, 200, 162, .7); background: #13262f; }
.ae-crm-tab[aria-selected="true"] .ae-crm-tab-d { color: var(--fg-2); }
.ae-crm-tab:focus-visible { outline: 3px solid var(--pda-teal); outline-offset: 3px; }
.ae-crm.is-tabbed .ae-crm-grid { display: block; }
.ae-crm.is-tabbed .ae-crm-col { display: block; max-width: 1000px; margin: 0 auto; }
.ae-crm.is-tabbed .ae-crm-col[hidden] { display: none; }
.ae-crm.is-tabbed .ae-crm-col > :not(.ae-shot) { display: none; }
.ae-crm.is-tabbed .ae-crm-col:focus-visible { outline: 3px solid var(--pda-teal); outline-offset: 6px; border-radius: 14px; }

/* ---------- The results ---------- */
.ae-results-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 40px; align-items: center; }
.ae-results-text { grid-column: 1 / span 5; }
.ae-metrics { grid-column: 6 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ae-metric {
  display: flex; flex-direction: column; gap: 10px; padding: 28px 26px;
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow-2), var(--shadow-inset-line);
}
.ae-metric-num {
  display: block; font-family: var(--font-display); font-size: clamp(44px, 5vw, 72px); line-height: 1; font-weight: 600;
  letter-spacing: -.025em; color: var(--pda-teal); font-variant-numeric: lining-nums;
}
.ae-metric-lbl { display: block; font-size: 16px; line-height: 1.3; font-weight: 600; color: var(--fg-1); }
.ae-metric--value { grid-column: 1 / -1; gap: 16px; border-color: rgba(32, 200, 162, .45); background: linear-gradient(160deg, #1b2a3c 0%, #1a2034 100%); }
.ae-metric-total { display: flex; flex-direction: column; gap: 10px; }
.ae-part-bar { height: 14px; border-radius: 9999px; background: rgba(200, 208, 226, .14); overflow: hidden; }
.ae-part-fill { display: block; height: 100%; width: 9.6%; min-width: 14px; border-radius: 9999px; background: var(--pda-gradient); }
.ae-metric-part { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; padding-top: 4px; }
.ae-metric-part .ae-metric-num { font-size: clamp(30px, 3vw, 42px); }

/* ---------- Invitation ---------- */
.ae-invite { padding: 96px 0 104px; }
.ae-invite-card {
  position: relative; overflow: hidden; border: 1px solid var(--border-2); border-radius: 22px; padding: 56px clamp(26px, 5vw, 64px);
  background: linear-gradient(160deg, #1a2034 0%, #131828 100%); text-align: center; box-shadow: var(--shadow-3);
}
.ae-invite-card h2 { font-family: var(--font-display); font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -.02em; font-weight: 600; margin: 0 auto 18px; max-width: 760px; text-wrap: balance; }
.ae-invite-card > p { font-size: 19px; line-height: 1.6; color: var(--fg-2); margin: 0 auto 26px; max-width: 58ch; }
.ae-invite-card .ae-actions { margin-bottom: 4px; }
.ae-rule { border: 0; height: 1px; background: var(--border-2); margin: 44px auto; max-width: 520px; }
.ae-invite-card h3 { font-size: 22px; line-height: 1.2; margin: 0 0 10px; font-weight: 600; }
.ae-links { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; }
.ae-links a { color: var(--pda-teal); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ae-stats { grid-template-columns: 1fr 1fr; max-width: 760px; }
  .ae-stat-pair { display: block; grid-column: 1 / -1; }
  .ae-results-text, .ae-metrics { grid-column: 1 / -1; }
  .ae-results-text { max-width: 720px; }
}
@media (max-width: 960px) {
  .ae-section { padding: 76px 0; }
  .ae-split, .ae-ba-row, .ae-results-layout { grid-template-columns: minmax(0, 1fr); }
  .ae-split-text, .ae-split-media, .ae-split--flip .ae-split-text, .ae-split--flip .ae-split-media { grid-column: 1 / -1; grid-row: auto; }
  .ae-ba-row { gap: 20px; }
  .ae-ba-row + .ae-ba-row { margin-top: 64px; }
  .ae-ba-copy, .ae-ba-row .ae-ba, .ae-ba-row--contact .ae-ba-copy, .ae-ba-row--contact .ae-ba,
  .ae-ba-row--mobile .ae-ba-copy, .ae-ba-row--mobile .ae-ba { grid-column: 1 / -1; grid-row: auto; }
}
/* The system diagram stacks vertically before its labels would get cramped. */
@media (max-width: 900px) {
  .ae-omni-stage { aspect-ratio: 360 / 790; max-width: 420px; margin: 0 auto; }
  .ae-omni-paths--wide { display: none; }
  .ae-omni-paths--tall { display: block; }
  .ae-chan { left: calc(var(--mx) / 360 * 100%); top: calc(var(--my) / 790 * 100%); width: calc(48 / 360 * 100%); }
  .ae-chan-lbl {
    right: auto; left: 50%; top: calc(100% + 8px); translate: -50% 0; white-space: normal; width: calc(120 / 48 * 100%);
    text-align: center; font-size: clamp(12px, 3.4cqw, 14px); line-height: 1.25;
  }
  .ae-box { left: calc(var(--mx) / 360 * 100%); top: calc(var(--my) / 790 * 100%); width: calc(var(--mw) / 360 * 100%); height: calc(var(--mh) / 790 * 100%); }
  .ae-box-lbl { font-size: clamp(13px, 4cqw, 16px); }
  .ae-box--hub { flex-direction: row; }
  .ae-box--hub img { width: 46%; }
  .ae-box--hub .ae-box-lbl { text-align: left; }
  .ae-box--crm { flex-direction: row; }
  .ae-box-icon { width: 18%; }
  .ae-crm-col { grid-template-columns: minmax(0, 1fr); grid-template-areas: "icon" "title" "tools" "shot"; grid-template-rows: auto; }
  .ae-crm-col .ae-shot { margin-top: 16px; }
  .ae-crm-tabs { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ae-crm-tab { padding: 12px 14px; }
}
@media (max-width: 760px) {
  .ae-wrap { padding: 0 22px; }
  .ae-hero { padding: 84px 0 56px; }
  .ae-lead { font-size: 17px; }
  .ae-section p { font-size: 17px; }
  .ae-js .ae-ba--contact .ae-ba-stage { --w: 600; --h: 640; }
  .ae-js .ae-ba--contact .ae-ba-pic img { object-position: top center; }
  .ae-metrics { gap: 12px; }
  .ae-metric { padding: 22px 20px; }
  .ae-flow { padding: 24px 16px 26px; border-radius: 18px; }
  .ae-flows { gap: 48px; }
  .ae-flow-head { margin-bottom: 14px; }
  .ae-step-t { font-size: 13px; }
  .ae-invite { padding: 64px 0 72px; }
  .ae-invite-card { padding: 40px 22px; border-radius: 18px; }
}
@media (max-width: 430px) {
  .ae-stats { grid-template-columns: 1fr; }
  .ae-stat-pair-list { grid-template-columns: 1fr; }
  .ae-stat-pair-list .ae-stat + .ae-stat { border-left: 0; border-top: 1px solid var(--border-2); }
  .ae-metrics { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .ae-wrap { padding: 0 18px; }
  .ae-stat { padding: 20px 18px; }
  .ae-step { padding: 0 2px; }
  .ae-step-t { font-size: 12px; }
  .ae-flow--to { padding-left: 8px; padding-right: 8px; }
  .ae-chan-lbl { width: calc(136 / 48 * 100%); font-size: 11.5px; }
}
@media (forced-colors: active) {
  .ae-support { background: none; -webkit-text-fill-color: CanvasText; color: CanvasText; }
  .ae-ba-line { background: CanvasText; }
  .ae-ba-knob { border-color: CanvasText; background: Canvas; }
  .ae-hl { text-decoration: underline; background: none; }
  .ae-beams path { stroke: CanvasText; }
}

/* The closing card brings the hero's contour lines back, rising from its lower edge: the page ends where it began. */
.ae-invite-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .95;
  background-image: var(--ae-contour); background-size: 900px 520px; background-position: center 40%; background-repeat: repeat-x;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 100%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 100%, #000 0%, transparent 78%);
}
.ae-invite-card > * { position: relative; }

/* Slider position. Registered so the scroll wipe below can animate it; the script writes it once the reader takes over. */
@property --pos { syntax: '<number>'; inherits: true; initial-value: 50; }

/* Optional, motion-only polish. The page is complete without it.
   Every effect here is tied to scroll position (the reader's own hand), runs on transform, opacity, clip-path or a
   custom property, and rests fully visible. Each act moves differently:
   hero: depth planes (contours slowest, logo slower, metrics a touch faster than the page)
   business and approach: the photo drifts inside its frame
   opportunity: copy slides in from its own side, and each comparison wipes from the old site to the halfway mark
   transformation: the headings rise, the To channels arrive one by one (the From and To loops live above)
   CRM: the screen settles flat out of a slight tilt
   results: the closed share fills its bar   close: the card settles over the returning contours */
html { scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @supports (animation-timeline: scroll()) {
    .ae-contours { animation: ae-drift linear both; animation-timeline: scroll(root block); animation-range: 0 720px; }
    .ae-logo { animation: ae-plane-back linear both; animation-timeline: scroll(root block); animation-range: 0 640px; }
    .ae-stats { animation: ae-plane-front linear both; animation-timeline: scroll(root block); animation-range: 0 640px; }
    @keyframes ae-drift { to { transform: translateY(46px); } }
    @keyframes ae-plane-back { to { translate: 0 22px; } }
    @keyframes ae-plane-front { to { translate: 0 -18px; } }

    /* Entrances tied to scroll position: the reader stays in control, and content rests fully visible. */
    .ae-photo, .ae-ba-stage, .ae-flow--from, .ae-flow-head, .ae-pull, .ae-invite-card {
      animation: ae-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 45%;
    }
    .ae-metric { animation: ae-rise linear both; animation-timeline: view(); animation-range: entry calc(var(--k, 0) * 8%) entry calc(45% + var(--k, 0) * 8%); }
    .ae-metric:nth-child(2) { --k: 1; } .ae-metric:nth-child(3) { --k: 2; }
    .ae-chan, .ae-box {
      animation: ae-pop linear both; animation-timeline: view();
      animation-range: entry calc(10% + var(--i, 3) * 7%) entry calc(55% + var(--i, 3) * 7%);
    }
    .ae-box--hub { --i: 6; } .ae-box--crm { --i: 7; } .ae-box--fu { --i: 8; }
    @keyframes ae-rise { from { translate: 0 22px; opacity: .35; } to { translate: 0 0; opacity: 1; } }
    @keyframes ae-pop { from { scale: .82; opacity: .3; } to { scale: 1; opacity: 1; } }

    /* Elements inside an overflow:hidden frame would track that frame (it counts as a scroll container), so the frame
       names its own view timeline and the inner layer follows it. */
    .ae-photo { view-timeline: --ae-photo block; }
    .ae-metric--value { view-timeline: --ae-value block; }
    .ae-invite { view-timeline: --ae-close block; }

    /* Photos drift inside their frames (scaled up just enough that no edge ever shows). The truck scales from its
       left edge so the ADDISON lettering on the door stays in frame. */
    .ae-photo img { scale: 1.1; animation: ae-pan linear both; animation-timeline: --ae-photo; animation-range: cover 0% cover 100%; }
    .ae-biz .ae-photo img { transform-origin: 0% 50%; }
    @keyframes ae-pan { from { translate: 0 -4%; } to { translate: 0 4%; } }

    /* Comparisons: the old site fills the frame as it arrives, then the current one wipes in to the halfway mark.
       The moment the reader drags or presses a key, the script marks it .is-set and the slider is theirs. */
    .ae-js .ae-ba:not(.is-set) { animation: ae-wipe linear both; animation-timeline: view(); animation-range: entry 30% cover 50%; }
    @keyframes ae-wipe { from { --pos: 96; } to { --pos: 50; } }
    @media (min-width: 961px) {
      .ae-ba-copy { --dx: -32px; animation: ae-side linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
      .ae-ba-row--contact .ae-ba-copy { --dx: 32px; }
      @keyframes ae-side { from { translate: var(--dx) 0; opacity: .3; } to { translate: 0 0; opacity: 1; } }
    }

    /* The CRM screen settles flat as it reaches the reader. */
    .ae-shot .ae-frame { transform-origin: 50% 100%; animation: ae-tilt linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    @keyframes ae-tilt { from { transform: perspective(1800px) rotateX(10deg) scale(.95); opacity: .45; } to { transform: none; opacity: 1; } }

    /* Results: the closed amount fills its share of the total. */
    .ae-part-fill { transform-origin: left center; animation: ae-fill linear both; animation-timeline: --ae-value; animation-range: entry 70% cover 50%; }
    @keyframes ae-fill { from { scale: 0 1; } to { scale: 1 1; } }

    /* Close: the contours rise into the card as it settles. */
    .ae-invite-card::before { animation: ae-terrain linear both; animation-timeline: --ae-close; animation-range: entry 10% cover 50%; }
    @keyframes ae-terrain { from { translate: 0 60px; opacity: 0; } to { translate: 0 0; opacity: .95; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .ae-lights path, .ae-rows i, .ae-dot { animation: none !important; }
}
