/* Cherriesberg Coffee site styles. The site's original colours, with faint contour lines of the
   Kenyan highlands behind the home page photo section. */

/* ==========================================================================
   Brand settings: every colour and font on the site comes from this block.
   Change a value here and it changes everywhere.
   ========================================================================== */
:root {
  /* Brand palette: the site's original colours */
  --cream: #fbeddf;       /* header band, tinted panels */
  --sand: #f2cfac;        /* soft accent: thin rules, numbers on red */
  --cherry: #802422;      /* buttons, red bands, cup score seals */
  --roast: #412815;       /* text, footer */
  --leaf: #25442b;        /* small labels */
  --white: #ffffff;       /* page and cards */
  --line: #d9bfa4;        /* card and field borders */

  /* Roles: which palette colour each part of the page uses */
  --page: var(--white);
  --header: var(--cream);
  --band: var(--roast);          /* footer */
  --surface: var(--white);       /* cards, form fields, pop-ups */
  --surface-tint: var(--cream);  /* alternate sections, image placeholders */
  --text: var(--roast);
  --label: var(--leaf);
  --accent: var(--cherry);
  --accent-text: var(--cherry);  /* red text */
  --on-accent: var(--white);     /* text on red and on the footer */
  --rule: var(--sand);
  --border: var(--line);
  --shadow: 65, 40, 21;          /* roast as RGB, for shadows */
  --texture: linear-gradient(transparent, transparent);   /* nothing over image placeholders */
  --contour: var(--header);      /* contour lines behind the home page photo section: the header cream */
  --contour-strength: 1;         /* how visible the contour lines are, 0 to 1 */

  /* Fonts */
  --font-display: "Cormorant SC", "Cormorant", Georgia, serif;     /* wordmark, headings */
  --font-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif; /* running text, buttons */

  /* Shape and layout */
  --radius: 14px;           /* cards and panels */
  --radius-control: 999px;  /* buttons */
  --page-max: none;        /* content runs to the same edges as the header */
  --page-top: 56px;        /* space between the header and the first line of each page */
  --gutter: clamp(16px, 3.75vw, 54px);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* Keep the footer at the bottom of the window on short pages, so no white shows below it */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--label);
  outline-offset: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  background: var(--header);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  min-height: 104px;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(24px, 6vw, 87px);
}

.site-header__logo img {
  width: 118px;
  height: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(24px, 4.2vw, 60px);
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-text);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 659px;
  overflow: hidden;
}

/* Contour lines behind the home page photo section, coloured from the settings through a mask */
.hero--contours::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--contour);
  -webkit-mask: url("assets/contours.svg") center / cover no-repeat;
  mask: url("assets/contours.svg") center / cover no-repeat;
  opacity: var(--contour-strength);
  pointer-events: none;
}

.hero__image {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 38%;
  background: url("assets/hero-cherries.jpg") right 60% / cover no-repeat;
  /* The mockup fades the photo into white on its left edge */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
  mask-image: linear-gradient(to right, transparent, #000 35%);
}

.hero__content {
  position: relative;
  max-width: calc(495px + 2 * var(--gutter));
  padding: var(--page-top) var(--gutter) 120px;
  display: flex;
  flex-direction: column;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.14em;
  color: var(--label);
}

/* A short contour-like rule after the label */
.hero__eyebrow::after {
  content: "";
  flex: 0 0 48px;
  height: 1px;
  background: var(--label);
  opacity: 0.6;
}

.hero__title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 4.3vw, 62px);
  line-height: 1.02;
  color: var(--text);
  text-wrap: balance;
}

.hero__intro {
  margin: 0 0 30px;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.9;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: var(--on-accent);
  transition: filter 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  filter: brightness(0.92);
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
}

.button--secondary {
  background: transparent;
  border-color: var(--label);
  color: var(--text);
}

.button--secondary:hover {
  filter: none;
  background: var(--text);
  color: var(--page);
}

