/* ===========================================================================
   Associate day scenes (prefix: ad-): a phone rises with a text from your
   Associate, then an Outlook thread builds as you scroll. Scroll-driven via
   js/home/associate-day.js (sets --p 0..1 on .ad-track). Reduced motion and
   no-JS show the finished states.
   =========================================================================== */
.ad-track { position: relative; height: 340vh; --p: 0; }
.ad-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; align-items: center; }
.ad-wrap { position: relative; width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 24px; height: 100%; }
@media (min-width: 640px) { .ad-wrap { padding: 0 40px; } }

.ad-scene { position: absolute; inset: 0 24px; display: grid; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ad-scene { inset: 0 40px; grid-template-columns: 0.9fr 1.1fr; gap: 56px; } }

.ad-copy { align-self: center; }
.ad-eyebrow { display: block; margin-bottom: 14px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(251,245,238,.62); }
.ad-head { margin: 0; font-family: var(--font-garamond); font-weight: 400; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.08; color: #fbf5ee; }
.ad-head em { color: var(--cream); }
.ad-head .ad-dim { transition: color .5s; color: rgba(251,245,238,.32); }
.ad-head .ad-dim.is-lit { color: rgba(251,245,238,.95); }
.ad-sub { margin: 18px 0 0; max-width: 420px; font-family: var(--font-garamond); font-size: 1.1rem; line-height: 1.6; color: rgba(251,245,238,.8); }

/* ---- Phone ---- */
.ad-phone-stage { display: flex; justify-content: center; }
.ad-phone { position: relative; width: min(300px, 70vw); aspect-ratio: 9 / 19.2; border-radius: 46px; background: #0c0607; padding: 10px;
  box-shadow: 0 40px 90px rgba(0,0,0,.55), inset 0 0 0 1.5px rgba(255,255,255,.08); will-change: transform; }
.ad-phone__screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #6a2224 0%, #3a1416 45%, #1a0b0b 100%); }
.ad-phone__island { position: absolute; top: 12px; left: 50%; width: 30%; height: 26px; transform: translateX(-50%); border-radius: 20px; background: #000; }
.ad-phone__time { position: absolute; top: 13%; left: 0; right: 0; text-align: center; font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif; font-weight: 300; font-size: clamp(54px, 15vw, 70px); color: rgba(255,255,255,.92); letter-spacing: -.02em; }
.ad-phone__date { position: absolute; top: 9.5%; left: 0; right: 0; text-align: center; font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif; font-size: 14px; color: rgba(255,255,255,.75); }
.ad-note { position: absolute; left: 10px; right: 10px; bottom: 54px; padding: 11px 12px; border-radius: 18px; background: rgba(40,28,28,.78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: start;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif; color: #fff; will-change: transform, opacity; }
.ad-note__icon { width: 30px; height: 30px; border-radius: 8px; background: #f3ebe1; color: #4D1B1A; display: grid; place-items: center; font-family: var(--font-garamond); font-size: 17px; }
.ad-note__row { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.ad-note__row span { font-weight: 400; color: rgba(255,255,255,.6); }
.ad-note__text { margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: rgba(255,255,255,.9); }
.ad-phone__bar { position: absolute; bottom: 9px; left: 50%; width: 36%; height: 5px; border-radius: 3px; transform: translateX(-50%); background: rgba(255,255,255,.75); }

/* ---- Outlook ---- */
.ad-mail { border-radius: 12px; overflow: hidden; background: #fbf7f1; box-shadow: 0 40px 90px rgba(0,0,0,.5); will-change: transform, opacity;
  font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; color: #241a17; }
.ad-mail__bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: #efe7dc; border-bottom: 1px solid rgba(33,13,14,.08); font-size: 12px; }
.ad-mail__dots { display: flex; gap: 5px; } .ad-mail__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(33,13,14,.18); display: block; }
.ad-mail__app { font-weight: 600; } .ad-mail__search { flex: 1; max-width: 260px; padding: 4px 10px; border-radius: 6px; background: #fff; color: #9a8f86; font-size: 11px; }
.ad-mail__body { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ad-mail__body { grid-template-columns: 130px 1fr; } }
.ad-mail__side { display: none; padding: 12px 8px; border-right: 1px solid rgba(33,13,14,.07); font-size: 12px; color: #5b514b; }
@media (min-width: 900px) { .ad-mail__side { display: block; } }
.ad-mail__side div { padding: 6px 10px; border-radius: 6px; } .ad-mail__side div:first-child { background: #ece3d7; color: #241a17; font-weight: 600; display: flex; justify-content: space-between; }
.ad-thread { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.ad-subject { font-size: 14.5px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid rgba(33,13,14,.08); }
.ad-msg { display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: 12.5px; line-height: 1.5; will-change: transform, opacity; }
.ad-msg__av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #5a1d1e; color: #f6e9dc; font-family: var(--font-garamond); font-size: 17px; }
.ad-msg__av--you { background: #d8cbbb; color: #4a3d36; font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif; font-size: 11px; font-weight: 600; }
.ad-msg__head { display: flex; justify-content: space-between; font-weight: 600; } .ad-msg__head span { font-weight: 400; color: #8a7f77; font-size: 11.5px; }
.ad-msg p { margin: 3px 0 0; color: #3b312c; }
.ad-msg--you .ad-msg__card { background: #f1e8dc; border-radius: 8px; padding: 8px 10px; }
.ad-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 4px 9px; border: 1px solid rgba(33,13,14,.12); border-radius: 6px; background: #fff; font-size: 11.5px; }
.ad-file b { font-family: var(--font-mono); font-size: 9px; letter-spacing: .06em; color: #2b579a; font-weight: 700; }

/* ---- Scroll choreography (driven by --p) ---- */
.ad-scene--phone { opacity: calc(1 - clamp(0, (var(--p) - .40) * 10, 1)); }
.ad-scene--mail { opacity: clamp(0, (var(--p) - .40) * 10, 1); }
.ad-phone { transform: translateY(calc((1 - clamp(0, var(--p) * 5.5, 1)) * 70vh - clamp(0, (var(--p) - .34) * 8, 1) * 30vh)); }
.ad-note { opacity: clamp(0, (var(--p) - .16) * 12, 1); transform: translateY(calc((1 - clamp(0, (var(--p) - .16) * 12, 1)) * -22px)); }
.ad-mail { transform: translateY(calc((1 - clamp(0, (var(--p) - .40) * 6, 1)) * 60vh)); }
.ad-msg--2 { opacity: clamp(0, (var(--p) - .62) * 12, 1); transform: translateY(calc((1 - clamp(0, (var(--p) - .62) * 12, 1)) * 14px)); }
.ad-msg--3 { opacity: clamp(0, (var(--p) - .78) * 12, 1); transform: translateY(calc((1 - clamp(0, (var(--p) - .78) * 12, 1)) * 14px)); }

/* ---- Phones: copy above, device below ---- */
@media (max-width: 899px) {
  .ad-track { height: 300vh; }
  .ad-scene { align-content: center; gap: 22px; }
  .ad-copy { text-align: left; }
  .ad-head { font-size: 34px; }
  .ad-sub { font-size: 17.5px; }
  .ad-phone { width: min(230px, 60vw); }
  .ad-phone__time { font-size: 52px; }
  .ad-note__row, .ad-note__text { font-size: 11.5px; }
  .ad-msg { font-size: 12px; }
}

/* ---- Reduced motion / no JS: finished states, no sticky ---- */
@media (prefers-reduced-motion: reduce) {
  .ad-track { height: auto; } .ad-sticky { position: relative; height: auto; padding: 80px 0; }
  .ad-wrap { height: auto; } .ad-scene { position: relative; inset: auto; margin-bottom: 80px; }
  .ad-scene--phone, .ad-scene--mail, .ad-note, .ad-msg--2, .ad-msg--3 { opacity: 1 !important; transform: none !important; }
  .ad-phone, .ad-mail { transform: none !important; }
}
.ad-track:not(.ad-armed) { height: auto; }
.ad-track:not(.ad-armed) .ad-sticky { position: relative; height: auto; padding: 80px 0; }
.ad-track:not(.ad-armed) .ad-wrap { height: auto; }
.ad-track:not(.ad-armed) .ad-scene { position: relative; inset: auto; margin-bottom: 80px; }
.ad-track:not(.ad-armed) .ad-scene--phone, .ad-track:not(.ad-armed) .ad-scene--mail,
.ad-track:not(.ad-armed) .ad-note, .ad-track:not(.ad-armed) .ad-msg--2, .ad-track:not(.ad-armed) .ad-msg--3,
.ad-track:not(.ad-armed) .ad-phone, .ad-track:not(.ad-armed) .ad-mail { opacity: 1; transform: none; }

/* ---- iMessage conversation on the phone (replaces the lock screen) ---- */
.ad-phone__screen--chat { background: #fff; display: flex; flex-direction: column; font-family: -apple-system, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif; color: #111; }
.ad-chat__status { display: flex; justify-content: space-between; padding: 14px 24px 0; font-size: 12px; font-weight: 600; }
.ad-chat__icons { font-size: 8px; letter-spacing: 1px; }
.ad-chat__head { padding: 16px 12px 10px; text-align: center; background: #f6f6f8; border-bottom: 1px solid #e3e3e6; }
.ad-chat__av { width: 34px; height: 34px; margin: 0 auto 4px; border-radius: 50%; background: #5a1d1e; color: #f6e9dc; display: grid; place-items: center; font-family: var(--font-garamond); font-size: 19px; }
.ad-chat__name { font-size: 12.5px; font-weight: 600; }
.ad-chat__matter { font-size: 10px; color: #8a8a8e; margin-top: 1px; }
.ad-chat__list { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; padding: 10px 10px 8px; overflow: hidden; }
.ad-bub { max-width: 84%; padding: 7px 11px; border-radius: 17px; font-size: 12.5px; line-height: 1.35; will-change: transform, opacity; }
.ad-bub--me { align-self: flex-end; background: #0b84ff; color: #fff; border-bottom-right-radius: 5px; }
.ad-bub--ai { align-self: flex-start; background: #f0e8de; color: #2a211d; border-bottom-left-radius: 5px; max-width: 90%; }
.ad-bub ol { margin: 5px 0 5px; padding-left: 16px; } .ad-bub li { margin: 3px 0; }
.ad-bub b { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: #4D1B1A; }
.ad-typing { align-self: flex-start; display: flex; gap: 4px; padding: 9px 12px; border-radius: 17px; background: #f0e8de; }
.ad-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9c8f85; display: block; }
.ad-chat__input { display: flex; align-items: center; gap: 8px; padding: 6px 12px 26px; }
.ad-chat__input span { color: #8a8a8e; font-size: 20px; }
.ad-chat__input div { flex: 1; padding: 6px 12px; border: 1px solid #d6d6da; border-radius: 16px; font-size: 12px; color: #a0a0a5; }

/* each message appears at its point in the scroll; typing dots show just before a reply */
.ad-m1, .ad-m2, .ad-m3, .ad-m4, .ad-t1, .ad-t2 { display: none; }
.ad-armed .ad-m1 { display: block; opacity: clamp(0, (var(--p) - .12) * 25, 1); }
.ad-armed .ad-t1 { display: flex; height: calc(clamp(0, (var(--p) - .16) * 50, 1) * (1 - clamp(0, (var(--p) - .21) * 50, 1)) * 24px); padding-block: calc(clamp(0, (var(--p) - .16) * 50, 1) * (1 - clamp(0, (var(--p) - .21) * 50, 1)) * 9px); overflow: hidden; opacity: calc(clamp(0, (var(--p) - .16) * 50, 1) * (1 - clamp(0, (var(--p) - .21) * 50, 1))); }
.ad-armed .ad-m2 { display: block; opacity: clamp(0, (var(--p) - .21) * 25, 1); max-height: calc(clamp(0, (var(--p) - .21) * 25, 1) * 400px); overflow: hidden; }
.ad-armed .ad-m3 { display: block; opacity: clamp(0, (var(--p) - .27) * 25, 1); max-height: calc(clamp(0, (var(--p) - .27) * 25, 1) * 100px); overflow: hidden; }
.ad-armed .ad-t2 { display: flex; height: calc(clamp(0, (var(--p) - .30) * 50, 1) * (1 - clamp(0, (var(--p) - .33) * 50, 1)) * 24px); padding-block: calc(clamp(0, (var(--p) - .30) * 50, 1) * (1 - clamp(0, (var(--p) - .33) * 50, 1)) * 9px); overflow: hidden; opacity: calc(clamp(0, (var(--p) - .30) * 50, 1) * (1 - clamp(0, (var(--p) - .33) * 50, 1))); }
.ad-armed .ad-m4 { display: block; opacity: clamp(0, (var(--p) - .33) * 25, 1); max-height: calc(clamp(0, (var(--p) - .33) * 25, 1) * 100px); overflow: hidden; }
/* reduced motion / no JS: the finished conversation */
.ad-track:not(.ad-armed) .ad-m1, .ad-track:not(.ad-armed) .ad-m2, .ad-track:not(.ad-armed) .ad-m3, .ad-track:not(.ad-armed) .ad-m4 { display: block; }
/* hold the phone on screen a little longer so the conversation can finish */
.ad-scene--phone { opacity: calc(1 - clamp(0, (var(--p) - .42) * 10, 1)); }
.ad-scene--mail { opacity: clamp(0, (var(--p) - .44) * 10, 1); }
.ad-phone { transform: translateY(calc((1 - clamp(0, var(--p) * 9, 1)) * 70vh - clamp(0, (var(--p) - .38) * 8, 1) * 30vh)); }
.ad-mail { transform: translateY(calc((1 - clamp(0, (var(--p) - .44) * 6, 1)) * 60vh)); }
@media (max-width: 899px) {
  .ad-phone { width: min(250px, 66vw); }
  .ad-bub { font-size: 11.5px; } .ad-bub b { font-size: 9.5px; }
}
/* keep bubbles at full height; older ones scroll off the top like a real chat */
.ad-chat__list > * { flex-shrink: 0; }
@media (max-width: 899px) {
  .ad-chat__head { padding: 12px 10px 8px; } .ad-chat__av { width: 28px; height: 28px; font-size: 16px; }
}

/* ---- Outlook (closer to the real app: blue header, ribbon, rail, folders, message list, reading pane) ---- */
.ol { background: #fff; border-radius: 8px; font-family: 'Segoe UI', -apple-system, 'Helvetica Neue', Arial, sans-serif; color: #242424; font-size: 12px; }
.ol-top { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; background: #0f6cbd; color: #fff; }
.ol-waffle { display: grid; grid-template-columns: repeat(3, 3px); gap: 2px; padding: 4px; }
.ol-waffle i { width: 3px; height: 3px; background: #fff; border-radius: 1px; display: block; }
.ol-brand { font-weight: 600; font-size: 13px; }
.ol-search { flex: 1; max-width: 300px; margin: 0 auto; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 4px; background: #fff; color: #616161; font-size: 11.5px; }
.ol-me { width: 24px; height: 24px; border-radius: 50%; background: #c4dbf0; color: #0f548c; display: grid; place-items: center; font-size: 9.5px; font-weight: 600; }
.ol-ribbon { display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 12px; background: #fafafa; border-bottom: 1px solid #e0e0e0; color: #424242; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.ol-new { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 4px; background: #0f6cbd; color: #fff; font-weight: 600; }
.ol-body { display: grid; grid-template-columns: 1fr; min-height: 360px; }
@media (min-width: 900px) { .ol-body { grid-template-columns: 40px 190px 1fr; } }
@media (min-width: 1200px) { .ol-body { grid-template-columns: 40px 130px 190px 1fr; } }
.ol-rail, .ol-folders, .ol-list { display: none; }
@media (min-width: 900px) { .ol-rail, .ol-list { display: block; } }
@media (min-width: 1200px) { .ol-folders { display: block; } }
.ol-rail { background: #f0f0f0; border-right: 1px solid #e0e0e0; padding-top: 8px; }
.ol-rail span { display: grid; place-items: center; height: 36px; color: #616161; }
.ol-rail span.is-on { color: #0f6cbd; box-shadow: inset 2px 0 0 #0f6cbd; }
.ol-folders { background: #fafafa; border-right: 1px solid #e0e0e0; padding: 8px 6px; }
.ol-folders > div { display: flex; justify-content: space-between; padding: 5px 8px; border-radius: 4px; color: #424242; font-size: 11.5px; }
.ol-folders > div.is-on { background: #e8ebfa; color: #0f548c; font-weight: 600; }
.ol-folders > div b { color: #0f6cbd; }
.ol-folders .ol-fh { padding-top: 10px; font-size: 10.5px; font-weight: 600; color: #616161; }
.ol-list { border-right: 1px solid #e0e0e0; }
.ol-tabs { display: flex; gap: 14px; padding: 9px 12px 6px; border-bottom: 1px solid #ebebeb; font-size: 11.5px; color: #616161; }
.ol-tabs .is-on { color: #242424; font-weight: 600; box-shadow: inset 0 -2px 0 #0f6cbd; padding-bottom: 4px; }
.ol-item { position: relative; padding: 8px 12px 9px 14px; border-bottom: 1px solid #f0f0f0; }
.ol-item.is-sel { background: #ebf3fc; box-shadow: inset 3px 0 0 #0f6cbd; }
.ol-item__row { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; } .ol-item__row span { color: #616161; font-size: 10.5px; white-space: nowrap; }
.ol-item.is-sel .ol-item__row b, .ol-item.is-sel .ol-item__subj { color: #0f548c; }
.ol-item__subj { margin-top: 1px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-item__prev { margin-top: 1px; font-size: 11px; color: #616161; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-clip { position: absolute; right: 10px; bottom: 8px; font-size: 10px; color: #616161; }
.ol-read { padding: 12px 16px 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ol-subj { font-size: 15px; font-weight: 600; padding-bottom: 6px; }
.ol-msg { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid #e6e6e6; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.04); will-change: transform, opacity; }
.ol-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.ol-av--ai { background: #5a1d1e; color: #f6e9dc; font-family: var(--font-garamond); font-size: 16px; font-weight: 400; }
.ol-av--you { background: #c4dbf0; color: #0f548c; }
.ol-msg__head { display: flex; justify-content: space-between; font-size: 12px; } .ol-msg__head span { color: #616161; font-size: 11px; }
.ol-msg__to { font-size: 11px; color: #616161; margin-top: 1px; }
.ol-msg p { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #242424; }
.ol-att { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px 6px 6px; border: 1px solid #e0e0e0; border-radius: 4px; background: #fafafa; }
.ol-att > span { display: flex; flex-direction: column; line-height: 1.25; } .ol-att b { font-size: 11px; font-weight: 600; } .ol-att em { font-style: normal; font-size: 10px; color: #616161; }
.ol-ico { width: 22px; height: 24px; border-radius: 3px; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; }
.ol-ico--w { background: #185abd; } .ol-ico--x { background: #107c41; }
@media (max-width: 899px) {
  .ol-ribbon span:not(.ol-new):nth-child(n+4) { display: none; }
  .ol-read { padding: 10px 12px 12px; }
  .ol-msg { padding: 9px 10px; } .ol-msg p { font-size: 11.5px; }
  .ol-search { max-width: 150px; }
}
/* give Outlook more width; folders only on very wide screens */
@media (min-width: 900px) { .ad-scene--mail { grid-template-columns: 0.72fr 1.28fr; gap: 44px; } }
@media (min-width: 1200px) { .ol-body { grid-template-columns: 40px 200px 1fr; } .ol-folders { display: none; } }
@media (min-width: 1500px) { .ol-body { grid-template-columns: 40px 140px 200px 1fr; } .ol-folders { display: block; } }
.ol-read { gap: 8px; } .ol-msg { padding: 9px 12px; } .ol-msg p { margin-top: 4px; } .ol-att { margin-top: 6px; }
.ol-item.is-sel .ol-item__prev { padding-right: 16px; }

/* Section intro: "A day with your Associate" */
.ad-intro { max-width: 760px; margin: 0 auto; padding: 120px 24px 0; text-align: center; }
.ad-intro__kicker { display: block; margin-bottom: 18px; font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(251,245,238,.72); }
.ad-intro__title { margin: 0; font-family: 'EB Garamond', Garamond, serif; font-weight: 400; font-size: clamp(36px, 4.6vw, 60px); line-height: 1.08; color: #fbf5ee; }
.ad-intro__title em { font-style: italic; color: #fdead4; }
.ad-intro__lede { margin: 22px auto 0; max-width: 600px; font-family: 'EB Garamond', Garamond, serif; font-size: 21px; line-height: 1.5; color: rgba(251,245,238,.8); }
@media (max-width: 720px) { .ad-intro { padding-top: 80px; } .ad-intro__lede { font-size: 18px; } }
html { scroll-padding-top: 90px; }
