/* The motion layer leaves the static page fully readable on its own. */
@keyframes soft-rise {
  from { opacity: .35; transform: translateY(12px); }
}
@keyframes room-settle {
  from { transform: scale(1.045); }
}
@keyframes price-stamp {
  from { opacity: .3; transform: translateY(9px) rotate(2deg) scale(.92); }
  70% { transform: translateY(-2px) rotate(-6deg) scale(1.015); }
  to { opacity: 1; transform: rotate(-5deg); }
}
@keyframes star-turn {
  from { transform: rotate(-45deg) scale(.75); }
  to { transform: rotate(0) scale(1); }
}
@keyframes veil-in {
  from { opacity: 0; }
}
@keyframes result-update {
  from { color: var(--accent); transform: translateY(2px); }
}

@media screen {
  :root { --ease-out: cubic-bezier(.2,.72,.24,1); }
  .hero-photo { animation: room-settle 1.5s var(--ease-out); }
  .hero h1 { animation: soft-rise .58s var(--ease-out); }
  .hero .lead { animation: soft-rise .56s .08s var(--ease-out) backwards; }
  .hero-price { animation: price-stamp .65s .18s var(--ease-out) backwards; }
  .hero-price .spark { animation: star-turn .75s .28s var(--ease-out) backwards; }
  .calculator { animation: soft-rise .5s .12s var(--ease-out) backwards; }
  .card.in-view { animation: soft-rise .48s var(--ease-out) backwards; }
  @media (min-width: 801px) {
    .card.in-view:nth-child(2) { animation-delay: 45ms; }
    .card.in-view:nth-child(3) { animation-delay: 90ms; }
    .card.in-view:nth-child(4) { animation-delay: 135ms; }
  }

  .button, .top-calc, .card {
    transition: translate .22s var(--ease-out), box-shadow .22s ease, background-color .18s ease;
  }
  .button:active, .top-calc:active { translate: 0 1px; }
  @media (hover: hover) and (pointer: fine) {
    .card:hover { translate: 0 -4px; box-shadow: 0 10px 24px #312a4014; }
    .button:hover, .top-calc:hover { box-shadow: 0 4px 12px #312a4025; }
  }

  .popover summary .icon:last-child:not(:first-child) { transition: transform .18s ease; }
  .popover[open] summary .icon:last-child:not(:first-child) { transform: rotate(180deg); }
  .popover[open] nav { animation: soft-rise .2s var(--ease-out); }
  .faq-list details[open] p { animation: soft-rise .26s var(--ease-out); }
  #result[open] { animation: soft-rise .24s var(--ease-out); }
  #result[open]::backdrop { animation: veil-in .2s ease; }
  #result .total.changed output { animation: result-update .32s var(--ease-out); }
}
