:root {
  --brand-ink: #243a76;
  --brand-teal: #4182ba;
  --brand-mint: #dfe7ff;
  --brand-amber: #af67e7;
  --brand-paper: #fbfcff;
  --brand-red: #d64b3c;
  --brand-green: #215c96;
}

@font-face {
  font-display: swap;
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  src: url("../../assets/fonts/Nunito-VariableFont_wght.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "bootstrap-icons";
  src: url("../vendor/bootstrap-icons/fonts/bootstrap-icons.woff2") format("woff2");
}

.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
  display: inline-block;
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-weight: 400 !important;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bi-arrow-clockwise::before { content: "\f116"; }
.bi-calendar-check::before { content: "\f1e2"; }
.bi-camera-video::before { content: "\f21f"; }
.bi-clock::before { content: "\f293"; }
.bi-pause-fill::before { content: "\f4c3"; }
.bi-play-fill::before { content: "\f4f4"; }
.bi-telephone::before { content: "\f5c1"; }

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #edf2ff;
  color: var(--brand-ink);
  font-family: "Nunito", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.demo-motion-enabled .demo-motion-item {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity .72s cubic-bezier(.22, 1, .36, 1),
    transform .82s cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--demo-motion-delay, 0ms);
  will-change: opacity, transform;
}

body.demo-motion-enabled .demo-motion-item.is-in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.demo-wrap {
  width: min(100%, 980px);
  display: grid;
  justify-items: center;
  gap: 16px;
}

.demo-stage {
  position: relative;
  width: min(430px, calc(100vw - 32px));
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--brand-paper);
  border: 1px solid rgba(36, 58, 118, .16);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(36, 58, 118, .2);
  isolation: isolate;
}

.demo-stage.format-horizontal {
  width: min(960px, calc(100vw - 32px));
  aspect-ratio: 16 / 9;
}

.stage-bg,
.scene {
  position: absolute;
  inset: 0;
}

.stage-bg {
  background: linear-gradient(160deg, #f4f7ff 0%, #fbfcff 48%, #edf1ff 100%);
  z-index: 0;
}

.scene {
  z-index: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 680ms ease, transform 680ms ease;
  pointer-events: none;
}

.scene.active {
  opacity: 1;
  transform: translateY(0);
}

.restaurant-bg,
.cost-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(36, 58, 118, .74) 0%, rgba(36, 58, 118, .18) 38%, rgba(36, 58, 118, .68) 100%);
}

.top-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 36px;
  color: #fff;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 760;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .32);
}

.ring-pulse {
  position: absolute;
  left: 50%;
  bottom: 14.4%;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  transform: translateX(-50%);
  opacity: 0;
}

.is-ringing .ring-pulse {
  animation: ringPulse 980ms ease-out infinite;
}

.missed-call {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 15px 16px;
  color: #fff;
  background: rgba(36, 58, 118, .74);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translateY(14px);
  backdrop-filter: blur(12px);
}

.show-missed .missed-call {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

.missed-label {
  font-size: 18px;
  font-weight: 720;
}

.missed-time {
  color: rgba(255, 255, 255, .76);
  font-size: 16px;
  font-weight: 650;
}

.cost-bg {
  filter: blur(10px) saturate(.82);
  transform: scale(1.04);
}

.scene-cost::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(36, 58, 118, .64);
}

.cost-card {
  position: absolute;
  z-index: 2;
  left: 30px;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 11px;
  color: #ffe0d2;
  background: rgba(214, 75, 60, .24);
  border: 1px solid rgba(255, 202, 183, .3);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 740;
}

.cost-card h1 {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1;
  font-weight: 780;
}

.cost-card p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 24px;
  line-height: 1.14;
  font-weight: 620;
}

.scene-solution {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(251, 252, 255, .94)),
    repeating-linear-gradient(90deg, rgba(65, 130, 186, .09) 0 1px, transparent 1px 84px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--brand-ink);
  font-size: 24px;
  font-weight: 780;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: url("../../assets/brand/rispondimi-glifo.svg") center / contain no-repeat;
  box-shadow: none;
}

.brand-mark::before {
  content: "";
  display: none;
}

.brand-mark::after {
  content: "";
  display: none;
}

