/* Medina Bakery: one stylesheet for the whole site. */

@font-face {
  font-family: "Fraunces";
  src: url("/files/s-x7k2m9/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fbf3e6;
  --paper: #fffaf2;
  --ink: #3b2417;
  --muted: #76563f;
  --line: #ead9c0;
  --terracotta: #b9512c;
  --terracotta-dark: #8f3a1d;
  --saffron: #e2a43a;
  --olive: #5e6b34;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(59 36 23 / 0.06), 0 10px 28px rgb(59 36 23 / 0.1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--terracotta); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 2.5rem); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 38ch; }
time { display: block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; color: var(--olive); }

/* Header and menu */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgb(255 250 242 / 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--serif); font-weight: 600; font-size: 1.3rem;
  color: var(--ink); text-decoration: none;
}
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500;
  padding: 0.25rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-color: var(--saffron); }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px;
  background: transparent; cursor: pointer;
}
.bars, .bars::before, .bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--ink); position: relative; transition: transform 0.2s, background 0.2s;
}
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Home: hero */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  background:
    radial-gradient(circle at 1px 1px, rgb(185 81 44 / 0.14) 1.2px, transparent 0) 0 0 / 22px 22px,
    var(--cream);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-media { margin: 0; }
.hero-media img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 999px 999px var(--radius) var(--radius);
  border: 6px solid var(--paper);
  box-shadow: var(--shadow);
}
.button {
  display: inline-block; margin-top: 0.75rem;
  background: var(--terracotta); color: #fff; text-decoration: none; font-weight: 600;
  padding: 0.85rem 1.6rem; border-radius: 999px; box-shadow: var(--shadow);
  transition: background 0.2s;
}
.button:hover { background: var(--terracotta-dark); }

/* Home: latest posts */
.latest { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; white-space: nowrap; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card a {
  display: flex; flex-direction: column; height: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
.card time, .card h3, .card p { margin-inline: 1.25rem; }
.card time { margin-top: 1.1rem; margin-bottom: 0.4rem; }
.card p { margin-top: 0; margin-bottom: 1.4rem; color: var(--muted); }

/* Page heads (about, blog) */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.75rem; }
.page-head h1 { margin-bottom: 0.3em; }
.page-head .lead { max-width: 52ch; margin: 0; }

/* Blog list */
.post-list { list-style: none; margin: 0 auto clamp(3rem, 6vw, 5rem); padding: 0; display: grid; gap: 1.25rem; }
.post-row a {
  display: grid; grid-template-columns: 300px 1fr; gap: 1.75rem; align-items: center;
  padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none; transition: border-color 0.2s;
}
.post-row a:hover { border-color: var(--saffron); }
.post-row img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 10px; }
.post-row h2 { font-size: 1.55rem; margin: 0.3rem 0 0.4rem; }
.post-row p { margin: 0 0 0.6rem; color: var(--muted); }
.read-more { font-weight: 600; color: var(--terracotta); }

/* Post */
.post { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); }
.back { margin: 0 0 1.5rem; }
.back a { font-weight: 600; text-decoration: none; }
.post-date { margin-bottom: 0.6rem; }
.post-figure { margin: 1.75rem auto 2.25rem; max-width: 960px; }
.post-figure img { width: 100%; border-radius: var(--radius); }

/* Rich text */
.prose { font-size: 1.125rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--terracotta); }

/* About */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.about-grid figure { margin: 0; }
.about-grid img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* 404 */
.notfound { padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; }
.notfound .lead { margin-inline: auto; }

/* Opening hours band (every page) */
.hours {
  padding: 2.25rem 0;
  color: #fbe9d4;
  background:
    radial-gradient(circle at 12px 12px, rgb(226 164 58 / 0.22) 2px, transparent 0) 0 0 / 24px 24px,
    var(--terracotta-dark);
}
.hours-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.5rem; }
.hours h2 { margin: 0; color: #fff; font-size: 1.6rem; }
.hours-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; font-weight: 500; }
.open-badge {
  margin: 0 0 0 auto; padding: 0.35rem 0.9rem; border-radius: 999px;
  font-size: 0.9rem; font-weight: 700;
  background: #f3dcc4; color: var(--terracotta-dark);
}
.open-badge.is-open { background: #dfe9bd; color: #33401a; }
.open-badge::before {
  content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.45rem;
  border-radius: 50%; background: currentColor; vertical-align: 0.05em;
}
.open-badge[hidden] { display: none; }

/* Footer */
.site-footer { padding: 1.5rem 0; background: var(--ink); color: #d9c3ae; font-size: 0.9rem; }
.site-footer p { margin: 0; }

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .post-row a { grid-template-columns: 220px 1fr; }
}

@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 0.25rem 1.25rem 1rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .hero-inner, .about-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 420px; }
  .cards { grid-template-columns: 1fr; }
  .post-row a { grid-template-columns: 1fr; gap: 1rem; }
  .open-badge { margin-left: 0; }
}
