/* A small bakery ticket, pinned to the hero photograph. */
.hero-scene { position: relative; min-width: 0; }
.favorite-ticket {
  position: absolute;
  right: clamp(12px, 3vw, 44px);
  bottom: 64px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(280px, calc(100% - 24px));
  padding: 13px 15px 11px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 9px 24px #3d2b2029;
  transform: rotate(-2deg);
}
.favorite-ticket::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 36%;
  width: 64px;
  height: 17px;
  background: #c5cdb3eb;
  transform: rotate(5deg);
  pointer-events: none;
}
.ticket-photo {
  position: relative;
  display: grid;
  place-items: center;
  height: 80px;
  overflow: hidden;
  border-radius: 3px;
  color: var(--sage);
  background: #ede9dd;
  font-size: 30px;
}
.ticket-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ticket-copy small {
  color: #526448;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ticket-copy h2 {
  margin: 4px 0 1px;
  font: 500 21px/1.12 'Playfair Display', Georgia, serif;
  color: var(--brown);
}
.ticket-copy button {
  min-height: 44px;
  padding: 2px 4px 2px 0;
  border: 0;
  background: transparent;
  color: #475d3e;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 780px) {
  .favorite-ticket {
    position: relative;
    right: auto;
    bottom: auto;
    margin: -18px 10px 0 auto;
    width: min(280px, calc(100% - 20px));
  }
  .hero-scene .hero-caption { text-align: left; padding-bottom: 24px; }
}

