/* Customer site. Phone first; the only media query caps the column on larger screens.
   Blend rule: nothing that wraps .blend art gets isolation, transform, filter or
   opacity. Press states change colour and shadow instead, and sold-out dimming sits
   on the image itself. */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

#view:focus-visible {
  outline: none;
}

#view {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-foot {
  flex: none;
  margin-top: 28px;
  padding-bottom: var(--safe-bottom);
}

.site-foot img {
  width: 100%;
}

.pad {
  padding-inline: var(--gutter);
}

.noscript {
  padding: 32px var(--gutter);
  text-align: center;
}

/* ---------- Sign art ---------- */

.hero-title {
  padding-top: var(--safe-top);
}

.hero {
  width: 100%;
}

.tagline {
  margin-top: 4px;
  padding-inline: var(--gutter);
  font-family: var(--font-script);
  font-size: clamp(1.375rem, 6.9vw, 1.9rem);
  line-height: 1.15;
  color: var(--green);
  text-align: center;
  text-wrap: balance;
}

.garland {
  width: 100%;
  margin-top: var(--safe-top);
  margin-bottom: -14px;
  -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
}

.label {
  height: clamp(40px, 13vw, 52px);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

.label-text {
  display: block;
  font-family: var(--font-script);
  font-size: 2.4rem;
  line-height: 1.1;
  color: var(--green);
  text-align: center;
}

/* ---------- Cards ---------- */

.card {
  display: block;
  background: var(--card);
  border: var(--ribbon);
  border-radius: var(--radius);
  box-shadow: var(--ribbon-shadow);
  color: inherit;
  text-decoration: none;
}

a.card:focus-visible {
  border-radius: var(--radius);
}

a.card:active {
  background: var(--red-wash);
  box-shadow: 0 0 0 rgba(158, 26, 38, 0.28);
}

/* ---------- Buttons ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--tap);
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 16px 14px 17px 13px / 14px 17px 13px 16px;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.btn:focus-visible {
  border-radius: 16px;
}

.btn-primary {
  min-height: 58px;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 3px 0 var(--red-deep);
  color: var(--on-red);
  font-size: 1.25rem;
}

.btn-primary:active {
  background: var(--red-deep);
  box-shadow: 0 0 0 var(--red-deep);
  transform: translateY(3px);
}

.btn-secondary {
  background: var(--card);
  border-color: var(--red);
  color: var(--red-deep);
}

.btn-secondary:active {
  background: var(--red-wash);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap);
  padding-inline: var(--gutter) 12px;
  font-weight: 700;
  color: var(--red-deep);
  text-decoration: none;
  align-self: flex-start;
}

.back svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Home ---------- */

.recents {
  margin-top: 8px;
  padding-inline: var(--gutter);
  text-align: center;
}

.recents > a,
.recents summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding-inline: 12px;
  font-weight: 700;
  color: var(--red-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.recents summary {
  list-style: none;
}

.recents summary::-webkit-details-marker {
  display: none;
}

.recents li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 8px 12px;
  border-top: 1px solid rgba(200, 32, 47, 0.25);
  color: var(--ink);
  text-decoration: none;
}

.recents li strong {
  margin-right: 8px;
  font-weight: 800;
  color: var(--red-deep);
}

.products {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-inline: var(--gutter);
}

/* Rows, not tall cards: all three choices should show on a phone without much scrolling. */
.product-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-areas: "photo label" "photo foot";
  column-gap: 12px;
  row-gap: 4px;
  align-items: center;
  padding: 10px 12px 10px 10px;
}

.product-card .label {
  grid-area: label;
  align-self: end;
  width: auto;
  max-width: 100%;
  height: 36px;
  margin: 0;
  object-fit: contain;
  object-position: left center;
}

.product-art {
  grid-area: photo;
  position: relative;
}

.product-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 62%;
  border-radius: var(--radius-sm);
}

.product-foot {
  grid-area: foot;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-blurb {
  font-size: 0.9375rem;
  font-weight: 700;
}

.price {
  font-weight: 800;
  color: var(--red-deep);
}

.product-price {
  display: block;
  font-size: 1.125rem;
}

.chev-round {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: var(--on-red);
}

.chev-round svg {
  width: 20px;
  height: 20px;
}

/* ---------- Designs grid ---------- */

.section-head {
  padding-inline: var(--gutter);
  text-align: center;
}

.section-head .label {
  height: clamp(44px, 14.5vw, 58px);
}

.hint {
  margin-top: 6px;
  color: var(--ink-soft);
}

.designs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-inline: var(--gutter);
}

.design-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 8px 8px 10px;
}

.design-art {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
}

.design-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.design-name {
  margin-top: 6px;
  font-family: var(--font-script);
  font-size: 1.4rem;
  line-height: 1.12;
  color: var(--red-deep);
  text-align: center;
}

.design-card.is-sold,
.product-card.is-sold {
  box-shadow: none;
  border-color: rgba(200, 32, 47, 0.45);
}

.design-card.is-sold .design-art img,
.product-card.is-sold .product-photo,
.stage.is-sold .stage-design {
  opacity: 0.38;
}

.design-card.is-sold .design-name,
.product-card.is-sold .product-blurb {
  color: var(--ink-soft);
}

.ribbon {
  position: absolute;
  top: 50%;
  left: -2px;
  right: -2px;
  padding: 4px 18px;
  background: var(--red);
  color: var(--on-red);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%, 10px 50%);
  transform: translateY(-50%) rotate(-5deg);
  z-index: 1;
}

/* The home photo is only 96px wide, so the ribbon gives up some padding to stay on one line. */
.product-art .ribbon {
  padding-inline: 12px;
  white-space: nowrap;
}

