/* Burge Flower Shop - the foundation. Runs in the order a page is read: top of the page to its end. */

/* The palette, type and spacing every page uses. */
:root {
  --colour-of-the-page: #5C9440;
  --colour-of-the-dots: #457A2E;
  --colour-of-the-panels: #F2F7E4;
  --colour-of-the-ink: #14230F;
  --colour-of-the-sunflower: #F8D034;
  --face-of-the-headlines: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --face-of-the-text: 'Encode Sans Expanded', Verdana, sans-serif;
  --size-of-the-text: 1rem;
  --size-of-the-small-text: 0.9375rem;
  --size-of-the-opening: 1.6875rem;
  --size-of-the-headlines: clamp(2.25rem, 1.6rem + 2.6vw, 2.875rem);
  --size-of-the-address: clamp(2rem, 1.2rem + 3.4vw, 4rem);
  --thickness-of-the-bar: 0.625rem;
  --length-of-the-bar: 3.5rem;
  --space-inside-a-panel: 1.25rem;
  --space-between-blocks: 0.75rem;
  --space-between-sections: clamp(2.5rem, 7vh, 5rem);
  --height-of-the-dock: 3.75rem;
  --height-of-the-bench-crop: auto;
  --height-of-the-door-crop: auto;
  --time-of-a-hover: 0.12s;
}
@media (min-width: 56em) {
  :root {
    --size-of-the-text: 1.0625rem;
    --size-of-the-opening: 2.25rem;
    --size-of-the-headlines: clamp(3.25rem, 1rem + 4vw, 4.5rem);
    --space-inside-a-panel: 2rem;
    --space-between-blocks: 1.5rem;
    --height-of-the-dock: 3.5rem;
    --height-of-the-bench-crop: 38vh;
    --height-of-the-door-crop: 36vh;
  }
}

/* The leaf-green ground with its quiet dot grid; panels sit on it solid. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle, var(--colour-of-the-dots) 0.0625rem, transparent 0.07rem) 0 0 / 1.125rem 1.125rem,
    var(--colour-of-the-page);
  color: var(--colour-of-the-ink);
  font-family: var(--face-of-the-text);
  font-size: var(--size-of-the-text);
  line-height: 1.6;
  padding-bottom: calc(var(--height-of-the-dock) + env(safe-area-inset-bottom) + 3.5rem);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  font-family: var(--face-of-the-headlines);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: 0;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

/* Links: ink, underlined, a sunflower fill on hover or focus. */
a {
  color: var(--colour-of-the-ink);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  transition: background-color var(--time-of-a-hover) linear;
}
a:hover, a:focus-visible { background-color: var(--colour-of-the-sunflower); }
:focus-visible { outline: 0.1875rem solid var(--colour-of-the-ink); outline-offset: 0.125rem; }

/* burv: visually hidden text, read aloud but not shown. */
.burv {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* burk: skip link, the first thing a keyboard reaches. */
.burk {
  position: absolute; left: 1rem; top: -10rem; z-index: 30;
  background: var(--colour-of-the-panels);
  padding: 0.75rem 1rem;
}
.burk:focus { top: 1rem; }

/* burm: masthead - the linked shop name, large, at 5vw; it scrolls away. burl: the inline logo mark. */
.burm { padding: 1rem 0 0.75rem 5vw; }
.burm a {
  display: inline-flex; align-items: center; gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.5rem 0.25rem 0;
  font-size: clamp(1.375rem, 1rem + 1.6vw, 2.125rem);
  line-height: 1.15;
  text-decoration: none;
}
.burl { width: 1.5em; height: 1.5em; flex: none; }

/* burs: the stepped pair - burb (area bench, upper right), burp (area words, between), burw (area door, lower left). */
.burs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "bench" "words" "door";
  row-gap: var(--space-between-blocks);
  padding-bottom: var(--space-between-sections);
}
.burs > .burb { grid-area: bench; margin: 0 3vw 0 16vw; }
.burs > .burp { grid-area: words; margin: 0 5vw 0 7vw; align-self: start; }
.burs > .burw { grid-area: door; margin: 0 12vw 0 3vw; }
@media (min-width: 56em) {
  .burs {
    grid-template-columns: 8vw 9vw 27vw 12vw 3vw 36vw minmax(0, 1fr);
    grid-template-areas:
      ". . . . . bench ."
      ". . words words . bench ."
      ". door door . . . .";
    column-gap: 0;
  }
  .burs > .burb, .burs > .burp, .burs > .burw { margin: 0; }
}

