/* Chapter 02: Eloquent. */

/* -------------------------------------------------------------------------
   02 Eloquent
   ------------------------------------------------------------------------- */
.ch--eloquent { --rond: 0; color: #121317; padding-top: 18vh; padding-bottom: 22vh; overflow: clip; }
.aurora { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.aurora i {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 46vw; height: 46vw; left: -10vw; top: 2%; background: #f2c5fe; }
.aurora i:nth-child(2) { width: 40vw; height: 40vw; right: -8vw; top: 10%; background: #c7d2fe; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 36vw; height: 36vw; left: 30vw; top: 38%; background: #d9f2ff; animation-delay: -12s; }
.aurora i:nth-child(4) { width: 34vw; height: 34vw; right: 10vw; top: 64%; background: #fde2f3; animation-delay: -18s; }
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -3vw) scale(1.1); }
  100% { transform: translate(-3vw, 4vw) scale(.95); }
}
.ch--eloquent > .wrap,
.ch--eloquent > .e-h { position: relative; z-index: 1; }
.e-head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.e-head .ch__sub { margin-left: auto; margin-right: auto; }
.e-head .ctas { justify-content: center; }
.e-title { margin: 0; font-size: clamp(48px, 7.6vw, 132px); line-height: .98; letter-spacing: -.045em; font-weight: 420; }
.e-line { display: block; }
.e-line--hl {
  background: linear-gradient(90deg, #566cde 0%, #9b72f2 40%, #e46fc4 75%, #f29a8b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em;
}
.e-title .e-line { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); }
.e-title.in .e-line { opacity: 1; transform: none; }
.e-title.in .e-line:nth-child(2) { transition-delay: .12s; }

.e-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 56px; margin: 34px 0 0; }
.e-wave i {
  width: 4px; border-radius: 2px; background: #121317; height: 6px;
  transition: height .12s linear;
}
.e-wave i.dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(18, 19, 23, .35); }