/* ---------- The item preview ---------- */

.stage {
  position: relative;
  aspect-ratio: 806 / 1000;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #f7ecd5;
}

.stage-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-design {
  position: absolute;
  object-fit: contain;
  max-width: none;
}

.stage-plain {
  background: none;
}

.stage-plain img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Sized so the design name still clears the sticky bar on a short phone. The arrows
   belong to the row, so they sit beside the photo whenever it is narrower than the column. */
.preview-row {
  position: relative;
}

.preview-wrap {
  width: min(100%, max(180px, calc((100vh - 345px) * 0.806)));
  width: min(100%, max(180px, calc((100dvh - 345px) * 0.806)));
  margin-inline: auto;
}

.stage .ribbon {
  top: 26%;
  left: 16%;
  right: 16%;
}

.arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: var(--ribbon);
  border-radius: 50%;
  background: var(--card);
  color: var(--red-deep);
  box-shadow: 0 2px 6px rgba(120, 70, 40, 0.18);
}

.arrow:focus-visible {
  border-radius: 50%;
}

.arrow:active {
  background: var(--red-wash);
}

.arrow svg {
  width: 24px;
  height: 24px;
}

.arrow-prev {
  left: 0;
}

.arrow-next {
  right: 0;
}

.preview-info {
  margin-top: 10px;
  text-align: center;
}

.big-name {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 10.5vw, 2.75rem);
  line-height: 1.08;
  color: var(--red);
}

.preview-sub {
  margin-top: 2px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--green);
}

.preview-sub .price {
  margin-left: 8px;
}

.buybar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: var(--paper);
  box-shadow: 0 -6px 14px rgba(253, 248, 234, 0.95);
}

.buybar-spacer {
  flex: none;
  height: 14px;
}

/* ---------- Notices ---------- */

.notice {
  margin-top: 14px;
  padding: 16px;
  text-align: center;
}

.notice h2,
.notice-title {
  text-wrap: balance;
  font-family: var(--font-script);
  font-size: 2rem;
  line-height: 1.12;
  color: var(--red);
}

.notice p {
  margin-top: 6px;
}

.notice .btn {
  margin-top: 14px;
}

.center-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px var(--gutter);
}

.center-state .notice {
  margin-top: 0;
}

.loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50vh;
  padding: 32px var(--gutter);
  color: var(--ink-soft);
  font-weight: 700;
}

.star {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.loading .star {
  width: 40px;
  height: 40px;
  animation: twinkle 1.2s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

/* ---------- Pay ---------- */

.pay-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  padding: 10px;
}

.pay-item .stage {
  flex: none;
  width: 92px;
}

.pay-item-name {
  min-width: 0;
}

.pay-item-name .design-title {
  font-family: var(--font-script);
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--red);
}

.pay-item-name p {
  margin-top: 2px;
  font-weight: 700;
  color: var(--green);
}

.pay-item-name .design-title {
  margin-top: 0;
}

.pay-item-name .price {
  color: var(--red-deep);
  font-weight: 800;
}

.pay-q {
  margin-top: 20px;
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 9vw, 2.3rem);
  line-height: 1.12;
  color: var(--green);
  text-align: center;
}

.pay-buttons {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.pay-btn {
  flex-direction: column;
  gap: 2px;
  min-height: 104px;
  font-size: 1.75rem;
}

.pay-btn small {
  font-size: 1rem;
  font-weight: 700;
}

.pay-btn:disabled {
  cursor: default;
}

.pay-btn.btn-primary:disabled {
  background: var(--red-deep);
  border-color: var(--red-deep);
  box-shadow: none;
  color: var(--on-red);
}

.pay-btn.is-idle:disabled {
  background: #efe7d2;
  border-color: #cfc3a8;
  box-shadow: none;
  color: var(--ink-soft);
}

.pay-problem {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--red-wash);
  border: 2px solid var(--red);
  border-radius: var(--radius-sm);
  text-align: center;
}

.pay-problem .btn {
  margin-top: 10px;
}

/* ---------- Order confirmation ---------- */

.order-head {
  margin-top: 16px;
  text-align: center;
}

.order-word {
  display: block;
  font-family: var(--font-script);
  font-size: 2.5rem;
  line-height: 1.05;
  color: var(--green);
}

.order-num {
  display: block;
  font-family: var(--font-ui);
  font-size: clamp(4.5rem, 24vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--red);
}

.order-item {
  margin-top: 14px;
}

.order-pay {
  margin-top: 16px;
}

.order-pay > :first-child {
  margin-top: 0;
}

.order-pay-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.amount {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--red-deep);
}

.venmo-handle {
  margin-top: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.venmo-note {
  color: var(--ink-soft);
}

.show-table {
  margin-top: 16px;
  font-size: 1.125rem;
  font-weight: 800;
  text-align: center;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-height: 64px;
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--green-wash);
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--green);
  text-align: center;
}

.status .star {
  flex: none;
  width: 22px;
  height: 22px;
}

.status-paid {
  padding: 2px 12px;
  background: var(--green);
  border-radius: 999px;
  color: var(--card);
  white-space: nowrap;
}

.status.is-cancelled {
  background: var(--red-wash);
  color: var(--red-deep);
}

.status.is-ready {
  background: var(--green);
  color: var(--card);
}

.status.is-ready .status-paid {
  background: var(--card);
  color: var(--green);
}

.order-again {
  margin-top: 18px;
}

/* ---------- Larger screens: a centred column, nothing more ---------- */

@media (min-width: 520px) {
  .page {
    width: 100%;
    max-width: var(--column);
    margin-inline: auto;
  }
}
