/* =====================================================================
   closing.css : package A sections (problem pb-, Tredit Stack ts-, final call jn-)
   ===================================================================== */

/* ---------- Problem (brief 4) ---------- */
.pb { background: var(--bg); }
.pb-grid { align-items: center; }
#problem .section__head { margin-bottom: 64px; }
#problem .pb-line { display: block; text-align: left; }
@media (max-width: 820px) { #problem .section__head { margin-bottom: 46px; } }
.pb-list { display: block; padding-block: 8px; --pb-struck: .55; }
html[data-theme="light"] .pb-list { --pb-struck: .7; }
.pb-row {
  display: flex; align-items: center; gap: 14px;
  height: 52px; margin-left: var(--ml, 0);
  transform: rotate(var(--rot, 0deg)); transform-origin: left center;
  font-size: 15px; font-weight: 500; line-height: 1.3;
}
.pb-txt { color: var(--text); opacity: .78; text-decoration-thickness: 1px; transition: opacity .16s; }
s.pb-txt { opacity: var(--pb-struck); }
.pb-ico { transition: translate .16s; }
.pb-row:hover .pb-txt, .pb-row:focus-within .pb-txt { opacity: 1; }
.pb-row:hover .pb-ico, .pb-row:focus-within .pb-ico { translate: 0 -2px; }
.pb-statements li { padding: 22px 0; border-top: 1px solid var(--border); }
.pb-statements li:first-child { border-top: 0; padding-top: 0; }
.pb-statements li:last-child { padding-bottom: 0; }
.pb-statements h3 { font-size: 20px; margin-bottom: 6px; }

@keyframes pb-drift {
  from { transform: translateY(0) rotate(-1.2deg); }
  to { transform: translateY(-3px) rotate(1.2deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .pb-ico { animation: pb-drift var(--dur, 6s) ease-in-out var(--dl, 0s) infinite alternate; animation-play-state: paused; }
  .pb-list.is-live .pb-ico { animation-play-state: running; }
}

@media (max-width: 820px) {
  .pb-row { margin-left: calc(var(--ml, 0px) / 2); }
  .pb-list { margin-bottom: 16px; }
}
@media (max-width: 560px) {
  .pb-row { font-size: 14px; gap: 12px; }
}

/* ---------- Tredit Stack band (brief 13): its own palette in both themes ---------- */
.ts {
  --ts-bg: #0B1B36; --ts-text: #E8EDF6; --ts-body: #C4CEE0;
  --ts-btn-bg: #FBFAF7; --ts-btn-text: #1A1F2E;
  background: var(--ts-bg); color: var(--ts-text);
  border-top: 1px solid rgba(184, 115, 63, .45);
  border-bottom: 1px solid rgba(184, 115, 63, .45);
  padding-block: 72px;
}
html[data-theme="light"] .ts {
  --ts-bg: #FBFAF7; --ts-text: #1A1F2E; --ts-body: #3A4052;
  --ts-btn-bg: #1A1F2E; --ts-btn-text: #FBFAF7; --ts-copper: #9A5A2C;
}
.ts-inner { display: grid; grid-template-columns: 218px minmax(0, 1fr) auto; gap: 32px 56px; align-items: center; }
.ts-logo { grid-column: auto; }
.ts-logo img { width: 218px; max-width: 100%; height: auto; }
.ts-copy { grid-column: auto; max-width: 52ch; }
.ts-copy h3 { color: var(--ts-text); font-size: 22px; line-height: 1.25; }
.ts-copy p { margin-top: 8px; font-size: 15px; color: var(--ts-body); }
.ts-action { grid-column: auto; justify-self: end; }
.ts-btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 14px 22px; border-radius: 10px;
  background: var(--ts-btn-bg); color: var(--ts-btn-text);
  font-size: 16px; font-weight: 600; line-height: 1.25; text-decoration: none;
}
.ts-btn:hover { text-decoration: none; }
.ts-btn__label { position: relative; padding-bottom: 3px; }
.ts-btn__label::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: #B8733F; transform: scaleX(0); transform-origin: left; transition: transform .2s;
}
.ts-btn:hover .ts-btn__label::after, .ts-btn:focus-visible .ts-btn__label::after { transform: scaleX(1); }
.ts-btn:focus-visible { outline-color: #B8733F; }
@media (max-width: 1100px) {
  .ts-inner { grid-template-columns: 218px minmax(0, 1fr); }
  .ts-action { grid-column: 2; justify-self: start; }
}
@media (max-width: 820px) {
  .ts { padding-block: 56px; }
  .ts-inner { grid-template-columns: minmax(0, 1fr); }
  .ts-logo, .ts-copy, .ts-action { grid-column: 1 / -1; }
  .ts-action { justify-self: stretch; }
  .ts-btn { width: 100%; }
}

/* ---------- Final call (brief 14) ---------- */
.jn {
  min-height: 78vh; padding: 128px 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; background: var(--bg);
}
.jn > .jn-art { position: static; width: 240px; height: auto; margin: 0 auto 36px; max-width: none; overflow: visible; }
.jn-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
.jn-title { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.03; letter-spacing: -.03em; max-width: 22ch; }
.jn-title .hd-strong, .jn-title .hd-light { display: block; }
.jn-title .hd-light { margin: .35em auto 0; font-size: .6em; line-height: 1.15; letter-spacing: -.02em; max-width: 28ch; }

.jn-form { max-width: 620px; width: 100%; margin-top: 40px; position: relative; display: block; }
.jn-field {
  display: flex; align-items: center; gap: 8px; height: 68px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px;
  box-shadow: var(--shadow-float);
}
.jn-field:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.jn-input {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 16px 0 18px; font-size: 18px; text-align: left;
  background: transparent; border: 0; border-radius: 12px; color: var(--heading);
}
.jn-input:focus, .jn-input:focus-visible { outline: none; }
.jn-btn { flex: none; border-radius: 12px; }
.jn-form .email-inline__error { position: absolute; left: 6px; top: 100%; margin-top: 10px; text-align: left; }

.jn-assure { margin-top: 56px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
.jn-assure li { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); }
.jn-assure .icon { color: var(--ok); width: 18px; height: 18px; stroke-width: 2.25; }

/* draw-in, once (data-reveal on the section) */
@media (prefers-reduced-motion: no-preference) {
  .jn-plate { stroke-dasharray: 1; stroke-dashoffset: 0; }
  .jn-mask-path { stroke-dasharray: 1; stroke-dashoffset: 0; }
  html.js .jn[data-reveal]:not(.is-in) .jn-plate,
  html.js .jn[data-reveal]:not(.is-in) .jn-mask-path { stroke-dashoffset: 1; }
  html.js .jn[data-reveal]:not(.is-in) .jn-gold-label { opacity: 0; }
  .jn[data-reveal].is-in .jn-plate,
  .jn[data-reveal].is-in .jn-mask-path {
    animation: jn-draw 900ms cubic-bezier(.2, 0, 0, 1) both;
    animation-delay: calc(var(--i, 0) * 110ms);
  }
  .jn[data-reveal].is-in .jn-mask-path { animation-delay: 550ms; }
  .jn[data-reveal].is-in .jn-gold-label { animation: jn-fade 500ms ease-out 1100ms both; }
}
@keyframes jn-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes jn-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 820px) {
  .jn { padding: 88px 0; min-height: 0; }
  .jn > .jn-art { width: 180px; margin-bottom: 28px; }
  .jn-assure { flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; }
}
@media (max-width: 560px) {
  .jn-field { flex-direction: column; height: auto; align-items: stretch; }
  .jn-input { height: 56px; }
  .jn-btn { width: 100%; }
}

/* stack: tagline on one row, explore label above button */
.ts-copy { max-width: 60ch; }
.ts-tag { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--ts-text); white-space: nowrap; }
.ts-action { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ts-explore { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .02em; color: var(--ts-copper, #C98550); }
@media (max-width: 820px) { .ts-tag { white-space: normal; } }
/* join: single CTA */
.jn-cta { margin-top: 40px; }
.jn-title { max-width: 18ch; }

/* video teaser band: bridge between problem and walkthrough */
.vt { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 28px; }
.vt__thumb { position: relative; flex: none; width: 176px; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: #0A0F1E; cursor: pointer; box-shadow: var(--shadow-card); }
.vt__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vt__thumb .icon { position: absolute; left: 50%; top: 50%; box-sizing: content-box; width: 16px; height: 16px; padding: 8px; margin: -16px 0 0 -16px; border-radius: 50%; background: var(--amber); color: #0A0F1E; fill: #0A0F1E; stroke: #0A0F1E; transition: transform .15s; }
.vt__thumb:hover .icon { transform: scale(1.1); }
.vt__thumb:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
@media (max-width: 560px) { .vt { flex-direction: column; gap: 20px; margin-top: 48px; padding-top: 32px; } .vt__thumb { width: min(100%, 280px); } }
#problem.pb { padding-bottom: calc(var(--section-pad) * .65); }