/* ---------- Info banner ---------- */

.info-banner {
  background: var(--accent);
  color: var(--on-accent);
}

.info-banner__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 36px var(--gutter) 38px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 362px));
  justify-content: space-evenly;
  gap: 32px;
}

.info-banner__item {
  min-width: 0;
  text-align: center;
}

.info-banner__item h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.1;
}

.info-banner__item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

/* ---------- Contact page ---------- */

.contact__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--page-top) var(--gutter) 88px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas:
    "intro form"
    "details form";
  align-items: start;
  gap: 40px clamp(32px, 6vw, 96px);
}

.contact__intro {
  grid-area: intro;
  min-width: 0;
}

.contact__title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 4.3vw, 62px);
  line-height: 1.02;
  color: var(--text);
}

.contact__lead {
  margin: 0;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.contact__details {
  grid-area: details;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.contact__details dl {
  margin: 0;
  display: grid;
  gap: 18px;
}

.contact__details dt {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--label);
}

.contact__details dd {
  margin: 4px 0 0;
  font-size: 17px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.contact__details dd a {
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

.contact__note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--accent-text);
}

.contact__form {
  grid-area: form;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.required {
  color: var(--accent-text);
}

.contact__required-note {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.field textarea {
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.field--check input:focus-visible {
  outline: 2px solid var(--label);
  outline-offset: 1px;
  border-color: var(--label);
}

.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.field--check input {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 2px 0 0;
  flex: none;
  background: var(--surface) center / 12px 12px no-repeat;
  border: 1.5px solid var(--text);
  border-radius: 3px;
  cursor: pointer;
}

.field--check input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  /* White tick */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.field--check label {
  font-weight: 400;
  line-height: 1.45;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.contact__actions .button {
  border: 0;
  cursor: pointer;
}

.contact__status {
  margin: 0;
  flex: 1 1 240px;
  font-size: 14px;
  color: var(--accent-text);
}

/* ---------- About page ---------- */

.hero--about {
  min-height: 540px;
}

.hero--about .hero__image {
  background-position: 20% center;
}

.hero--about .hero__intro {
  font-size: 16px;
  line-height: 1.5;
}

.section-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.08;
  color: var(--text);
  text-wrap: balance;
}

.section-title--light {
  color: var(--on-accent);
}

.about-section--tint {
  background: var(--surface-tint);
}

.about-section__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 72px var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px clamp(32px, 6vw, 96px);
  align-items: start;
}

.about-section__inner--single {
  grid-template-columns: minmax(0, 1fr);
}

.about-section__text {
  min-width: 0;
  max-width: 66ch;
}

.about-section__text p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}

.about-section__text p:last-child {
  margin-bottom: 0;
}

.about-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: var(--text);
}

.about-panel__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  color: var(--label);
}

.about-panel p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.grades {
  margin: 20px 0;
  display: grid;
  gap: 16px;
}

.grades div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.grades dt {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--accent-text);
}

.grades dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.about-panel__note {
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--accent-text);
}

.journey {
  /* Red band: text and numbers switch to light colours */
  --text: var(--on-accent);
  --label: var(--sand);
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--text);
}

.journey__inner {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 64px var(--gutter);
}

.journey__steps {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px;
}

.journey__steps li {
  counter-increment: step;
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.journey__steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--label);
}

.journey__steps h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
}

.journey__steps p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.journey__note {
  margin: 40px 0 0;
  max-width: 66ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--label);
}

.commitments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 64px);
}

.commitments div {
  min-width: 0;
}

.commitments h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--label);
}

.commitments p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.cta-strip {
  position: relative;
  background: var(--surface-tint);
}

.cta-strip__inner {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 56px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}

.cta-strip .section-title {
  margin: 0;
  flex: 1 1 420px;
  max-width: 24ch;
}

/* ---------- Coffees page ---------- */

