/* =========================================================================
   ui_kits/marketing/marketing.css
   Components (nav, buttons, footer, cursor) + Articles layout.
   Depends on tokens from ../../colors_and_type.css.
   ========================================================================= */

/* ============================ CONTAINER ============================ */
.container {
  width: 100%; max-width: var(--max-w);
  margin: 0 auto; padding: 0 var(--pad-h);
}

/* ============================ NAV (floating pill) ============================
   Mirrors the main Relationship Digest page nav exactly. Both `.nav` (the
   main-page class) and `.nav--floating` resolve to the same styling. */
.nav, .nav--floating {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 100;
  width: min(1136px, calc(100vw - 64px)); max-width: calc(100vw - 32px);
  background: rgba(243, 248, 234, 0.55);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border: 1px solid rgba(220, 227, 205, 0.45);
  border-radius: 999px;
  box-shadow: 0 8px 28px -8px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.04);
  transition: box-shadow 200ms ease, background 200ms ease;
}
.nav.scrolled, .nav--floating.scrolled { box-shadow: 0 10px 32px -8px rgba(0,0,0,0.16), 0 1px 2px rgba(0,0,0,0.05); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px; padding: 8px 8px 8px 24px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-wordmark, .nav-brand-text {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500; color: var(--ink); letter-spacing: -0.015em;
}
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 400; color: var(--ink-2); transition: color 150ms ease; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }

/* Mobile hamburger toggle (hidden on desktop) — ported from the main page */
.nav-links a.nav-menu-cta { display: none; } /* inline menu CTA: shown only inside the mobile dropdown */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 220ms ease, opacity 180ms ease; }
.nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav { min-width: 0; width: calc(100vw - 24px); max-width: calc(100vw - 24px); top: 12px; }
  .nav-inner { justify-content: space-between; gap: 16px; padding: 8px 12px 8px 22px; }
  .nav-wordmark, .nav-brand-text { font-size: 18px; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: flex;
    position: absolute; top: calc(100% + 10px); right: 6px; left: auto;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px;
    padding: 10px; width: min(200px, calc(100vw - 48px));
    box-shadow: 0 16px 40px -10px rgba(0,0,0,0.22);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-8px) scale(0.96); transform-origin: top right;
    transition: opacity 200ms ease, transform 260ms ease, visibility 0s linear 260ms;
  }
  .nav.menu-open .nav-links {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateY(0) scale(1);
    transition: opacity 200ms ease, transform 260ms cubic-bezier(0.2,0.9,0.3,1.2), visibility 0s;
  }
  .nav-links > * { opacity: 0; transform: translateY(-4px); transition: opacity 200ms ease, transform 200ms ease; }
  .nav.menu-open .nav-links > * { opacity: 1; transform: translateY(0); }
  .nav.menu-open .nav-links > *:nth-child(1) { transition-delay: 60ms; }
  .nav.menu-open .nav-links > *:nth-child(2) { transition-delay: 90ms; }
  .nav.menu-open .nav-links > *:nth-child(3) { transition-delay: 120ms; }
  .nav.menu-open .nav-links > *:nth-child(4) { transition-delay: 150ms; }
  .nav.menu-open .nav-links > *:nth-child(5) { transition-delay: 180ms; }
  .nav.menu-open .nav-links > *:nth-child(6) { transition-delay: 210ms; }
  .nav-links a { padding: 10px 14px; border-radius: 10px; font-size: 15px; color: var(--ink); }
  .nav-links a:hover { background: var(--paper-2); }
  .nav-links a.nav-menu-cta {
    display: inline-flex; justify-content: center; gap: 6px; margin-top: 8px;
    color: var(--paper); background: var(--ink); border-radius: 999px;
  }
  .nav-links a.nav-menu-cta:hover { background: var(--ink-2); color: var(--paper); }
}

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; cursor: pointer; font-family: var(--font-sans);
  font-weight: 500; border-radius: 999px; gap: 6px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease;
  position: relative; overflow: hidden; letter-spacing: 0.01em;
}
.btn:active { transform: scale(0.985); }
.btn .arrow { transition: transform 150ms ease; }
.btn:hover .arrow { transform: translateX(2px); }

.btn-primary { background: var(--ink); color: var(--paper); padding: 14px 24px; font-size: 15px; }
.btn-primary:hover { background: var(--ink-2); color: var(--paper); }
.btn-primary .btn-label, .btn-primary .arrow { position: relative; z-index: 1; }

