/* Hearth & Honey: the demo bakery's styles. Plain CSS, no build step.

   Laid out for phones first; wider screens add columns (see the
   @media blocks near the end). Sizes use rem (relative to the browser's
   text size) so the page grows with a visitor's font setting. */

:root {
  --cream: #fbf7f0;
  --paper: #fff;
  --ink: #2b2118;
  --muted: #6b5d50;
  --line: #eadfce;
  --crust: #b4532a;       /* the main colour: buttons, links, prices */
  --crust-dark: #8f3f1f;
  --honey: #e9b44c;
  --honey-soft: #f8ead0;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--crust-dark); }
a:hover { color: var(--crust); }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }

/* The content column: centred, with room at the sides on phones. */
.wrap { width: min(72rem, 100% - 2rem); margin-inline: auto; }

/* A link to jump past the menu, shown only when reached with the keyboard. */
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--paper); padding: .5rem 1rem; }

/* The "this is a demo" bar on top of every page, with a white button
   into the admin so prospects can find it. */
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem .9rem;
  padding: .45rem 1rem;
  background: var(--ink);
  color: var(--honey-soft);
  font-size: .85rem;
  text-align: center;
}
.demo-bar p { margin: 0; }

/* The announcement at the top of the homepage: a block the bakery edits
   in the control panel, shown only while it is switched on. */
.announcement {
  margin: 0;
  padding: .6rem 1rem;
  background: var(--honey-soft);
  color: var(--ink);
  font-weight: 500;
  text-align: center;
}
.demo-admin {
  padding: .25rem .8rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.demo-admin:hover { background: var(--honey-soft); color: var(--ink); }

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

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .5rem;
  padding-block: .75rem;
}
.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font: 600 1.15rem/1 var(--serif);
  color: var(--ink);
  text-decoration: none;
}
.brand em, .footer-brand em { color: var(--crust); font-style: italic; }
.logo { width: 2rem; height: 2rem; flex: none; }

