/**
 * Homepage banner that launches the Packaging Copilot.
 * Scoped under .sdtcb and reset against the theme's global element styles
 * (h2, p, button, i/fontawesome) so nothing leaks in.
 */

/* --- defensive reset: neutralize theme globals inside the banner --- */
.sdtcb, .sdtcb *, .sdtcb *::before, .sdtcb *::after { box-sizing: border-box; }
.sdtcb h2, .sdtcb p, .sdtcb span, .sdtcb b, .sdtcb i, .sdtcb button {
  margin: 0; padding: 0; border: 0;
  font: inherit; letter-spacing: normal; text-transform: none;
  line-height: normal; text-align: left; box-shadow: none;
}
.sdtcb i { font-style: normal; font-family: inherit; }
.sdtcb button { cursor: pointer; -webkit-appearance: none; appearance: none; }

.sdtcb-wrap {
  padding: 24px 16px 8px; display: flex; justify-content: center;
  font-family: inherit;
}
.sdtcb {
  position: relative; width: 100%; max-width: 1200px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 8px; align-items: stretch;
  border-radius: 22px; overflow: hidden; isolation: isolate;
  background: linear-gradient(115deg, #0b1f52 0%, #143a95 46%, #1551c1 100%);
  box-shadow: 0 24px 60px -24px rgba(0, 25, 80, 0.55);
  color: #ffffff;
}
.sdtcb::before {
  content: ""; position: absolute; inset: -40%; z-index: 0;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.55), transparent 70%);
  filter: blur(30px); opacity: 0.7; animation: sdtcb-drift 9s ease-in-out infinite alternate;
}
@keyframes sdtcb-drift { from { transform: translate(-8%, -6%); } to { transform: translate(10%, 8%); } }
/* Faint woven-fabric texture (gpt-image-1) for a tactile, premium feel. */
.sdtcb::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url(../images/banner-texture.jpg) center / cover no-repeat;
  opacity: 0.1; mix-blend-mode: soft-light;
}