.btn-ghost { background: transparent; border: 1px solid var(--ink); color: var(--ink); padding: 13px 22px; font-size: 15px; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Match the main Relationship Digest page nav CTA exactly */
.btn-sage { background: var(--ink); color: var(--paper); padding: 10px 22px; font-size: 14px; }
.btn-sage:hover { background: var(--ink-2); color: var(--paper); }
.nav-cta { padding: 10px 18px; font-size: 13px; gap: 6px; }
.nav-cta .arrow { transition: transform 150ms ease; }
.nav-cta:hover .arrow { transform: translateX(2px); }

/* Magnetic fill sweep */
.btn--magnetic .btn-fill {
  position: absolute; inset: 0; z-index: 0;
  background: var(--ink-2);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 250ms ease;
}
.btn--magnetic:hover .btn-fill { transform: scaleX(1); }

/* ============================ BREADCRUMB ============================ */
.breadcrumb-strip {
  padding-top: 96px;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.breadcrumb-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 16px var(--pad-h);
}
.breadcrumb-inner a {
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em; color: var(--ink-3); transition: color 150ms ease;
}
.breadcrumb-inner a:hover { color: var(--ink); }

/* ============================ SECTIONS ============================ */
.section { padding: var(--pad-v) 0; }
.section--tight { padding: 64px 0 96px; }

/* ============================ ARTICLES HERO (list page) ============================ */
.articles-hero {
  padding: 160px 0 56px;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.articles-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 68px); font-weight: 500;
  line-height: 1.05; letter-spacing: -0.03em; color: var(--ink);
  text-wrap: balance; margin: 6px 0 20px;
}
.articles-hero h1 em { color: var(--spark-deep); font-style: italic; }
.articles-hero p {
  font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 60ch;
}

/* ============================ ARTICLE LIST ============================ */
.article-list { list-style: none; border-top: 1px solid var(--hairline); }
.article-row { border-bottom: 1px solid var(--hairline); }
.article-row a {
  display: grid;
  grid-template-columns: 64px 1fr auto 24px;
  grid-template-areas:
    "num name   date arrow"
    "num agency date arrow";
  align-items: baseline; column-gap: 20px; row-gap: 4px;
  padding: 22px 4px;
  transition: background 150ms ease, padding 150ms ease;
}
.article-num   { grid-area: num; }
.article-name  { grid-area: name; }
.article-agency{ grid-area: agency; }
.article-date  { grid-area: date; align-self: center; }
.article-arrow { grid-area: arrow; align-self: center; }
.article-row a:hover { background: var(--surface-ink); padding-left: 16px; padding-right: 16px; }
.article-num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--spark-deep); letter-spacing: 0.02em;
}
.article-name {
  font-family: var(--font-display); font-size: 20px; font-weight: 500;
  letter-spacing: -0.015em; color: var(--ink);
}
.article-agency {
  font-family: var(--font-sans); font-size: 14px; color: var(--ink-3);
  line-height: 1.4;
}
.article-date {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-4);
  white-space: nowrap; text-align: right;
}
.article-arrow {
  font-size: 16px; color: var(--ink-4); justify-self: end;
  transition: transform 150ms ease, color 150ms ease;
}
.article-row a:hover .article-arrow { transform: translateX(4px); color: var(--ink); }

.articles-list-foot {
  margin-top: 40px; font-size: 14px; color: var(--ink-3);
}
.articles-list-foot a { color: var(--spark-deep); text-decoration: underline; }

@media (max-width: 720px) {
  .article-row a {
    grid-template-columns: 48px 1fr 18px;
    grid-template-areas:
      "num name arrow"
      "num agency arrow"
      "num date arrow";
    gap: 4px 16px; row-gap: 4px;
  }
  .article-num { grid-area: num; }
  .article-name { grid-area: name; }
  .article-agency { grid-area: agency; }
  .article-date { grid-area: date; text-align: left; }
  .article-arrow { grid-area: arrow; align-self: center; }
}

/* ============================ ARTICLE HERO (detail page) ============================
   Two-column row: round portrait on the left, meta on the right
   (issue line → name → role/company). Closed off by a hairline below.
   The breadcrumb above already clears the fixed nav, so top padding is modest. */