/* burb and burw: the two rectangular crops of the bench - straight down, never overlapping. */
.burb, .burw { margin: 0; position: relative; }
.burb img, .burw img {
  width: 100%;
  object-fit: cover;
}
.burb img { aspect-ratio: 16 / 9; height: var(--height-of-the-bench-crop); }
.burw img { aspect-ratio: 4 / 3; height: var(--height-of-the-door-crop); }

/* burq: the round sunflower stamp at a slight angle - on the quiet upper right corner of a burw crop on phones
   (clear of the cookie plate), on its quiet lower left corner on desktop. */
.burq {
  position: absolute; right: 0.6rem; top: 0.6rem;
  width: 5.5rem; height: 5.5rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--colour-of-the-sunflower);
  color: var(--colour-of-the-ink);
  font-family: var(--face-of-the-headlines);
  font-weight: 900;
  font-size: 1.125rem;
  line-height: 1;
  text-align: center;
  padding: 0.6rem;
  transform: rotate(-8deg);
}
@media (min-width: 56em) {
  .burq {
    right: auto; top: auto; left: 0.9rem; bottom: 0.9rem;
    width: 6.25rem; height: 6.25rem;
    font-size: 1.25rem;
    padding: 0.75rem;
  }
}

/* burp: the pale panel under all copy, opened by one 10 px sunflower bar. bury: the yellow variant, its bar in ink. */
.burp {
  background: var(--colour-of-the-panels);
  padding: 0 var(--space-inside-a-panel) var(--space-inside-a-panel);
}
.burp::before {
  content: "";
  display: block;
  width: var(--length-of-the-bar);
  height: var(--thickness-of-the-bar);
  margin: 0 0 var(--space-inside-a-panel) calc(-1 * var(--space-inside-a-panel));
  background: var(--colour-of-the-sunflower);
}
.burp.bury { background: var(--colour-of-the-sunflower); }
.burp.bury::before { background: var(--colour-of-the-ink); }

/* buro: the one-sentence opening h1 of a page, middle scale; a link inside it is underlined. */
.buro {
  font-size: var(--size-of-the-opening);
  line-height: 1.12;
  margin: 0;
}
.buro a { text-decoration-thickness: 0.09em; }

/* burh: an article headline, tall and narrow, sentence case. */
.burh { font-size: var(--size-of-the-headlines); line-height: 0.98; }

/* burr: running text in a panel - a reading measure with lists kept plain. */
.burr { max-width: 40em; }
.burr ul, .burr ol { margin: 0 0 1em; padding-left: 1.25em; }
.burr li { margin-bottom: 0.4em; }
.burr h2 { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem); margin-top: 1.2em; }
.burr h3 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); margin-top: 1em; }

/* burj: the quiet sentence-case line of links set with middots, used in panels and the footer. */
.burj { font-size: var(--size-of-the-small-text); }
.burj a { display: inline-block; padding: 0.55rem 0; }

/* burg: a figure, photograph large; burn: its caption on its own pale strip, flush with the picture's left edge. */
.burg { margin: 0; }
.burg img { width: 100%; object-fit: cover; }
.burn {
  display: inline-block;
  background: var(--colour-of-the-panels);
  padding: 0.5rem 0.9rem;
  font-size: var(--size-of-the-small-text);
  line-height: 1.45;
}

