/* Page chrome: container, header with the 72-hour readout and route rail,
   buttons, stage marks, footer. */

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-field);
  background: var(--paramo);
  color: var(--fog);
}

.skip-link:focus { top: 12px; }

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgb(231 234 227 / 0.84);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  backdrop-filter: saturate(1.3) blur(16px);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 40px);
  max-width: var(--max);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wordmark {
  flex: none;
  font: 500 1.875rem / 1 var(--font-serif);
  letter-spacing: -0.035em;
  color: var(--paramo);
  text-decoration: none;
}

.readout {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.readout__h {
  min-width: 2ch;
  font: 700 2.125rem / 1 var(--font-cond);
  color: var(--freedom);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.readout__unit {
  margin-right: 10px;
  font: 500 1.25rem / 1 var(--font-cond);
  color: var(--freedom);
}

.readout__stage {
  overflow: hidden;
  font-size: var(--text-sm);
  color: var(--moss);
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

.readout__stage.is-changing { opacity: 0; }

.readout__temp {
  flex: none;
  margin-left: 6px;
  padding: 3px 9px 2px;
  border-radius: var(--radius-pill);
  background: var(--ice);
  color: var(--ice-ink);
  font: 500 1.0625rem / 1.1 var(--font-cond);
  font-variant-numeric: tabular-nums;
}

.site-nav { display: flex; gap: clamp(16px, 2vw, 28px); }

.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover { text-decoration: underline; }

/* Language switcher */

.lang { position: relative; flex: none; }

.lang__current {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--fog-3);
  border-radius: var(--radius-pill);
  font: 600 var(--text-sm) / 1 var(--font-sans);
  list-style: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.lang__current::-webkit-details-marker { display: none; }

.lang__current:hover { border-color: var(--moss); }

.lang__current::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.lang[open] .lang__current::after { transform: translateY(1px) rotate(-135deg); }

.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: 0 12px 32px rgb(22 37 30 / 0.18);
}

.lang__menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-field);
  font-size: var(--text-sm);
  text-decoration: none;
}

.lang__menu a:hover { background: var(--fog); }

.lang__menu a[aria-current="page"] { font-weight: 600; color: var(--freedom); }

/* Route rail: the bottom edge of the header is the trip from farm to warehouse */

/* The gap under the rail keeps the red fill readable over the red order section. */
.rail { position: relative; height: var(--rail-h); margin-bottom: var(--rail-gap); }

.rail__track {
  position: absolute;
  inset: 0 var(--gutter);
  background: var(--fog-3);
}

.rail__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--freedom);
  transition: width 0.7s var(--ease-out);
}

.rail__tick {
  position: absolute;
  top: 50%;
  left: calc(var(--at) * 1%);
  width: 11px;
  height: 11px;
  border: 2px solid var(--fog-3);
  border-radius: 50%;
  background: var(--fog);
  transform: translate(-50%, -50%);
  transition: background-color 0.3s, border-color 0.3s;
}

.rail__tick.is-passed { border-color: var(--freedom); background: var(--freedom); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font: 600 1rem / 1.1 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary { background: var(--freedom); color: var(--white); }
.btn--primary:hover { background: var(--freedom-deep); }
.btn--primary:disabled { opacity: 0.7; cursor: progress; }

.btn--ghost { border-color: currentColor; background: transparent; }
.btn--ghost:hover { background: rgb(255 255 255 / 0.14); }

.btn--light { background: var(--fog); color: var(--paramo); }
.btn--light:hover { background: var(--white); }

.btn--small { flex: none; min-height: 40px; padding: 0 18px; font-size: var(--text-sm); }

.btn__short { display: none; }

/* Stage marks: the hour of the trip each section stands for */

.stage {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 6px;
  margin: 0 0 clamp(20px, 2.4vw, 32px);
}

.stage__h {
  font: 700 var(--text-stage) / 0.78 var(--font-cond);
  color: var(--freedom);
}

.stage__unit {
  margin-right: 14px;
  font: 500 clamp(1.25rem, 1rem + 0.8vw, 1.75rem) / 1 var(--font-cond);
  color: var(--freedom);
}

.stage__name { font-size: var(--text-sm); font-weight: 500; color: var(--moss); }

.stage--on-ice .stage__name { color: var(--ice-ink); }

.stage--on-dark .stage__h,
.stage--on-dark .stage__unit { color: var(--petal); }

.stage--on-dark .stage__name { color: rgb(231 234 227 / 0.8); }

/* Footer */

.site-footer {
  overflow: hidden;
  padding: clamp(56px, 7vw, 104px) 0 32px;
  background: var(--paramo);
  color: var(--fog);
}

/* Sized so the wordmark spans the container width (word width ≈ 1.54em). */
.site-footer__mark {
  margin: 0 0 clamp(24px, 3vw, 48px) -0.05em;
  font: 400 min(calc((100vw - 2 * var(--gutter)) / 1.54), 50rem) / 0.78 var(--font-serif);
  letter-spacing: -0.05em;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 20px;
  border-top: 1px solid rgb(231 234 227 / 0.18);
  font-size: var(--text-sm);
  color: rgb(231 234 227 / 0.72);
}

.site-footer__row p { margin: 0; }
.site-footer__row a { color: var(--fog); }

@media (max-width: 1080px) {
  .site-nav { display: none; }
}

@media (max-width: 640px) {
  .wordmark { font-size: 1.625rem; }
  .readout__stage { display: none; }
  .readout__h { font-size: 1.875rem; }
  .btn__long { display: none; }
  .btn__short { display: inline; }
}
