/* ==========================================================================
   css/founder-offer.css
   Loaded only on guides whose data/guides.json entry sets founderOffer: true.

   Three surfaces, one file:
     .founder-note          in-article card, server rendered, works with JS off
     #founder-dock          slim bottom bar, JS only, docks after the card goes by
     #founder-dock-overlay  the dialog the bar opens, on an explicit click only

   Self contained on purpose: article-conversion.css and landing.css are not
   loaded on these pages, so the palette and the trust marks live here.

   Specificity note. The card renders inside .post-content, which styles bare
   a, img, ul and li at (0,1,1) in blog.css:528/539/568/573. Every rule below
   that could collide is written with its own block class as an ancestor, which
   lands at (0,2,x) and wins without a single !important.
   ========================================================================== */

.founder-note,
.founder-trust,
#founder-dock,
#founder-dock-overlay {
  --fo-blue: #086da9;
  --fo-ink: #18384d;
  --fo-body: #4c687b;
  --fo-point: #315b74;
  --fo-surface: #eff9ff;
  --fo-hairline: #cce8f7;
  --fo-btn-bg: var(--accent, #38b6ff);
  --fo-btn-ink: #09314a;
  --fo-focus: #1687c3;
  font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

/* --------------------------------------------------------------------------
   1. In-article card
   -------------------------------------------------------------------------- */

.post-article .founder-note {
  margin: 36px 0;
  padding: 26px;
  border: 1px solid var(--fo-hairline);
  border-radius: var(--radius-lg, 12px);
  background: var(--fo-surface);
  color: var(--fo-body);
}

.founder-note picture { display: block; }

.founder-note .founder-note__person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fo-hairline);
}

.founder-note .founder-note__photo {
  flex-shrink: 0;
  display: block;
  width: 72px;
  height: 72px;
  margin: 0;
  border: 1px solid var(--fo-hairline);
  border-radius: var(--radius-full, 999px);
  background: #fff;
  object-fit: cover;
}

.founder-note .founder-note__who {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
}

.founder-note .founder-note__who strong {
  color: var(--fo-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.founder-note .founder-note__who span {
  color: #587487;
  font-size: 12px;
  line-height: 1.5;
}

.founder-note .founder-note__eyebrow {
  margin: 20px 0 0;
  color: #386781;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* A <p>, not an <h2>: an offer heading injected mid body would enter the
   guide's outline and its Article schema. The <aside> carries the name. */
.founder-note .founder-note__title {
  margin: 10px 0 12px;
  color: var(--fo-ink);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.founder-note .founder-note__lead {
  margin: 0;
  color: var(--fo-body);
  font-size: 14px;
  line-height: 1.75;
}

.founder-note .founder-note__points {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--fo-point);
  font-size: 12.5px;
  line-height: 1.55;
}

.founder-note .founder-note__points li {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin: 0;
}

.founder-note .founder-note__points li::before {
  content: '\2713';
  color: #087ab9;
  font-weight: 600;
}

.founder-note .founder-note__actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.founder-note .founder-note__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 15px 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--fo-btn-bg);
  color: var(--fo-btn-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: background .18s;
}

.founder-note .founder-note__btn:hover {
  background: #65c7ff;
  color: var(--fo-btn-ink);
}

.founder-note .founder-note__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  color: #24546f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.founder-note .founder-note__secondary:hover {
  color: #087ab9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.founder-note .founder-note__note {
  margin: 15px 0 0;
  color: #587487;
  font-size: 11px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   2. Trust marks, shared by the card and the dialog
   -------------------------------------------------------------------------- */

.founder-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--fo-hairline);
}

.founder-trust .founder-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 11px;
  border: 1px solid var(--fo-hairline);
  border-radius: var(--radius-full, 999px);
  background: #fff;
  color: #46627a;
  font-size: 11.5px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.founder-trust .founder-trust__item strong { color: var(--fo-ink); font-weight: 600; }