/* buri: a story block - areas picture and words, side by side on desktop with green between, stacked on phones. */
.buri {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "picture" "words";
  gap: var(--space-between-blocks);
}
.buri > .burg { grid-area: picture; }
.buri > .burp { grid-area: words; align-self: start; }
@media (min-width: 56em) {
  .buri {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "picture words";
  }
  .buri.burw-first { grid-template-areas: "words picture"; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}

/* [data-burr="1".."5"]: rungs of the stair after the opening - left edges 31, 11, 23, 6 and 15vw, widths their own. */
[data-burr] { margin-top: var(--space-between-sections); margin-right: 4vw; }
[data-burr="1"] { margin-left: 8vw; }
[data-burr="2"] { margin-left: 3vw; }
[data-burr="3"] { margin-left: 6vw; }
[data-burr="4"] { margin-left: 2vw; }
[data-burr="5"] { margin-left: 5vw; }
@media (min-width: 56em) {
  [data-burr="1"] { margin-left: 31vw; margin-right: 6vw; }
  [data-burr="2"] { margin-left: 11vw; margin-right: 19vw; }
  [data-burr="3"] { margin-left: 23vw; margin-right: 4vw; }
  [data-burr="4"] { margin-left: 6vw; margin-right: 12vw; }
  [data-burr="5"] { margin-left: 15vw; margin-right: 9vw; }
}

/* bura: a row of the price stair, set on [data-burprice]; site.js turns the price into its left inset. */
.bura {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name price" "line price";
  column-gap: 1.25rem;
  margin: 0 3vw var(--space-between-blocks) calc(3vw + var(--inset-from-the-price, 0) * 10vw);
}
.bura h2, .bura h3 { grid-area: name; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem); margin: 0 0 0.25em; }
.bura p { grid-area: line; }
.bura strong {
  grid-area: price; align-self: center;
  font-family: var(--face-of-the-headlines); font-weight: 900;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 3.25rem); line-height: 1;
}
@media (min-width: 56em) {
  .bura { margin-left: calc(6vw + var(--inset-from-the-price, 0) * 36vw); margin-right: 0; width: 52vw; }
}

/* bure: a block that takes its sunflower bar when it reaches the window (class "arrived") - instantly, nothing moves. */
.js .bure:not(.arrived)::before { background: var(--colour-of-the-dots); }

/* buru: a flat control at reading size - pale, no border; .picked or aria-pressed="true" fills it sunflower. */
.buru {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  border: 0; border-radius: 0;
  background: var(--colour-of-the-panels);
  color: var(--colour-of-the-ink);
  font: inherit;
  font-size: var(--size-of-the-small-text);
  line-height: 1.25;
  cursor: pointer;
  transition: background-color var(--time-of-a-hover) linear;
}
.buru:hover, .buru:focus-visible, .buru.picked, .buru[aria-pressed="true"] { background: var(--colour-of-the-sunflower); }
.burp .buru { background: var(--colour-of-the-page); color: var(--colour-of-the-ink); }
.burp .buru:hover, .burp .buru:focus-visible, .burp .buru.picked { background: var(--colour-of-the-sunflower); }

/* burz: the live line beside printed hours - open now and until when, or when the shop opens next. */
.burz {
  display: inline-block;
  background: var(--colour-of-the-sunflower);
  padding: 0.4rem 0.8rem;
  margin-top: 0.75rem;
  font-size: var(--size-of-the-small-text);
}

/* burf: footer - a flush-left shop-window panel, the address set large on two lines with the town below. */
.burf { margin-top: var(--space-between-sections); margin-right: 6vw; }
.burf .burp { padding-top: 0; }
.burf address {
  font-style: normal;
  font-size: var(--size-of-the-address);
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.burf address span { display: block; }
.burf address span:last-child { font-size: 0.5em; margin-top: 0.4em; }
.burf p { font-size: var(--size-of-the-small-text); max-width: 46em; }
.burf ul {
  list-style: none; margin: 0.5rem 0 0.75rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0 1.25rem;
  font-size: var(--size-of-the-small-text);
}
.burf li a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.burf .buru { padding: 0.5rem 0.8rem; }
@media (min-width: 56em) {
  .burf { margin-right: 0; width: 64vw; }
}

/* burd: the dock - a full-width pale bar fixed to the bottom; the current page is filled ink (.picked).
   Every label stays on one line; the links share the row's spare width between them. */
.burd {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--colour-of-the-panels);
  padding-bottom: env(safe-area-inset-bottom);
}
.burd ul {
  list-style: none; margin: 0; padding: 0;
  display: flex;
}
.burd li { flex: 1 1 auto; }
.burd a {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--height-of-the-dock);
  padding: 0.25rem 0.2rem;
  font-family: var(--face-of-the-headlines);
  font-size: 1.0625rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.burd a.picked { background: var(--colour-of-the-ink); color: var(--colour-of-the-panels); }
