/* home – end (premium v2): gallery, FAQ preview, contact, footer – scoped to .page--home */

/* =========================================================
   GALLERY – polaroids are pressed onto the wall and develop
   ========================================================= */
.page--home .polaroid { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.page--home .polaroid:hover { scale: 1.035; rotate: calc(var(--r, 0deg) * .3); box-shadow: 0 46px 70px -32px rgba(59,32,20,.62), 0 12px 22px -14px rgba(59,32,20,.3); }
.page--home .polaroid img { outline: 0; }
.page--home .polaroid:has(img:focus-visible) { outline: 3px solid var(--caramel); outline-offset: 6px; }
.page--home .polaroid figcaption { transition: translate .6s var(--ease-out), color .4s; }
.page--home .polaroid:hover figcaption { translate: 0 -2px; color: var(--caramel); }
/* tape lifts a little on hover */
.page--home .polaroid .tape { transition: rotate .6s var(--ease-out), translate .6s var(--ease-out), clip-path .7s var(--ease-out); }
.page--home .polaroid:hover .tape { rotate: -7deg; translate: -50% -3px; }

@media (prefers-reduced-motion: no-preference) {
  /* the frame is placed, not boxed: no clip-path unveil on polaroids */
  .page--home .polaroid.unveil { clip-path: none; }
  .page--home .polaroid.unveil img { transform: none; }

  /* drop onto the wall: slightly larger and turned, settles into place */
  .page--home .polaroid.is-in { animation: hmeDrop 1.25s var(--ease-out) var(--d, 0s) backwards; }
  @keyframes hmeDrop { from { scale: 1.07; rotate: calc(var(--r, 0deg) - 5deg); } }

  /* developing photo: washed-out, colourless and over-exposed -> full colour */
  .page--home .polaroid img { transition: filter 2.6s cubic-bezier(.45, 0, .2, 1) calc(var(--d, 0s) + .45s), transform 1.8s var(--ease-out); }
  .page--home .polaroid:not(.is-in) img { filter: grayscale(.85) sepia(.35) contrast(.7) brightness(1.18); }
  .page--home .polaroid::after {
    content: ""; position: absolute; left: 12px; right: 12px; top: 12px; bottom: 54px; border-radius: 3px; pointer-events: none;
    background: radial-gradient(120% 90% at 50% 40%, #fffaf3 0%, #f3e6da 60%, #e3d2c6 100%);
    opacity: .92; transition: opacity 2.4s cubic-bezier(.45, 0, .2, 1) calc(var(--d, 0s) + .35s);
  }
  .page--home .polaroid.is-in::after { opacity: 0; }

  /* tape is pressed on after the frame lands */
  .page--home .polaroid:not(.is-in) .tape { clip-path: inset(0 100% 0 0); }
  .page--home .polaroid.is-in .tape { clip-path: inset(0 0 0 0); transition: rotate .6s var(--ease-out), translate .6s var(--ease-out), clip-path .7s var(--ease-out) calc(var(--d, 0s) + .55s); }
}

/* phones: a scrapbook column instead of four full-width frames */
@media (max-width: 560px) {
  .page--home .polaroids { gap: 34px; padding-inline: 4px; }
  .page--home .polaroid { width: 86%; justify-self: start; }
  .page--home .polaroid:nth-child(even) { justify-self: end; }
  .page--home .polaroid figcaption { font-size: 27px; }
}

/* ---- lightbox: the photo lifts out of its frame ---- */
.hme-lb { position: fixed; inset: 0; z-index: 990; cursor: zoom-out; }
.hme-lb__bg { position: absolute; inset: 0; background: rgba(43,22,12,.86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .5s var(--ease-out); }
.hme-lb.is-open .hme-lb__bg { opacity: 1; }
.hme-lb__fig { position: absolute; left: 50%; top: 50%; margin: 0; transform-origin: 50% 50%; will-change: transform; }
.hme-lb__fig img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 50px 90px -30px rgba(0,0,0,.6), 0 0 0 1px rgba(255,250,243,.08); }
.hme-lb__cap { position: absolute; left: 0; right: 0; top: calc(100% + 10px); text-align: center; font-size: clamp(30px, 4vw, 44px); line-height: 1.2; color: var(--rose-2); opacity: 0; translate: 0 8px; transition: opacity .5s var(--ease-out), translate .7s var(--ease-out); }
.hme-lb.is-open.is-settled .hme-lb__cap { opacity: 1; translate: 0 0; }
.hme-lb__close {
  position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--cream); background: rgba(247,233,217,.1); box-shadow: inset 0 0 0 1.5px rgba(247,233,217,.4);
  opacity: 0; transition: opacity .4s, background .3s, rotate .5s var(--ease-out);
}
.hme-lb.is-open .hme-lb__close { opacity: 1; }
.hme-lb__close:hover { background: rgba(247,233,217,.2); rotate: 90deg; }
.hme-lb__close:focus-visible { outline: 3px solid var(--rose-2); outline-offset: 3px; }
.hme-lb__close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }

/* =========================================================
   FAQ – soft cards that open smoothly
   ========================================================= */