.article-hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(120% 80% at 0% -10%, var(--spark-paper) 0%, transparent 55%),
    var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.article-hero-inner {
  max-width: 880px; margin: 0 auto; padding: 0 var(--pad-h);
  display: flex; align-items: center; gap: 48px;
}
/* Round portrait (left) */
.article-hero .portrait {
  width: 220px; height: 220px; border-radius: 24px; overflow: hidden;
  border: 5px solid var(--surface); background: var(--surface-ink);
  box-shadow: 0 18px 48px -16px rgba(0,0,0,0.32), 0 0 0 1px var(--hairline);
  flex: none;
}
.article-hero .portrait img { width: 100%; height: 100%; object-fit: cover; }
/* Meta column (right) */
.article-hero-meta {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start;
}
.branding-issue {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 16px;
}
.series-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3);
}
.episode {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--spark-deep);
  padding-left: 12px; border-left: 1px solid var(--hairline-2);
}
.pubdate {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-4);
  padding-left: 12px; border-left: 1px solid var(--hairline-2);
}
.article-hero-meta h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px); font-weight: 500;
  line-height: 1.04; letter-spacing: -0.03em; color: var(--ink);
}
.article-hero-meta .subject-meta {
  margin-top: 14px; font-family: var(--font-sans); font-size: 15px;
  color: var(--ink-3); letter-spacing: 0.01em;
}
@media (max-width: 620px) {
  .article-hero { padding: 44px 0 32px; }
  .article-hero-inner { flex-direction: column; align-items: center; text-align: center; gap: 28px; }
  .article-hero .portrait { width: 168px; height: 168px; }
  .article-hero-meta { align-items: center; }
  .branding-issue { justify-content: center; }
}

/* ============================ PULL QUOTE ============================ */
.article-pull-quote {
  max-width: 720px; margin: 48px auto 0; padding: 0 var(--pad-h);
  text-align: center; position: relative;
}
.article-pull-quote .quote-mark {
  display: block; font-family: var(--font-display); font-size: 64px;
  line-height: 0.5; color: var(--spark); margin-bottom: 18px;
}
.article-pull-quote q {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.3; color: var(--ink);
  quotes: none;
}

/* ============================ ARTICLE BODY ============================ */
.article-body {
  max-width: 720px; margin: 56px auto 0; padding: 0 var(--pad-h);
}
.article-body p {
  font-size: 17px; line-height: 1.7; color: var(--ink-2); margin-bottom: 20px;
}
.article-body h2 {
  font-family: var(--font-display); font-size: 26px; font-weight: 500;
  line-height: 1.2; letter-spacing: -0.02em; color: var(--ink);
  margin: 48px 0 20px;
}
.article-body .qa-name {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3);
  margin: 0 0 4px;
}
.article-body .qa-prompt {
  font-size: 17px; font-weight: 500; color: var(--ink); margin: 0 0 16px;
}
.article-body blockquote {
  border-left: 2px solid var(--spark); padding-left: 24px; margin: 0 0 32px;
}
.article-body blockquote p { color: var(--ink-2); }
.article-body blockquote p:last-child { margin-bottom: 0; }

/* ============================ KEY TAKEAWAYS ============================ */
.takeaways {
  max-width: 720px; margin: 56px auto 0; padding: 32px;
  background: var(--surface-ink); border: 1px solid var(--hairline);
  border-radius: 16px;
}
.takeaways h3 {
  font-family: var(--font-display); font-size: 22px; font-weight: 500;
  letter-spacing: -0.015em; color: var(--ink); margin-bottom: 18px;
}
.takeaways ol { padding-left: 20px; display: flex; flex-direction: column; gap: 14px; }
.takeaways li { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.takeaways li strong { color: var(--ink); }

/* ============================ AUTHOR CARD ============================ */
.author-card {
  max-width: 720px; margin: 40px auto 0; padding: 0 var(--pad-h);
  display: flex; align-items: center; gap: 16px;
}
.author-av {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--surface-ink); border: 1px solid var(--hairline); flex: none;
}
.author-av img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-weight: 500; font-size: 15px; color: var(--ink); }
.author-bio { font-size: 14px; color: var(--ink-3); }
.author-bio a { color: var(--spark-deep); text-decoration: underline; }

/* ============================ SUBSCRIBE ============================ */
.subscribe-block {
  max-width: 720px; margin: 56px auto 0; padding: 40px 32px;
  background: var(--surface-ink); color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 16px;
}
.subscribe-block h3 {
  font-family: var(--font-display); font-size: 24px; font-weight: 500;
  letter-spacing: -0.015em; margin-bottom: 8px; color: var(--ink);
}
.subscribe-block > p { font-size: 15px; color: var(--ink-3); margin-bottom: 24px; }
.subscribe-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.subscribe-form input {
  width: 100%; padding: 12px 14px; font-family: var(--font-sans); font-size: 14px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--hairline-2); border-radius: 8px;
}
.subscribe-form input::placeholder { color: var(--ink-4); }
.subscribe-form input:focus { outline: none; border-color: var(--spark-deep); }
.subscribe-form .submit-row { grid-column: 1 / -1; }
.subscribe-form .btn-primary { background: var(--ink); color: var(--paper); }
.subscribe-form .btn-primary:hover { background: var(--ink-2); }
@media (max-width: 560px) { .subscribe-form { grid-template-columns: 1fr; } }

