/* Landing page: fixed nav + full-screen mascot hero.
   Scoped to .mf-nav / .mf-hero so nothing here leaks into the rest of the app,
   which keeps its own type system (Fira Sans). Loaded only by main/landing.html. */

.landing {
  --mf-fg: #0b0b0c;
  --mf-font-heading: 'HelveticaNowDisplay-Medium', 'Helvetica Neue', Arial, sans-serif;
  --mf-font-body: 'HelveticaNowDisplayW01-Rg', 'Helvetica Neue', Arial, sans-serif;
  font-family: var(--mf-font-body);
}

html:has(.landing) { scroll-behavior: smooth; }
#how, #builder, #engine, #brokers { scroll-margin-top: 104px; }

/* ------------------------------------------------------------------ nav
   A floating glass capsule. Desktop (>=1024px): logo | links with a sliding highlight that
   follows hover/focus and marks the section in view | Sign in + Get started, with a hairline
   that fills as you scroll. Below that: logo + burger, and the menu drops down as a sheet. */
.mf-nav {
  position: fixed; top: 12px; left: 0; right: 0; z-index: 10;
  padding: 0 12px; pointer-events: none;                      /* only the capsule takes clicks */
  color: var(--mf-fg);
  animation: mf-nav-in .7s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes mf-nav-in { from { opacity: 0; transform: translateY(-14px); } }
@media (min-width: 640px) { .mf-nav { top: 16px; padding: 0 24px; } }

.mf-bar {
  position: relative; pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 7px 7px 7px 20px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, .58);
  border: 1px solid rgba(11, 11, 12, .07);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 1px 2px rgba(11, 11, 12, .04), 0 16px 36px -24px rgba(11, 11, 12, .3);
  transition: background-color .35s ease, box-shadow .35s ease, max-width .45s cubic-bezier(.2, .7, .2, 1);
}
.mf-nav.scrolled .mf-bar {
  /* Fully solid, not just more-opaque: at .86 the bold oversized hero heading still showed through as a
     legible blurred ghost once it scrolled directly behind the capsule. */
  max-width: 1000px; background-color: #fff;
  box-shadow: 0 1px 2px rgba(11, 11, 12, .05), 0 22px 44px -26px rgba(11, 11, 12, .42);
}

.mf-nav.open .mf-bar { background-color: #fff; }

/* logo mark */
.mf-logo { display: flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; border-radius: 999px; }
.mf-logo-text { font-family: var(--mf-font-heading); font-size: 21px; letter-spacing: -.025em; line-height: 1; }
.mf-logo-mark { display: block; flex: none; width: auto; height: 28px; user-select: none; -webkit-user-drag: none; }
@media (min-width: 640px) {
  .mf-logo-text { font-size: 23px; }
  .mf-logo-mark { height: 30px; }
}

/* links with the sliding highlight (positioned by landing-hero.js through --x / --w / --o) */
.mf-links {
  --x: 0px; --w: 0px; --o: 0;
  position: relative; display: none; list-style: none; margin: 0; padding: 4px;
  gap: 2px; border-radius: 999px; background: rgba(11, 11, 12, .045);
}
.mf-links li { position: relative; z-index: 1; }
.mf-links a {
  display: block; padding: 8px 16px; border-radius: 999px; font-size: 15px; line-height: 1.2;
  color: var(--mf-fg); text-decoration: none; opacity: .74; white-space: nowrap;
  transition: opacity .2s ease;
}
.mf-links a:hover, .mf-links a:focus-visible, .mf-links a[aria-current] { opacity: 1; }
.mf-links .mf-indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: var(--w); transform: translateX(var(--x)); opacity: var(--o);
  border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(11, 11, 12, .08), 0 6px 14px -8px rgba(11, 11, 12, .28);
  pointer-events: none;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1), width .4s cubic-bezier(.2, .7, .2, 1), opacity .2s ease;
}