.page--home .faq__item {
  transition: box-shadow .5s var(--ease-out), transform .5s var(--ease-out), outline-color .4s, background-color .4s,
    opacity 1s var(--ease-out) var(--d, 0s), translate 1.1s var(--ease-out) var(--d, 0s);
}
.page--home .faq__item:nth-child(2) { --d: .08s; }
.page--home .faq__item:nth-child(3) { --d: .16s; }
.page--home .faq__item:nth-child(4) { --d: .24s; }
.page--home .faq__item:hover { transform: translateY(-2px); outline-color: rgba(185,139,144,.95); box-shadow: 0 26px 44px -26px rgba(59,32,20,.5); }
.page--home .faq__item[open] { outline-color: rgba(185,139,144,.95); box-shadow: 0 30px 50px -30px rgba(59,32,20,.55); }
.page--home .faq__item summary { transition: color .3s; }
.page--home .faq__item summary:hover { color: var(--caramel); }

/* paw sits in a little cream badge that turns to chocolate when open */
.page--home .faq__paw {
  width: 40px; height: 40px; padding: 10px; border-radius: 50%; box-sizing: border-box;
  fill: var(--caramel); background: var(--rose-2); box-shadow: inset 0 -2px 4px rgba(110,72,58,.18);
  transition: transform .7s var(--ease-out), fill .35s, background-color .35s, box-shadow .35s;
}
.page--home .faq__item:hover .faq__paw { transform: rotate(-14deg); }
.page--home .faq__item[open]:not(.is-closing) .faq__paw {
  transform: rotate(90deg); fill: var(--cream); background-color: var(--choco);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 8px 14px -8px rgba(59,32,20,.7);
}
.page--home .faq__item.is-closing .faq__paw { transform: none; fill: var(--caramel); background-color: var(--rose-2); }
.page--home .faq__a a { color: var(--choco); font-weight: 700; text-decoration: none; background: linear-gradient(var(--rose), var(--rose)) 0 100% / 100% 1.5px no-repeat; transition: background-size .45s var(--ease-out), color .3s; }
.page--home .faq__a a:hover { color: var(--caramel); background-size: 0 1.5px; background-position: 100% 100%; }
.page--home .faq__list.hme-js .faq__item[open] .faq__a { animation: none; }
@media (max-width: 560px) { .page--home .faq__paw { width: 36px; height: 36px; padding: 9px; } }

/* =========================================================
   CONTACT – number rises, card is set down with its bow
   ========================================================= */
.page--home .phone__num.hme-split { background: none; color: var(--cream); animation: none; }
.page--home .phone__num .g { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .04em .02em .1em; margin: -.04em -.02em -.1em; }
.page--home .phone__num .gi { display: inline-block; transition: transform 1.1s var(--ease-out), color .4s; transition-delay: calc(.25s + var(--gi, 0) * 90ms); }
.page--home .phone:not(.is-in) .phone__num .gi { transform: translateY(105%); }
.page--home .phone:hover .phone__num .gi { color: var(--rose-2); transition-delay: 0s; }
.page--home .phone__ring { transition: scale .9s var(--ease-bounce) .15s, opacity .6s .15s; }
.page--home .phone:not(.is-in) .phone__ring { scale: .5; opacity: 0; }

/* the tilt highlight washed out the address – only show it while touched */
.page--home .address-card::after { opacity: 0; transition: opacity .5s; background: radial-gradient(45% 35% at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.4), transparent 70%); }
.page--home .address-card:hover::after { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .page--home .contact__btns.is-in .btn { animation: hmeRise .9s var(--ease-out) backwards; }
  .page--home .contact__btns.is-in .btn:nth-child(1) { animation-delay: .35s; }
  .page--home .contact__btns.is-in .btn:nth-child(2) { animation-delay: .44s; }
  .page--home .contact__btns.is-in .btn:nth-child(3) { animation-delay: .53s; }
  @keyframes hmeRise { from { opacity: 0; transform: translateY(16px); } }

  .page--home .address-card.is-shown .address-card__bow { animation: hmeBow 1s var(--ease-bounce) .65s backwards; }
  .page--home .address-card.is-shown .address-card__pin { animation: hmePin .9s var(--ease-out) .45s backwards; }
  .page--home .address-card.is-shown:hover .address-card__bow { animation: bowOnce 1.1s var(--ease-out); }
  .page--home .address-card.is-shown:hover .address-card__pin { animation: pinBounce 1s ease-in-out; }
  @keyframes hmeBow { from { scale: .3; rotate: -14deg; opacity: 0; } }
  @keyframes hmePin { from { transform: translateY(-26px); opacity: 0; } }
}

/* =========================================================
   FOOTER wordmark – rises fully by the end of the page
   ========================================================= */
.page--home .footer { margin-top: 90px; }
.page--home .footer__mark { margin: 26px 0 -30px; padding: 0 .5em; }
.page--home .footer__mark .script {
  padding: .14em .2em .06em;
  background: linear-gradient(180deg, rgba(247,233,217,.26) 20%, rgba(233,211,210,.1) 95%);
  -webkit-background-clip: text; background-clip: text;
  transform: translate3d(0, calc((1 - var(--me, 1)) * 38%), 0);
  opacity: calc(.35 + var(--me, 1) * .65);
}
@media (max-width: 560px) {
  .page--home .footer__mark { padding: 0 .2em; }
  .page--home .footer__mark .script { font-size: 15vw; }
}

/* =========================================================
   reduced motion: everything static and visible
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .page--home .polaroid::after { display: none; }
  .page--home .polaroid img { filter: none; }
  .page--home .polaroid .tape { clip-path: none; }
  .page--home .phone__num .gi { transform: none !important; }
  .page--home .phone__ring { scale: 1 !important; opacity: 1 !important; }
  .page--home .footer__mark .script { transform: none; opacity: 1; }
  .hme-lb__bg, .hme-lb__cap, .hme-lb__close { transition: none; }
}
