/* Hinge preview card. All rules are scoped to this component. */
.hinge-preview {
  --hp-ink: #30294c;
  --hp-purple: #7950db;
  box-sizing: border-box;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  min-height: 420px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid #ded5e6;
  border-radius: 16px;
  color: var(--hp-ink);
  background: radial-gradient(ellipse at 8% 60%, #e6d4ff80, transparent 65%),
    radial-gradient(ellipse at 100% 100%, #ffdbb970, transparent 60%), #fff9ed;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  text-decoration: none;
  text-align: left;
  line-height: 1.3;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.hinge-preview *, .hinge-preview *::before, .hinge-preview *::after { box-sizing: border-box; }
.hinge-preview::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(#9e83bb55 .7px, transparent .7px);
  background-size: 13px 13px; opacity: .45; pointer-events: none;
}
.hinge-preview:hover { transform: translateY(-3px); border-color: #ad8fd4; box-shadow: 0 12px 26px #30294c12; }
.hinge-preview:focus-visible { outline: 3px solid var(--hp-purple); outline-offset: 5px; }
.hinge-preview .hp-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hinge-preview .hp-logo { width: 107px; height: auto; display: block; overflow: visible; }
.hinge-preview .hp-open { display: grid; place-items: center; width: 31px; height: 31px; background: #eee5ff; color: var(--hp-purple); border-radius: 8px; font-size: 20px; transition: transform .25s, background .25s; }
.hinge-preview:hover .hp-open { transform: rotate(-8deg); background: #e1ceff; }
.hinge-preview .hp-tagline { margin: 13px 0 0; font-size: clamp(16px, 5.5cqi, 21px); font-weight: 500; letter-spacing: -.5px; }
.hinge-preview .hp-stage { position: relative; display: grid; place-items: center; flex: 1; min-height: 0; padding: 10px 4px; }
.hinge-preview .hp-puzzle { width: 100%; background: #fffdfa; border: 1.5px solid var(--hp-ink); border-radius: 15px; padding: 14px 12px 11px; box-shadow: 5px 6px 0 #d9c9ed; transform: rotate(-2deg); }
.hinge-preview .hp-puzzle::before { content: ''; position: absolute; width: 62px; height: 17px; background: #ded0f4c9; top: -9px; left: calc(50% - 31px); transform: rotate(5deg); border-inline: 1px dashed #b7a1d2; }
.hinge-preview .hp-kicker { display: flex; justify-content: space-between; font-size: 8px; font-weight: 700; color: var(--hp-purple); letter-spacing: 1.4px; margin-bottom: 7px; }
.hinge-preview .hp-kicker span:last-child { color: #8e7f9f; letter-spacing: .5px; }
.hinge-preview .hp-row { display: grid; grid-template-columns: 1fr 1.05fr 1fr; align-items: center; min-height: 28px; margin-top: 5px; padding: 0 6px; border: 1px solid #ded2ed; border-bottom-width: 2px; border-radius: 7px; background: #f2ebfa; font-size: clamp(9px, 3.2cqi, 12px); font-weight: 700; letter-spacing: .6px; text-align: center; }
.hinge-preview .hp-middle { position: relative; display: grid; place-items: center; height: 22px; border-inline: 1px solid #d6c5e6; color: #9173b6; }
.hinge-preview .hp-answer, .hinge-preview .hp-dots { grid-area: 1 / 1; }
.hinge-preview .hp-dots { letter-spacing: 3px; }
.hinge-preview .hp-answer { opacity: 0; color: #425b23; }
.hinge-preview .hp-row:first-of-type { margin-top: 0; }
.hinge-preview .hp-row--demo { animation: hp-connect 10s ease-in-out infinite; }
.hinge-preview .hp-row--demo .hp-answer { animation: hp-answer 10s ease-in-out infinite; }
.hinge-preview .hp-row--demo .hp-dots { animation: hp-dots 10s ease-in-out infinite; }
.hinge-preview .hp-row--second, .hinge-preview .hp-row--second .hp-answer, .hinge-preview .hp-row--second .hp-dots { animation-delay: 1.3s; }
.hinge-preview .hp-mini-input { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; border: 1px solid #d7c8e5; border-radius: 6px; padding: 4px 4px 4px 8px; color: #9a88a9; font-size: 8px; background: white; }
.hinge-preview .hp-mini-input b { font-size: 8px; color: white; background: var(--hp-purple); border-radius: 4px; padding: 6px 10px; }
.hinge-preview .hp-star { position: absolute; z-index: 1; color: #ed946f; font-size: 30px; right: -6px; top: 10px; animation: hp-float 5s ease-in-out infinite; }
.hinge-preview .hp-star--small { color: #9b73d9; font-size: 19px; left: -11px; right: auto; top: auto; bottom: 34px; animation-delay: -2s; }
.hinge-preview .hp-bottom { margin-top: auto; }
.hinge-preview .hp-caption { margin: 0 0 13px; color: #897694; font-size: 11px; text-align: center; }
.hinge-preview .hp-cta { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border: 1px solid var(--hp-ink); border-radius: 8px; background: var(--hp-purple); color: white; font-size: 12px; font-weight: 700; box-shadow: 0 3px 0 var(--hp-ink); transition: background .2s; }
.hinge-preview:hover .hp-cta { background: #8a61e4; }
.hinge-preview .hp-cta span:last-child { font-size: 16px; transition: transform .25s; }
.hinge-preview:hover .hp-cta span:last-child { transform: translateX(3px); }
@keyframes hp-connect { 0%, 14%, 88%, 100% { background: #f2ebfa; border-color: #ded2ed; transform: scale(1); } 22% { transform: scale(1.035); } 27%, 80% { background: #e1f1b3; border-color: #b4c983; transform: scale(1); } }
@keyframes hp-answer { 0%, 16%, 88%, 100% { opacity: 0; transform: translateY(5px); } 24%, 80% { opacity: 1; transform: translateY(0); } }
@keyframes hp-dots { 0%, 15%, 90%, 100% { opacity: 1; } 22%, 82% { opacity: 0; } }
@keyframes hp-float { 0%,100% { transform: translateY(0) rotate(-10deg); } 50% { transform: translateY(-6px) rotate(12deg); } }
@media (max-width: 360px) { .hinge-preview { padding: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .hinge-preview, .hinge-preview *, .hinge-preview *::before, .hinge-preview *::after { animation: none !important; transition: none !important; }
  .hinge-preview .hp-row--demo { background: #e1f1b3; border-color: #b4c983; }
  .hinge-preview .hp-row--demo .hp-answer { opacity: 1; }
  .hinge-preview .hp-row--demo .hp-dots { opacity: 0; }
}