.phone-mockup {
  width: min(100%, 336px);
  min-height: 520px;
  padding: 14px;
  color: var(--brand-ink);
  background: #243a76;
  border: 1px solid rgba(36, 58, 118, .18);
  border-radius: 36px;
  box-shadow: 0 22px 54px rgba(36, 58, 118, .22);
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px 10px;
  color: #f8f9f7;
  font-size: 15px;
  font-weight: 720;
}

.phone-top small {
  margin-left: auto;
  color: rgba(248, 249, 247, .62);
  font-size: 12px;
  font-weight: 650;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-mint);
  box-shadow: 0 0 0 4px rgba(102, 124, 216, .18);
}

.chat-list {
  min-height: 448px;
  padding: 18px 14px;
  overflow: hidden;
  background: #f6f6f1;
  border-radius: 24px;
}

.bubble,
.saved-note {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 13px;
  opacity: 0;
  transform: translateY(16px);
}

.bubble.visible,
.saved-note.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 430ms ease, transform 430ms ease;
}

.bubble {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 620;
  box-shadow: 0 10px 22px rgba(36, 58, 118, .08);
}

.bubble.customer {
  margin-left: auto;
  color: #fff;
  background: var(--brand-teal);
}

.bubble.assistant {
  color: var(--brand-ink);
  background: #fff;
  border: 1px solid rgba(36, 58, 118, .08);
}

.saved-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 12px 13px;
  color: #215c96;
  background: #dfe7ff;
  border: 1px solid rgba(65, 130, 186, .24);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 780;
}

.check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #fff;
  background: var(--brand-green);
  border-radius: 50%;
}

.scene-practical {
  display: grid;
  align-content: center;
  padding: 34px;
  background:
    linear-gradient(180deg, #f7fbfa 0%, #fffaf2 100%);
}

.practical-title {
  margin-bottom: 24px;
  color: var(--brand-ink);
  font-size: 31px;
  line-height: 1.04;
  font-weight: 800;
}

.benefits {
  display: grid;
  gap: 14px;
}

.benefit {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  min-height: 76px;
  padding: 13px 15px;
  color: var(--brand-ink);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(36, 58, 118, .1);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(36, 58, 118, .08);
  opacity: 0;
  transform: translateX(-14px);
}

.benefit.visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 420ms ease, transform 420ms ease;
}

.benefit i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  background: var(--brand-teal);
  border-radius: 8px;
  font-size: 22px;
}

.benefit:nth-child(2) i {
  background: #4182ba;
}

.benefit:nth-child(3) i {
  background: var(--brand-green);
}

.benefit span {
  min-width: 0;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 760;
}

.scene-cta {
  display: grid;
  place-items: center;
  padding: 34px;
  text-align: center;
  background:
    linear-gradient(165deg, #fff 0%, #f4f7ff 54%, #f8f0ff 100%);
}

.cta-inner {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.brand-mark-large {
  width: 82px;
  height: 82px;
  border-radius: 0;
  box-shadow: none;
}

.brand-mark-large::before {
  display: none;
}

.brand-mark-large::after {
  display: none;
}

.cta-inner h2 {
  margin: 0;
  color: var(--brand-ink);
  font-size: 45px;
  line-height: 1;
  font-weight: 830;
}

.brand-gradient {
  display: inline-block;
  color: var(--brand-mint);
  background: linear-gradient(90deg, #4182ba 0%, #af67e7 64%, #dfe7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 18px 46px rgba(65, 130, 186, .28);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 244px;
  padding: 15px 20px;
  color: #fff;
  background: var(--brand-teal);
  border-radius: 8px;
  box-shadow: 0 17px 36px rgba(65, 130, 186, .26);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.cta-inner p {
  margin: 0;
  color: #50679f;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 720;
}

.subtitle {
  position: absolute;
  z-index: 5;
  left: 20px;
  right: 20px;
  bottom: 20px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  color: #fff;
  background: rgba(36, 58, 118, .78);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 720;
  text-align: center;
  text-wrap: balance;
  backdrop-filter: blur(12px);
}

.scene-solution.active ~ .subtitle,
.scene-practical.active ~ .subtitle,
.scene-cta.active ~ .subtitle {
  color: #243a76;
  background: rgba(255, 255, 255, .84);
  border-color: rgba(36, 58, 118, .12);
}

.timeline-track {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, .24);
}

.timeline-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-mint), var(--brand-amber));
}