.coffees__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--page-top) var(--gutter) 88px;
}

.coffees__intro {
  max-width: 720px;
  margin-bottom: 48px;
}

.coffees__example-note {
  display: inline-block;
  margin: 20px 0 0;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-tint);
  font-size: 14px;
  color: var(--label);
}

.lots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.lot {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.lot__image {
  aspect-ratio: 5 / 2;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--texture), var(--surface-tint);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.lot__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 32px 32px;
}

.lot__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.lot__head > div:first-child {
  min-width: 0;
}

.lot__badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 10px;
  font-size: 11px;
  border: 1px solid var(--label);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
}

.lot__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 2.8vw, 40px);
  line-height: 1.05;
  color: var(--text);
}

.lot__meta {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--label);
  font-variant-numeric: tabular-nums;
}

.lot__score {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

.lot__score-value {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lot__score-label {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lot__notes {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  font-style: italic;
}

.lot__groups {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
}

.lot__group {
  min-width: 0;
}

.lot__group h4 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rule);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  color: var(--label);
}

.lot__group dl {
  margin: 0;
  display: grid;
  gap: 4px;
}

.lot__group dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.lot__group dt {
  color: var(--text);
  opacity: 0.75;
}

.lot__group dd {
  margin: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.lot__price {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 23px;
  color: var(--text);
}

.lot__actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lot__actions .button {
  width: auto;
  flex: 1 1 160px;
  height: 56px;
  padding-inline: 20px;
}

/* ---------- Quote list: header icon and hover panel ---------- */

.quote-nav {
  position: relative;
  margin-left: auto;
}

.quote-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  font-family: var(--font-display);
  font-size: 19px;
  text-decoration: none;
  color: var(--text);
}

.quote-nav__link:hover,
.quote-nav__link[aria-current="page"] {
  color: var(--accent-text);
}

.quote-nav__icon {
  display: block;
  flex: none;
}

.quote-nav__count {
  position: absolute;
  top: 0;
  left: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  color: var(--on-accent);
  font-variant-numeric: tabular-nums;
}

.quote-nav__count[hidden] {
  display: none;
}

.quote-nav__panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 300px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(var(--shadow), 0.14);
}

/* Bridges the gap so the panel stays open while the pointer moves onto it. */
.quote-nav__panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

@media (hover: hover) {
  .quote-nav:hover .quote-nav__panel,
  .quote-nav:focus-within .quote-nav__panel {
    display: block;
  }
}

.quote-panel__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  color: var(--label);
}

.quote-panel__empty {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.quote-panel__items {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quote-panel__items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--rule);
  font-size: 14px;
  color: var(--text);
}

.quote-panel__items li span:last-child {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.button.quote-panel__cta {
  width: 100%;
  height: 48px;
  font-size: 15px;
}

.button--outline {
  background: transparent;
  border: 1px solid var(--label);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
}

.button--outline:hover {
  filter: none;
  background: rgba(181, 185, 143, 0.12);
}

.button--outline[aria-pressed="true"] {
  background: var(--surface-tint);
}

/* ---------- Draft-only view switch ---------- */

.draft-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 28px;
  padding: 12px 16px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
}

.draft-toggle button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  color: var(--text);
  cursor: pointer;
}

.draft-toggle button[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--on-accent);
}

.draft-toggle button:focus-visible {
  outline: 2px solid var(--label);
  outline-offset: 2px;
}

/* ---------- Lot tiles ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.tile {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Keyboard focus highlights too, but a mouse click doesn't leave the tile stuck highlighted. */
.tile:hover,
.tile:has(:focus-visible) {
  transform: translateY(-3px);
  border-color: var(--label);
  box-shadow: 0 10px 28px rgba(var(--shadow), 0.14);
}

.tile__image {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--texture), var(--surface-tint);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.tile__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 2px 9px;
  font-size: 10px;
  background: var(--surface);
  border: 1px solid var(--label);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
}

