/* Header, footer, sections, edges, breadcrumbs, logo */

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--primitive-spacing-3);
  min-height: var(--touch-min);
  color: var(--text);
  text-decoration: none;
}

.logo__lockup {
  display: block;
  flex: none;
  width: auto;
  height: var(--primitive-spacing-10);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background-color: var(--header-glass);
  -webkit-backdrop-filter: blur(var(--header-blur));
  backdrop-filter: blur(var(--header-blur));
  box-shadow: 0 1px 0 var(--line);
}

/* The open menu covers the page, so it goes solid */
.header.is-open {
  background-color: var(--bg);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--primitive-spacing-6);
  height: var(--header-height);
}

.header__nav ul {
  display: flex;
  gap: var(--primitive-spacing-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  padding-inline: var(--primitive-spacing-3);
  border-radius: var(--button-radius);
  font-family: var(--font-montserrat), var(--primitive-font-display);
  font-size: var(--primitive-fontSize-sm);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--primitive-duration-fast) ease;
}

.header__nav a:hover,
.header__nav a[aria-current='page'] {
  color: var(--text);
}

.header__nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--mark);
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.45em;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--primitive-spacing-2);
}

.header__icon {
  display: inline-grid;
  place-items: center;
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--primitive-radius-full);
  background: none;
  color: var(--text);
  cursor: pointer;
}

.header__icon .icon {
  width: var(--primitive-spacing-5);
  height: var(--primitive-spacing-5);
}

.header__panel {
  border-top: 1px solid var(--line);
  background-color: var(--bg);
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
}

.header__panel nav {
  display: grid;
  gap: var(--primitive-spacing-4);
  padding-block: var(--primitive-spacing-4) var(--primitive-spacing-8);
}

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

.header__panel li a {
  display: flex;
  align-items: center;
  min-height: var(--primitive-spacing-14);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-montserrat), var(--primitive-font-display);
  font-size: var(--primitive-fontSize-xl);
  font-weight: 700;
  text-decoration: none;
}

.header__panel li a[aria-current='page'] {
  color: var(--ink);
}

.header__panel .btn {
  justify-self: start;
}

/* Without JavaScript the menu can't open; the footer carries every link instead */
html:not(.js) .header__menu {
  display: none;
}

/* Five links and two buttons need the room: the bar folds into the menu below 64rem */
@media (min-width: 64rem) {
  .header__menu,
  .header__panel {
    display: none !important;
  }
}

@media (max-width: 63.99rem) {
  .header .header__nav,
  .header .header__book,
  .header .header__audit {
    display: none;
  }

  /* Phones and tablets: the logo in the middle, the menu button on the right (Stephen, round 3).
     The word LEMONADE is what's centred on the screen, not the whole lockup: the wedge on its left
     made the word read as off-centre (Emil, 17 November 2026). In the file the word runs from
     23.6% to 97.8% of the width, so its centre is 10.7% right of the lockup's. */
  .header__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .header__bar > .logo {
    grid-column: 2;
    translate: -10.7% 0;
  }

  .header__actions {
    grid-column: 3;
    justify-self: end;
  }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding-block: var(--spacing-section);
}

.section--pour {
  padding-top: calc(var(--spacing-section) + var(--wave-height) * 0.6);
}

.section--wave {
  padding-bottom: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--primitive-spacing-6) var(--primitive-spacing-10);
}

.section-head > div {
  display: grid;
  gap: var(--primitive-spacing-4);
  max-width: var(--measure-wide);
}

.section-head .lede {
  max-width: var(--measure-text);
  font-size: var(--primitive-fontSize-base);
}

/* ---------- Edges ---------- */
.edge {
  position: relative;
  z-index: 2;
  height: var(--wave-height);
  margin-top: var(--spacing-section);
  pointer-events: none;
}

.edge svg {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* The ground above hangs into the top of the section: the bottom edge's picture, flipped */
.edge--pour {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  margin: 0;
  transform: scale(-1, -1);
}

.edge__juice {
  fill: var(--ground-juice);
}

.edge--light .edge__ground {
  fill: var(--ground-light-bg);
}

.edge--sand .edge__ground {
  fill: var(--ground-sand-bg);
}

.edge--dark .edge__ground {
  fill: var(--ground-dark-bg);
}

/* ---------- Breadcrumbs ---------- */
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--primitive-spacing-2);
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-montserrat), var(--primitive-font-display);
  font-size: var(--primitive-fontSize-xs);
  font-weight: 600;
  color: var(--muted);
}

.crumbs li + li::before {
  content: '›';
  margin-right: var(--primitive-spacing-2);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-min);
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--text);
}

.crumbs [aria-current] {
  color: var(--text);
}

/* ---------- Footer ---------- */
.footer {
  padding-block: var(--primitive-spacing-20) var(--primitive-spacing-8);
  border-top: 1px solid var(--line);
  font-size: var(--primitive-fontSize-sm);
}

.footer__grid {
  display: grid;
  gap: var(--primitive-spacing-10);
  grid-template-columns: 1fr;
}

/* The footer's logo, a size up from the header's (Stephen, round 3) */
.footer__brand .logo__lockup {
  height: var(--primitive-spacing-14);
}

.footer__brand p {
  max-width: var(--measure-text);
  margin-top: var(--primitive-spacing-4);
}

.footer__head {
  margin-bottom: var(--primitive-spacing-3);
  font-size: var(--primitive-fontSize-xs);
  letter-spacing: var(--primitive-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink);
}

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

.footer li a,
.footer__contact li {
  display: inline-flex;
  align-items: center;
  gap: var(--primitive-spacing-2);
  min-height: var(--touch-min);
  color: var(--text);
  text-decoration: none;
}

.footer li a:hover {
  text-decoration: underline;
}

.footer__contact .icon {
  flex: none;
  width: var(--primitive-spacing-4);
  height: var(--primitive-spacing-4);
  color: var(--ink);
}

.footer__contact li {
  /* One line each for the number, the email and the location, at every width */
  display: flex;
  color: var(--muted);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--primitive-spacing-4);
  margin-top: var(--primitive-spacing-16);
  padding-top: var(--primitive-spacing-6);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (min-width: 40rem) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64rem) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  }
}
