/* styles.css — Sunrise Bakery, lesson 6: Flexbox and responsive design.
   Mobile first: the base styles are for small screens, and the media query
   at the bottom adds the wide-screen layout. */

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #2b2118;
  background-color: #fffaf2;
}

h1,
h2,
h3 {
  line-height: 1.2;
  color: #8a3b12;
}

/* ---------- Header: a flex container ---------- */
.site-header {
  display: flex;
  flex-direction: column;   /* stacked on phones */
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background-color: #fff4e0;
  border-bottom: 3px solid #f2a83c;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #8a3b12;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.site-nav a {
  padding: 6px 14px;
  color: #8a3b12;
  text-decoration: none;
  border-radius: 999px;
}

.site-nav a:hover {
  background-color: #f2a83c;
  color: #2b2118;
}

/* ---------- Page content ---------- */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  padding: 32px 0;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  margin: 0 0 12px;
}

/* ---------- Menu: cards that wrap onto new lines ---------- */
.menu-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.menu-grid .card {
  flex: 1 1 100%;           /* one card per row on phones */
}

.card {
  margin-bottom: 24px;
  padding: 20px 24px;
  background-color: #ffffff;
  border: 1px solid #f1dfc4;
  border-radius: 12px;
}

.menu-grid .card {
  margin-bottom: 0;
}

footer {
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: #6b5a4a;
}

/* ---------- Wider screens: 700px and up ---------- */
@media (min-width: 700px) {
  .site-header {
    flex-direction: row;          /* logo left, nav right */
    justify-content: space-between;
  }

  .hero h1 {
    font-size: 44px;
  }

  .menu-grid .card {
    flex: 1 1 calc(33.333% - 16px);   /* three cards in a row */
  }
}