.tile__body {
  padding: 18px 20px 20px;
}

.tile__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.05;
}

.tile__link {
  color: var(--text);
  text-decoration: none;
}

/* The whole tile opens the lot. */
.tile__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.tile__link:focus-visible {
  outline: none;
}

.tile:has(.tile__link:focus-visible) {
  outline: 2px solid var(--label);
  outline-offset: 3px;
}

/* Cup score seal, overlapping the image edge so it reads first. */
.tile__seal {
  position: absolute;
  bottom: -30px;
  right: 16px;
  z-index: 1;
  margin: 0;
  width: 60px;
  height: 60px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 0 0 4px var(--surface), 0 6px 16px rgba(var(--shadow), 0.28);
}

.tile__seal::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(248, 243, 233, 0.55);
  border-radius: 50%;
}

.tile__seal-value {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tile__seal-label {
  margin-top: 2px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile__name {
  padding-right: 64px;
}

.tile__tier {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--label);
}

.tile__hint {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--accent-text);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.tile:hover .tile__hint,
.tile:has(:focus-visible) .tile__hint {
  opacity: 1;
  transform: none;
}

/* Touch screens have no hover, so the hint always shows. */
@media (hover: none) {
  .tile__hint {
    opacity: 1;
    transform: none;
  }
}

.lot__full-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--accent-text);
  text-underline-offset: 3px;
}

.tile__score {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text);
}

.tile__score span {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.tile__add {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  line-height: 1;
  color: var(--on-accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(var(--shadow), 0.2);
}

.tile__add[aria-pressed="true"] {
  background: var(--label);
}

.tile__add svg {
  display: block;
}

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

/* ---------- Lot pop-up and lot page ---------- */

.lot-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  overflow: auto;
}

.lot-dialog::backdrop {
  background: rgba(var(--shadow), 0.45);
}

.lot-dialog__close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 3;
  width: 40px;
  height: 40px;
  margin: 12px 12px -52px 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  font-size: 26px;
  line-height: 40px;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(var(--shadow), 0.2);
}

.lot-dialog__close:focus-visible {
  outline: 2px solid var(--label);
  outline-offset: 2px;
}

.lot--dialog {
  border: 0;
  border-radius: 0;
}

.lot-page {
  max-width: 900px;
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.3;
  color: var(--text);
  text-underline-offset: 3px;
}

.lot__actions .button.lot__add {
  flex-basis: 100%;
}

/* ---------- Quote list page ---------- */

.ql-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.ql-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 130px auto auto;
  align-items: center;
  gap: 16px 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.ql-item__image {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--texture), var(--surface-tint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

.ql-item__info {
  min-width: 0;
}

.ql-item__info h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
}

.ql-item__info h2 a {
  color: var(--text);
  text-decoration: none;
}

.ql-item__info h2 a:hover {
  color: var(--accent-text);
}

.ql-item__info p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text);
}