.founder-trust a.founder-trust__item:hover { border-color: #9fd4ee; color: var(--fo-blue); }

.founder-trust .founder-trust__item img {
  display: block;
  flex-shrink: 0;
  margin: 0;
  border: 0;
}

.founder-trust .founder-trust__backers {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.founder-trust .founder-trust__backed {
  color: #6b8296;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.founder-trust .founder-trust__logo {
  display: block;
  margin: 0;
  border: 0;
  opacity: .88;
}

.founder-trust .founder-trust__logo--inno { width: auto; height: 15px; }
.founder-trust .founder-trust__logo--ffe { width: auto; height: 19px; }

/* --------------------------------------------------------------------------
   3. Docked bar
   -------------------------------------------------------------------------- */

#founder-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;          /* under nav 999, header 1000-1002, consent 10000 */
  pointer-events: none;  /* only the bar itself takes clicks */
}

#founder-dock[hidden] { display: none; }

#founder-dock .founder-dock__bar {
  pointer-events: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 980px;
  min-height: 64px;
  margin: 0 auto clamp(1rem, 3vw, 2rem);
  padding: 10px 14px;
  border: 1px solid var(--fo-hairline);
  border-radius: var(--radius-lg, 12px);
  background: #fff;
  transform: translateY(calc(100% + clamp(1rem, 3vw, 2rem)));
  opacity: 0;
  visibility: hidden;
  transition: transform 260ms var(--ease-out, cubic-bezier(.16, 1, .3, 1)),
              opacity 200ms linear,
              visibility 0s linear 280ms;
}

/* visibility, not opacity alone: a faded-out bar must leave the tab order and
   stop taking pointer events, not sit invisibly over the footer. */
#founder-dock[data-state="docked"] .founder-dock__bar {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform 260ms var(--ease-out, cubic-bezier(.16, 1, .3, 1)),
              opacity 200ms linear,
              visibility 0s linear 0s;
}

#founder-dock .founder-dock__expand {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #142431;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#founder-dock .founder-dock__expand:hover { background: #f2f8fc; }
#founder-dock picture { display: block; flex-shrink: 0; }

#founder-dock .founder-dock__face {
  display: block;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin: 0;
  border: 1px solid var(--fo-hairline);
  border-radius: var(--radius-full, 999px);
  background: #fff;
  object-fit: cover;
}

#founder-dock .founder-dock__lines {
  display: grid;
  gap: 1px;
  min-width: 0;
}

#founder-dock .founder-dock__line-short { display: none; }
.founder-dock__line {
  overflow: hidden;
  color: #142431;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#founder-dock .founder-dock__sub {
  color: #6b8296;
  font-size: 11.5px;
  line-height: 1.4;
  white-space: nowrap;
}

#founder-dock .founder-dock__chev {
  flex-shrink: 0;
  color: #7b8b97;
}

#founder-dock .founder-dock__book {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 5px;
  background: var(--fo-btn-bg);
  color: var(--fo-btn-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s;
}

#founder-dock .founder-dock__book:hover { background: #65c7ff; color: var(--fo-btn-ink); }

#founder-dock .founder-dock__dismiss {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b8296;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

#founder-dock .founder-dock__dismiss:hover { background: #f2f8fc; color: #40525f; }

/* The bar displaces content instead of covering it. Value written from JS. */
html.has-founder-dock body { padding-bottom: var(--founder-dock-height, 0px); }

/* --------------------------------------------------------------------------
   4. Dialog, opened only by a click on the bar
   -------------------------------------------------------------------------- */

#founder-dock-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;         /* over the header, still under consent 10000 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out, cubic-bezier(.16, 1, .3, 1));
}

/* [hidden] and the id selector would otherwise tie, and display:flex would
   keep the overlay mounted. Same fix as .uc-modal[hidden] in layout.css. */
#founder-dock-overlay[hidden] { display: none; }
#founder-dock-overlay.is-open { opacity: 1; pointer-events: auto; }

#founder-dock-overlay .founder-dock__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, .5);
}

#founder-dock-overlay .founder-dock__panel {
  position: relative;
  box-sizing: border-box;
  width: min(460px, 100%);
  max-height: min(86vh, 760px);
  max-height: min(86dvh, 760px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 26px;
  border: 1px solid #dbeaf4;
  border-radius: 18px;
  background: #fff;
  color: var(--fo-body);
  transform: translateY(14px) scale(.985);
  transition: transform 240ms var(--ease-out, cubic-bezier(.16, 1, .3, 1));
  outline: none;
}

#founder-dock-overlay.is-open .founder-dock__panel { transform: none; }

#founder-dock-overlay .founder-dock__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #6b8296;
  cursor: pointer;
}

#founder-dock-overlay .founder-dock__close:hover { background: #f2f8fc; color: #253d4e; }

#founder-dock-overlay .founder-dock__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 44px;
}

#founder-dock-overlay picture { display: block; flex-shrink: 0; }

