/* =====================================================================
   TEMPLATE — capital-acquisition / Tripoli Advisors Capital, the shared chrome.
   ---------------------------------------------------------------------
   Five pages hang off this file: index (the capital homepage), financing
   (working capital), buyer-form, seller-form and portal. It owns the
   tokens, the type, the header, the footer and the buttons; each page
   adds only what is its own.

   ⚠️ THE SKIN IN THIS FILE IS A REFERENCE, NOT A DEFAULT. The values you
   see (deep navy base, signal-red accent, condensed uppercase display
   face, square corners, disc CTA) are ONE prospect's design language,
   harvested off their live site. Shipping them to a different client is
   the definition of AI slop. Every :root token below, the masthead
   treatment, the headline two-tone rule, the button language and the two
   decorating motifs (.dots grid, offset solid block) must be re-derived
   from the NEW prospect's live site during the blend pass — see
   README.md §"The blend". The GRID, the motion system and the form
   plumbing are the template; the skin is not.

   Cache: linked as capital.css?v=N. Bump N when this file changes.
   ===================================================================== */

:root {
  /* -- SKIN: re-derive every value in this block from the prospect ---- */
  /* the two brand colours, straight off their live site (count instances
     on the LIVE site before trusting a harvest — plugin defaults and
     platform furniture lie) */
  /* the logo navy, which is also the ground of their hero photograph.
     It is the brand colour and it carries every dark surface here. */
  --base: #152433;
  --base-deep: #0c1a26;
  --base-lift: #2b4258;
  /* the accent is their near-black, because that is the colour that
     actually carries a CTA on tripoliadvisors.com — "Schedule Meeting"
     is #2d2a2a and "Send" / "Sign Up" are #080707. The navy never
     appears as a button anywhere on the site. */
  --accent: #161616;
  --accent-deep: #080707;
  /* the accent lifted until it holds 3:1 as display type on --base —
     measure it; a raw accent that reads on white usually goes muddy on
     the dark band */
  /* a near-black cannot be an accent ON the navy band, and the site
     publishes no light accent, so this is the navy lifted until it
     holds 4.4:1 on --base. */
  --accent-on-dark: #b9c6d4;
  --spot: #2f4f4f;          /* the only other colour on the site: the footer contact links */

  /* bare rgb triplets of --base / --base-deep / --accent, for the
     rgba() derivations (scrims, focus rings, selection, shadows).
     KEEP IN SYNC with the hex values above. */
  --base-rgb: 21, 36, 51;
  --base-deep-rgb: 12, 26, 38;
  --accent-rgb: 22, 22, 22;

  /* their masthead is white, with their real logo on it. Everything the
     template painted white inside the bar is flipped below. */
  --masthead: #ffffff;

  /* the two faces. --font-display gets headlines and big figures ONLY;
     --font-body is everything a person reads at length or types into.
     A brand with no display face uses the body face in both at a heavier
     weight — then remove the uppercase transform from .cap-h1/.cap-h2. */
  --font-display: Cinzel, Georgia, serif;
  --font-body: Cantarell, Arial, sans-serif;

  --ink: #080707;            /* their heading ink */
  --body: #5e5e5e;           /* their paragraph grey */
  --muted: #6f6f6f;
  --faint: #a4a4a4;

  --canvas: #f6f6f6;         /* the light band under their subscribe strip */
  --paper: #ffffff;
  --line: #e4e4e4;
  --line-soft: rgba(var(--base-rgb), .1);
  --line-dark: rgba(255, 255, 255, .16);
  --on-dark: rgba(255, 255, 255, .74);

  --shell: min(1240px, 100%);
  /* Dos curvas y nada más.
     --ease      feedback: hover, foco, press. Reacción, no viaje.
     --settle    entrada: cola de desaceleración larga, sin overshoot. Es
                 lo que hace que algo se ASIENTE en vez de aterrizar, y de
                 donde sale la sensación de calma. Un rebote acá leería
                 como juguetón, que es exactamente lo contrario. */
  --ease: cubic-bezier(.2, .8, .25, 1);
  --settle: cubic-bezier(.16, .84, .28, 1);

  /* Role tokens the CRE form reads (added with the capital-acquisition-cre
     shape, 2026-09-08). They were literals inside crossriver's own pages,
     which is why that build could not be stamped from this template.
     --accent-ink   what sits ON the accent as a label. White unless the
                    accent is light enough that black is the readable ink —
                    measure it, do not assume white.
     --accent-text  the accent lifted (or darkened) until it holds 4.5:1 on
                    white, for small type, rails and field borders. An
                    accent that works as a fill usually does not as type.
     --radius / --radius-sm / --pill  the corner language. Square is a
                    legitimate answer: set all three to 0 and the CTA stops
                    being a pill without touching any rule. */
  --accent-ink: #f7f7f7;     /* their own button label colour, not pure white */
  --accent-text: #152433;    /* small type and rails take the navy: 14.4:1 on white */
  /* every corner on tripoliadvisors.com is square */
  --radius: 0;
  --radius-sm: 0;
  --pill: 0;
  /* the focus-ring triplet. Aliased so a brand whose accent is near-black
     can point the ring at something visible without editing every rule. */
  --ring-rgb: 21, 36, 51;    /* the navy: a near-black ring is invisible against a field border */

  /* what the ported Lendflow form CSS reads. Same colours, its names. */
  --lf-accent: #161616;
  --lf-accent-dark: #080707;
  --lf-accent-text: #152433;
  --lf-accent-ink: #f7f7f7;
  --lf-form-dark: #152433;
  --lf-form-bg: #f6f6f6;
  --lf-form-border: #e4e4e4;
  --lf-font-heading: var(--font-body);
  --lf-font-body: var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--body);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }

::selection { background: rgba(var(--accent-rgb), .16); color: var(--base); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.on-dark :focus-visible, .cap-footer :focus-visible, .cap-head :focus-visible { outline-color: #fff; }

.shell { width: var(--shell); margin: 0 auto; padding-inline: clamp(20px, 4vw, 44px); }

/* ---------------------------------------------------------------------
   Type. --font-display gets the headlines and the big figures and
   nothing else; anything a person reads at length or types into stays
   --font-body. The uppercase transform and .92 line-height below assume
   a condensed display face — a brand whose headings are set in a normal
   face drops the transform and opens the leading during the blend.
   --------------------------------------------------------------------- */
/* Cinzel is not a condensed face and it is not set in caps on their site:
   text-transform stays none, because the face itself renders lowercase as
   small capitals, and that is where the all-caps look comes from. Their
   leading is open — 1.2 on the h1, 1.4 on an h2 — and tracking is normal. */
.display,
.cap-h1, .cap-h2, .cap-h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: none;
  color: var(--ink);
  line-height: 1.34;
  letter-spacing: normal;
}
.cap-h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.2; }
.cap-h2 { font-size: clamp(28px, 3.1vw, 44px); }
.cap-h3 { font-size: clamp(21px, 2vw, 30px); }
/* No two-tone headline. tripoliadvisors.com sets every heading in one
   colour, so <em> is a phrase mark that changes nothing — the heading
   carries the section on its own. */
