/* ============================================================
   Madpakken — full landing page
   Palette refined to match the supplied logo (mustard + caramel
   on pale cream) with a rust accent sampled from the packaging
   label. Still confirm exact HEX from the original logo file.
   ============================================================ */

:root {
  --cream: #f6f7e3;        /* logo background */
  --cream-deep: #e9e8cf;
  --mustard: #e8b22e;      /* awning light stripe */
  --caramel: #9a6513;      /* awning dark stripe + wordmark */
  --espresso: #4a3016;     /* readable dark text */
  --rust: #b5531f;         /* packaging-label accent */
  --white: #ffffff;

  --ink: var(--espresso);
  --bg: var(--cream);

  --maxw: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --radius: 20px;

  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.55s;

  /* Type pairing: rounded display face for headlines, clean Inter for everything else */
  --font-display: "M PLUS Rounded 1c", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  font-family: var(--font-body);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ---------- Lenis smooth-scroll hooks (required for Lenis to drive scrolling) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  background: var(--bg);
  color: var(--ink);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
a { color: inherit; }
img { max-width: 100%; display: block; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--espresso); color: var(--cream);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

.section { padding-block: clamp(3.5rem, 9vh, 7rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.5rem;
  border-radius: 999px; font-weight: 700; text-decoration: none;
  font-family: var(--font-display);
  transition: transform 0.25s var(--ease-soft), box-shadow 0.25s var(--ease-soft), background-color 0.25s;
}
.btn:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }
.btn-primary { background: var(--espresso); color: var(--cream); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(74, 48, 22, 0.3); }
.btn-secondary { background: var(--white); color: var(--espresso); border: 2px solid var(--caramel); }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(154, 101, 19, 0.25); }
.btn-ghost { background: transparent; color: var(--rust); font-weight: 700; }
.btn-ghost:hover { color: var(--espresso); }

/* Dotted "ticket" frame sitting outside the button with a gap */
.btn-dotted {
  outline: 2px dotted color-mix(in srgb, var(--cream) 70%, transparent);
  outline-offset: 6px;
}
.btn-dotted:focus-visible { outline: 3px solid var(--caramel); outline-offset: 6px; }

.inline-link { color: var(--rust); font-weight: 700; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }
.inline-link:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; border-radius: 4px; }

.section-head { max-width: 50ch; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem);
  line-height: 1.08; font-weight: 800; letter-spacing: -0.015em;
  margin: 0 0 0.75rem; color: var(--espresso);
}
.section-intro { margin: 0; color: color-mix(in srgb, var(--espresso) 82%, var(--cream)); }

/* ---------- Awning motif ---------- */
/* Scalloped awning matching the logo: alternating stripes, each ending
   in a rounded (semicircle) tab. --scallop sets one stripe's width. */
.awning {
  --scallop: 30px;
  display: block; height: var(--scallop);
  transform-origin: top center;
  /* colour: alternating caramel / mustard, one scallop per stripe */
  background: repeating-linear-gradient(
    90deg,
    var(--caramel) 0 var(--scallop),
    var(--mustard) var(--scallop) calc(var(--scallop) * 2)
  );
  /* shape: carve a rounded tab at the bottom of each scallop via a mask */
  -webkit-mask: radial-gradient(
    circle at 50% 0,
    #000 calc(var(--scallop) * 0.5), transparent calc(var(--scallop) * 0.5 + 0.5px)
  ) 0 0 / var(--scallop) 100% repeat-x;
  mask: radial-gradient(
    circle at 50% 0,
    #000 calc(var(--scallop) * 0.5), transparent calc(var(--scallop) * 0.5 + 0.5px)
  ) 0 0 / var(--scallop) 100% repeat-x;
}
.awning-footer { --scallop: 24px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--caramel) 18%, transparent);
  transition: padding 0.3s var(--ease-soft);
}
/* Scalloped awning strip across the full top of the header */
.header-awning {
  --scallop: 22px;
  position: absolute; top: 0; left: 0; right: 0; width: 100%;
  height: 12px; z-index: 1;
  transform-origin: top center;
  transition: opacity 0.3s var(--ease-soft), transform 0.3s var(--ease-soft);
}
/* Hide the awning once the header condenses on scroll */
.site-header.is-condensed .header-awning { opacity: 0; transform: scaleY(0); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; padding-block: 1.1rem; padding-top: 1.7rem; }
.site-header.is-condensed .header-inner { padding-block: 0.55rem; padding-top: 0.55rem; }

.wordmark {
  display: inline-flex; align-items: center; text-decoration: none;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.9rem; line-height: 1; letter-spacing: -0.01em;
  color: var(--caramel);
  transition: font-size 0.3s var(--ease-soft);
}
.site-header.is-condensed .wordmark { font-size: 1.6rem; }