.ql-item__bags {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ql-item__bags label,
.ql-item__wants legend {
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.ql-item__bags input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
}

.ql-item__wants {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ql-item__wants label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.ql-item__wants input,
.ql-item__bags input:focus-visible {
  accent-color: var(--accent);
}

.ql-item__wants input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  background: var(--surface) center / 12px 12px no-repeat;
  border: 1.5px solid var(--text);
  border-radius: 3px;
  cursor: pointer;
}

.ql-item__wants input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ql-item__bags input:focus-visible,
.ql-item__wants input:focus-visible,
.ql-item__remove:focus-visible {
  outline: 2px solid var(--label);
  outline-offset: 1px;
}

.ql-item__remove {
  padding: 8px 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ql-footer {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.ql-summary {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.button.ql-send {
  width: auto;
  padding-inline: 40px;
}

.ql-empty {
  padding: 48px 24px;
  border: 2px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.ql-empty p {
  margin: 0 0 20px;
  font-size: 17px;
  color: var(--text);
}

.ql-empty .button {
  width: auto;
  padding-inline: 32px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--band);
  color: var(--on-accent);
}

.site-footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 32px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--on-accent);
  text-underline-offset: 3px;
}

.site-footer a:focus-visible {
  outline-color: var(--rule);
}

/* ---------- Privacy notice ---------- */

.legal__inner {
  max-width: calc(760px + 2 * var(--gutter));
  margin: 0;
  padding: var(--page-top) var(--gutter) 80px;
}

.legal__updated {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text);
}

.legal section {
  margin-top: 40px;
}

.legal .section-title {
  font-size: clamp(22px, 2vw, 28px);
}

.legal section p,
.legal li {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.legal section p {
  margin: 0 0 12px;
}

.legal ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal li + li {
  margin-top: 6px;
}

.legal a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

/* ---------- Desktop fit ----------
   Keep the hero within one screen on laptops. */

main {
  flex: 1 0 auto;
}

/* On the home page the photo grows instead, so the bands stay together at the bottom */
@media (min-width: 901px) {
  main:has(> .hero:not(.hero--about)) {
    display: flex;
    flex-direction: column;
  }

  main > .hero:not(.hero--about) {
    flex: 1 0 auto;
  }

  .hero:not(.hero--about) {
    min-height: clamp(520px, calc(100vh - 104px), 659px);
  }
}

@media (min-width: 901px) and (max-height: 900px) {
  :root {
    --page-top: 36px;
  }

  .hero__content {
    padding-bottom: 48px;
  }

  .hero__eyebrow {
    margin-bottom: 24px;
  }

  .hero__title {
    margin-bottom: 24px;
  }
}

/* ---------- Phone menu button (hidden on larger screens) ---------- */

.nav-toggle {
  display: none;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  :root {
    --page-top: 40px;
  }

  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column-reverse;
  }

  .hero__image {
    position: relative;
    left: 0;
    height: 320px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
  }

  .hero__content {
    max-width: calc(560px + 2 * var(--gutter));
    padding-bottom: 32px;
  }

  .contact__inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "details"
      "form";
    padding-block: var(--page-top) 56px;
  }

  .about-section__inner {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 48px;
  }

  .journey__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .commitments {
    grid-template-columns: minmax(0, 1fr);
  }

  .lots {
    grid-template-columns: minmax(0, 1fr);
  }

  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ql-item {
    grid-template-columns: 72px minmax(0, 1fr) 120px;
  }

  .ql-item__wants {
    grid-column: 2 / 3;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 16px;
  }

  .ql-item__wants legend {
    width: 100%;
  }

  .ql-item__remove {
    justify-self: end;
  }

  .info-banner__inner {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
    padding-block: 40px;
  }
}