#founder-dock-overlay .founder-dock__portrait {
  display: block;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  margin: 0;
  border: 1px solid var(--fo-hairline);
  border-radius: var(--radius-full, 999px);
  background: var(--fo-surface);
  object-fit: cover;
}

#founder-dock-overlay .founder-dock__who {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
}

#founder-dock-overlay .founder-dock__who strong {
  color: var(--fo-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

#founder-dock-overlay .founder-dock__who span {
  color: #587487;
  font-size: 12px;
  line-height: 1.5;
}

#founder-dock-overlay .founder-dock__eyebrow {
  margin: 20px 0 0;
  color: #386781;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#founder-dock-overlay .founder-dock__title {
  margin: 8px 0 12px;
  color: var(--fo-ink);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
}

#founder-dock-overlay .founder-dock__lead { margin: 0; font-size: 14px; line-height: 1.75; }

#founder-dock-overlay .founder-dock__points {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--fo-point);
  font-size: 12.5px;
  line-height: 1.55;
}

#founder-dock-overlay .founder-dock__points li {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin: 0;
}

#founder-dock-overlay .founder-dock__points li::before {
  content: '\2713';
  color: #087ab9;
  font-weight: 600;
}

#founder-dock-overlay .founder-dock__actions { display: grid; gap: 12px; margin-top: 22px; }

#founder-dock-overlay .founder-dock__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 15px 18px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--fo-btn-bg);
  color: var(--fo-btn-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: background .18s;
}

#founder-dock-overlay .founder-dock__btn:hover { background: #65c7ff; color: var(--fo-btn-ink); }

#founder-dock-overlay .founder-dock__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  color: #24546f;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

#founder-dock-overlay .founder-dock__secondary:hover {
  color: #087ab9;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#founder-dock-overlay .founder-dock__note {
  margin: 14px 0 0;
  color: #587487;
  font-size: 11px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   5. Focus
   -------------------------------------------------------------------------- */

.founder-note a:focus-visible,
.founder-trust a:focus-visible,
#founder-dock a:focus-visible,
#founder-dock button:focus-visible,
#founder-dock-overlay a:focus-visible,
#founder-dock-overlay button:focus-visible {
  outline: 3px solid var(--fo-focus);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   6. Mobile. 64% of the traffic, so this is the design rather than a fallback.
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {
  .post-article .founder-note { padding: 22px; }
  .founder-note .founder-note__photo { width: 60px; height: 60px; }
  .founder-note .founder-note__title { font-size: 23px; }
  .founder-trust { gap: 8px 10px; }
  .founder-trust .founder-trust__backers { width: 100%; }

  #founder-dock .founder-dock__bar {
    max-width: none;
    min-height: 56px;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
    transform: translateY(100%);
  }
  #founder-dock[data-state="docked"] .founder-dock__bar { transform: translateY(0); }
  #founder-dock .founder-dock__sub { display: none; }
  #founder-dock .founder-dock__line { display: none; }
  #founder-dock .founder-dock__line-short { display: block; font-size: 13px; white-space: normal; }
  #founder-dock .founder-dock__chev { display: none; }
  #founder-dock .founder-dock__dismiss-text { display: none; }
  #founder-dock .founder-dock__book { padding: 11px 13px; font-size: 12.5px; }

  #founder-dock-overlay { align-items: flex-end; padding: 0; }
  #founder-dock-overlay .founder-dock__panel {
    width: 100%;
    max-height: 86vh;
    max-height: 86dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 280ms var(--ease-out, cubic-bezier(.16, 1, .3, 1));
  }
  #founder-dock-overlay .founder-dock__title { font-size: 22px; }
}

/* Landscape phones: a persistent bar is a real tax on a 400px viewport, and
   the in-article card still does the job there. */
@media (max-height: 479px) {
  #founder-dock,
  #founder-dock-overlay { display: none !important; }
  html.has-founder-dock body { padding-bottom: 0 !important; }
}

/* --------------------------------------------------------------------------
   7. Reduced motion. Last, so it wins over the mobile transforms above.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  #founder-dock .founder-dock__bar,
  #founder-dock[data-state="docked"] .founder-dock__bar,
  #founder-dock .founder-dock__book,
  #founder-dock-overlay,
  #founder-dock-overlay .founder-dock__panel,
  .founder-note .founder-note__btn {
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
  }
  #founder-dock-overlay .founder-dock__panel,
  #founder-dock[data-state="docked"] .founder-dock__bar { transform: none !important; }
}