/* ==========================================================================
   Golden Crumb Bakery — warm cream/butter, wheat-brown, burnt-orange
   Type: Bitter (display serif) + Nunito Sans (rounded humanist body)
   ========================================================================== */

:root {
  --cream: #faf3e3;
  --butter: #f5e3bd;
  --butter-deep: #efd49a;
  --wheat: #8a5a2b;
  --wheat-dark: #5d3a17;
  --rust: #b85c1e;
  --rust-deep: #8f4413;
  --ink: #3d2a16;
  --paperbag: #d9bf94;
  --radius: 14px;
  --font-display: "Bitter", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  /* faint flour-dust texture */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(184, 92, 30, 0.05) 0, transparent 28%),
    radial-gradient(circle at 85% 65%, rgba(138, 90, 43, 0.05) 0, transparent 30%);
}

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--wheat-dark);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 100;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

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

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

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

.site-header {
  background: var(--cream);
  border-bottom: 3px dashed var(--paperbag);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { transform: rotate(-4deg); }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.brand-name em {
  font-style: italic;
  font-weight: 400;
  color: var(--rust);
}

.nav-toggle {
  display: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  background: var(--butter);
  color: var(--ink);
  border: 2px solid var(--wheat);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  align-items: center;
  gap: 0.5rem;
}

.nav-toggle-bar {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

/* Dropdown ornaments exist only for the mobile JS dropdown; hidden everywhere else.
   Desktop and no-JS visitors see a plain inline .nav-list — .is-open has no effect here. */
.nav-wheat,
.nav-scallop { display: none; }

.nav-list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-list a {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  color: var(--wheat-dark);
  font-weight: 700;
  border-radius: 999px;
}

.nav-list a:hover {
  background: var(--butter);
  color: var(--rust-deep);
}

/* ---------- Hero ---------- */

.hero {
  max-width: 70rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rust);
  transform: rotate(-1.2deg);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  color: var(--wheat-dark);
}

.hero-lede {
  font-size: 1.15rem;
  max-width: 34em;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--rust);
  color: #fff8ec;
  box-shadow: 0 3px 0 var(--rust-deep);
}

.btn-primary:hover { background: var(--rust-deep); }

.btn-ghost {
  border-color: var(--wheat);
  color: var(--wheat-dark);
}

.btn-ghost:hover { background: var(--butter); }

.hero-fact {
  font-size: 0.95rem;
  color: var(--wheat);
  font-weight: 600;
  border-top: 2px dashed var(--paperbag);
  padding-top: 1rem;
  max-width: 36em;
}

.hero-loaf { justify-self: center; transform: rotate(2deg); }

.hero-loaf svg { max-width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero-loaf svg {
    animation: loaf-rise 700ms ease-out both;
  }
  @keyframes loaf-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Scalloped dividers ---------- */

.divider { line-height: 0; }
.divider svg { display: block; width: 100%; height: 48px; }

.divider-cream-to-butter { background: var(--cream); color: var(--butter); }
.divider-butter-to-cream { background: var(--butter); color: var(--cream); }
.divider-cream-to-rust { background: var(--cream); color: var(--rust); }
.divider-rust-to-cream { background: var(--rust); color: var(--cream); }

/* ---------- Sections ---------- */

.section { padding: 3.5rem 0 4.5rem; }

.section-butter { background: var(--butter); }

.section-rust {
  background: linear-gradient(160deg, var(--rust) 0%, var(--rust-deep) 100%);
  color: #fbeed8;
}

.section-rust .section-title { color: #fff4dd; }
.section-rust a { color: #ffe2b0; }
.section-rust strong { color: #fff; }

.section-inner {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--wheat-dark);
  margin: 0 0 0.75rem;
  display: inline-block;
}

/* the "hand-placed" off-grid tilt */
.tilt-left { transform: rotate(-1deg); }
.tilt-right { transform: rotate(0.8deg); }

.section-lede {
  max-width: 44em;
  margin: 0 0 2rem;
  font-size: 1.1rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

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

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.menu-card {
  background: var(--cream);
  border: 2px solid var(--paperbag);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 4px 5px 0 rgba(138, 90, 43, 0.18);
}

.menu-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 1rem;
  color: var(--rust-deep);
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.price-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--paperbag);
}

.price-list li:last-child { border-bottom: 0; }

.item-name { font-weight: 700; }

.item-name small {
  display: block;
  font-weight: 400;
  color: var(--wheat);
  font-size: 0.85rem;
}

.dots {
  flex: 1;
  border-bottom: 2px dotted var(--paperbag);
  transform: translateY(-4px);
  min-width: 1.5rem;
}

.price {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--rust);
  font-size: 1.1rem;
  white-space: nowrap;
}

.card-note {
  margin: 1rem 0 0;
  font-size: 0.92rem;
  color: var(--wheat);
  font-style: italic;
}

/* ---------- Bread schedule ---------- */

.schedule-list {
  list-style: none;
  counter-reset: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: 46rem;
}

.schedule-day {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  grid-template-areas:
    "day loaf"
    "day desc";
  gap: 0.1rem 1.25rem;
  background: var(--butter);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  border-left: 6px solid var(--rust);
}

.schedule-day:nth-child(odd) { transform: rotate(-0.4deg); }
.schedule-day:nth-child(even) { transform: rotate(0.4deg); margin-left: 1.5rem; }

.day-name {
  grid-area: day;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--rust-deep);
  align-self: center;
}

