/* Mo's Dough: one page, one stylesheet. The look is docs/DESIGN.md.
   One typeface: the system sans, for headings and body. */

:root {
  --paper: #fbf6ee; /* the printed menu's paper, exactly */
  --card: #ffffff;
  --ink: #1c1512;
  --ink-soft: #5b504a;
  --ink-faint: #77695f;
  --line: #e3d9c8;
  --ember: #b4341f;
  --ember-deep: #9a2c1a;
  --ember-soft: #f7e5df;

  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(44, 32, 24, 0.05);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --page: 40rem;
  --page-wide: 70rem;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(1.0625rem, 1rem + 0.28vw, 1.1875rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ember);
}

h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  margin: 0 0 0.75rem;
  text-align: center;
}

/* The short red rule under each heading, from the printed menu. */
h2::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  margin: 0.85rem auto 0;
  border-radius: 2px;
  background: var(--ember);
}

/* Keeps "Pre-orders" from splitting at its hyphen on a phone. */
.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

main > * {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- top --- */

/* Flame shot above the logo, edge to edge. Outside <main> so the page width
   rule does not apply. Short on phones so "Order here" stays on the first
   screen at 375x812. */
.banner {
  display: block;
  width: 100%;
  height: clamp(150px, 22vw, 340px);
  object-fit: cover;
  object-position: center;
}

.top {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.logo {
  width: min(15rem, 62vw);
  height: auto;
  margin: 0 auto 1.5rem;
}

.button {
  display: inline-block;
  background: var(--ember);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-pill);
}

.button-big {
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem);
  padding: 1rem 3rem;
  min-height: 56px;
  min-width: min(18rem, 100%);
  box-shadow: 0 6px 18px -8px rgba(154, 44, 26, 0.6);
}

.button:hover,
.button:focus-visible {
  background: var(--ember-deep);
}

.button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* --- how it works --- */

main > .how {
  margin-top: 1rem;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: 32rem;
  margin: 1.5rem auto 0;
  text-align: center;
}

.how-block {
  padding: 0;
}

.how-block h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.how-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

.how-block p + p {
  margin-top: 0.75rem;
}

.how-block strong {
  color: var(--ember);
  font-weight: 700;
}

/* --- menu: the old site's pie cards --- */

main > .menu {
  max-width: var(--page-wide);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.menu-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.menu-blurb {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: stretch;
}

/* 2x2 from tablet up, capped so the cards don't balloon on a wide screen. */
@media (min-width: 40rem) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 52rem;
    margin-inline: auto;
  }
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

/* Fixed height, so lazy images have a box before they load. */
.card-photo {
  width: 100%;
  height: clamp(13.5rem, 30vw, 17rem);
  object-fit: cover;
  background: var(--ember-soft);
}

.card-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.card-photo-empty span {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ember-deep);
}

.card-body {
  padding: 0.95rem 1.15rem 1.25rem;
}

.card-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.card-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
}

.card-price {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 1.28rem;
  color: var(--ember);
  font-weight: 700;
}

.card p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.5;
}

/* --- pickup --- */

main > .where {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.where p {
  margin: 0 0 0.75rem;
}

.where a {
  display: inline-block;
  padding: 0.5rem 0;
  min-height: 44px;
}

.where .hours {
  line-height: 1.8;
}

/* Square on a phone, capped at 28rem and centred on a wide screen. Border and
   corners match the pie cards. */
.map {
  display: block;
  width: 100%;
  max-width: 28rem;
  aspect-ratio: 1 / 1;
  margin: 1.25rem auto 0;
  border: 1px solid var(--line); /* replaces the iframe's default border, so no inline border:0 */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--card);
}

/* Secondary to "Order here": outline, a size smaller. The .where prefix
   is needed to beat the `.where a` padding rule above. */
.where .list-cta {
  margin-top: 2rem;
}

.where .button-outline {
  background: transparent;
  color: var(--ember);
  border: 2px solid var(--ember);
  font-size: 1.1rem;
  padding: 0.7rem 2rem;
  min-height: 48px;
}

.where .button-outline:hover,
.where .button-outline:focus-visible {
  background: var(--ember-soft);
  color: var(--ember-deep);
}

/* --- footer --- */

footer {
  margin-top: 3.5rem;
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  font-size: 0.95rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.25rem;
  min-height: 44px;
  color: var(--ink-soft);
}

footer a:hover,
footer a:focus-visible {
  color: var(--ember);
}

footer .icon {
  flex: none;
  color: var(--ember);
}

/* --- 404 --- */

.lede {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  margin: 0 0 1.5rem;
}

.lede + .button {
  padding: 0.85rem 2.2rem;
}
