/* ============================================================
   Fielding's Bakehouse, Storefront Digital portfolio example
   Print-inspired: warm flour neutrals, Fraunces with Karla. Menu with
   dot leaders, torn-edge card, receipt panel, taped guestbook notes.
   ============================================================ */

:root {
  --paper: oklch(96% 0.012 75);
  --paper-2: oklch(93% 0.016 70);
  --ink: oklch(24% 0.02 45);
  --ink-dim: oklch(24% 0.02 45 / 0.66);
  --ink-faint: oklch(24% 0.02 45 / 0.4);
  --line: oklch(24% 0.02 45 / 0.16);
  --accent: oklch(40% 0.13 25);
  --accent-soft: oklch(40% 0.13 25 / 0.1);
  --hero-veil: oklch(24% 0.02 45 / 0.38);

  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 40px; }

h1, h2, h3, .display { font-family: 'Fraunces', Georgia, serif; font-style: normal; }
h1 { overflow-wrap: anywhere; min-width: 0; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 3px;
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.25s var(--ease-out), background 0.25s var(--ease-out);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--accent); transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.body-copy { color: var(--ink-dim); font-size: 15.5px; max-width: 46ch; margin-bottom: 14px; }
.body-copy:last-child { margin-bottom: 0; }

/* ---------- Demo notice ---------- */
.demo-notice {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: 12.5px;
  padding: 9px 16px;
}
.demo-notice a { text-decoration: underline; margin-left: 6px; }
.demo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  margin-right: 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: 1px;
}

/* ---------- Masthead ----------
   Double-decked, static letterhead. Not sticky, not blurred glass,
   deliberately different from the floating pill / brutal slab
   navs used on the other two demos. */
.masthead { border-bottom: 2px solid var(--ink); }
.masthead-top {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 26px 40px 18px;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.wordmark span { color: var(--accent); }
.nav-toggle { color: var(--ink); }
.masthead-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 12px 40px;
  flex-wrap: wrap;
}
.masthead-links a { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-dim); }
.masthead-links a:hover { color: var(--accent); }
.btn-order {
  border: 1.5px solid var(--ink);
  padding: 7px 16px;
  border-radius: 3px;
  color: var(--ink) !important;
}
.btn-order:hover { background: var(--ink); color: var(--paper) !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(22rem, 58vw, 34rem);
  padding: var(--space-2xl) 0 var(--space-3xl);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  filter: blur(3px);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--hero-veil);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-copy {
  max-width: 36rem;
  min-width: 0;
  background: var(--paper);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  border: 1px solid var(--line);
}
.hero h1 { font-size: 44px; font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 20px; }
.hero .lead { font-size: 17px; color: var(--ink-dim); max-width: 44ch; margin-bottom: 30px; }
.hero .btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Menu ---------- */
.section-head { max-width: 560px; margin: 0 auto var(--space-2xl); text-align: center; }
.section-head h2 { font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.section-head p { color: var(--ink-dim); font-size: 15px; }

.menu-section { padding: var(--space-3xl) 0; background: var(--paper-2); }
.menu-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
}
.menu-col h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.menu-row { display: flex; align-items: baseline; margin-bottom: 12px; font-size: 14.5px; }
.menu-row .item { white-space: nowrap; }
.menu-row .spacer { flex: 1; border-bottom: 1px dotted var(--ink-faint); margin: 0 6px 4px; }
.menu-row .price { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Story ----------
   Torn-edge card via a zigzag clip-path, not a stock photo or an
   illustration library. */
.story { padding: var(--space-3xl) 0; }
.story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-2xl);
  align-items: center;
}
.story-card {
  background: var(--ink);
  color: var(--paper);
  padding: 46px 40px 54px;
  clip-path: polygon(
    0% 2%, 5% 0%, 10% 2%, 15% 0%, 20% 2%, 25% 0%, 30% 2%, 35% 0%, 40% 2%, 45% 0%,
    50% 2%, 55% 0%, 60% 2%, 65% 0%, 70% 2%, 75% 0%, 80% 2%, 85% 0%, 90% 2%, 95% 0%, 100% 2%,
    100% 100%, 0% 100%
  );
}
.story-card .pull { font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 22px; line-height: 1.4; margin-bottom: 18px; }
.story-card .story-cite { font-size: 13px; letter-spacing: 0.04em; color: oklch(96% 0.012 75 / 0.6); }
.story-copy h2 { font-size: 28px; font-weight: 700; margin-bottom: 16px; }

