/**
 * Preorder updates page (sections/preorder-updates.liquid).
 *
 * The page exists to answer one question - "where is my order?" - so each
 * batch card is built around a hierarchy of exactly that: the current stage
 * as a headline (.preorder-batch__now), the stepper as its evidence, and
 * the merchant's dated log as the detail a reader opts into. The expected
 * window reads as a spec chip (label + value), the same grammar this
 * audience scans on sensor/weight spec rows, not as a sentence.
 *
 * The stepper inside each card is .tracking-steps, styled by
 * section-customers.css - nothing here restyles it, so the two pages that
 * draw it cannot drift apart.
 */
.section-preorder-updates {
  padding-block: var(--space-8);
}

.preorder-intro {
  max-width: 640px;
  margin-bottom: var(--space-7);
}

.preorder-intro__title {
  margin: 0 0 var(--space-3);
}

.preorder-intro__text {
  color: var(--color-muted);
}

/* Full-width board: one card per row on mobile, two-up from 990px so the
   page reads as a status wall rather than a narrow left-hugging feed. */
.preorder-batches {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: start;
}

@media screen and (min-width: 990px) {
  .preorder-batches {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

/* A month heading spans both columns so the batches beneath it start a
   fresh row, which is what makes it read as a divider rather than a card
   with no body. */
.preorder-month {
  grid-column: 1 / -1;
  margin: var(--space-4) 0 0;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-line);
  color: var(--color-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preorder-month:first-child {
  margin-top: 0;
}

.preorder-batch {
  padding: var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-m);
  background-color: var(--color-bg);
}

/* Same quiet-card-that-lifts grammar as the roadmap's entries: outline at
   rest, darker edge and a soft drop on hover/focus. */
.preorder-batch:hover,
.preorder-batch:focus-within {
  border-color: color-mix(in srgb, var(--color-ink) 22%, var(--color-line));
  box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--color-ink) 30%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .preorder-batch {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }

  .preorder-batch:hover,
  .preorder-batch:focus-within {
    transform: translateY(-2px);
  }

  /* Board stagger: the second card of the desktop pair follows a beat
     behind; lower rows re-earn their own reveal on scroll. */
  .preorder-batches > [data-reveal]:nth-child(2) {
    transition-delay: 80ms;
  }
}

.preorder-batch__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.preorder-batch__media {
  flex: 0 0 auto;
  width: 96px;
  aspect-ratio: 1;
  border-radius: var(--radius-s);
  overflow: hidden;
  background-color: var(--color-card-media);
}

.preorder-batch__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: var(--card-media-blend);
}

.preorder-batch__id {
  flex: 1 1 auto;
  min-width: 0;
}

.preorder-batch__title {
  margin: 0;
}

.preorder-batch__title a {
  color: inherit;
  text-decoration: none;
}

.preorder-batch__title a:hover {
  text-decoration: underline;
}

/* The expected window as a chip: uppercase label over the value, pinned to
   the header's end. Deliberately bordered, not filled - it is a soft
   target, and a filled pill would promise more certainty than "late Aug"
   carries. */
.preorder-batch__eta {
  flex: 0 0 auto;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-s);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  /* Wraps rather than nowrap: merchants write sentences here ("Around
     October 10th or slightly earlier."), and a nowrap chip pushed the card
     past the screen edge on phones. */
  max-width: 100%;
}

.preorder-batch__eta-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* The answer, promoted to a headline. The label is the quiet part; the
   stage name carries the heading face so it is the first thing read. */
.preorder-batch__now {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.preorder-batch__now-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.preorder-batch__now-stage {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* The live dot: the roadmap's in-progress grammar carried over - the
   current stage is the one thing on the card that is actually happening,
   so it gets the page's only ambient motion (and none at all under
   reduced motion; the brand colour still marks it as live). */
.preorder-batch__now-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background-color: var(--color-brand);
}

@media (prefers-reduced-motion: no-preference) {
  .preorder-batch__now-dot {
    animation: preorder-now-pulse 2.6s ease-in-out infinite;
  }

  @keyframes preorder-now-pulse {
    0%,
    100% {
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-brand) 25%, transparent);
    }
    50% {
      box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-brand) 8%, transparent);
    }
  }
}

/* The log reads as a mini timeline: the merchant writes each entry as
   <p><strong>date</strong> - text</p>, and the date becomes a hanging
   uppercase chip. The newest entry (first) keeps full ink; history fades. */
.preorder-batch__updates {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
}

.preorder-batch__updates p {
  margin: 0 0 var(--space-2);
}

.preorder-batch__updates p:first-child {
  color: var(--color-ink);
}

.preorder-batch__updates strong:first-child {
  display: inline-block;
  min-width: 64px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.preorder-batch__updates p:first-child strong:first-child {
  color: var(--color-brand);
}

.preorder-batch__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--color-ink);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: 2px;
}

.preorder-batch__link:hover {
  color: var(--color-brand);
  border-bottom-color: var(--color-brand);
}

@media screen and (max-width: 749px) {
  /* The chip drops under the title rather than squeezing it. */
  .preorder-batch__header {
    flex-wrap: wrap;
  }

  .preorder-batch__eta {
    order: 3;
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-2);
  }
}

@media screen and (min-width: 990px) {
  .section-preorder-updates {
    padding-block: var(--space-9);
  }

  .preorder-batch {
    padding: var(--space-6);
  }

  .preorder-batch__now {
    font-size: 20px;
  }
}
