/* Livin Room motion: hero entrance, scroll reveals, smooth + answers.
   Everything here is skipped for people who ask their phone for less motion. */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-pop: cubic-bezier(.34, 1.56, .64, 1); }

/* The + turns into an x when an answer opens (both page styles) */
.faq summary::after { content: "+" !important; transition: rotate .35s var(--ease-pop), background-color .2s; }
.faq details[open] summary::after, .faq details.is-open summary::after { rotate: 45deg; }
.faq details.is-closing summary::after { rotate: 0deg; }
.faq details { overflow: hidden; }
.faq summary { transition: color .2s; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes lr-rise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
  @keyframes lr-pop { 0% { opacity: 0; scale: .4; } 70% { opacity: 1; } 100% { opacity: 1; scale: 1; } }
  @keyframes lr-drop { from { opacity: 0; translate: 0 -60px; } to { opacity: 1; translate: 0 0; } }
  @keyframes lr-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
  @keyframes lr-wiggle { 0%, 100% { rotate: 0deg; } 25% { rotate: -4deg; } 75% { rotate: 4deg; } }

  /* Homepage hero: lines rise in one after another, the Couch drops onto the table */
  .band.hero h1 .l1, .band.hero h1 .l2 { display: block; }
  .band.hero .kick { animation: lr-rise .6s var(--ease-out) .05s both; }
  .band.hero h1 .l1 { animation: lr-rise .7s var(--ease-out) .15s both; }
  .band.hero h1 .l2 { animation: lr-rise .7s var(--ease-out) .3s both; }
  .band.hero .bigcouch { animation: lr-drop .75s var(--ease-pop) .5s both; }
  .band.hero .bubble { transform-origin: 20% 100%; animation: lr-pop .55s var(--ease-pop) .95s both; }
  .band.hero .sub { animation: lr-rise .6s var(--ease-out) .7s both; }
  .band.hero .join { animation: lr-rise .6s var(--ease-out) .82s both; }
  .band.hero .proof { animation: lr-rise .6s var(--ease-out) .94s both; }
  .band.hero .deco:not(.blob) { animation: lr-pop .5s var(--ease-pop) 1.1s both, lr-float 4s ease-in-out 1.6s infinite; }
  .band.hero .deco.blob { animation: lr-pop .8s var(--ease-pop) .9s both; }
  .band.hero .bigcouch:hover { animation: lr-wiggle .5s ease-in-out; }

  /* Inner pages: the orange header settles in */
  .head .hero .eyebrow { animation: lr-rise .55s var(--ease-out) .05s both; }
  .head .hero h1 { animation: lr-rise .65s var(--ease-out) .15s both; }
  .head .hero .lede { animation: lr-rise .6s var(--ease-out) .3s both; }

  /* Scroll reveals: motion.js adds .rv, then .in when it comes on screen */
  .rv { opacity: 0; translate: 0 32px; transition: opacity .7s var(--ease-out) var(--d, 0s), translate .7s var(--ease-out) var(--d, 0s), scale .7s var(--ease-pop) var(--d, 0s), transform .3s var(--ease-pop); }
  .rv.in { opacity: 1; translate: 0 0; }
  .rv.pop { translate: 0 0; scale: .85; }
  .rv.pop.in { scale: 1; }

  /* Buttons and choices feel pressable */
  .btn, .chip span, .card span { transition: transform .15s var(--ease-out), background-color .2s, box-shadow .2s; }
  .btn:hover { transform: translateY(-2px); }
  .btn:active, .chip:active span, .card:active span { transform: scale(.96); }
  .print { transition: transform .3s var(--ease-pop); }
  .print:hover { transform: rotate(0deg) scale(1.03); }
}