@media (max-width: 600px) {
  .site-header__inner {
    min-height: 0;
    padding-block: 12px 16px;
    padding-inline: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-header__logo img {
    width: 120px;
  }

  .site-nav a {
    font-size: 16px;
  }

  .hero__content {
    padding-inline: 16px;
  }

  .contact__inner {
    padding-inline: 16px;
  }

  .about-section__inner,
  .journey__inner,
  .cta-strip__inner {
    padding-inline: 16px;
  }

  .coffees__inner {
    padding-inline: 16px;
    padding-block: var(--page-top) 56px;
  }

  .lot__body {
    padding: 24px 20px;
  }

  .lot__groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-header__inner {
    position: relative;
  }

  .quote-nav {
    position: absolute;
    top: 12px;
    right: 16px;
  }

  .quote-nav__label {
    display: none;
  }

  .tile__name {
    font-size: 20px;
  }

  .tile__body {
    padding: 14px 14px 16px;
  }

  .tile__seal {
    bottom: -24px;
    right: 10px;
    width: 50px;
    height: 50px;
  }

  .tile__seal-value {
    font-size: 17px;
  }

  .tile__seal-label {
    font-size: 6px;
  }

  .tile__name {
    padding-right: 0;
    margin-top: 16px;
  }

  .ql-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .ql-item__bags,
  .ql-item__wants {
    grid-column: 1 / -1;
  }

  .ql-item__remove {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .button.ql-send {
    width: 100%;
  }

  .journey__steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-panel {
    padding: 24px 20px;
  }

  .contact__form {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact__details {
    padding: 24px 20px;
  }

  .hero__eyebrow {
    margin-bottom: 20px;
  }

  .hero__title {
    margin-bottom: 24px;
  }

  .hero__actions {
    margin-left: 0;
    gap: 16px;
  }

  .button {
    width: auto;
    min-width: 0;
    flex: 1 1 140px;
    height: 56px;
    padding: 0 16px;
  }
}

/* ---------- Phone layout ----------
   Comes after the other small-screen rules so these win. Sized for phones up to
   the iPhone 15 Pro Max (430px wide). Larger screens are unchanged. */

@media (max-width: 600px) {
  /* Slim header: ☰ left, logo centred, quote list right. */
  .site-header {
    position: relative;
    z-index: 30;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0;
    min-height: 76px;
    padding-block: 8px 16px;
  }

  .nav-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: -10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }

  .nav-toggle:focus-visible {
    outline: 2px solid var(--label);
    outline-offset: 2px;
  }

  .nav-toggle__bars {
    position: relative;
    display: block;
    width: 22px;
    height: 16px;
  }

  .nav-toggle__bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-toggle__bars span:nth-child(1) { top: 0; }
  .nav-toggle__bars span:nth-child(2) { top: 7px; }
  .nav-toggle__bars span:nth-child(3) { top: 14px; }

  /* The bars turn into a cross while the menu is open. */
  .is-open .nav-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .is-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  .is-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-header__logo {
    grid-column: 2;
    grid-row: 1;
  }

  .site-header__logo img {
    width: 88px;
  }

  .quote-nav {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    position: static;
    margin-left: 0;
  }

  /* The menu drops down over the page, so nothing underneath moves. */
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(var(--shadow), 0.18);
  }

  .is-open .site-nav {
    display: block;
    animation: menu-down 0.18s ease-out;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 4px 16px 12px;
  }

  .site-nav li + li {
    border-top: 1px solid var(--border);
  }

  .site-nav a {
    display: block;
    padding: 14px 0;
    font-size: 18px;
  }

  .site-nav a[aria-current="page"] {
    color: var(--accent-text);
  }

  /* Coffee lots: two per row, scaled down to fit. */
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .tile {
    border-radius: var(--radius);
  }

  .tile__image {
    aspect-ratio: 1 / 1;
    font-size: 10px;
    text-align: center;
  }

  .tile__badge {
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    font-size: 9px;
  }

  .tile__add {
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
  }

  .tile__seal {
    bottom: -21px;
    right: 8px;
    width: 42px;
    height: 42px;
    box-shadow: 0 0 0 3px var(--surface), 0 4px 12px rgba(var(--shadow), 0.28);
  }

  .tile__seal::after {
    inset: 2px;
  }

  .tile__seal-value {
    font-size: 14px;
  }

  .tile__seal-label {
    margin-top: 1px;
    font-size: 5px;
  }

  .tile__body {
    padding: 10px 10px 12px;
  }

  .tile__name {
    margin-top: 14px;
    font-size: 20px;
  }

  .tile__tier {
    margin-top: 4px;
    font-size: 10px;
  }

  .tile__hint {
    margin-top: 8px;
    font-size: 12px;
  }
}

@keyframes menu-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .tile {
    transition: none;
  }

  .tile:hover,
  .tile:has(:focus-visible) {
    transform: none;
  }

  .tile__hint {
    transition: none;
  }

  .is-open .site-nav {
    animation: none;
  }
}
