:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --link: #0b5fd0;
  --rule: #e6e6e6;
  --paper: #fdfcf8;
  --ok: #1f6f3a;
  --err: #a8331a;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.masthead {
  margin-bottom: 28px;
}

.masthead h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.masthead h1 a {
  color: inherit;
  text-decoration: none;
}

.masthead .bar {
  color: var(--muted);
  font-weight: 400;
  margin: 0 10px;
}

.masthead .tagline {
  font-weight: 400;
  color: var(--muted);
}

.topnav {
  margin-top: 8px;
  font-size: 15px;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.topnav .sep {
  color: var(--muted);
  margin: 0 6px;
}

/* button_to renders a <form>; keep it inline so it doesn't wrap to a new line */
.topnav form,
.auth-links form {
  display: inline;
  margin: 0;
}

.meta {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

section {
  margin: 36px 0;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.signup-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.signup-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.signup-form input[type="email"] {
  flex: 1 1 240px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

.signup-form input[type="email"]:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
  border-color: var(--link);
}

.signup-form input[type="submit"] {
  font: inherit;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.signup-form input[type="submit"]:hover {
  background: #000;
}

.ok {
  color: var(--ok);
  font-weight: 500;
}

.err {
  color: var(--err);
}

footer {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

.btn {
  display: inline-block;
  font: inherit;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #000;
}

.preorder-cta {
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
}

/* One combined card: image on top, details in the middle, add to cart at the bottom. */
.release {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.05);
}

.release__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.release__head .release__info {
  flex: 1;
  min-width: 220px;
}

.release__info h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.release__info .meta {
  margin-top: 16px;
}

.release__pending {
  margin: 12px 0 0;
  font-style: italic;
  color: var(--muted);
}

.coffee-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 6px;
  margin: 12px 0 0;
  font-size: 15px;
}

.coffee-details dt {
  color: var(--muted);
  font-weight: 500;
}

.coffee-details dd {
  margin: 0;
  color: var(--ink);
}

.stripe-checkout {
  margin-top: 20px;
  min-height: 80px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
}

.stripe-checkout__loading {
  padding: 24px 16px;
  text-align: center;
}

/* Auth forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 380px;
  margin-top: 20px;
}

.auth-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-form label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}

.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
  border-color: var(--link);
}

.auth-links {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Inline button that looks like a link */
.link-btn {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.link-btn:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Orders list */
.order-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-card {
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.order-header strong {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.03em;
}

.order-details p {
  margin: 0 0 4px;
  font-size: 15px;
}

.order-details .shipping {
  font-size: 13px;
}

/* Add to cart — lives inside the release card; inline price, single-row controls */
.purchase-card--sold-out {
  color: var(--muted);
}

.purchase-card__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.purchase-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.purchase-card__amount {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.purchase-card__unit {
  font-size: 13px;
  color: var(--muted);
}

.purchase-card__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.purchase-card__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

/* Left column: the postcard plus an optional dropdown to switch the artwork. */
.release__art-col {
  flex-shrink: 0;
  width: 220px;
  max-width: 100%;
}

/* Release carousel: product photos and artwork, one image visible at a time,
   with arrows and dots when there's more than one. */
.carousel {
  position: relative;
  margin-bottom: 16px;
}

.carousel__viewport {
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.07);
}

.carousel__slide {
  margin: 0;
}

.carousel__slide[hidden] {
  display: none;
}

/* Show the whole image, uncropped, at its natural aspect ratio. */
.carousel__slide img {
  display: block;
  width: 100%;
  height: auto;
}

/* Artwork sits inset from the frame on a white mat, like a postcard, with its
   title/artist printed below. The mat is the padding here (not a second border
   on the image), so it never doubles up on the viewport's own border. */
.carousel__slide--art {
  padding: 14px 14px 12px;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--rule);
  border-radius: 50%;
  cursor: pointer;
}

.carousel__nav:hover {
  background: #fff;
}

.carousel__nav:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

.carousel__nav--prev {
  left: 8px;
}

.carousel__nav--next {
  right: 8px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.carousel__dot--active {
  background: var(--ink);
  border-color: var(--ink);
}

.carousel__dot:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Caption under an artwork slide: the piece's title and artist, set off from the
   image by a thin rule. */
.carousel__caption {
  margin: 12px 4px 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  text-align: center;
  line-height: 1.35;
}

.carousel__caption-title {
  display: block;
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
}

.carousel__caption-artist {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Dropdown to page the carousel to a release's other artwork. */
.artwork-switch {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
}

.artwork-switch label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.artwork-switch__select {
  font: inherit;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.artwork-switch__select:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
  border-color: var(--link);
}

.cart-item__art-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cart-item__art-switch label {
  font-size: 13px;
  color: var(--muted);
}

/* Keep a long artwork name from widening the cart row past its box. */
.cart-item__art-switch select {
  min-width: 0;
  max-width: 100%;
  flex: 1;
}

.qty-field {
  display: flex;
}

.qty-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.qty-field__select,
.cart-item__qty input[type="number"] {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.qty-field__select {
  min-width: 84px;
}

.qty-field__select:focus,
.cart-item__qty input[type="number"]:focus {
  outline: 2px solid var(--link);
  outline-offset: 1px;
  border-color: var(--link);
}

.btn--block {
  min-width: 180px;
  text-align: center;
  padding: 11px 18px;
}

.purchase-card__link {
  margin: 12px 0 0;
  font-size: 14px;
}

/* Cart */
.cart-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  /* Let the 1fr grid column shrink so a long artwork name doesn't push the
     quantity, subtotal, and remove controls out of the row. */
  min-width: 0;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-item__qty input[type="number"] {
  width: 64px;
}

.cart-item__subtotal {
  font-variant-numeric: tabular-nums;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 16px;
}

.cart-summary__total {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.checkout-back {
  margin: 0 0 20px;
  font-size: 14px;
}

/* Empty cart — echoes the gallery's matted "plate" with its placeholder frame */
.cart-empty {
  max-width: 420px;
  margin: 40px auto 0;
  text-align: center;
}

/* White mat + soft double shadow, matching .plate-image */
.cart-empty__frame {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.07);
}

/* Caption styled like .plate-caption */
.cart-empty__caption {
  margin: 22px auto 0;
}

.cart-empty__title {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.cart-empty__text {
  margin: 14px auto 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.cart-empty__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.cart-empty__link {
  font-size: 14px;
  color: var(--link);
}

/* Gallery — full-bleed, image-forward, like a modern art gallery's site */
.gallery {
  /* Break out of the 640px main column for an immersive width */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 8px;
}

.gallery-intro {
  max-width: 640px;
  margin: 0 auto 72px;
  padding: 0 24px;
}

.gallery-intro h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  margin-bottom: 14px;
}

.gallery-intro .meta {
  max-width: 52ch;
}

.gallery-empty {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

.drop {
  margin: 0 0 112px;
}

.drop:last-child {
  margin-bottom: 24px;
}

.drop-label {
  max-width: 420px;
  margin: 0 auto 28px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.drop-name {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.drop-summary {
  font-size: 14px;
  color: var(--muted);
}

.plate {
  max-width: 1120px;
  margin: 0 auto 80px;
  padding: 0 32px;
}

.plate:last-child {
  margin-bottom: 0;
}

/* Postcard-sized presentation: modest landscape with a white mat and soft shadow */
.plate-image {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.07);
}

.plate-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* Graceful stand-in when no image URL is set */
.plate-placeholder {
  width: 100%;
  aspect-ratio: 3 / 2;
  background:
    repeating-linear-gradient(
      45deg,
      #f3f1ea,
      #f3f1ea 14px,
      #ece9df 14px,
      #ece9df 28px
    );
  border: 1px solid var(--rule);
}

.plate-caption {
  margin: 22px auto 0;
  max-width: 420px;
}

.plate-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
}

.plate-artist {
  font-weight: 600;
}

.plate-name {
  color: var(--ink);
}

.plate-name::before {
  content: " — ";
  color: var(--muted);
}

.plate-medium {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.plate-statement {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.plate-beneficiary {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

@media (max-width: 600px) {
  .drop {
    margin-bottom: 72px;
  }

  .drop-label,
  .plate {
    padding: 14px 20px 0;
  }

  .plate {
    padding-top: 0;
  }
}

.site-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: #5c4433;
  color: #fdfcf8;
  font-size: 0.9rem;
  text-align: center;
}

.site-banner a {
  color: inherit;
  text-decoration: underline;
}

.site-banner__close {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.site-banner[hidden] {
  display: none;
}
