@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light dark;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --paper: #f5eee3;
  --panel: #fffbf3;
  --ink: #35221b;
  --muted: #6c584b;
  --line: #dfd1c0;
  --espresso: #493025;
  --espresso-ink: #fff7ea;
  --pistachio: #e9ecdb;
  --pistachio-ink: #3c4830;
  --copper: #994a35;
  --danger: #943a2e;
  --focus: #76513d;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  background: var(--paper);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #211815;
    --panel: #2b201b;
    --ink: #fff0dd;
    --muted: #cdb4a2;
    --line: #554035;
    --espresso: #edd5b7;
    --espresso-ink: #302016;
    --pistachio: #3a4431;
    --pistachio-ink: #e0e8ce;
    --copper: #efa48b;
    --danger: #a34335;
    --focus: #e5b694;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
button, input { font: inherit; min-height: 2.75rem; }
button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
button:is(:disabled, [aria-disabled="true"]) { opacity: .6; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.page {
  max-width: 70rem;
  margin-inline: auto;
  padding: max(.9rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) 3.5rem max(1.25rem, env(safe-area-inset-left));
}
.masthead, .brand, .section-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.masthead {
  min-height: 4.4rem;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  flex-shrink: 0;
  font-family: var(--serif);
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -.035em;
}
.cup-icon { display: block; width: 2.35rem; height: 2.35rem; }

main { padding-top: clamp(1.1rem, 3.7vw, 2.9rem); }
.status {
  position: fixed;
  z-index: 1;
  inset: auto 1rem max(1rem, env(safe-area-inset-bottom));
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: 0 auto;
  padding: .65rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 .4rem 1.6rem #2a1b1726;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.status:empty { opacity: 0; transform: translateY(.35rem); }
.status.is-error { position: static; margin: 0 0 1rem; border-color: var(--copper); }

.hero, .panel, dialog {
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--panel);
  color: var(--ink);
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: .55rem;
}
.hero-copy {
  display: grid;
  align-content: space-between;
  gap: clamp(1.5rem, 3.2vw, 3rem);
  min-height: 24rem;
  padding: clamp(1.55rem, 4.2vw, 3.25rem);
}
.hero-main { align-self: center; }
.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 29rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 54%;
  border-radius: .75rem;
  background: #6c4533;
}
.eyebrow {
  font-size: .73rem;
  font-weight: 720;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-main .eyebrow { color: var(--copper); }
h1, h2, .next-buyer {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.027em;
}
h1 { font-size: clamp(3.4rem, 7.7vw, 6.6rem); overflow-wrap: break-word; }
.hero h1 { margin: .35rem 0 .55rem; }
.hero-detail, .next-detail, .panel p, dialog p { color: var(--muted); }
.next {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .24rem;
  padding: .85rem 1rem .9rem 1.85rem;
  border-radius: .65rem;
  background: var(--pistachio);
  color: var(--pistachio-ink);
}
.next::before {
  content: "";
  position: absolute;
  inset: 1.18rem auto auto .85rem;
  width: .43rem;
  height: .43rem;
  border-radius: 50%;
  background: currentColor;
}
.next-buyer { font-size: clamp(1.9rem, 3.6vw, 2.55rem); }
.next-detail { color: inherit; font-size: .85rem; }

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}
.panel, dialog { padding: clamp(1.15rem, 3vw, 1.85rem); }
h2 { font-size: clamp(1.9rem, 3.1vw, 2.45rem); }
.panel p, dialog p { margin-top: .45rem; }
.section-heading { justify-content: space-between; flex-wrap: wrap; gap: .15rem .75rem; }
.buyers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(7.5rem, 100%), 1fr));
  gap: .55rem;
  margin-top: 1.15rem;
}
.primary, .outline, .danger, .text-button {
  border-radius: .65rem;
  padding: .5rem .85rem;
  font-weight: 650;
  transition: transform 160ms var(--ease-out);
}
.primary, .danger { border: 1px solid transparent; }
.primary { background: var(--espresso); color: var(--espresso-ink); }
.buyers .primary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .35rem;
  min-height: 3.1rem;
  padding-inline: .85rem;
}
.buyers .primary::after {
  content: "";
  flex: 0 0 .7rem;
  height: .7rem;
  background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
              linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
  opacity: .75;
}
.danger { background: var(--danger); color: white; }
.outline { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.outline, .text-button { font-size: .82rem; }
.text-button { border: 1px solid transparent; background: transparent; color: var(--muted); padding-inline: .5rem; }
button:active:not(:disabled, [aria-disabled="true"]) { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .primary:hover:not(:disabled, [aria-disabled="true"]), .danger:hover:not(:disabled, [aria-disabled="true"]) { filter: brightness(1.12); }
  .outline:hover:not(:disabled, [aria-disabled="true"]), .text-button:hover:not(:disabled, [aria-disabled="true"]) { background: var(--paper); }
}

ol { margin: 0; padding: 0; list-style: none; }
ol:not(:empty) { margin-top: .65rem; }
li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
}
.initial {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1;
}
li:first-child .initial { background: var(--pistachio); color: var(--pistachio-ink); border-color: transparent; }
li strong { font-weight: 650; }
li time { display: block; color: var(--muted); font-size: .85rem; }
#more { margin-top: .55rem; }
.access { max-width: 35rem; }
.access h1 { font-size: clamp(2.9rem, 6.5vw, 4.6rem); }
.access form { display: grid; gap: .65rem; margin-top: 1.2rem; }
.access label { font-weight: 650; }
.access input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: .55rem;
  padding: .5rem .7rem;
  background: var(--paper);
  color: var(--ink);
}
.access form button { justify-self: start; }
dialog { width: min(29rem, calc(100% - 2rem)); }
dialog::backdrop { background: #25150db0; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .55rem; margin-top: 1rem; }

@media (max-width: 43rem) {
  .masthead { min-height: 3.9rem; }
  .hero, .columns { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { min-height: auto; gap: 1.1rem; padding: 1rem 1rem 1.15rem; }
  .hero-photo { height: clamp(8rem, 37vw, 13rem); aspect-ratio: auto; }
  .columns { gap: .75rem; margin-top: .75rem; }
}
@media (max-width: 23rem) {
  .page { padding-inline: .85rem; }
  .brand { gap: .45rem; font-size: 1.85rem; }
  .masthead .outline { padding-inline: .55rem; }
  .cup-icon { width: 1.95rem; height: 1.95rem; }
}
@media (prefers-reduced-motion: reduce) {
  button:active:not(:disabled, [aria-disabled="true"]), .status:empty { transform: none; }
  .primary, .outline, .danger, .text-button { transition: none; }
  .status { transition: opacity 180ms var(--ease-out); }
}