/* ============================ BACK LINK ============================ */
.article-back {
  max-width: 720px; margin: 48px auto 80px; padding: 0 var(--pad-h);
}
.article-back a {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  color: var(--ink-3); transition: color 150ms ease;
}
.article-back a:hover { color: var(--ink); }

/* ============================ FOOTER ============================ */
.footer { background: var(--ink); color: var(--paper); padding: 80px 0 32px; margin-top: 0; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; grid-template-rows: auto auto; gap: 32px;
}
.footer-inner .footer-brand-col { grid-column: 1; grid-row: 1 / 3; }
.footer-bureau {
  grid-column: 2 / -1; grid-row: 2; justify-self: end; display: block;
  margin-top: 32px; text-decoration: none;
}
.footer-bureau img { display: block; height: 64px; width: auto; border-radius: 6px; }
.footer h5 {
  font-family: var(--font-sans); font-weight: 500; font-size: 12px; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(243, 248, 234, 0.5); margin: 0 0 16px;
}
.footer a {
  display: block; font-family: var(--font-sans); font-weight: 400; font-size: 14px; line-height: 2;
  color: var(--paper); text-decoration: none; opacity: 0.85;
  transition: color 150ms ease, opacity 150ms ease;
}
.footer a:hover { opacity: 1; color: var(--spark); }
.footer .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer .brand img.footer-mark {
  width: 36px; height: 36px; border-radius: 7px; background: var(--paper); object-fit: cover;
}
.footer .brand span {
  font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1;
  letter-spacing: -0.015em; color: var(--paper);
}
.footer .copy {
  font-family: var(--font-sans); font-weight: 400; font-size: 13px; line-height: 1.6;
  color: rgba(243, 248, 234, 0.6); max-width: 36ch; margin: 0;
}
.footer .copy a { display: inline; opacity: 0.85; text-decoration: underline; }
.footer-contact { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.footer-contact p {
  font-family: var(--font-sans); font-weight: 400; font-size: 13px; line-height: 1.5;
  color: rgba(243, 248, 234, 0.6); margin: 0; max-width: 36ch;
}
.footer-contact p a { display: inline; opacity: 0.85; }
.footer-bottom {
  max-width: 1200px; margin: 56px auto 0; padding: 24px 32px 0;
  border-top: 1px solid rgba(243, 248, 234, 0.1);
  font-family: var(--font-mono); font-weight: 400; font-size: 12px; line-height: 1;
  color: rgba(243, 248, 234, 0.4);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
@media (max-width: 768px) {
  .footer { padding: 56px 0 24px; }
  .footer-inner { grid-template-columns: 1fr; grid-template-rows: auto; gap: 32px; padding: 0 24px; }
  .footer-inner .footer-brand-col,
  .footer-inner .footer-col-resources,
  .footer-inner .footer-col-compare,
  .footer-inner .footer-col-legal { grid-column: 1; grid-row: auto; }
  .footer-bureau { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; padding: 20px 24px 0; }
}

/* ============================ CUSTOM CURSOR + PAGE MASK ============================ */
.cursor-dot, .cursor-label { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 1000; will-change: transform; }
.cursor-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ink);
  transform: translate(-50%, -50%); transition: width 150ms ease, height 150ms ease;
}
.cursor-dot.is-hover { width: 16px; height: 16px; }
.cursor-dot.is-press { width: 6px; height: 6px; }
.cursor-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em;
  background: var(--ink); color: var(--paper); padding: 4px 8px; border-radius: 6px;
  transform: translate(12px, 12px); opacity: 0; transition: opacity 150ms ease;
}
.cursor-label.is-visible { opacity: 1; }
.page-mask { position: fixed; inset: 0; z-index: 999; pointer-events: none; display: none; }
@media (max-width: 768px), (pointer: coarse) {
  .cursor-dot, .cursor-label { display: none; }
}

/* ============================ REVEAL (pre-animation states) ============================
   motion.js promotes these to visible. Defined so content is hidden only
   briefly; a `.motion-ready` class on <html> (set by motion.js once loaded)
   gates the hidden state so JS-off / failed-load still shows everything. */
.motion-ready [data-reveal],
.motion-ready [data-reveal-lines],
.motion-ready [data-reveal-child] { opacity: 0; transform: translateY(14px); }
[data-reveal].is-in,
[data-reveal-lines].is-in,
[data-reveal-child].is-in {
  opacity: 1 !important; transform: none !important;
  transition: opacity 600ms ease, transform 600ms ease;
}