.cap-h1 em, .cap-h2 em, .cap-h3 em, .display em { font-style: normal; color: inherit; }
.on-dark .cap-h1, .on-dark .cap-h2, .on-dark .cap-h3 { color: #f7f7f7; }
.on-dark .cap-h1 em, .on-dark .cap-h2 em, .on-dark .cap-h3 em { color: inherit; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.on-dark .eyebrow { color: rgba(255, 255, 255, .62); }

.lede { max-width: 56ch; font-size: 16.5px; line-height: 1.78; color: var(--body); }
.on-dark .lede { color: var(--on-dark); }

/* the hairline they draw under every section heading */
.rule { height: 1px; margin: 26px 0 0; background: var(--line); border: 0; }
.on-dark .rule { background: var(--line-dark); }

/* ---------------------------------------------------------------------
   Buttons. The primary is their "Read More ●" — a label with a filled
   red disc carrying a chevron. Nothing else on the site is round, which
   is exactly what makes the disc read as Tripoli Advisors's.
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 32px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  /* their button: 14px Cantarell 700, .88px of tracking, 60px tall,
     square, and nothing after the label */
  min-width: 170px;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .88px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-solid { background: var(--base); border-color: var(--base); color: var(--accent-ink); }
.btn-solid:hover { background: var(--base-deep); border-color: var(--base-deep); }
.btn-red { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-red:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost:hover { border-color: var(--base); color: var(--base); }
.on-dark .btn { border-color: var(--line-dark); color: #f7f7f7; }
/* Their button is a near-black block with light ink. On a dark band that
   block has nothing to sit against, so the pair inverts: a light block
   with the ink colour on it. Same language, read the other way round. */
.on-dark .btn-red { background: #f7f7f7; border-color: #f7f7f7; color: var(--ink); }
.on-dark .btn-red:hover { background: #fff; border-color: #fff; color: var(--ink); }
.on-dark .btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .4); color: #fff; }

/* No disc. The disc CTA is the reference brand's signature; every button
   on tripoliadvisors.com is a bare uppercase label on a square block.
   The inline row link keeps a rule under it instead, which is the one
   underline treatment their site does use (the active nav item). */
.btn-disc::after { content: none; }
.arrow-link::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  opacity: .38;
  transition: opacity .2s var(--ease);
}
.arrow-link:hover::after { opacity: 1; }

/* the inline "Read More ●" used inside cards and rows */
.arrow-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--base);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.on-dark .arrow-link { color: #f7f7f7; }

/* ---------------------------------------------------------------------
   Motifs. tripoliadvisors.com decorates with nothing: full-bleed
   photographs, centred type, square edges, and a hairline under the
   active nav item. The reference brand's dotted grid and offset block
   are not theirs, so both are off — the markup keeps the hooks so a
   later blend can put something real in them.
   --------------------------------------------------------------------- */
.dots { display: none; }

/* ============================ masthead ============================ */
.cap-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--masthead);
  border-bottom: 1px solid var(--line);
}
.cap-nav { min-height: 84px; display: flex; align-items: center; gap: 22px; }

/* The lockup. Two storeys: the wordmark, and the division under it —
   that is what tells a visitor they are on capital, not on tripoliadvisors.com.
   The tracking on the second line is tuned to the width of the first. */
.lockup { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.lockup img { width: 34px; height: 34px; }
.lockup-name { display: grid; gap: 3px; line-height: 1; }
.lockup-name strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: .2px;
  color: var(--base);
}
.lockup-name strong i { font-style: normal; color: var(--accent); }
/* The divisional line is tracked out until its glyph run measures exactly
   as wide as the wordmark above it. MEASURE, don't guess: width of the
   wordmark at its final size, minus the natural width of "CAPITAL" (or
   whatever the division reads), divided by the inter-letter gaps. The
   negative margin cancels the trailing gap, which would otherwise push
   the run past the wordmark's right edge.
   ⚠️ These two numbers are tuned PER BRAND NAME — a 4-letter and a
   14-letter wordmark need completely different tracking. Retune them in
   every blend, and again if .lockup-name strong ever changes size. */
.lockup-name em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  /* MEASURED, not guessed: "Tripoli Advisors" is 169.6px at 19px Cinzel and
     "CAPITAL" is 48.6px untracked. margin-right cancels the trailing gap, so
     six gaps carry the difference: (169.6 - 48.6) / 6 = 20.2px.
     RETUNE if the wordmark size or the brand name ever changes. */
  letter-spacing: 20.2px;
  margin-right: -20.2px;
  text-transform: uppercase;
  color: var(--muted);
}
/* The masthead is WHITE here, so the lockup's default is the dark one and
   the dark surfaces (the navy footer, the portal bar) are the exception.
   The emblem is a navy disc, invisible on the navy band, so on a dark
   surface it sits on a small white plate — square, like everything else. */
.on-dark .lockup .lockup-name strong { color: #f7f7f7; }
.on-dark .lockup .lockup-name em { color: rgba(255, 255, 255, .58); }
.on-dark .lockup img { background: #fff; padding: 3px; box-sizing: content-box; }
.lockup-dark .lockup-name strong { color: var(--base); }
.lockup-dark .lockup-name em { color: var(--muted); }

.cap-links { display: flex; align-items: center; gap: 15px; margin-left: auto; }
.cap-links a {
  position: relative;
  padding: 6px 0;
  color: #1b1b1b;
  font-size: 12.2px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  /* six links plus their domain plus the two actions: uppercase makes the
     run long enough that a wrap is the default, and a wrapped nav reads as
     a broken header. nowrap first, then the gap absorbs the rest. */
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.cap-links a:hover { color: var(--ink); }
/* the hairline under the current page — theirs, verbatim */
.cap-links a.active { color: var(--ink); }
.cap-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
}

.cap-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.cap-login {
  color: #1b1b1b;
  font-size: 12.4px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.cap-login:hover { color: var(--ink); }
.cap-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11.6px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .2s var(--ease);
}
.cap-cta:hover { background: var(--accent-deep); }
/* no arrow: nothing follows a label on any button on their site */
.cap-cta::after { content: none; }

.cap-burger { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; }
.cap-burger span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--ink); }

/* ============================ footer ============================ */
.cap-footer { background: var(--base); color: var(--on-dark); }

/* their newsletter strip: a full-bleed #f6f6f6 band with dark type in it */
.cap-strip { background: var(--canvas); color: var(--ink); }
.cap-strip .shell {
  min-height: 132px;
  padding-block: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cap-strip .eyebrow { margin: 0 0 6px; color: var(--muted); }
.cap-strip .cap-h3 { color: var(--ink); }
.cap-strip-contact { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
/* the phone and the email take --spot: #2f4f4f is the one colour their
   own footer puts on these two links, and it is the only place on the
   whole site where a link is not simply ink. */
.cap-strip-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--spot);
  font-size: 14.5px;
  font-weight: 600;
}
.cap-strip-contact a:hover { text-decoration: underline; text-underline-offset: 4px; }

.cap-footer-main {
  padding: 68px 0 52px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
}
.cap-footer-brand p { max-width: 300px; margin: 18px 0 22px; font-size: 13.4px; line-height: 1.8; color: var(--on-dark); }
/* the socials rail and its rules are gone: tripoliadvisors.com publishes no
   social account anywhere, and an invented one is worse than none. */

.cap-footer-col h3 {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
}
.cap-footer-col a { display: block; margin-bottom: 10px; font-size: 13.4px; color: var(--on-dark); }
.cap-footer-col a:hover { color: #fff; }

.cap-footer-bottom {
  padding: 22px 0 30px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  font-size: 11.6px;
  line-height: 1.75;
  color: rgba(255, 255, 255, .52);
}
.cap-footer-bottom p { max-width: 640px; margin: 0; }

/* ============================ responsive ============================ */
/* El riel del header nunca cupo entre el breakpoint de la hamburguesa y
   ~1290px: con cuatro puertas ya se salía 270px a 1000px de ancho, y la
   página ganaba scroll horizontal. Con la quinta puerta el borde se movió
   hacia arriba, así que el tramo se arregla en dos escalones antes de que
   la hamburguesa tome el relevo.

   Primer escalón: se va el enlace al sitio del prospecto. Es el más largo
   del riel y el único que no es una puerta — sigue estando en el footer de
   todas las páginas. */
@media (max-width: 1360px) {
  .cap-links { gap: 12px; }
  .cap-links a { font-size: 11.6px; letter-spacing: .04em; }
  .cap-links a[target="_blank"] { display: none; }
}
@media (max-width: 1180px) {
  .cap-nav { gap: 16px; }
  .cap-links { gap: 10px; }
  .cap-links a { font-size: 11px; letter-spacing: .03em; }
  .cap-actions { gap: 12px; }
}
@media (max-width: 1280px) {
  .cap-burger { display: block; }
  .cap-links {
    position: fixed;
    inset: 84px 0 auto;
    margin: 0;
    padding: 22px clamp(20px, 4vw, 44px) 30px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--masthead);
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: none;
  }
  .cap-links.open { display: flex; }
  /* Fixed takes the rail out of the flow, and its margin-left: auto was the
     only thing pushing the actions to the right edge. */
  .cap-actions { margin-left: auto; }
  .cap-links a[target="_blank"] { display: block; }
  .cap-links a { width: 100%; padding: 12px 0; font-size: 15px; }
  .cap-links a.active::after { display: none; }
  .cap-login { display: none; }
  .cap-footer-main { grid-template-columns: 1fr 1fr; }
  .cap-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .cap-nav { min-height: 72px; }
  .cap-links { inset-block-start: 72px; }
  .cap-footer-main { grid-template-columns: 1fr; }
  .cap-footer-brand { grid-column: auto; }
  .cap-footer-bottom { flex-direction: column; }
  .cap-cta { padding: 9px 14px; }
}

/* =====================================================================
   Motion.
   ---------------------------------------------------------------------
   Un solo gesto en todo el sitio: 14px hacia arriba y un fundido. Se
   repite en cada sección, así que después de la primera el ojo ya sabe
   qué va a pasar — y esa previsibilidad ES la sensación de solidez.

   Nada entra desde fuera de la pantalla, nada escala desde cero, nada
   rebota. Las distancias son cortas a propósito: un elemento que viaja
   14px se lee como que estaba ahí y se acomodó; uno que viaja 80px se
   lee como que llegó corriendo.

   Duraciones: 680ms para entradas, 180ms para hover, 90ms para el
   press. Los 680 están muy por encima del rango habitual de web
   (150-200), y es deliberado: eso es feedback funcional, esto es
   contenido apareciendo. A 250ms el mismo movimiento se siente
   nervioso, y bajando de 500 con scroll lento ni se alcanza a ver.
   ===================================================================== */

/* El estado oculto vive bajo html.js, y esa clase la pone un script
   inline en el <head> antes del primer pintado. Sin JS no hay nada
   escondido: la página abre completa, sin movimiento. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  will-change: opacity, transform;
}
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .68s var(--settle) var(--d, 0ms),
              transform .68s var(--settle) var(--d, 0ms);
  will-change: auto;
}

/* La mitad de arriba no depende del JS: corre en un keyframe de CSS con
   fill-mode both. Si capital.js no existe, esto igual sucede. */
@keyframes cap-settle {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
/* `backwards`, NUNCA `both`.
   Con `both` el elemento se queda pegado al fotograma final de la
   animación, así que si la animación no llega a correr —una pestaña en
   segundo plano, un webview que congela el compositor— se queda en
   opacity 0 y la mitad de arriba de la página nunca aparece. Con
   `backwards` el estado en reposo es el del propio elemento, o sea
   visible, y la animación solo lo pisa mientras dura. */
.hero-inner > *,
.fin-hero-grid > *,
.doors,
/* El hero de los formularios: la columna de texto de un lado y la
   tarjeta del otro. Se le había escapado — usa .lf-hero-grid, no las
   clases de las páginas de marketing. */
.lf-hero-copy > *,
.lf-q,
.lf-apply-card {
  animation: cap-settle .62s var(--settle) backwards;
}
/* El titular es el ancla; lo demás lo sigue. Dos animaciones igual de
   fuertes se anulan — el ojo tiene que saber a dónde ir primero. */
.hero-inner > .cap-h1        { animation-delay: .04s; }
.hero-inner > .lede         { animation-delay: .16s; }
.hero-inner > .hero-points  { animation-delay: .26s; }
.fin-hero-grid > :last-child { animation-delay: .14s; }
.doors                       { animation-delay: .22s; }

/* En el formulario el ancla es el titular; la tarjeta llega después,
   que es el orden en que se lee la pantalla: primero qué es esto,
   después dónde empiezo. Una vez puesta, la tarjeta no se mueve más —
   ese sigue siendo el trato. */
.lf-hero-copy > h1            { animation-delay: .04s; }
.lf-hero-copy > p             { animation-delay: .14s; }
.lf-hero-copy > .lf-hero-points { animation-delay: .22s; }
.lf-q, .lf-apply-card         { animation-delay: .3s; }
/* Los tres puntos del hero entran uno detrás de otro. */
.lf-hero-points li { animation: cap-settle .5s var(--settle) backwards; }
.lf-hero-points li:nth-child(1) { animation-delay: .3s; }
.lf-hero-points li:nth-child(2) { animation-delay: .36s; }
.lf-hero-points li:nth-child(3) { animation-delay: .42s; }
/* La bifurcación Sell side / Buy side, con la tarjeta. */
.lf-fork { animation: cap-settle .5s var(--settle) backwards .36s; }

/* El bloque sólido detrás de la foto entra después de la foto, corrido
   unos pixeles: se lee como que se acomodó detrás, no como que apareció. */
.figure::after, .fin-hero-figure::after {
  animation: cap-block .68s var(--settle) backwards .3s;
}
@keyframes cap-block {
  from { opacity: 0; transform: translate(10px, 10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   Feedback. Corto, y siempre sobre una propiedad que el compositor
   puede mover solo — nunca sobre width, height, top o left.
   --------------------------------------------------------------------- */

/* La tarjeta reconoce el cursor con un filo rojo que se dibuja desde la
   izquierda. Es el mismo rojo del subrayado del nav: una sola idea. */
.door, .card, .product { position: relative; }
.door::before, .card::before, .product::before {
  content: "";
  position: absolute;
  inset: -1px auto auto -1px;
  width: calc(100% + 2px);
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .24s var(--ease);
}
.door:hover::before, .card:hover::before, .product:hover::before { transform: scaleX(1); }
.card.accent::before { background: #fff; }

/* Los enlaces del nav estrenan el mismo subrayado que marca la página
   actual, en vez de solo cambiar de color. */
.cap-links a:not(.active)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s var(--ease);
}
.cap-links a:not(.active):hover::after { transform: scaleX(1); }

/* Press. 90ms y un 1.5% — no se ve, se siente, y es lo que separa un
   botón que responde de uno que solo cambia de color. */
.btn, .cap-cta, .arrow-link { transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .09s var(--ease); }
.btn:active, .cap-cta:active { transform: scale(.985); }

/* El disco ya se corría al hover; que también acuse el click. */
.btn-disc:active::after, .arrow-link:active::after { transform: translateX(1px) scale(.94); }

/* Los numerales grandes de los pasos se tiñen al pasar por la fila
   entera, no solo por el número. */
.steps li b { transition: color .22s var(--ease); }

/* ---------------------------------------------------------------------
   Y si el sistema pidió menos movimiento, no hay ninguno. capital.js
   además se apaga solo y quita la clase js, así que nada queda oculto.
   --------------------------------------------------------------------- */
/* Y la red: capital.js pone esta clase a los 3 segundos pase lo que pase.
   Un compositor congelado deja de importar — la animación se retira y cada
   elemento vuelve a su estado propio, que es visible. */
.cap-settled .hero-inner > *,
.cap-settled .fin-hero-grid > *,
.cap-settled .doors,
.cap-settled .lf-hero-copy > *,
.cap-settled .lf-hero-points li,
.cap-settled .lf-fork,
.cap-settled .lf-q,
.cap-settled .lf-apply-card,
.cap-settled .figure::after,
.cap-settled .fin-hero-figure::after { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .hero-inner > *, .fin-hero-grid > *, .doors,
  .lf-hero-copy > *, .lf-hero-points li, .lf-fork, .lf-q, .lf-apply-card,
  .figure::after, .fin-hero-figure::after { animation: none; }
  .btn:active, .cap-cta:active { transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =====================================================================
   Segunda capa: los sitios donde la página responde a la persona.
   ---------------------------------------------------------------------
   La primera capa era contenido apareciendo. Esta es la interfaz
   acusando recibo — y es la que hace que un formulario de cinco pasos
   no se sienta un trámite.

   La regla que sigue en pie: nada se mueve MIENTRAS alguien escribe.
   Lo que se mueve es el cambio de paso, el foco, el error y la cifra
   que se recalcula. Los campos, quietos.
   ===================================================================== */

/* ---- el titular llega en dos tiempos --------------------------------
   El titular a dos tonos es la firma de la marca, así que se anima como
   tal: primero asienta la parte navy, y el rojo entra después. El ojo
   lee la frase y recibe el remate. */
@keyframes cap-fade { from { opacity: 0; } to { opacity: 1; } }
.hero .cap-h1 em,
.fin-hero .cap-h1 em { animation: cap-fade .5s linear backwards .34s; }
.js .reveal .cap-h2 em,
.js .reveal .lf-section-head h2 em { opacity: 0; }
.js .reveal.in .cap-h2 em,
.js .reveal.in .lf-section-head h2 em { opacity: 1; transition: opacity .45s linear calc(var(--d, 0ms) + .26s); }

/* ---- la foto del hero respira ----------------------------------------
   24s, imperceptible por diseño. No se ve moverse; se nota que no está
   muerta. El estado inicial es un scale, no una opacidad, así que un
   compositor congelado no esconde nada. */
@keyframes cap-drift { from { transform: scale(1.05); } to { transform: scale(1); } }
.hero::before, .fin-hero::before { animation: cap-drift 24s ease-out both; }

/* =====================================================================
   Los formularios
   ===================================================================== */

/* ---- cambio de paso --------------------------------------------------
   El paso entrante viene del lado hacia el que vas: adelante entra por
   la derecha, Atrás por la izquierda. Es la señal más barata de "dónde
   estoy" en un flujo de cinco pantallas. 18px, no 60: es una pista de
   dirección, no un carrusel. */
@keyframes lf-step-fwd  { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes lf-step-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.lf-fin .lf-step.now { animation: lf-step-fwd .38s var(--settle) backwards; }
[data-dir="back"] .lf-fin .lf-step.now,
.lf-fin [data-dir="back"] .lf-step.now { animation-name: lf-step-back; }
.lf-apply-card[data-dir="back"] .lf-step.now { animation-name: lf-step-back; }

/* ---- el riel de progreso se llena ------------------------------------
   El borde de arriba deja de cambiar de color y pasa a LLENARSE de
   izquierda a derecha. Un tramo que se pinta se lee como avance; uno
   que cambia de color, como un estado. */
.lf-fin .lf-progress li { position: relative; }
.lf-fin .lf-progress li::after {
  content: "";
  position: absolute;
  top: -3px; left: 0; right: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .42s var(--settle);
}
.lf-fin .lf-progress li.now::after,
.lf-fin .lf-progress li.done::after { transform: scaleX(1); }
.lf-fin .lf-progress li.done::after { background: var(--teal); }

/* ---- foco -------------------------------------------------------------
   ⚠️ Trampa histórica: en un port anterior este anillo llegó con el rgba
   del acento de OTRA marca escrito a mano y sobrevivió dos revisiones.
   Por eso ahora deriva de --accent-rgb y nunca se escribe literal. */
.lf-fin .lf-input:focus, .lf-fin .lf-select:focus, .lf-fin textarea:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .13) !important;
}

/* ---- error ------------------------------------------------------------
   El mensaje baja en lugar de aparecer de golpe, y el campo da un
   desplazamiento corto. El movimiento acá está motivado: algo fue
   rechazado. 3px y dos ciclos — suficiente para notarlo, no tanto como
   para regañar. */
@keyframes lf-drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lf-fin .lf-err:not(:empty) { animation: lf-drop .26s var(--ease) backwards; }
@keyframes lf-refuse {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-3px); }
  75%      { transform: translateX(3px); }
}
.lf-fin .lf-input.is-err, .lf-fin .lf-select.is-err { animation: lf-refuse .22s var(--ease); }

/* ---- documentos -------------------------------------------------------
   Cada archivo adjunto entra por su cuenta, y la sección marca el check
   con un trazo, no con un cambio de color. */
@keyframes lf-file-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lf-fin .lf-uplist li { animation: lf-file-in .3s var(--settle) backwards; }
.lf-fin .lf-doc { transition: border-color .3s var(--ease), background .3s var(--ease); }

/* ---- la pantalla final -------------------------------------------------
   El único momento con permiso para celebrar, y aun así con mesura: el
   disco entra una vez y se queda. */
@keyframes lf-seal { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.lf-fin .lf-done-mark { animation: lf-seal .5s var(--settle) backwards .06s; }

/* ---- la cifra que se recalcula ----------------------------------------
   capital.js la hace rodar hasta el valor nuevo en vez de cambiarla de
   golpe. Es el momento en que el formulario demuestra que está
   trabajando para vos, así que se le da el tiempo de verse. */
.lf-fin #calcOut, .stat b { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .lf-fin .lf-step.now, .lf-fin .lf-err:not(:empty), .lf-fin .lf-input.is-err,
  .lf-fin .lf-uplist li, .lf-fin .lf-done-mark,
  .hero::before, .fin-hero::before,
  .hero .cap-h1 em, .fin-hero .cap-h1 em { animation: none; }
  .js .reveal .cap-h2 em, .js .reveal .lf-section-head h2 em { opacity: 1; }
}

/* Five paths (2026-09-22): the prospect's own domain leaves the desktop rail
   at every width. It is the longest item and the only one that is not a
   door; it still sits in every footer and the burger panel re-shows it. */
/* 2026-09-23, Juan: the rail keeps a way back to their main site at every
   width. The label is "Main site", short enough to fit beside the five paths
   and their chevrons; the two tiers below that hid the domain link are
   overridden here on purpose. */
.cap-links a.cap-home { display: inline-block !important; color: var(--muted); }
.cap-links a.cap-home:hover { color: var(--ink); }
@media (max-width: 1280px) {
  .cap-links a.cap-home { display: block !important; width: 100%; color: inherit; }
}

/* On a phone the rail is lockup + Log in + Get started + burger, and at 390px
   that is 44px wider than the screen (measured 2026-09-22). Get started only
   anchors to the slab that starts right under the hero, so it is the one to go. */
@media (max-width: 520px) {
  .cap-cta { display: none; }
}

/* Five paths (2026-09-22): two rail items open a menu of doors. The trigger
   is a real link (the path's slab), the menu is hover / focus-within, and
   it uses their own chevron (their "MORE" item carries one). In the burger
   panel the menu is simply an indented list. */
.cap-menu { position: relative; display: flex; align-items: center; }
.cap-menu > a { padding-right: 14px; }
.cap-menu::after {
  content: "";
  position: absolute;
  right: 1px;
  top: calc(50% - 4px);
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #1b1b1b;
  border-bottom: 1.5px solid #1b1b1b;
  transform: rotate(45deg);
  pointer-events: none;
}
.cap-sub {
  display: none;
  position: absolute;
  top: 100%;
  left: -18px;
  z-index: 30;
  min-width: 252px;
  padding: 8px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .28);
}
.cap-menu:hover .cap-sub, .cap-menu:focus-within .cap-sub { display: grid; }
.cap-sub a { padding: 10px 18px; font-size: 11.6px; letter-spacing: .06em; }
.cap-sub a:hover { background: var(--canvas); }
.cap-sub a::after { content: none !important; }
@media (max-width: 1280px) {
  .cap-menu { width: 100%; flex-direction: column; align-items: flex-start; }
  .cap-menu::after { display: none; }
  .cap-sub {
    display: grid;
    position: static;
    min-width: 0;
    width: 100%;
    padding: 0 0 8px 18px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .cap-links .cap-sub a { padding: 9px 0; font-size: 13.5px; font-weight: 600; }
  .cap-sub a:hover { background: transparent; }
}
/* 2026-09-23: the burger moved from 1080 to 1280 once "Main site" came back to
   the rail — measured: 0 at 1281, 10px over at 1240, 69px at 1181. */
  .cap-menu > a { padding-right: 11px; }
}
