/* Home page, laid out as a searchable catalogue: news ticker, featured banners, search, trending searches,
   occasion tiles, the invitation grid, then how it works and questions. */

/* News ticker */
.ticker { position: relative; overflow: hidden; color: #fff; background: var(--plum); font-size: 0.8rem; font-weight: 500; }
.ticker-track { display: flex; width: max-content; animation: ticker 46s linear infinite; }
.ticker-track.is-paused { animation-play-state: paused; }
.ticker-track p { margin: 0; padding: 0.42rem 6rem 0.42rem 2rem; white-space: nowrap; }
.ticker-pause {
  position: absolute; right: 0; top: 0; bottom: 0; display: grid; place-items: center; width: 2.5rem;
  color: #fff; background: var(--plum-deep); border: 0; cursor: pointer;
}
.ticker-pause svg { width: 11px; height: 11px; }
.ticker-pause:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.ticker-pause[aria-pressed="true"] { background: var(--rose); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Featured banners */
.promos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; padding-top: 1.25rem; }
.promo {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 15.5rem; padding: 1.4rem 1.6rem; overflow: hidden;
  color: var(--ink); text-decoration: none; border-radius: 22px;
  background: center / cover no-repeat; box-shadow: var(--shadow-card);
}
.promo--rose { background-image: url("../img/photos/banner-wedding.jpg"); }
.promo--season { background-image: url("../img/photos/banner-christmas.jpg"); }
.promo--plum { background-image: url("../img/photos/banner-plum.jpg"); color: #fbe9dc; }
.promo-copy { position: relative; display: grid; justify-items: start; gap: 0.45rem; max-width: 62%; }
.promo-art { order: 2; flex: none; width: 31%; max-width: 132px; transform: rotate(5deg); transition: transform 0.25s ease; }
.promo--season .promo-art { transform: rotate(-4deg); }
.promo-art .inv { box-shadow: 0 18px 30px -14px rgb(33 27 28 / 0.55); }
.promo:hover .promo-art { transform: rotate(2deg) translateY(-4px); }
.promo svg { flex: none; width: 1.05em; height: 1.05em; }
.promo-tag, .promo-pill {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.65rem;
  color: #fff; background: var(--plum-fill); border-radius: 7px; font-size: 0.8rem; font-weight: 600;
}
.promo-eyebrow { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--plum); }
.promo--plum .promo-eyebrow { color: #fbe9dc; }
.promo-title { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: clamp(1.8rem, 2.5vw, 2.45rem); line-height: 1.02; letter-spacing: -0.01em; color: var(--plum); }
.promo--plum .promo-title { color: #f3d6b4; }
.promo-sub { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.98rem; font-weight: 500; }
.promo-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.15rem; font-size: 0.95rem; font-weight: 600; color: var(--plum); }
.promo--plum .promo-link { color: #fff; }
.promo-free { display: flex; align-items: center; gap: 0.5rem; line-height: 1; }
.promo-free b { font-size: 3rem; font-weight: 800; color: #f8e6d2; }
.promo-free small { max-width: 5.5em; font-size: 0.9rem; font-weight: 500; line-height: 1.15; }
.price-chip {
  display: inline-block; padding: 0.05em 0.38em; color: var(--ink); background: var(--gold-chip);
  border-radius: 6px; font-size: 1.3rem; font-weight: 800; line-height: 1.35;
}
.price-chip--big { font-size: 2.1rem; border-radius: 9px; box-shadow: 0 6px 14px -8px rgb(120 70 30 / 0.6); }

/* Search */
.finder { display: grid; justify-items: center; gap: 1.1rem; padding-block: 2rem 0.5rem; text-align: center; }
.finder h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.finder-lede { max-width: 40rem; margin: -0.4rem 0 0; color: var(--slate); }
.search { position: relative; width: min(760px, 100%); }
.search input {
  min-height: 64px; padding: 0 4.6rem 0 1.8rem; font-size: 1.05rem;
  background: #fff; border: 1.5px solid #dcaec4; border-radius: 999px;
  box-shadow: 0 10px 26px -18px rgb(110 20 67 / 0.6);
}
.search input::placeholder { color: #85707a; }
.search input:focus-visible { border-color: var(--plum); outline: 2px solid rgb(110 20 67 / 0.25); outline-offset: 2px; }
.search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 48px; height: 48px;
  color: #fff; background: var(--plum-fill); border: 0; border-radius: 50%; cursor: pointer;
}
.search-btn:hover { filter: brightness(1.1); }
.search-btn svg { width: 20px; height: 20px; }

/* Shelves */
.shelf { padding-top: 2.5rem; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; }
.shelf-title { margin-bottom: 1rem; font-size: clamp(1.6rem, 2.4vw, 2.15rem); }
.shelf-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.shelf-link svg { width: 1em; height: 1em; }
.results { margin: 0 0 1rem; color: var(--slate); font-size: 0.95rem; }

.chips { list-style: none; margin: 0; padding: 0 0 0.4rem; display: flex; gap: 0.75rem; overflow-x: auto; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: 0.7rem; min-height: 52px; padding: 0.3rem 1.3rem 0.3rem 0.3rem;
  color: var(--ink); background: #fff; border: 1px solid #f2e3ea; border-radius: 999px;
  box-shadow: 0 4px 14px -8px rgb(110 20 67 / 0.3); font-size: 1rem; font-weight: 500; white-space: nowrap; text-decoration: none;
}
.chip img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.chip:hover { border-color: #dcaec4; }
.chip[aria-current="true"] { color: #fff; background: var(--plum-fill); border-color: transparent; }

.tiles {
  list-style: none; margin: 0; padding: 0.25rem 0.1rem 1rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, calc((100% - 8 * 1rem) / 9)); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.tiles li { scroll-snap-align: start; }
.tile {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  color: var(--ink); text-decoration: none; background: #fff; border: 1px solid #f4e6ec; border-radius: 16px; box-shadow: var(--shadow-card);
}
.tile:hover { border-color: #dcaec4; }
.tile[aria-current="true"] { border-color: var(--plum); box-shadow: 0 0 0 2px var(--plum); }
.tile-art { position: relative; display: block; aspect-ratio: 16 / 10; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; }
.tile-count {
  position: absolute; left: 8px; bottom: 8px; padding: 0.1rem 0.6rem;
  color: var(--ink); background: rgb(255 255 255 / 0.82); border-radius: 999px; backdrop-filter: blur(4px);
  font-size: 0.75rem; font-weight: 600;
}
.tile-name { padding: 0.75rem 0.9rem 0.95rem; font-size: 0.92rem; font-weight: 600; line-height: 1.25; }

/* Invitation cards */
.templates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; }
.tpl { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #f4e6ec; border-radius: 18px; box-shadow: var(--shadow-card); }
.tpl[hidden] { display: none; }
.tpl-art { position: relative; }
/* The card's place is held until it is drawn (cards are drawn as they scroll into view). */
.tpl-art .inv-wrap { aspect-ratio: 5 / 7; background: var(--blush); }
.tpl-art .inv { box-shadow: none; }
.tpl-kind {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.55rem;
  color: #fff; background: rgb(33 27 28 / 0.78); border-radius: 999px; backdrop-filter: blur(4px); font-size: 0.68rem; font-weight: 600;
}
.tpl-kind svg { width: 9px; height: 9px; }
.tpl-video {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.55rem;
  color: #fff; background: var(--plum-fill); border-radius: 999px; font-size: 0.68rem; font-weight: 700;
}
.tpl-video svg { width: 9px; height: 9px; }
.tpl-expand {
  position: absolute; right: 8px; top: 8px; display: grid; place-items: center; width: 30px; height: 30px;
  color: var(--ink); background: rgb(255 255 255 / 0.78); border-radius: 50%; backdrop-filter: blur(4px);
}
.tpl-expand svg { width: 14px; height: 14px; }
.tpl-preview {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.85rem;
  color: var(--ink); background: rgb(255 255 255 / 0.82); border-radius: 999px; backdrop-filter: blur(4px);
  font-size: 0.8rem; font-weight: 600; text-decoration: none; box-shadow: 0 4px 12px -6px rgb(0 0 0 / 0.4);
}
.tpl-preview svg { width: 10px; height: 10px; }
.tpl-body { display: flex; flex-direction: column; flex: 1; padding: 0.85rem 0.9rem 1rem; }
.tpl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.tpl-name { font-family: var(--font-text); font-size: 1.05rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.tpl-share {
  flex: none; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.6rem;
  font: inherit; font-size: 0.75rem; color: var(--ink); background: #fff; border: 1px solid #e9d5de; border-radius: 999px; cursor: pointer;
}
.tpl-share svg { width: 12px; height: 12px; }
.tpl-share:hover { border-color: var(--plum); }
.tpl-note { margin: 0.3rem 0 0; color: #8c5a73; font-size: 0.82rem; line-height: 1.35; }
.tpl-code { margin: 0.25rem 0 0.75rem; color: #6f5f66; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; }
/* The price and button sit at the foot of every card, so they line up across a row whatever the name's length. */
.tpl-price { margin: auto 0 0.8rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.tpl-use { width: 100%; min-height: 44px; font-size: 0.92rem; }
.share-status {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 30; transform: translateX(-50%);
  max-width: calc(100% - 2rem); margin: 0; padding: 0.7rem 1.2rem;
  color: #fff; background: var(--ink); border-radius: 999px; box-shadow: 0 10px 30px -12px rgb(0 0 0 / 0.5);
  font-size: 0.9rem; font-weight: 500; text-align: center;
}
.share-status[hidden] { display: none; }
.empty { padding: 2.5rem 0 1rem; text-align: center; color: var(--slate); }
.empty p { margin: 0 0 0.4rem; }

/* Sections */
.section { padding-block: 5rem 1rem; }
.faq h2, .how h2 { font-size: clamp(2rem, 3.6vw, 3rem); }

/* How it works */
.how { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; align-items: center; }
.how-steps { margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1.5rem; max-width: 32em; }
.how-steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; column-gap: 0.75rem; }
.how-steps li::before {
  content: counter(step); grid-row: span 2;
  font-family: var(--font-display); font-size: 2.6rem; line-height: 0.9; color: var(--rose);
}
.how-steps b { display: block; font-size: 1.15rem; color: var(--ink); }

.phone-figure { margin: 0; display: grid; justify-items: center; gap: 1rem; }
.phone-figure figcaption { color: var(--slate); font-size: 0.95rem; text-align: center; }
.phone {
  width: min(290px, 78vw); padding: 12px;
  background: #2b1325; border-radius: 42px;
  box-shadow: 0 30px 60px -30px rgb(53 19 41 / 0.6);
}
.phone-screen {
  display: grid; gap: 0.55rem; padding: 1.4rem 1.1rem 1.3rem;
  background: var(--blush); border-radius: 31px;
}
.phone-screen .inv-wrap { margin-bottom: 0.5rem; }
.phone-btn {
  display: block; padding: 0.55rem; text-align: center; font-size: 0.85rem; font-weight: 700;
  color: var(--plum); border: 1px solid rgb(74 29 63 / 0.35); border-radius: var(--radius-control);
}
.phone-btn--primary { background: var(--plum); color: #fff8fa; border-color: transparent; }

/* Questions */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem 3rem; align-items: start; }
.faq-list { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0;
  font-family: var(--font-display); font-size: 1.4rem; line-height: 1.25; color: var(--plum);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-text); color: var(--rose); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: -0.2rem 0 1.2rem; max-width: 36em; }

@media (max-width: 1060px) {
  .promos {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(340px, 70%);
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.6rem; scrollbar-width: thin;
  }
  .promo { scroll-snap-align: start; }
}

@media (max-width: 860px) {
  .how, .faq { grid-template-columns: minmax(0, 1fr); }
}

/* Phones get smaller banner photos. */
@media (max-width: 700px) {
  .promo--rose { background-image: url("../img/photos/banner-wedding-s.jpg"); }
  .promo--season { background-image: url("../img/photos/banner-christmas-s.jpg"); }
  .promo--plum { background-image: url("../img/photos/banner-plum-s.jpg"); }
}

@media (max-width: 560px) {
  .ticker { font-size: 0.72rem; }
  .promos { grid-auto-columns: 90%; }
  .promo { min-height: 13.5rem; padding: 1.1rem 1.2rem; }
  .price-chip--big { font-size: 1.6rem; }
  .search input { min-height: 56px; padding-left: 1.2rem; font-size: 0.95rem; }
  .search-btn { width: 42px; height: 42px; right: 6px; }
  .chip { min-height: 46px; font-size: 0.92rem; }
  .chip img { width: 38px; height: 38px; }
  .tiles { grid-auto-columns: 140px; }
  .templates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
  .tpl-body { padding: 0.7rem 0.7rem 0.8rem; }
  .tpl-share { position: relative; }
  .tpl-share > span:first-of-type { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tpl-name { font-size: 0.95rem; }
  .tpl-use { font-size: 0.82rem; padding-inline: 0.6em; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-pause { display: none; }
}