.sdtcb-copy { position: relative; z-index: 1; padding: 38px 34px 40px; }
.sdtcb .sdtcb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #bcd0ff !important;
}
.sdtcb .sdtcb-eyebrow svg { width: 16px; height: 16px; color: #a78bfa; flex: 0 0 auto; }
.sdtcb .sdtcb-headline {
  display: block; margin: 14px 0 0; color: #ffffff !important; font-weight: 800; letter-spacing: -0.01em;
  font-size: clamp(26px, 3.2vw, 40px); line-height: 1.08; text-wrap: balance;
}
.sdtcb .sdtcb-headline em { font-style: normal; color: #ffd98a !important; }
.sdtcb .sdtcb-sub { display: block; margin: 14px 0 0; color: #eef3fd !important; font-size: 17px; line-height: 1.55; max-width: 46ch; font-weight: 500; }
.sdtcb-ctarow { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sdtcb .sdtcb-cta {
  background: #ffffff !important; color: #002f85 !important; font-weight: 800; font-size: 16px;
  padding: 15px 26px; border-radius: 999px; display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s;
}
.sdtcb-cta:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.5); }
.sdtcb-cta:focus-visible { outline: 3px solid #a78bfa; outline-offset: 3px; }
.sdtcb-cta .sdtcb-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex: 0 0 auto; animation: sdtcb-pulse 2s infinite; }
@keyframes sdtcb-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); } 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.sdtcb .sdtcb-reassure { color: #ffffff !important; font-size: 14px; font-weight: 600; opacity: 0.96; letter-spacing: 0.01em; }

.sdtcb-demo { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; padding: 22px 26px 22px 6px; }
.sdtcb-phone { width: 100%; max-width: 360px; background: #f6f8fc; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px -18px rgba(0, 10, 40, 0.6); border: 1px solid rgba(255, 255, 255, 0.15); }
.sdtcb-tophead { background: linear-gradient(90deg, #0b2e7a, #1551c1); color: #ffffff; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.sdtcb-av { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #1551c1; flex: 0 0 auto; }
.sdtcb-av svg { width: 18px; height: 18px; }
.sdtcb-tophead b { font-size: 14px; font-weight: 800; color: #ffffff; }
.sdtcb .sdtcb-live { margin-left: auto; font-size: 10.5px; font-weight: 700; color: #c8ffd8 !important; display: flex; align-items: center; gap: 5px; }
.sdtcb-live i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.sdtcb-thread { height: 300px; padding: 16px 14px; overflow: hidden; }
.sdtcb-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.sdtcb-msg.is-user { align-self: flex-end; background: #1551c1; color: #ffffff; border-bottom-right-radius: 5px; }
.sdtcb-msg.is-bot { align-self: flex-start; background: #fff; color: #12203a; border: 1px solid #e6ebf4; border-bottom-left-radius: 5px; font-weight: 500; }
@keyframes sdtcb-rise { to { opacity: 1; transform: none; } }
.sdtcb-typing { align-self: flex-start; background: #fff; border: 1px solid #e6ebf4; border-radius: 14px; border-bottom-left-radius: 5px; padding: 12px 14px; display: flex; gap: 5px; }
.sdtcb-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9fb2d6; animation: sdtcb-blink 1.2s infinite; }
.sdtcb-typing span:nth-child(2) { animation-delay: 0.2s; }
.sdtcb-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sdtcb-blink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
.sdtcb-pcard { align-self: flex-start; width: 90%; background: #fff; border: 1px solid #e6ebf4; border-radius: 14px; padding: 10px; display: flex; gap: 10px; align-items: center; }
.sdtcb-pthumb { width: 56px; height: 56px; border-radius: 10px; flex: 0 0 auto; background: radial-gradient(circle at 50% 30%, #f4ede0, #e7d9c2); display: grid; place-items: center; }
.sdtcb-pthumb svg { width: 40px; height: 40px; }
.sdtcb-pthumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.sdtcb-pmeta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sdtcb-ptag { font-size: 10px; font-weight: 700; color: #1551c1; text-transform: uppercase; letter-spacing: 0.04em; }
.sdtcb-pname { font-size: 13px; font-weight: 700; color: #12203a; line-height: 1.2; }
.sdtcb .sdtcb-pcta { font-size: 12px; font-weight: 700; color: #ffffff !important; background: #1551c1; border-radius: 8px; padding: 4px 10px; align-self: flex-start; margin-top: 3px; }

/* Scripted multi-scene demo: scenes stacked in a fixed-height thread, revealed by banner.js. */
.sdtcb-feed { display: flex; flex-direction: column; gap: 10px; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.sdtcb-feed.is-out { opacity: 0; transition: opacity 0.6s ease; }
.sdtcb-typing.sdtcb-gone { display: none; }
.sdtcb-swatches { display: flex; gap: 8px; flex-wrap: wrap; align-self: flex-start; }
.sdtcb-sw { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65), 0 1px 4px rgba(0, 20, 60, 0.25); }
.sdtcb-step { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.sdtcb-step.is-in { opacity: 1; transform: none; }
.sdtcb .sdtcb-qcta { align-self: flex-start; background: #1551c1; color: #ffffff !important; font-weight: 800; font-size: 13px; padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 18px -8px rgba(21, 81, 193, 0.7); animation: sdtcb-qpulse 1.8s ease-in-out infinite; }
@keyframes sdtcb-qpulse { 0%, 100% { transform: none; } 50% { transform: translateY(-2px) scale(1.03); } }
.sdtcb .sdtcb-sent { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; color: #16a34a !important; font-weight: 800; font-size: 13.5px; }
.sdtcb-sent svg { width: 17px; height: 17px; }

@media (max-width: 820px) {
  .sdtcb { grid-template-columns: 1fr; }
  .sdtcb-demo { padding: 0 22px 26px; order: 2; }
  .sdtcb-copy { padding: 30px 26px 6px; }
  .sdtcb-phone { max-width: 460px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sdtcb::before, .sdtcb-cta .sdtcb-dot { animation: none; }
  .sdtcb-step { opacity: 1 !important; transform: none !important; transition: none; }
  .sdtcb .sdtcb-qcta { animation: none; }
}
