/* JOAT homepage polish v2
   Intentionally narrow scope: pathway-card styling, live handoff visual,
   and subtle scroll reveals. Global typography, buttons, colors, and layout stay intact. */

:root {
  --joat-accent-display: "Fraunces", "Bodoni Moda", Didot, "Times New Roman", serif;
}

/* Typography refinement v3: Fraunces is the homepage display serif.
   The JOAT wordmark remains Bodoni Moda; functional/body copy remains Montserrat. */
:root {
  --serif: "Fraunces", "Bodoni Moda", Didot, "Times New Roman", serif;
  --wordmark-serif: "Bodoni Moda", Didot, "Times New Roman", serif;
}

.wordmark-main,
.wordmark-sub {
  font-family: var(--wordmark-serif) !important;
}

/* Give the opening statement more air with Fraunces, especially on phones. */
.hero-v9 .hero-dark h2,
.hero-approved .hero-dark h2 {
  font-optical-sizing: auto;
  line-height: .97;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.hero-dark-copy .joat-definition {
  display: grid;
  gap: 16px;
}
.hero-dark-copy .joat-definition p {
  margin: 0;
}
.hero-dark-copy .joat-definition p:first-child {
  color: rgba(255,247,238,.94);
  font-size: 18px;
  line-height: 1.65;
}
.hero-dark-copy .joat-definition p:first-child strong,
.hero-dark-copy .joat-definition p:last-child strong {
  color: var(--paper);
  font-weight: 600;
}
.hero-dark-copy .joat-definition .handled-signoff {
  margin-top: 4px;
  color: #e8c6bd;
  font-family: "Corinthia", cursive;
  font-size: clamp(42px, 4.5vw, 62px);
  font-weight: 700;
  line-height: .8;
  letter-spacing: .01em;
}

/* Fraunces has more character than Bodoni and does not need such tight tracking. */
.display,
.section-title,
.launch-modal h2,
.modal-head h2,
.inquiry-intro h2,
.form-step h3,
.path-modal h2,
.chase-pop h2 {
  font-optical-sizing: auto;
  letter-spacing: -.025em;
}

@media (max-width: 680px) {
  .hero-v9 .hero-dark h2,
  .hero-approved .hero-dark h2 {
    font-size: clamp(48px, 12.2vw, 59px);
    line-height: 1.01;
    letter-spacing: -.022em;
  }
  .hero-dark-copy .joat-definition { gap: 14px; }
  .hero-dark-copy .joat-definition p:first-child {
    font-size: 16px;
    line-height: 1.62;
  }
  .hero-dark-copy .joat-definition .handled-signoff {
    margin-top: 8px;
    font-size: 46px;
  }
}

/* Approved pathway treatment: keep the existing grid and CTAs, but make each
   option feel like an editorial service card rather than a generic tile. */
.joat-pathways .pathway-grid {
  background: transparent;
}
.joat-pathways .pathway-card {
  position: relative;
  isolation: isolate;
  min-height: 330px;
  padding: 34px 28px 30px;
  background: rgba(251, 248, 243, .38);
  overflow: hidden;
}
.joat-pathways .pathway-card > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--wine);
  color: transparent;
  font-size: 0;
  line-height: 0;
  user-select: none;
}
.joat-pathways .pathway-card h3 {
  margin-top: 46px;
  font-family: var(--joat-accent-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(31px, 2.9vw, 44px);
  line-height: 1.01;
  letter-spacing: -.03em;
}
.joat-pathways .pathway-card p {
  font-size: 15px;
  line-height: 1.72;
}

/* Approved live handoff visual. It is additive only; the four explanatory
   steps below it remain unchanged. */
.handoff-demo {
  margin: 50px 0 56px;
  padding: 30px 30px 26px;
  border: 1px solid rgba(255, 247, 238, .2);
  background: #a9a5a3;
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.handoff-demo::before {
  content: "LIVE HANDOFF";
  display: block;
  margin-bottom: 30px;
  color: var(--wine);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.handoff-task-row {
  display: grid;
  grid-template-columns: minmax(250px, .95fr) minmax(0, 1.55fr) auto;
  gap: 30px;
  align-items: center;
}
.handoff-task { min-width: 0; }
.handoff-label {
  margin: 0 0 13px;
  color: var(--wine);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.handoff-task strong {
  display: block;
  font-family: var(--joat-accent-display);
  font-optical-sizing: auto;
  font-size: clamp(32px, 3.25vw, 49px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.035em;
  color: var(--paper);
  transition: opacity .24s ease, transform .24s ease;
}
.handoff-task strong.is-changing {
  opacity: 0;
  transform: translateY(8px);
}
.handoff-pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: 92px;
}
.handoff-pipeline::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 1px;
  background: rgba(111, 22, 32, .35);
}
.handoff-node {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
}
.handoff-node i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f7f2ed;
  border: 1px solid var(--wine);
  transition: transform .25s ease, background .25s ease;
}
.handoff-node span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(33, 26, 24, .65);
  white-space: nowrap;
}
.handoff-node.is-active i {
  transform: scale(1.55);
  background: var(--wine);
}
.handoff-runner {
  position: absolute;
  z-index: 3;
  left: 7%;
  top: calc(50% - 9px);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4eee7;
  border: 4px solid #a9a5a3;
  box-shadow: 0 0 0 1px rgba(111, 22, 32, .35);
  transform: translateX(-50%);
  transition: left .58s cubic-bezier(.4, 0, .2, 1);
}
.handoff-stamp {
  display: grid;
  place-items: center;
  width: 122px;
  height: 76px;
  border: 2px solid rgba(111, 22, 32, .65);
  color: rgba(111, 22, 32, .7);
  font-family: var(--joat-accent-display);
  font-size: 20px;
  font-style: italic;
  transform: rotate(-4deg) scale(.94);
  opacity: .65;
  transition: transform .25s ease, opacity .25s ease, background .25s ease, color .25s ease;
}
.handoff-stamp.is-done {
  transform: rotate(-4deg) scale(1);
  opacity: 1;
  background: var(--wine);
  color: var(--paper);
}

/* Scroll polish. JS adds .joat-pop only after it is ready, so content remains
   visible if JavaScript is blocked or fails. */
.joat-pop {
  opacity: 0;
  transform: translateY(20px) scale(.988);
  transition:
    opacity .62s ease,
    transform .74s cubic-bezier(.2, .78, .2, 1);
  transition-delay: var(--joat-pop-delay, 0ms);
  will-change: opacity, transform;
}
.joat-pop.joat-pop-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 980px) {
  .handoff-task-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .handoff-stamp {
    justify-self: end;
  }
}