.mf-actions { display: none; align-items: center; gap: 4px; }
.mf-cta {
  padding: 10px 16px; border-radius: 999px; font-size: 15px; line-height: 1.2;
  color: inherit; text-decoration: none; transition: background-color .2s ease;
}
.mf-cta:hover { background: rgba(11, 11, 12, .06); }
.mf-start {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 6px 6px 20px; border-radius: 999px;
  font-size: 15px; line-height: 1.2; color: #fff; text-decoration: none; background: var(--mf-fg);
  transition: background-color .2s ease, transform .15s ease;
}
.mf-start:hover { background: #2a2a30; }
.mf-start:active { transform: scale(.98); }
.mf-arrow {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; color: #000; transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.mf-start:hover .mf-arrow { transform: rotate(-45deg); }

/* scroll progress: an inset hairline along the capsule's bottom edge */
.mf-progress {
  position: absolute; left: 28px; right: 28px; bottom: 0; height: 2px; border-radius: 2px;
  background: rgba(11, 11, 12, .07); overflow: hidden; pointer-events: none;
}
.mf-progress i { display: block; height: 100%; background: var(--mf-fg); transform: scaleX(0); transform-origin: left; }

/* burger: two bars that cross into an X */
.mf-burger {
  position: relative; flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(11, 11, 12, .06); color: inherit; cursor: pointer;
  transition: background-color .2s ease;
}
.mf-burger:hover { background: rgba(11, 11, 12, .1); }
.mf-burger span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), top .35s cubic-bezier(.2, .7, .2, 1);
}
.mf-burger span:nth-child(1) { top: 18px; }
.mf-burger span:nth-child(2) { top: 24px; }
.mf-nav.open .mf-burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.mf-nav.open .mf-burger span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

@media (min-width: 1024px) {
  .mf-links { display: flex; }
  .mf-actions { display: flex; }
  .mf-burger { display: none; }
}

/* mobile / tablet: dropdown sheet under the capsule */
.mf-menu {
  position: fixed; inset: 0; z-index: 9; padding: 84px 12px 12px;
  background: rgba(11, 11, 12, .3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.mf-menu.open { opacity: 1; visibility: visible; transition-delay: 0s; }
@media (min-width: 640px) { .mf-menu { padding: 92px 24px 24px; } }
.mf-sheet {
  max-width: 460px; margin-left: auto; padding: 8px; border-radius: 32px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 2px rgba(11, 11, 12, .06), 0 30px 60px -24px rgba(11, 11, 12, .45);
  transform: translateY(-10px) scale(.98); transform-origin: top right;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
  max-height: calc(100dvh - 104px); overflow-y: auto;
}
.mf-menu.open .mf-sheet { transform: none; }
.mf-item {
  display: flex; align-items: baseline; gap: 16px; padding: 15px 18px; border-radius: 24px;
  font-family: var(--mf-font-heading); font-size: 30px; letter-spacing: -.03em; line-height: 1.1;
  color: var(--mf-fg); text-decoration: none; transition: background-color .2s ease;
}
.mf-item:hover, .mf-item:focus-visible { background: rgba(11, 11, 12, .05); }
.mf-idx { min-width: 22px; font-family: var(--mf-font-body); font-size: 13px; letter-spacing: .04em; color: #5f5f68; }
.mf-menu.open .mf-item { animation: mf-item-in .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 45ms + 90ms); }
@keyframes mf-item-in { from { opacity: 0; transform: translateY(12px); } }
.mf-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 6px 6px; }
.mf-sheet-actions .mf-pill { margin: 0; }
@media (min-width: 1024px) { .mf-menu { display: none; } }

/* the app-wide inline-link underline (app-modern.css `li a`) must not reach nav chrome */
.landing .mf-nav a, .landing .mf-menu a { text-decoration: none; }

.mf-nav a:focus-visible, .mf-burger:focus-visible, .mf-menu a:focus-visible,
.mf-pill:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 999px; }
.mf-item:focus-visible { outline-offset: -2px; border-radius: 24px; }