.polish { margin-top: 18vh; }
.polish__head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; flex-wrap: wrap; }
.polish__head h3 { margin: 0; font-size: clamp(32px, 3.6vw, 60px); line-height: 1.02; letter-spacing: -.03em; font-weight: 440; }
.seg {
  position: relative; display: inline-flex; padding: 5px; border-radius: 99px;
  background: rgba(18, 19, 23, .06);
}
.seg button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: 11px 20px; border-radius: 99px; font-size: 15px; font-weight: 500;
  color: rgba(18, 19, 23, .6);
  transition: color .4s;
}
.seg button[aria-selected="true"] { color: #fff; }
.seg__thumb {
  position: absolute; top: 5px; bottom: 5px; left: 5px;
  border-radius: 99px; background: #121317;
  transition: transform .6s var(--ease-out), width .6s var(--ease-out);
}
.polish__card {
  border-radius: 32px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 40px 80px -40px rgba(86, 108, 222, .35), 0 1px 0 rgba(18, 19, 23, .04);
  padding: clamp(24px, 3.4vw, 54px);
}
.polish__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.polish__rec { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: rgba(18, 19, 23, .7); }
.polish__rec i { width: 10px; height: 10px; border-radius: 50%; background: #ea4335; animation: rec 1.2s infinite; }
.polish.is-polished .polish__rec i { background: #566cde; animation: none; }
@keyframes rec { 50% { opacity: .25; } }
.polish__chip { font-size: 12px; padding: 6px 12px; border-radius: 99px; background: rgba(86, 108, 222, .1); color: #3f51b5; font-weight: 500; letter-spacing: .02em; }
.polish__text {
  margin: 0; min-height: 4.6em;
  font-size: clamp(22px, 2.3vw, 38px); line-height: 1.38; letter-spacing: -.012em; font-weight: 400;
}
.tk {
  display: inline-block; vertical-align: bottom;
  white-space: nowrap;
  overflow: hidden;
  max-width: var(--w, 20em);
  margin-right: .26em;
  font-stretch: 100%;
  transition: max-width .7s var(--ease-io), margin .7s var(--ease-io), opacity .45s ease, font-stretch .7s var(--ease-io), color .4s, filter .4s;
}
.tk.is-hidden { opacity: 0; transform: translateY(.2em); }
.tk.is-typing { opacity: 0; }
.tk.drop { color: #b3261e; }
.polish.is-polished .tk.drop { max-width: 0 !important; margin-right: 0; opacity: 0; font-stretch: 25%; }
.tk.add { max-width: 0 !important; margin-right: 0; opacity: 0; font-stretch: 25%; }
.polish.is-polished .tk.add { max-width: var(--w2, 10em) !important; margin-right: .26em; opacity: 1; font-stretch: 100%; color: #3f51b5; }
.tk .alt { display: none; }
.tk.swap.is-swapped .orig { display: none; }
.tk.swap.is-swapped .alt { display: inline; }
.tk.vocab.is-swapped { color: #566cde; font-weight: 520; background: linear-gradient(transparent 82%, rgba(86, 108, 222, .22) 82%); }
#polishText.measuring .tk { transition: none !important; max-width: none !important; font-stretch: 100% !important; margin-right: .26em !important; }
.polish__meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(18, 19, 23, .08); font-size: 14px; color: rgba(18, 19, 23, .6); }
.polish__meta b { color: #121317; font-weight: 600; font-stretch: 55%; margin-right: 2px; }

/* Horizontal pinned gallery */
.e-h { position: relative; height: 420vh; margin-top: 14vh; }
.e-h__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
/* flex: none keeps the track at its content width; auto margins center it when the
   viewport is wider than the track and resolve to 0 (left-aligned) when it overflows. */
.e-h__track { flex: none; margin: 0 auto; display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); padding: 0 var(--pad); will-change: transform; }
.e-panel { flex: none; margin: 0; }
.e-panel--intro { width: min(440px, 80vw); padding-right: 4vw; }
.e-intro { margin: 18px 0 18px; font-size: clamp(40px, 4.4vw, 72px); line-height: 1; letter-spacing: -.035em; font-weight: 440; }
.e-panel--intro p { font-size: 18px; line-height: 1.55; color: rgba(18, 19, 23, .62); margin: 0 0 40px; }
.e-h__progress { height: 2px; width: 100%; background: rgba(18, 19, 23, .1); border-radius: 2px; overflow: hidden; }
.e-h__progress i { display: block; height: 100%; background: linear-gradient(90deg, #566cde, #e46fc4); transform-origin: 0 50%; transform: scaleX(0); }
.e-media {
  background: #fff; /* every Eloquent media asset has a pure-white edge */
  border-radius: 40px;
  box-shadow: 0 1px 0 rgba(18, 19, 23, .04), 0 50px 80px -50px rgba(86, 108, 222, .45);
  display: grid; place-items: center;
}
/* Wider white plates with generous inner padding; media is letterboxed inside with object-fit. */
.e-media--phone,
.e-media--wide { display: block; }
.e-media--phone { height: min(74vh, 760px); aspect-ratio: .64; padding: clamp(28px, 3.4vw, 48px); }
.e-media--phone video,
.e-media--phone img { width: 100%; height: 100%; object-fit: contain; }
.e-media--wide { height: min(62vh, 620px); aspect-ratio: 1.42; padding: clamp(28px, 3.4vw, 48px); }
.e-media--wide video { width: 100%; height: 100%; object-fit: contain; }
.e-panel figcaption { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; max-width: 360px; font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.e-panel figcaption > span:first-child { font-size: 12px; color: rgba(18, 19, 23, .45); font-stretch: 55%; letter-spacing: .08em; }
.e-stat { font-size: 15px; font-weight: 400; color: rgba(18, 19, 23, .6); }
.e-stat b { font-size: 15px; color: #566cde; font-weight: 600; font-stretch: 55%; }