.brand-entrance { display: none; }
@media screen and (prefers-reduced-motion: no-preference) {
  .brand-entrance {
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: var(--cream);
    pointer-events: none;
    animation: entrance-away .33s .85s ease-out forwards;
  }
  .brand-name {
    font: 700 clamp(34px, 6vw, 56px)/1.12 Arial, Helvetica, sans-serif;
    letter-spacing: -.055em;
    text-align: center;
    animation: wordmark-ink .52s ease-out backwards;
  }
  .brand-name span { color: var(--sage); }
  .hero-copy > * { animation: bloom-up .55s .88s both; }
  .hero-copy > h1 { animation-delay: .94s; }
  .hero-copy > p { animation-delay: 1s; }
  .hero-copy > a { animation-delay: 1.06s; }
  .hero-scene { animation: photo-in .75s .82s both; }
  .favorite-ticket { animation: ticket-in .58s 1.11s both; }
  .scroll-arrival { animation: bloom-up .55s cubic-bezier(.2,.75,.2,1) var(--arrival-delay, 0ms) backwards; }
  .bag-bump { animation: bag-bump .28s ease-out; }
  body:focus-within .brand-entrance { visibility: hidden; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .favorite-ticket { transition: rotate .22s ease; }
  .favorite-ticket:hover, .favorite-ticket:focus-within { rotate: 2deg; }
}
@keyframes entrance-away { to { opacity: 0; visibility: hidden; } }
@keyframes wordmark-ink { from { opacity: 0; clip-path: inset(0 46%); } to { opacity: 1; clip-path: inset(0); } }
@keyframes bloom-up { from { opacity: 0; transform: translateY(12px); } }
@keyframes photo-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes ticket-in { from { opacity: 0; transform: translateY(10px) rotate(2deg); } }
@keyframes bag-bump { 45% { transform: scale(1.18); } }

/* Choreograph the café's existing photography, lettering and illustrations. */
@media screen and (prefers-reduced-motion: no-preference) {
  .hero-media > img {
    transform-origin: 50% 65%;
    animation: hero-settle 1.45s .82s cubic-bezier(.2,.75,.25,1) backwards;
  }
  .hero-caption { animation: caption-in .65s 1.12s backwards; }
  .welcome-strip > :nth-child(2), .intro-ritual > :nth-child(2),
  .detail-grid > :nth-child(2), footer > :nth-child(2) { --arrival-delay: 65ms; }
  .welcome-strip > :nth-child(3), .intro-ritual > :nth-child(3),
  .detail-grid > :nth-child(3), footer > :nth-child(3) { --arrival-delay: 130ms; }
  .welcome-strip > :nth-child(4) { --arrival-delay: 185ms; }
  .intro-ritual-item.scroll-arrival .intro-ritual-symbol,
  .scroll-arrival > .detail-icon {
    display: inline-block;
    animation: botanical-turn .7s var(--arrival-delay, 0ms) ease-out backwards;
  }
  .story-ornament.scroll-arrival .story-cup path:nth-child(4) {
    stroke-dasharray: 90;
    animation: steam-draw 1.15s ease-out backwards;
  }
  .story-ornament.scroll-arrival .story-flower {
    animation: botanical-turn .8s .12s ease-out backwards;
  }
  .editorial-photo.scroll-arrival figcaption,
  .journal-layout .scroll-arrival figcaption {
    animation: caption-in .58s .15s backwards;
  }
  .contact-mail:focus-within, .contact-choice:focus-within {
    border-color: var(--sage);
  }
  .contact-mail, .contact-choice { transition: border-color .2s ease; }
  .scroll-arrival:focus-within { animation: none; }

  /* Browsers without scroll timelines retain the one-time image reveals. */
  @supports (animation-timeline: view()) {
    .journal-layout figure, .editorial-photo, .story-art {
      view-timeline-name: --photo-travel;
      view-timeline-axis: block;
    }
    .journal-layout figure img, .editorial-photo img, .story-art img {
      animation: photo-travel 1s linear both;
      animation-timeline: --photo-travel;
      animation-range: entry 0% exit 100%;
    }
  }
  @supports (animation-timeline: scroll()) {
    .nav::after {
      content: "";
      position: absolute;
      pointer-events: none;
      inset: auto 0 -1px;
      height: 2px;
      background: var(--sage);
      transform-origin: left;
      animation: page-progress 1s linear both;
      animation-timeline: scroll(root block);
    }
  }
}
@media (hover: hover) and (min-width: 781px) and (prefers-reduced-motion: no-preference) {
  .nav nav a { position: relative; }
  .nav nav a::after {
    content: "";
    position: absolute;
    inset: auto 0 -5px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
  }
  .nav nav a:is(:hover, :focus-visible)::after { transform: scaleX(1); }
}
@keyframes hero-settle { from { scale: .976; } to { scale: 1; } }
@keyframes caption-in { from { opacity: 0; translate: 0 7px; } }
@keyframes botanical-turn { from { rotate: -16deg; scale: .87; } }
@keyframes steam-draw { from { stroke-dashoffset: 90; } to { stroke-dashoffset: 0; } }
@keyframes photo-travel {
  from { scale: 1.06; translate: 0 -1.7%; }
  to { scale: 1.06; translate: 0 1.7%; }
}
@keyframes page-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.headline-mask, .headline-mask > span { display: block; }
.filters { position: relative; }

@media screen and (prefers-reduced-motion: no-preference) {
  .hero-copy > h1 { animation: none; }
  .headline-mask { overflow: clip; padding-bottom: .09em; margin-bottom: -.09em; }
  .headline-mask > span {
    transform-origin: 0 100%;
    animation: headline-rise .78s .82s cubic-bezier(.18,.78,.2,1) backwards;
  }
  .headline-mask + .headline-mask > span { animation-delay: .99s; }
  .hero-media > img {
    animation: hero-unveil 1.05s .78s cubic-bezier(.18,.75,.22,1) backwards;
  }
  .filters.marker-ready::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 21px;
    width: var(--category-width);
    height: 3px;
    border-radius: 3px;
    background: var(--sage);
    transform: translateX(var(--category-x)) scaleX(.58);
    transition: transform .32s cubic-bezier(.2,.8,.2,1), width .32s ease;
    pointer-events: none;
  }
  .product.scroll-arrival {
    animation: menu-card-in .62s var(--arrival-delay, 0ms) cubic-bezier(.2,.8,.25,1) backwards;
  }
  .product.scroll-arrival .tag {
    animation: label-in .36s calc(var(--arrival-delay, 0ms) + 80ms) ease-out backwards;
  }
  #products > p:only-child { animation: label-in .22s ease-out; }
  .filters button, .search-wrap input { transition: border-color .18s, box-shadow .18s; }
  .search-wrap input:focus { box-shadow: 0 0 0 3px #71815826; }
  .scrim:not([hidden]), .modal-wrap:not([hidden]) { animation: veil-in .16s ease-out; }
  .drawer.open .drawer-foot, .drawer.open .drawer-head { animation: label-in .24s ease-out; }
  .modal-wrap:not([hidden]) #modalContent > h2,
  .modal-wrap:not([hidden]) #modalContent > form,
  .modal-wrap:not([hidden]) .fulfillment-choices,
  #upiDetails:not([hidden]) {
    animation: step-in .24s cubic-bezier(.18,.77,.25,1);
  }
  .payment-option { transition: background-color .2s ease, border-color .2s ease; }
  .payment-option:has(input:checked) { animation: payment-pick .27s ease-out; }
  .nav nav.mobile-open { animation: step-in .19s ease-out; }
}
@keyframes headline-rise {
  from { transform: translateY(105%) rotate(2deg); }
  to { transform: none; }
}
@keyframes hero-unveil {
  from { clip-path: inset(0 0 20% 0 round 22px); scale: .97; }
  to { clip-path: inset(0 round 22px); scale: 1; }
}
@keyframes menu-card-in {
  from { opacity: .35; translate: var(--card-enter-x, -18px) 25px; scale: .975; }
  to { opacity: 1; translate: none; scale: 1; }
}
@keyframes label-in { from { opacity: .25; translate: -6px 0; } }
@keyframes veil-in { from { opacity: 0; } }
@keyframes step-in { from { opacity: .6; translate: 0 6px; } }
@keyframes payment-pick { 45% { box-shadow: 0 0 0 3px #71815826; } }