/* ---------- Guestbook ----------
   Taped index-card notes, gently rotated, in place of a tabbed
   testimonial carousel or a single block quote. */
.guestbook { padding: var(--space-3xl) 0; background: var(--paper-2); }
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xl);
  padding-top: 6px;
}
.note {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 26px 24px;
  position: relative;
  box-shadow: 0 10px 22px oklch(24% 0.02 45 / 0.06);
}
.note::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 46px;
  height: 18px;
  background: oklch(40% 0.13 25 / 0.16);
}
.note.n1 { transform: rotate(-1.5deg); }
.note.n2 { transform: rotate(1deg); }
.note.n3 { transform: rotate(-0.75deg); }
.note p { font-size: 14.5px; color: var(--ink-dim); margin-bottom: 14px; }
.note-by { font-size: 13px; font-weight: 600; }

/* ---------- Visit ---------- */
.visit { padding: var(--space-3xl) 0; }
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}
.visit h2 { font-size: 28px; font-weight: 700; margin-bottom: 14px; }
.visit .btn { margin-top: 20px; }

.receipt {
  background: var(--paper-2);
  padding: 30px 28px;
  border: 1px dashed var(--ink-faint);
  position: relative;
}
.receipt::before {
  content: '';
  position: absolute;
  top: -6px; left: 0; right: 0;
  height: 6px;
  background-image: radial-gradient(circle, var(--paper) 3px, transparent 3.5px);
  background-size: 16px 12px;
  background-position: 0 0;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--ink-faint);
  font-size: 14px;
}
.receipt-row:last-child { border-bottom: none; }
.receipt-row span:first-child { color: var(--ink-faint); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; font-size: 11.5px; }
.receipt-row span:last-child { text-align: right; font-weight: 600; }

/* ---------- Footer ----------
   Restrained single centered column, distinct from the other two
   demos' link-grid and dense-colophon footers. */
footer { padding: var(--space-2xl) 0 var(--space-xl); text-align: center; border-top: 2px solid var(--ink); }
.foot-word { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.foot-tag { font-size: 13px; color: var(--ink-dim); margin-bottom: 22px; }
.foot-bottom {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-faint);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.foot-bottom a { font-weight: 600; color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .wrap { padding: 0 24px; }
  .hero h1 { font-size: 33px; }
  .menu-cols { grid-template-columns: 1fr; gap: var(--space-xl); }
  .story-grid { grid-template-columns: 1fr; }
  .story-card { order: 2; }
  .notes { grid-template-columns: 1fr; }
  .note.n1, .note.n2, .note.n3 { transform: none; }
  .visit-grid { grid-template-columns: 1fr; }
  .masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
  }
  .masthead-top {
    align-items: center;
    padding-block: 22px;
    padding-inline: 28px;
    column-gap: 1rem;
  }
  button.nav-toggle,
  summary.nav-toggle { display: flex; }
  .masthead-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 24px 24px;
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .masthead:has(.nav-menu[open]) .masthead-links { display: flex; }
  .masthead-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .btn-order {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
    min-height: 44px;
    box-sizing: border-box;
    background: var(--ink);
    color: var(--paper) !important;
    border-color: var(--ink);
    padding: 13px 24px;
    font-size: 14.5px;
    font-weight: 600;
  }
  .btn-order:hover {
    background: var(--accent);
    color: var(--paper) !important;
    border-color: var(--accent);
  }
}


/* --- Accessibility baseline (Web Interface Guidelines) --- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-200%);
}
.skip-link:focus { outline: none; }
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
[id] {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Safe-area gutters on sticky chrome; contain scroll chaining in drawers/overlays */
.nav, .nav-min, .masthead, .bar {
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
.nav-drawer {
  overscroll-behavior: contain;
}

/* --- Web Interface Guidelines extras --- */
a, button, summary, input, select, textarea, label, [role="button"], [role="tab"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}
h1, h2, h3 { text-wrap: pretty; }