.day-loaf {
  grid-area: loaf;
  font-weight: 800;
}

.day-desc {
  grid-area: desc;
  font-size: 0.95rem;
  color: var(--wheat-dark);
}

.schedule-note {
  margin-top: 2rem;
  font-weight: 600;
  max-width: 40em;
}

/* ---------- Facts / about ---------- */

.fact-list {
  padding-left: 1.2rem;
  margin: 1rem 0 0;
}

.fact-list li { margin-bottom: 0.6rem; }

.about-inner { max-width: 50rem; }

.wheat-flourish {
  color: var(--rust);
  display: block;
  margin-bottom: 0.5rem;
  transform: rotate(8deg);
}

.about-copy p { max-width: 42em; }

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 46rem;
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  background: var(--cream);
  border: 2px solid var(--paperbag);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 1rem 1.4rem;
  color: var(--wheat-dark);
  list-style-position: inside;
}

.faq-item summary:hover { background: rgba(232, 160, 76, 0.15); }

.faq-item[open] summary {
  border-bottom: 1px dashed var(--paperbag);
  color: var(--rust-deep);
}

.faq-item p {
  padding: 0.85rem 1.4rem 1.1rem;
  margin: 0;
}

/* ---------- Visit / hours ---------- */

.visit-subhead {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--rust-deep);
  margin: 1.75rem 0 0.5rem;
}

.visit-subhead:first-of-type { margin-top: 1rem; }

.visit-address {
  font-style: normal;
  line-height: 1.8;
  font-weight: 600;
}

.hours-table {
  border-collapse: collapse;
  min-width: 16rem;
}

.hours-table th,
.hours-table td {
  text-align: left;
  padding: 0.45rem 1.25rem 0.45rem 0;
  border-bottom: 1px dashed var(--paperbag);
}

.hours-table th { font-weight: 800; color: var(--wheat-dark); }

.hours-footnote {
  font-size: 0.9rem;
  color: var(--wheat);
  margin-top: 0.75rem;
  max-width: 30em;
}

a { color: var(--rust-deep); }

a:hover { color: var(--rust); }

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

.site-footer {
  background: var(--wheat-dark);
  color: var(--butter);
  padding: 2.75rem 1.25rem 2.25rem;
  text-align: center;
}

.footer-inner { max-width: 44rem; margin: 0 auto; }

.site-footer .wheat { color: var(--butter-deep); margin-bottom: 0.5rem; }