.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; color: var(--espresso); }
.nav a:hover { color: var(--rust); }
.nav a:focus-visible { outline: 2px solid var(--caramel); outline-offset: 3px; border-radius: 4px; }

.header-visit { display: flex; align-items: center; gap: 0.9rem; font-weight: 700; }
.header-call { text-decoration: none; color: var(--espresso); white-space: nowrap; }
.header-call:hover { color: var(--rust); }

.status {
  font-size: 0.82rem; padding: 0.3rem 0.7rem; border-radius: 999px;
  background: color-mix(in srgb, var(--mustard) 30%, var(--white));
  color: var(--espresso); white-space: nowrap; font-weight: 700;
}
.status.is-open { background: #cfe6c6; color: #33501f; }
.status.is-closed { background: color-mix(in srgb, var(--caramel) 18%, var(--white)); }

@media (max-width: 760px) {
  .nav { display: none; }
  .header-visit { margin-left: auto; }
}
@media (max-width: 420px) {
  .header-call { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; min-height: min(92vh, 860px);
  display: flex; align-items: center;
  padding-block: clamp(3rem, 8vh, 6rem); overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-photo {
  position: absolute; inset: -8% 0; width: 100%; height: 116%;
  object-fit: cover; object-position: center 60%;
}
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(60,38,18,0.78) 0%, rgba(60,38,18,0.5) 45%, rgba(60,38,18,0.12) 100%);
}
@media (max-width: 860px) {
  .hero-scrim { background: linear-gradient(180deg, rgba(60,38,18,0.35) 0%, rgba(60,38,18,0.82) 72%); }
}

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.25fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center; width: 100%;
}
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }

.hero-copy { color: var(--cream); }
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 4.3rem); line-height: 1.03;
  font-weight: 800; letter-spacing: -0.02em; margin: 0 0 1rem;
  text-shadow: 0 2px 20px rgba(40,24,10,0.3);
}
.hero-headline span { display: block; }
.hero-body {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  max-width: 34ch; margin: 0 0 1.75rem;
  color: color-mix(in srgb, var(--cream) 94%, var(--white));
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ============================================================
   Products
   ============================================================ */
/* Let the short products heading sit on one line on larger screens */
.products .section-head { max-width: none; }
@media (min-width: 620px) { .products .section-title { white-space: nowrap; } }

/* One shared panel holding all four items; each item reads as a distinct
   thing via its own rounded image + label sitting on the panel surface. */
.product-panel {
  background: var(--white);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  outline: 2px dotted color-mix(in srgb, var(--caramel) 45%, transparent);
  outline-offset: 10px;
}
.product-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.2vw, 1.5rem);
}
@media (max-width: 960px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 3vw, 1.75rem); } }
@media (max-width: 520px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  background: transparent; border: 0; box-shadow: none; overflow: visible;
}
.product-photo {
  aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(74, 48, 22, 0.14);
  transition: transform 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease-soft); }
.product-card:hover .product-photo { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(74, 48, 22, 0.22); }
.product-card:hover .product-photo img { transform: scale(1.05); }
.product-info { padding: 0.95rem 0.25rem 0.25rem; }
.product-info h3 { margin: 0 0 0.35rem; font-size: 1.1rem; color: var(--espresso); line-height: 1.2; font-family: var(--font-display); font-weight: 700; }
.product-info p { margin: 0; font-size: 0.95rem; color: color-mix(in srgb, var(--espresso) 78%, var(--cream)); }

.products-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem; margin-top: clamp(2rem, 5vw, 3rem); }

/* ============================================================
   Story
   ============================================================ */
.story { background: var(--cream-deep); }
.story-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.75rem, 5vw, 4rem); align-items: center;
}
@media (max-width: 820px) { .story-grid { grid-template-columns: 1fr; } }
.story-media img { width: 100%; height: auto; display: block; }
.story-copy p { max-width: 52ch; }
.story-cta { margin-top: clamp(1.5rem, 4vw, 2rem); }

/* ============================================================
   Reviews
   ============================================================ */