@media (min-width: 56em) {
  .burd ul { justify-content: flex-start; padding-left: 5vw; }
  .burd li { flex: none; }
  .burd a { padding: 0 1.25rem; font-family: var(--face-of-the-text); font-size: 1rem; }
}

/* burt: the pinned call control - a small ink tab above the dock on phones, the dock's right end on desktop. */
.burt {
  position: fixed; right: 0; z-index: 21;
  bottom: calc(var(--height-of-the-dock) + env(safe-area-inset-bottom));
  display: flex; align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  background: var(--colour-of-the-ink);
  color: var(--colour-of-the-panels);
  font-size: var(--size-of-the-small-text);
  text-decoration: none;
}
.burt span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.burt:hover, .burt:focus-visible { background: var(--colour-of-the-sunflower); color: var(--colour-of-the-ink); }
@media (min-width: 56em) {
  .burt { bottom: env(safe-area-inset-bottom); min-height: var(--height-of-the-dock); padding: 0 1.75rem; font-size: 1rem; }
  .burt span { position: static; width: auto; height: auto; clip: auto; margin-left: 0.35em; }
}

/* burc (#yesno): a compact solid plate low in the left corner, seated above the dock and left of the Call tab;
   the two choices side by side on phones, stacked on desktop, equal. */
.burc {
  position: fixed; z-index: 22; left: 0; right: 5.5rem;
  bottom: calc(var(--height-of-the-dock) + env(safe-area-inset-bottom) + 0.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "say say" "yes no";
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--colour-of-the-panels);
  border-top: var(--thickness-of-the-bar) solid var(--colour-of-the-sunflower);
  font-size: var(--size-of-the-small-text);
  line-height: 1.35;
}
.burc p { grid-area: say; margin: 0; }
.burc [data-yesno="granted"] { grid-area: yes; }
.burc [data-yesno="denied"] { grid-area: no; }
.burc .buru { background: var(--colour-of-the-page); padding: 0.35rem 0.5rem; }
.burc .buru:hover, .burc .buru:focus-visible { background: var(--colour-of-the-sunflower); }
@media (min-width: 56em) {
  .burc {
    left: 1.5rem; right: auto; width: 22rem;
    bottom: calc(var(--height-of-the-dock) + 1rem);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "say" "yes" "no";
    padding: 1rem;
  }
  .burc .buru .burv {
    position: static; width: auto; height: auto; overflow: visible;
    clip: auto; white-space: normal; margin-left: 0.3em;
  }
}

/* burx (#flag): the offer, a round sunflower stamp at the upper right on desktop, a slim band at the top on phones. */
#flag {
  position: fixed; z-index: 23; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  background: var(--colour-of-the-sunflower);
  font-size: var(--size-of-the-small-text);
  line-height: 1.3;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.2s linear, transform 0.2s linear;
}
#flag.is-in { opacity: 1; transform: none; }
#flag p { margin: 0; flex: 1; }
#flag [data-flag-close] {
  flex: none; width: 2.75rem; height: 2.75rem;
  border: 0; background: var(--colour-of-the-panels); color: var(--colour-of-the-ink);
  font-size: 1.25rem; cursor: pointer;
}
@media (min-width: 56em) {
  #flag {
    top: 1.5rem; right: 1.5rem; left: auto;
    width: 12rem; height: 12rem;
    flex-direction: column; justify-content: center; gap: 0.3rem;
    padding: 1.5rem; border-radius: 50%; text-align: center;
    transform: translateY(-1rem) rotate(-8deg);
  }
  #flag.is-in { transform: rotate(-8deg); }
  #flag p { flex: none; }
}

/* Less motion asked for: even the hover fills arrive without a transition. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media (min-width: 120.0625rem) { html { font-size: 0.8333vw; } }
header :is(a, button), nav :is(a, button) { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  *,
  *::after,
  *::before {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
html,body{overflow-x:clip}