/* On phones the menu takes its own full-width row under the name. */
.main-nav { order: 3; flex-basis: 100%; }
.main-nav ul, .lang, .site-footer ul { list-style: none; margin: 0; padding: 0; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: .1rem; }
.main-nav a {
  display: block;
  padding: .4rem .5rem;
  font-size: .95rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.main-nav a:hover { background: var(--honey-soft); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

.lang { display: flex; gap: .25rem; margin-left: auto; }
.lang a, .lang span {
  display: block;
  padding: .3rem .55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.lang span { background: var(--honey-soft); color: var(--ink); border-color: var(--honey); }

/* ---- Shared pieces --------------------------------------------------- */

.eyebrow {
  margin-bottom: .6rem;
  color: var(--crust);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.note { color: var(--muted); font-size: .9rem; }
.section-title { margin-bottom: 1.25rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.button {
  display: inline-block;
  padding: .75rem 1.3rem;
  border: 2px solid var(--crust);
  border-radius: 999px;
  background: var(--crust);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--crust-dark); border-color: var(--crust-dark); color: #fff; }
.button.ghost { background: transparent; color: var(--crust-dark); }
.button.ghost:hover { background: var(--honey-soft); color: var(--crust-dark); }
/* A smaller button with an icon, for the contact page's Find us card. A
   long email address may wrap rather than run out of the card. */
.button.small {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  max-width: 100%;
  padding: .45rem 1rem;
  border-width: 1.5px;
  font-size: .92rem;
}
.button.small span { overflow-wrap: anywhere; }
.button.small .ci { width: 1rem; height: 1rem; margin-top: 0; color: currentColor; }

/* A row of cards: one column on phones, more on wider screens. */
.cards { display: grid; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.card, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: .8rem;
  border-radius: 50%;
  background: var(--honey-soft);
  color: var(--crust);
  font-size: 1.3rem;
}
.price { color: var(--crust); font-weight: 700; white-space: nowrap; }

.band { background: var(--honey-soft); padding-block: 3rem; }
.band .card { border-color: transparent; }

.page-head { padding-block: 2.5rem 1.5rem; }

/* ---- Home ------------------------------------------------------------ */

.hero { padding-block: 2.5rem 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-art { position: relative; max-width: 17rem; margin-inline: auto; width: 100%; }
.hero-art svg { display: block; width: 100%; height: auto; }
.badge {
  position: absolute;
  right: 0;
  bottom: 8%;
  margin: 0;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 6px 20px rgb(43 33 24 / .12);
  font-weight: 600;
  font-size: .9rem;
}

.oven { padding-block: 3rem; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.more { font-weight: 600; text-decoration: none; margin-bottom: 1.25rem; }
.dish { display: flex; flex-direction: column; }
.dish p:not(.price) { color: var(--muted); }
.dish .price { margin-top: auto; font-size: 1.1rem; }

.quote { background: var(--ink); color: var(--cream); padding-block: 3rem; }
.quote figure { margin-block: 0; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  font: italic 500 clamp(1.3rem, 4vw, 1.9rem)/1.35 var(--serif);
  max-width: 44rem;
}
.quote blockquote p::before { content: "“"; color: var(--honey); }
.quote blockquote p::after { content: "”"; color: var(--honey); }
.quote figcaption { color: var(--honey); font-weight: 600; }

.visit { display: grid; gap: 1.5rem; padding-block: 3rem; }
/* The address, phone and email, each on its own line with an icon. The
   links show an underline only on hover, so the block reads as a list
   rather than a row of links. */
.address { display: grid; gap: .6rem; font-style: normal; margin-bottom: 1.25rem; }
.contact-line { display: flex; align-items: flex-start; gap: .65rem; margin: 0; text-decoration: none; color: inherit; }
a.contact-line:hover span { text-decoration: underline; }
.contact-line a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.contact-line a:hover { text-decoration: underline; }
/* The address links to the map but keeps the colour of the text around
   it, in the footer too. */
.address a.plain, .address a.plain:hover { color: inherit; }
.ci { width: 1.15rem; height: 1.15rem; flex: none; margin-top: .2rem; color: var(--crust); }
.lines { display: block; }
.lines > span { display: block; }

/* Opening hours: a thin solid line between rows (the menu keeps its
   dashed lines; here they looked busy). */
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: .45rem 0; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { font-weight: 500; padding-inline-end: 1rem; }
.hours td { text-align: end; white-space: nowrap; }
.hours .closed { color: var(--muted); }

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

.story { display: grid; gap: 1.5rem; padding-bottom: 3rem; }
.prose { font-size: 1.05rem; max-width: 40rem; }
.facts dl { margin: 0; display: grid; gap: 1rem; }
.facts dt { font: 600 2rem/1 var(--serif); color: var(--crust); }
.facts dd { margin: .2rem 0 0; color: var(--muted); }

.team { padding-block: 3rem; }
.person { display: flex; gap: 1rem; align-items: center; }
.person h3 { margin-bottom: .1rem; }
.person p { margin: 0; color: var(--muted); }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--crust);
  color: #fff;
  font: 600 1.4rem/1 var(--serif);
}
.avatar.alt { background: var(--honey); color: var(--ink); }
.avatar.third { background: var(--ink); color: var(--honey); }

/* ---- Menu ------------------------------------------------------------ */

.jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.jump a {
  padding: .35rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  text-decoration: none;
  font-size: .9rem;
}
.menu-grid { display: grid; gap: 1.25rem; }
.menu-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  scroll-margin-top: 1rem;
}
.menu-section h2 { margin-bottom: .1em; }
.menu-section ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.item { padding-block: .8rem; border-top: 1px dashed var(--line); }
.item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.item h3 { font-size: 1.1rem; margin: 0; }
.item p { margin: .2rem 0 0; color: var(--muted); font-size: .95rem; }
.allergens-note { padding-block: 1.5rem 3rem; color: var(--muted); }

/* Allergen icons: a small coloured disc per allergen. The icon set itself
   is drawn once per page and hidden. */
.icon-set { position: absolute; width: 0; height: 0; overflow: hidden; }
.item-name { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; }
.allergens { display: inline-flex; gap: .25rem; }
.allergen {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
}
.allergen svg { width: .95rem; height: .95rem; }
.al-gluten { background: #fbecc8; color: #a8700f; }
.al-milk { background: #e3edf8; color: #2f5f96; }
.al-egg { background: #fde6d6; color: #c0602c; }
.al-nuts { background: #efe4d8; color: #6b4a2b; }

/* The tip: shown on hover, and on keyboard focus or a tap. It is anchored
   to the whole item, not the icon, so it never runs off a phone screen. */
.item { position: relative; }
.allergens .allergen { cursor: help; }
.allergens .allergen::after {
  content: attr(data-tip);
  display: none;
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: calc(100% - .4rem);
  max-width: 100%;
  width: max-content;
  padding: .4rem .65rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.35;
}
.allergens .allergen:hover::after,
.allergens .allergen:focus-visible::after,
.allergens .allergen:focus::after { display: block; }

.legend { margin-top: 1.5rem; }
.legend h2 { font: 700 .8rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.legend ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.legend li { display: inline-flex; align-items: center; gap: .4rem; font-size: .95rem; }

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

.contact-grid { display: grid; gap: 1.25rem; padding-bottom: 3rem; }
.details { margin: 0 0 1rem; display: grid; gap: .9rem; }
.details dt { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.details dd .button { margin-top: .3rem; }
.panel.accent { background: var(--honey-soft); border-color: var(--honey); }

/* ---- Error pages ----------------------------------------------------- */

.error-page { padding-block: 4rem; text-align: center; }

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

.site-footer { background: #241b14; color: #d9cbb8; padding-top: 3rem; font-size: .95rem; }
.site-footer a { color: #f3d79b; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
/* Small gold headings in capitals, so each column's title stands apart
   from its text. */
.site-footer h2 {
  font: 700 .78rem/1.2 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 1rem;
}
.footer-brand { color: #fff; font-size: 1.35rem; margin-bottom: .9rem; }
.footer-about p { max-width: 22rem; }
/* The pages: one row of links under the blurb, set off by a faint line. */
.footer-pages { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid #3a2e24; max-width: 22rem; }
.footer-pages ul { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.footer-pages a { font-weight: 600; }
.footer-grid { display: grid; gap: 2.25rem; padding-bottom: 2.5rem; }
.site-footer .ci { color: var(--honey); }
.site-footer .address { margin: 0; justify-items: start; }
/* In the footer the phone and email are small outlined buttons; their
   icons stay outside, in line with the address's icon above. */
.site-footer .address p.contact-line { align-items: center; }
.site-footer .address p.contact-line .ci { margin-top: 0; }
.site-footer .contact-line a {
  display: inline-block;
  padding: .3rem .95rem;
  border: 1.5px solid #6b5640;
  border-radius: 999px;
  color: #f3d79b;
  font-weight: 600;
  font-size: .9rem;
}
.site-footer .contact-line a:hover { border-color: var(--honey); background: #3a2e24; color: #fff; text-decoration: none; }
/* In the footer the hours have a faint line between rows, just enough to
   follow a day across to its times. */
.site-footer .hours th, .site-footer .hours td { border-color: #3a2e24; padding-block: .4rem; }
.site-footer .hours th { font-weight: 400; }
.site-footer .hours td { color: #fff; }
.site-footer .hours .closed, .site-footer .hours .closed td { color: #a8998a; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid #4a3b2e;
  font-size: .85rem;
  color: #a8998a;
}
.footer-base p { margin: 0; }

/* ---- Wider screens --------------------------------------------------- */

/* Tablets and up: the menu moves next to the name, cards sit side by side. */
@media (min-width: 48rem) {
  .brand { font-size: 1.3rem; }
  .logo { width: 2.2rem; height: 2.2rem; }
  .main-nav a { font-size: 1rem; padding-inline: .75rem; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; }
  .hero-art { max-width: 20rem; }
  .main-nav { order: 0; flex-basis: auto; margin-left: auto; }
  .lang { margin-left: .5rem; }
  .cards.three { grid-template-columns: repeat(3, 1fr); }
  .team .cards.three { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid .accent { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .visit { grid-template-columns: 1fr 1fr; align-items: start; }
  .page-head { padding-block: 3.5rem 2rem; }
}

/* Laptops and up: the homepage picture sits beside the headline. */
@media (min-width: 64rem) {
  .hero { padding-block: 4rem 5rem; }
  .hero-grid { grid-template-columns: 1.2fr 1fr; }
  .hero-art { max-width: 26rem; }
  .story { grid-template-columns: 2fr 1fr; align-items: start; }
  .contact-grid { grid-template-columns: 1fr 1fr 1fr; }
  .contact-grid .accent { grid-column: auto; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 3rem; }
  .footer-about { grid-column: auto; }
}