.reviews {
  position: relative; overflow: hidden; color: var(--cream);
  /* espresso tint layered over the buns photo (webp falls back to jpg) */
  background:
    linear-gradient(rgba(42, 26, 11, 0.82), rgba(42, 26, 11, 0.86)),
    image-set(url("assets/img/buns.webp") type("image/webp"), url("assets/img/buns.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center;
}
.reviews.section { padding-block: clamp(6rem, 18vh, 12rem); }
/* Flour dusting at the left & right edges, each about half off-screen */
.reviews::before,
.reviews::after {
  content: ""; position: absolute;
  width: min(42vw, 420px); aspect-ratio: 681 / 286;
  background: image-set(url("assets/img/flour.webp") type("image/webp"), url("assets/img/flour.png") type("image/png")) center / contain no-repeat;
  pointer-events: none; opacity: 0.6; z-index: 0;
}
.reviews::before { top: 0;    left: 0;  transform: translate(-37%, -37%); }
.reviews::after  { bottom: 0; right: 0; transform: translate(37%, 37%) scaleX(-1); }
/* keep the quote above the texture */
.reviews .wrap { position: relative; z-index: 1; }
.reviews .section-title { color: var(--cream); }
.review-feature {
  margin: 0; text-align: center;
}
.review-feature .section-title { margin: 0; }
.review-attrib {
  display: block; margin-top: 1.25rem;
  font-style: normal; font-size: 1rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--mustard);
}

/* ============================================================
   Visit
   ============================================================ */
.visit-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.75rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .visit-grid { grid-template-columns: 1fr; } }
.visit-details { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.visit-details strong { color: var(--caramel); }

.hours-card {
  position: relative;
  background: var(--white); border-radius: 0 0 var(--radius) var(--radius);
  padding: 1rem clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 10px 30px rgba(74, 48, 22, 0.12);
}
/* Sliced-bread topper rising above the card's top edge.
   The mustard curve baked into the image sits at the card's top line;
   the bread rises above it against the section background. */
.hours-topper {
  display: block; position: absolute;
  left: 0; right: 0; bottom: 100%;
  margin-bottom: -6px;          /* let the mustard curve meet the card top */
  pointer-events: none;
}
/* On stacked (mobile) layouts the topper floats above the card into the
   content above it, so reserve clear space above the card for the bread.
   Space ≈ topper height = card width × (145/433). */
@media (max-width: 860px) {
  .hours-card { margin-top: clamp(6rem, 32vw, 16rem); }
}
.hours-topper img { width: 100%; height: auto; display: block; }
.hours-card h2, .hours-card h3 { margin: 0; color: var(--espresso); font-size: 1.25rem; font-family: var(--font-display); }
.hours-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
/* Hero hours card: lift it with a stronger shadow over the dark hero */
.hero-hours { box-shadow: 0 24px 60px rgba(40, 24, 10, 0.4); }
/* Desktop: nudge the hero card down so the bread topper clears the header */
@media (min-width: 861px) {
  .hero-hours { margin-top: 5rem; }
}
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 0.5rem 0; font-size: 16px; border-bottom: 2px dotted color-mix(in srgb, var(--caramel) 30%, transparent); }
.hours th { font-weight: 700; font-family: var(--font-display); }
.hours td { text-align: right; color: color-mix(in srgb, var(--espresso) 80%, var(--cream)); }
.hours tr.is-today th, .hours tr.is-today td { color: var(--rust); font-weight: 800; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--cream-deep); }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
@media (max-width: 680px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3.1rem); line-height: 1.1;
  letter-spacing: -0.015em; color: var(--caramel);
  margin: 0 0 0.6rem;
}
.footer-brand p { margin: 0; color: color-mix(in srgb, var(--espresso) 72%, var(--cream)); }
.footer-col h4 { margin: 0 0 0.6rem; color: var(--caramel); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; }
.footer-col p { margin: 0 0 0.4rem; }
.footer-col a { color: var(--espresso); text-decoration: none; }
.footer-col a:hover { color: var(--rust); text-decoration: underline; }
.footer-base {
  padding-bottom: 2rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem;
}
.footer-base p { margin: 0; font-size: 0.85rem; color: color-mix(in srgb, var(--espresso) 60%, var(--cream)); }
.footer-credit { font-size: 0.85rem; color: color-mix(in srgb, var(--espresso) 60%, var(--cream)); text-decoration: none; }

/* ============================================================
   Reveal base states
   ============================================================ */
[data-reveal], [data-reveal-card], [data-reveal-lines] > span {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--dur) var(--ease-soft), transform var(--dur) var(--ease-soft);
}
.is-in[data-reveal], .is-in[data-reveal-card],
.is-in [data-reveal], .is-in[data-reveal-lines] > span { opacity: 1; transform: none; }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  [data-reveal], [data-reveal-card], [data-reveal-lines] > span { opacity: 1 !important; transform: none !important; }
  .hero-photo { inset: 0 !important; height: 100% !important; transform: none !important; }
  .product-card:hover, .product-card:hover .product-photo img { transform: none; }
}
