/* Sabbath Bread Co. — oat / ink / moss / clay / cinnamon */

:root {
  --oat: #EDE8DC;
  --paper: #F5F1E6;
  --ink: #23201B;
  --ink-soft: #6B6353;
  --moss: #5F614B;
  --moss-deep: #4A4C39;
  --clay: #C9BFA9;
  --cinnamon: #96562F;
  --serif: "Marcellus", "Times New Roman", serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--oat);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
  border-radius: 1px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--clay);
}

.masthead-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.masthead-cta {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--moss-deep);
  border: 1px solid var(--moss);
  padding: 0.5rem 1.1rem;
  border-radius: 1px;
  transition: background-color 160ms ease, color 160ms ease;
}

.masthead-cta:hover { background: var(--moss); color: var(--oat); }

/* ---------- brand mark ---------- */

.mark path {
  fill: none;
  stroke: var(--moss);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.mark-small { width: 26px; height: 26px; }
.mark-small path { stroke: var(--ink); }

.mark-hero { width: 72px; height: 72px; margin-bottom: 1.5rem; }

/* ---------- hero ---------- */

.hero {
  max-width: 46rem;
  margin: 0 auto;
  padding: 5.5rem 1.5rem 4.5rem;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 700ms ease both;
  }
  .hero > *:nth-child(2) { animation-delay: 60ms; }
  .hero > *:nth-child(3) { animation-delay: 120ms; }
  .hero > *:nth-child(4) { animation-delay: 180ms; }
  .hero > *:nth-child(5) { animation-delay: 240ms; }
  .hero > *:nth-child(6) { animation-delay: 320ms; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin: 0 0 1.4rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.15rem);
  margin-bottom: 0.5em;
  text-wrap: balance;
}

.hero-sub {
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 auto 2.2rem;
}

.button {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--oat);
  background: var(--moss);
  border: 1px solid var(--moss);
  border-radius: 1px;
  padding: 0.95rem 2rem;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.button:hover { background: var(--moss-deep); border-color: var(--moss-deep); }

.button-wide { width: 100%; }

/* ---------- week strip (signature) ---------- */

.week {
  position: relative;
  margin: 4.5rem auto 0;
  max-width: 34rem;
  padding-bottom: 3.4rem;
}

.week-line {
  position: absolute;
  top: 2.35rem;
  left: 0;
  right: 0;
  border-top: 1px solid var(--clay);
}

.week-days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
}

.week-days li {
  position: relative;
  width: 3.2rem;
  padding-top: 0;
}

.week-letter {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  padding-bottom: 1.1rem;
}

/* tick on every day */
.week-days li::after {
  content: "";
  position: absolute;
  top: 2.05rem;
  left: 50%;
  height: 0.6rem;
  border-left: 1px solid var(--clay);
}

.week-mark .week-letter { color: var(--ink); }

.week-mark::after { border-left-width: 2px; }

.week-close::after { border-color: var(--moss); }
.week-bake::after  { border-color: var(--cinnamon); }

.week-note {
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.week-close .week-note { color: var(--moss-deep); }
.week-bake .week-note  { color: var(--cinnamon); }

/* last day's note: right-align and wrap to two lines so it clears Thursday's */
.week-days li:last-child .week-note {
  left: auto;
  right: 0;
  transform: none;
  white-space: normal;
  width: 5.6rem;
  text-align: right;
  line-height: 1.6;
}

/* ---------- sections ---------- */

.section { border-top: 1px solid var(--clay); }

.section-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section-inner.narrow { max-width: var(--measure); }

.lede {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.aside {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- price list ---------- */

.pricelist {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
}

.pricelist li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.85rem 0;
}

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

.pricelist .item {
  font-family: var(--serif);
  font-size: 1.15rem;
}

.pricelist .leader {
  flex: 1;
  border-bottom: 1px dotted var(--clay);
  transform: translateY(-0.3em);
}

.pricelist .per {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  min-width: 4.6rem;
  text-align: right;
}

.pricelist .price {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  min-width: 2.8rem;
  text-align: right;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.steps h3 { font-size: 1.2rem; margin: 0.9rem 0 0.4rem; }

.steps p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--moss);
  border-radius: 50%;
  font-family: var(--serif);
  color: var(--moss-deep);
}

/* ---------- order form ---------- */

.order { background: var(--paper); }

.order h2 { font-size: 1.9rem; }

.order-note { color: var(--ink-soft); margin: 0 0 2.2rem; }

fieldset.qty {
  border: 0;
  margin: 0 0 1.8rem;
  padding: 0;
}

fieldset.qty legend {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss-deep);
  padding: 0 0 0.8rem;
}

.packs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--clay);
  border-bottom: 1px solid var(--clay);
}

.packs li {
  display: grid;
  grid-template-columns: 1fr auto 3.6rem;
  align-items: center;
  gap: 0.9rem;
  padding: 0.55rem 0.65rem;
  margin: 0;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

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

/* rows that are part of the order read as "on the receipt" */
.packs li.active {
  background: #ECE5D3;
  box-shadow: inset 2px 0 0 var(--moss);
}

.pack-name { font-family: var(--serif); font-size: 1.1rem; }

.pack-price { color: var(--ink-soft); font-size: 0.85rem; margin-left: 0.55rem; }

.pack-total {
  font-family: var(--serif);
  font-size: 1.1rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.step {
  width: 2.6rem;
  height: 2.6rem;
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--clay);
  border-radius: 1px;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.step:hover:not(:disabled) { border-color: var(--moss); background: #E7E5D2; }

.step:active:not(:disabled) { background: var(--moss); border-color: var(--moss); color: var(--oat); }

.step:disabled {
  opacity: 0.3;
  cursor: default;
}

.pack-count {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 2.2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.qty-aside { margin-top: 1rem !important; }

.field { margin-bottom: 1.4rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss-deep);
  margin-bottom: 0.45rem;
}

.field .hint {
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #FDFBF4;
  border: 1px solid var(--clay);
  border-radius: 1px;
  padding: 0.7rem 0.85rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--moss);
  box-shadow: inset 0 0 0 1px var(--moss);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--ink);
  margin: 2rem 0 1.4rem;
  padding-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.order-total output {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
}

.form-status { min-height: 1.4em; margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--cinnamon); }

.confirm {
  text-align: center;
  padding: 3rem 0 1rem;
}

.confirm .mark-small { width: 40px; height: 40px; }

.confirm h2 { margin-top: 1rem; }

.confirm p { color: var(--ink-soft); }

/* ---------- footer ---------- */

.footer { border-top: 1px solid var(--clay); }

.footer-inner { padding: 2.8rem 1.5rem 3.2rem; text-align: center; }

.footer p { margin: 0.3rem 0; font-size: 0.9rem; color: var(--ink-soft); }

.footer-brand {
  font-family: var(--serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink) !important;
}

.footer-legal { font-size: 0.78rem !important; margin-top: 1.2rem !important; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .hero { padding-top: 3.5rem; }
  .section-inner { padding: 3rem 1.25rem; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .packs li { grid-template-columns: 1fr auto 3rem; gap: 0.5rem; }
  .pack-info { display: flex; flex-direction: column; }
  .pack-price { margin-left: 0; }
  .week { margin-top: 3.5rem; }
  .week-days li { width: 2.2rem; }
  .week-note { font-size: 0.58rem; }
  .pricelist .per { display: none; }
}