/* ----------------------------------------------------------------- hero */
.mf-hero {
  /* The .lp-sheet below overlaps this hero's bottom edge (z-index 2 > 1). */
  position: relative; z-index: 1; isolation: isolate; overflow: hidden;
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 20px 48px;
  color: var(--mf-fg);
  background: radial-gradient(120% 90% at 70% 40%, #f4f4f5 0%, #e7e7e9 100%);
}
@media (min-width: 640px) { .mf-hero { padding-inline: 32px; } }
/* --mf-gutter = the left edge of .lp-wrap below (1240px max, 40px padding), so hero and sections share one margin on wide screens */
@media (min-width: 1024px) { .mf-hero { --mf-gutter: max(40px, calc(50% - 580px)); justify-content: center; padding: 0 var(--mf-gutter); } }

/* "Scroll" cue: a label and a hairline with a dot running down it; it leaves once you start scrolling. */
.mf-cue { display: none; }
@media (min-width: 1024px) and (min-height: 620px) {
  .mf-cue {
    position: absolute; left: var(--mf-gutter, 40px); bottom: 32px; z-index: 2; display: flex; align-items: center; gap: 14px;
    font-size: .8125rem; letter-spacing: .04em; color: var(--mf-fg); text-decoration: none;
    transition: opacity .4s ease, transform .4s ease;
  }
  .mf-cue.is-gone { opacity: 0; transform: translateY(8px); pointer-events: none; }
  .mf-cue i { position: relative; width: 1px; height: 46px; background: rgba(11, 11, 12, .18); overflow: hidden; }
  .mf-cue i::after { content: ""; position: absolute; left: 0; top: -14px; width: 1px; height: 14px; background: var(--mf-fg); animation: mf-cue 1.9s cubic-bezier(.6, 0, .3, 1) infinite; }
}
@keyframes mf-cue { to { transform: translateY(64px); } }
@media (prefers-reduced-motion: reduce) { .mf-cue i::after { animation: none; top: 16px; } }

/* The mascot. Below 1024px it sits above the copy (so text never runs across the
   character); from 1024px it's pinned right of a left-aligned text column. */
.mf-stage { position: absolute; inset: 84px 0 auto 0; height: max(50dvh, 340px); z-index: 0; pointer-events: none; }
@media (min-width: 1024px) { .mf-stage { inset: 0; height: auto; } }

/* Static: the mascot does not move. */
.mf-parallax { position: absolute; inset: 0; }
.mf-mascot {
  --mf-mask-x: linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  position: absolute; top: 0; height: 100%; width: auto; max-width: none;
  left: 50%; transform: translateX(-51.5%);
  -webkit-mask-image: var(--mf-mask-x), linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: var(--mf-mask-x), linear-gradient(to bottom, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  user-select: none; -webkit-user-drag: none;
}
@media (min-width: 1024px) {
  .mf-mascot {
    left: 76%;
    -webkit-mask-image: var(--mf-mask-x); mask-image: var(--mf-mask-x);
  }
}
@media (min-width: 1280px) { .mf-mascot { left: 72%; } }


.mf-content { position: relative; z-index: 2; max-width: 36rem; }
@media (min-width: 1024px) { .mf-content { max-width: min(36rem, 44vw); } }

/* hero copy: badge, a quiet greeting, one big line, one primary button */
.mf-badge {
  display: none; align-items: center; gap: 9px; margin: 0 0 18px; padding: 7px 14px 7px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(11, 11, 12, .08);
  font-size: .8125rem; letter-spacing: .02em; color: #3d3d45;
}
.mf-badge i { width: 7px; height: 7px; border-radius: 50%; background: #067647; animation: mf-badge-ring 2.4s ease-out infinite; }
@keyframes mf-badge-ring { 0% { box-shadow: 0 0 0 0 rgba(6, 118, 71, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(6, 118, 71, 0); } }
@media (min-width: 640px) { .mf-badge { display: inline-flex; } }

.mf-type { margin: 0 0 22px; font-weight: 400; }
.mf-greet { display: block; margin: 0 0 10px; max-width: 34ch; font-size: .9375rem; line-height: 1.45; color: #3d3d45; }
.mf-ask { display: block; font-size: clamp(2.1rem, 8.6vw, 4.6rem); line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; color: var(--mf-fg); }
@media (min-width: 640px) { .mf-greet { font-size: clamp(1.05rem, 1.7vw, 1.2rem); line-height: 1.5; margin-bottom: 14px; } .mf-type { margin-bottom: 28px; } }

.mf-cursor {
  display: inline-block; width: 3px; height: .8em; margin-left: 4px;
  vertical-align: baseline; background: #067647; border-radius: 2px;
  animation: mf-blink 1s step-end infinite;
}
@keyframes mf-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.mf-cta-row, .mf-alt, .mf-proof { opacity: 0; transform: translateY(8px); animation: mf-pills-in .5s ease forwards; }
.mf-cta-row { display: flex; flex-wrap: wrap; gap: 10px; animation-delay: .5s; }
.mf-alt { display: none; align-items: center; gap: 10px; margin: 24px 0 0; font-size: .9375rem; color: #5f5f68; animation-delay: .6s; }
.mf-alt a { color: var(--mf-fg); text-decoration: underline; text-decoration-color: rgba(11, 11, 12, .3); text-underline-offset: 4px; transition: text-decoration-color .2s ease; }
.mf-alt a:hover { text-decoration-color: currentColor; }
.mf-proof { display: none; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none; font-size: .875rem; color: #3d3d45; animation-delay: .7s; }
.mf-proof li { display: inline-flex; align-items: center; gap: 7px; }
.mf-proof svg { color: #067647; flex: none; }
@media (min-width: 640px) { .mf-alt { display: flex; } .mf-proof { display: flex; } }
@keyframes mf-pills-in { to { opacity: 1; transform: none; } }

/* phones and small tablets: the whole copy block is centred under the mascot - badge, greeting,
   headline, buttons, text links and highlight chips alike */
@media (max-width: 767px) {
  .mf-content { margin-inline: auto; text-align: center; }
  .mf-greet { margin-inline: auto; }
  .mf-cta-row, .mf-alt, .mf-proof { justify-content: center; }
}

.mf-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: 999px;
  font: inherit; font-size: 15px; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.mf-btn:focus-visible { outline: 2px solid var(--mf-fg); outline-offset: 3px; }
.mf-btn-primary { background: var(--mf-fg); color: #fff; padding-right: 8px; box-shadow: 0 10px 24px -12px rgba(11, 11, 12, .6); }
.mf-btn-primary:hover { background: #26262b; }
.mf-btn-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--mf-fg); transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.mf-btn-primary:hover .mf-btn-ico { transform: translateX(3px); }
.mf-btn-ghost { background: rgba(255, 255, 255, .78); color: var(--mf-fg); border: 1px solid rgba(11, 11, 12, .14); }
.mf-btn-ghost:hover { background: #fff; border-color: rgba(11, 11, 12, .4); }
@media (min-width: 640px) { .mf-btn { padding: 0 24px; min-height: 50px; font-size: 16px; } .mf-btn-primary { padding-right: 9px; } }

.mf-pill {
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 .2em .4em; padding: .3em 16px;
  font: inherit; font-size: 13px; line-height: 1.3;
  border-radius: 999px; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
@media (min-width: 640px) { .mf-pill { font-size: 15px; padding-inline: 20px; } }
@media (pointer: coarse) { .mf-pill { padding-block: .55em; } }

.mf-pill-black { background: var(--mf-fg); color: #fff; border: 1px solid var(--mf-fg); }
.mf-pill-black:hover { background: #2a2a30; }

/* Outline pill: the spec's white-on-video treatment inverted for a light backdrop. */
.mf-pill-outline { gap: 8px; background: transparent; color: var(--mf-fg); border: 1px solid var(--mf-fg); }
@media (min-width: 640px) { .mf-pill-outline { gap: 12px; } }
.mf-pill-outline:hover { background: var(--mf-fg); color: #fff; }
.mf-pill-outline u { text-underline-offset: 1px; }

.mf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html:has(.landing) { scroll-behavior: auto; }
  .mf-nav, .mf-bar, .mf-menu, .mf-sheet, .mf-indicator, .mf-burger span, .mf-pill, .mf-arrow { transition: none; animation: none; }
  .mf-menu.open .mf-item { animation: none; }
  .mf-cursor, .mf-badge i { animation: none; }
  .mf-cta-row, .mf-alt, .mf-proof { animation: none; opacity: 1; transform: none; }
  .mf-btn, .mf-btn-ico { transition: none; }
}

/* ------------------------------------------------------------------- bull video, hero only
   The clip lives inside the hero's stage and plays on a loop (landing-video.js). Without the script
   (no JS / reduced motion / autoplay blocked / load failure) the photo stays and nothing changes.
   In the clip the bull's head and torso sit at ~49% of the frame width (measured on the frames; its
   outstretched arm only pulls the bounding box towards ~52%) on a plain light-grey backdrop, and the
   generator's sparkle mark sits at the bottom-right (~91% across). The video is drawn as a box
   positioned so the bull is centred where wanted, with soft edge fades that also keep that corner
   out of view at every size. */
.mf-video {                                       /* phones / tablets: bull centred above the copy */
  position: absolute; top: 6%; left: 50%; width: auto; height: 84%; max-width: none; aspect-ratio: 16 / 9;
  transform: translateX(-48.5%); opacity: 0; transition: opacity .7s ease; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%, #000 80%, transparent 88%), linear-gradient(to bottom, transparent 0, #000 16%, #000 76%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 22%, #000 80%, transparent 88%), linear-gradient(to bottom, transparent 0, #000 16%, #000 76%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
@media (min-width: 1024px) {                      /* desktop: bull centred at 75% of the viewport, copy stays clear on the left */
  .mf-video {
    top: 0; left: 75%; height: 100%; transform: translateX(-57.5%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26%, #000 80%, transparent 88%);
    mask-image: linear-gradient(to right, transparent 0, #000 26%, #000 80%, transparent 88%);
  }
}
.mf-hero.mf-video-on .mf-video { opacity: 1; }
.mf-hero.mf-video-on.mf-video-dip .mf-video { opacity: 0; transition-duration: .45s; }   /* dip to the backdrop where the loop restarts */

/* ---- headlines: an accent bar draws in under each one as its block scrolls into view (.is-in comes from
   the reveal observer in landing-hero.js), and the kicker dot rings out once. */
.lp-reveal-on [data-reveal] :is(.lp-display, .lp-h2)::after {
  content: ""; display: block; height: 3px; width: 0; margin-top: 18px; border-radius: 3px;
  background: var(--lp-accent); transition: width .8s var(--lp-ease) .25s;
}
.lp-reveal-on [data-reveal].is-in :is(.lp-display, .lp-h2)::after { width: 76px; }
.lp-reveal-on [data-reveal].is-in .lp-kicker::before { animation: mf-ring 1.4s ease-out .2s 1; }
@keyframes mf-ring { 0% { box-shadow: 0 0 0 0 rgba(6, 118, 71, .45); } 100% { box-shadow: 0 0 0 16px rgba(6, 118, 71, 0); } }
@media (prefers-reduced-motion: reduce) {
  .lp-reveal-on [data-reveal] :is(.lp-display, .lp-h2)::after { transition: none; }
  .lp-reveal-on [data-reveal].is-in .lp-kicker::before { animation: none; }
}
.mf-mascot { transition: opacity .7s ease; }
.mf-hero.mf-video-on .mf-mascot, .mf-hero.mf-video-pending .mf-mascot { opacity: 0; }