@media (max-width: 680px) {
  .joat-pathways .pathway-card {
    min-height: 315px;
    padding: 36px 26px 30px;
  }
  .joat-pathways .pathway-card h3 {
    margin-top: 44px;
    font-size: clamp(36px, 10vw, 48px);
  }
  .joat-pathways .pathway-card p {
    font-size: 16px;
    line-height: 1.72;
  }
  .handoff-demo {
    margin: 38px 0 44px;
    padding: 28px 18px 24px;
  }
  .handoff-demo::before { margin-bottom: 26px; }
  .handoff-task strong { font-size: clamp(33px, 10vw, 45px); }
  .handoff-pipeline {
    min-height: 92px;
    overflow: hidden;
  }
  .handoff-node span {
    font-size: 7px;
    letter-spacing: .02em;
  }
  .handoff-node i { width: 9px; height: 9px; }
  .handoff-runner { width: 16px; height: 16px; }
  .handoff-stamp { width: 104px; height: 62px; font-size: 18px; }
  .joat-pop { transform: translateY(14px) scale(.992); }
}

@media (prefers-reduced-motion: reduce) {
  .handoff-runner,
  .handoff-task strong,
  .handoff-stamp,
  .joat-pop {
    transition: none !important;
  }
  .joat-pop {
    opacity: 1 !important;
    transform: none !important;
  }
}