.site-footer a { color: #ffd9a3; }

.site-footer p { margin: 0.4rem 0; }

.footer-fine {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* ---------- Responsive ---------- */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }

  .hero-loaf { order: -1; }
  .hero-loaf svg { width: 220px; height: auto; }

  .menu-grid,
  .two-col { grid-template-columns: 1fr; gap: 2rem; }

  .schedule-day {
    grid-template-columns: 1fr;
    grid-template-areas: "day" "loaf" "desc";
  }

  .schedule-day:nth-child(even) { margin-left: 0; }

  /* progressive enhancement: toggle only appears once JS adds .js to <html> */
  .js .nav-toggle { display: inline-flex; margin-left: auto; }

  /* Dropdown panel: slides down from under the sticky header, scalloped
     bottom edge, warm butter background. Closed = visibility:hidden so the
     links are unfocusable and unclickable; CSS alone owns show/hide. */
  .js .nav-panel {
    position: absolute;
    top: calc(100% + 3px); /* clear the header's dashed border */
    left: 0;
    right: 0;
    background: var(--butter);
    visibility: hidden;
    opacity: 0;
  }

  .js .nav-panel.is-open {
    visibility: visible;
    opacity: 1;
  }

  .js .nav-panel .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 1.25rem 0;
  }

  .js .nav-panel .nav-list li { border-bottom: 1px dashed var(--paperbag); }
  .js .nav-panel .nav-list li:last-child { border-bottom: 0; }

  .js .nav-panel .nav-list a {
    display: block;
    padding: 0.7rem 0.8rem;
  }

  /* wheat ornament dividing the links from the scalloped hem */
  .js .nav-wheat {
    display: block;
    margin: 0.25rem auto 0.6rem;
    color: var(--rust);
    transform: rotate(8deg);
  }

  /* scalloped hem hangs just below the panel, colored to match it */
  .js .nav-scallop {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 22px;
    color: var(--butter);
  }

  /* burger morphs into a ✕ while the dropdown is open */
  .js .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }

  .js .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
    top: 0;
    transform: rotate(45deg);
  }

  .js .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .header-inner nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }
}

/* ---------- Mobile dropdown motion (skipped under reduced motion) ---------- */

@media (max-width: 800px) and (prefers-reduced-motion: no-preference) {
  .js .nav-panel {
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear 220ms;
  }

  .js .nav-panel.is-open {
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease, visibility 0s linear;
  }

  /* links rise + fade in with a gentle stagger */
  .js .nav-panel .nav-list li {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .js .nav-panel.is-open .nav-list li {
    opacity: 1;
    transform: none;
  }

  .js .nav-panel.is-open .nav-list li:nth-child(2) { transition-delay: 40ms; }
  .js .nav-panel.is-open .nav-list li:nth-child(3) { transition-delay: 80ms; }
  .js .nav-panel.is-open .nav-list li:nth-child(4) { transition-delay: 120ms; }
  .js .nav-panel.is-open .nav-list li:nth-child(5) { transition-delay: 160ms; }
  .js .nav-panel.is-open .nav-list li:nth-child(6) { transition-delay: 200ms; }

  /* burger ⇄ ✕ morph */
  .js .nav-toggle-bar { transition: background-color 160ms ease; }

  .js .nav-toggle-bar::before,
  .js .nav-toggle-bar::after {
    transition: top 180ms ease, transform 180ms ease;
  }
}

/* Social links (fictional .example profiles) */
.social-links { display: flex; gap: 1.2rem; list-style: none; justify-content: center; padding: 0 1.5rem; margin: 1.5rem auto 0; }
.social-links a { display: inline-flex; color: inherit; opacity: 0.85; }
.social-links a:hover, .social-links a:focus-visible { opacity: 1; }
.social-links svg { width: 1.3rem; height: 1.3rem; }


/* Anchor targets clear the sticky header instead of sliding under it */
[id] {
  scroll-margin-top: 136px;
}

/* Flour-stamp shortcut to the bread schedule (bottom-left, near thumb) */
.fab-stamp {
  position: fixed;
  left: 1rem;
  bottom: 1.1rem;
  z-index: 65;
  display: none;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: #fdf6e9;
  border: 2px dashed #b78b54;
  box-shadow: 0 6px 14px rgba(107, 74, 43, 0.25);
  color: #6b4a2b;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  transform: rotate(-4deg);
}

@media (max-width: 720px) {
  .fab-stamp { display: inline-flex; }
}