.controls {
  width: min(100%, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.controls .btn {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 740;
}

.controls .btn i {
  margin-right: 5px;
}

.timecode {
  min-width: 118px;
  color: #50679f;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-align: center;
}

#exportCanvas {
  position: fixed;
  left: -120vw;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.format-horizontal .top-caption {
  right: 48%;
  font-size: 36px;
}

.format-horizontal .missed-call {
  left: 34px;
  right: auto;
  width: 380px;
}

.format-horizontal .cost-card {
  left: 54px;
  right: 48%;
}

.format-horizontal .scene-solution {
  grid-template-columns: .8fr 1fr;
  align-items: center;
  justify-items: center;
  padding: 34px 56px;
}

.format-horizontal .brand-lockup {
  align-self: center;
  justify-self: start;
  margin: 0;
  font-size: 36px;
}

.format-horizontal .phone-mockup {
  min-height: 450px;
  width: 318px;
}

.format-horizontal .chat-list {
  min-height: 378px;
}

.format-horizontal .scene-practical {
  padding: 44px 70px;
}

.format-horizontal .benefits {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.format-horizontal .benefit {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  min-height: 170px;
}

.format-horizontal .scene-cta {
  padding: 44px;
}

.format-horizontal .cta-inner {
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "mark title"
    "mark button"
    "mark note";
  column-gap: 24px;
  text-align: left;
  align-items: center;
  justify-items: start;
}

.format-horizontal .brand-mark-large {
  grid-area: mark;
}

.format-horizontal .cta-inner h2 {
  grid-area: title;
  font-size: 58px;
}

.format-horizontal .cta-button {
  grid-area: button;
}

.format-horizontal .cta-inner p {
  grid-area: note;
}

.format-horizontal .subtitle {
  left: 50%;
  right: 28px;
  bottom: 22px;
  min-height: 64px;
  font-size: 16px;
}

@keyframes ringPulse {
  0% {
    opacity: .9;
    transform: translateX(-50%) scale(.72);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.55);
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding: 12px;
  }

  .controls {
    gap: 8px;
  }

  .top-caption {
    left: 22px;
    right: 22px;
    top: 28px;
    font-size: 27px;
  }

  .phone-mockup {
    min-height: 486px;
  }

  .chat-list {
    min-height: 414px;
  }

  .subtitle {
    left: 14px;
    right: 14px;
    min-height: 70px;
    font-size: 15px;
  }
}

/* Logo color refresh */
:root {
  --brand-ink: #243a76;
  --brand-teal: #4182ba;
  --brand-mint: #dfe7ff;
  --brand-amber: #af67e7;
  --brand-paper: #fbfcff;
  --brand-red: #d64b3c;
  --brand-green: #215c96;
}

body {
  background:
    linear-gradient(140deg, rgba(65, 130, 186, .16) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(220deg, rgba(175, 103, 231, .12) 0%, rgba(255, 255, 255, 0) 34%),
    #f3f7ff;
}

.demo-stage {
  border-color: rgba(36, 58, 118, .14);
  box-shadow: 0 28px 80px rgba(36, 58, 118, .16);
}

.stage-bg {
  background: linear-gradient(160deg, #f3f7ff 0%, #fbfcff 48%, #f8f4ff 100%);
}

.scene-cost::after {
  background: rgba(36, 58, 118, .58);
}

.solution-panel,
.phone-mockup,
.cta-card {
  box-shadow: 0 24px 64px rgba(36, 58, 118, .16);
}

.cta-button,
.control-btn.primary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, var(--brand-teal) 0%, #667cd8 58%, var(--brand-amber) 100%);
  box-shadow: 0 18px 42px rgba(102, 124, 216, .28), inset 0 1px 0 rgba(255, 255, 255, .32);
}

.cta-button {
  min-height: 46px;
  padding: .72rem 1.08rem;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  font-size: .96rem;
  font-weight: 850;
  line-height: 1.15;
}

.cta-button:hover,
.cta-button:focus-visible {
  color: #fff;
  text-decoration: none;
}

.timeline-progress {
  background: linear-gradient(90deg, var(--brand-mint), var(--brand-amber));
}

.demo-made-in-italy {
  position: fixed;
  top: 4px;
  right: 12px;
  z-index: 20;
  display: block;
  width: 98px;
  height: 98px;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.demo-made-in-italy img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(15, 27, 66, .22));
}

@media (max-width: 520px) {
  .demo-made-in-italy {
    top: 1px;
    right: 6px;
    width: 62px;
    height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-motion-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
