/*
 * Farmer360 home page additions (approved mock-up, 7 November 2026; scratchpad landing/seo-pages/mock site.css and
 * home-extra.css), loaded after styles.css and cards.css:
 * - The menu: a quiet glass pill beside the lockup that opens a calm glass panel (menu.js). The solution pages carry
 *   the same control in page.css.
 * - "What is Farmer360?": the sunrise sky between chapter 5 (roles) and chapter 6 (the walkthrough), with a question
 *   list on native <details>/<summary>.
 * No inline styles anywhere (the CSP allows only same-origin style sheets).
 */

/* ---------------------------------------------------------------- the header row: lockup, hairline, menu */

/* Placed over the hero by styles.css; above it here. --bar-gut: where the lockup starts, kept by the sticky bar
   (header.css) so the logo never moves sideways. */
.top {
  --bar-gut: calc(22 * var(--p));
  z-index: 30;
  display: flex;
  align-items: center;
}

@media (min-width: 960px) and (min-aspect-ratio: 6/5) and (min-height: 560px) {
  .top {
    --bar-gut: calc(48 * var(--u));
  }
}

.menu {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 37px;
}

/* A short hairline between the lockup and the control, so the control reads as part of the header, not the logo. */
.menu-btn::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 50%;
  width: 1px;
  height: 18px;
  margin-top: -9px;
  background: rgba(20, 32, 26, 0.16);
}

/* The control: a 34 px glass pill with a two-line glyph and "Menu". The ::after widens the touch area to 44 px. */
.menu-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 6px 18px -10px rgba(40, 50, 30, 0.4);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 560;
  letter-spacing: -0.005em;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.menu-btn::after {
  content: "";
  position: absolute;
  inset: -5px -4px;
  border-radius: 999px;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.74);
}

.menu-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 26px -14px rgba(40, 50, 30, 0.5);
}

/* Two lines that turn into a cross when the panel is open. */
.menu-glyph {
  position: relative;
  width: 14px;
  height: 10px;
}

.menu-glyph::before,
.menu-glyph::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 1.6px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.32s var(--ease),
    top 0.32s var(--ease);
}

.menu-glyph::before {
  top: 2px;
}

.menu-glyph::after {
  top: 7px;
  width: 9px;
}

.menu-btn[aria-expanded="true"] .menu-glyph::before {
  top: 4.4px;
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-glyph::after {
  top: 4.4px;
  width: 14px;
  transform: rotate(-45deg);
}

/* The panel: the site's glass, calm and small. It drops from under the control. */
.menu-panel {
  position: absolute;
  left: -6px;
  top: calc(100% + 14px);
  width: 288px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  /* Nearly opaque: the panel must stay calm over the headline. On the home page the blur below cannot reach the
     headline (the lockup's intro animation makes the header its own backdrop root), so the fill does the work. */
  background: rgba(252, 249, 244, 0.985);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 30px 60px -28px rgba(40, 45, 25, 0.45),
    0 10px 24px -16px rgba(40, 45, 25, 0.3);
  opacity: 0;
  transform: translate3d(0, -6px, 0) scale(0.985);
  transform-origin: 24px 0;
  transition:
    opacity 0.28s var(--ease),
    transform 0.36s var(--ease);
}

.menu-panel[hidden] {
  display: none;
}

.menu.is-open .menu-panel {
  opacity: 1;
  transform: none;
}

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

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.menu-link:hover {
  background: rgba(20, 32, 26, 0.05);
}

.menu-link svg {
  width: 14px;
  height: 14px;
  color: rgba(20, 32, 26, 0.42);
  transition:
    transform 0.3s var(--ease),
    color 0.2s ease;
}

.menu-link:hover svg {
  color: var(--ink);
  transform: translateX(2px);
}

/* The page you are on: a small green dot instead of the arrow. */
.menu-link[aria-current="page"]::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(44, 122, 49, 0.16);
}

.menu-link[aria-current="page"] svg {
  display: none;
}

.menu-foot {
  margin-top: 8px;
  padding: 10px 4px 4px;
  border-top: 1px solid rgba(20, 32, 26, 0.09);
}

.menu-foot .btn {
  width: 100%;
  height: 44px;
  font-size: 15px;
}

/* Phones: the panel spans the screen inside the gutter. */
@media (max-width: 599px) {
  .menu {
    position: static;
    margin-left: 29px;
  }

  .menu-btn::before {
    left: -15px;
  }

  .menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    width: auto;
    top: calc(100% + 14px);
  }

  .menu-link {
    min-height: 50px;
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-btn,
  .menu-glyph::before,
  .menu-glyph::after,
  .menu-panel,
  .menu-link,
  .menu-link svg {
    transition-duration: 0.01ms;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .menu-btn,
  .menu-panel {
    background: rgb(252, 249, 244);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ---------------------------------------------------------------- question list (native details) */

.qa {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--qa-line, rgba(20, 32, 26, 0.14));
}

.qa > li {
  border-bottom: 1px solid var(--qa-line, rgba(20, 32, 26, 0.14));
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 60px;
  padding: 14px 2px;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 560;
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--qa-ink, var(--ink));
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary:focus-visible {
  outline-offset: 2px;
  border-radius: 6px;
}

/* The plus from the scene-label cards, a little larger. */
.qa-plus {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--qa-plus-bg, rgba(20, 32, 26, 0.07));
  transition:
    transform 0.32s var(--ease),
    background-color 0.2s ease;
}

.qa-plus::before,
.qa-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.6px;
  margin: -0.8px 0 0 -5px;
  border-radius: 1px;
  background: var(--qa-ink, var(--ink));
  transition: background-color 0.2s ease;
}

.qa-plus::after {
  transform: rotate(90deg);
}

.qa summary:hover .qa-plus {
  background: var(--qa-plus-hover, rgba(20, 32, 26, 0.13));
}

.qa details[open] .qa-plus {
  transform: rotate(45deg);
  background: var(--qa-ink, var(--ink));
}

.qa details[open] .qa-plus::before,
.qa details[open] .qa-plus::after {
  background: var(--qa-plus-on, #fff);
}

.qa-a {
  margin: 0;
  padding: 0 52px 22px 2px;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  color: var(--qa-ink-2, rgba(20, 32, 26, 0.78));
  text-wrap: pretty;
}

/* An answer with a short list: a sentence, then the list in the privacy notice's list style (styles.css .doc-page). */
.qa-a p {
  margin: 0;
}

.qa-list {
  margin: 10px 0 0;
  padding-left: 1.2em;
  list-style: disc;
}

.qa-list li {
  margin-top: 10px;
}

@media (max-width: 599px) {
  .qa summary {
    font-size: 17px;
    min-height: 58px;
  }

  .qa-a {
    padding-right: 8px;
    font-size: 15.5px;
  }
}

/* ---------------------------------------------------------------- footer links (Packhouses, Co-ops, Privacy, email) */

/* Four links: they wrap rather than overflow on a narrow screen (from the version 1 mock-up's site.css). */
.pfoot-links {
  flex-wrap: wrap;
  row-gap: 4px;
}

/* Keeps a hyphenated word such as "co-ops" whole at a line end. */
.nw {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- "What is Farmer360?" */

/*
 * In the sunrise sky between chapter 5 (roles) and chapter 6 (the walkthrough). It replaces the plain sunrise band
 * and keeps its colours: rose at the top (chapter 5's foot), gold at the bottom (chapter 6's sky), with a soft first
 * light behind the words. No panel, no box: the text sits on the sky like every chapter's copy. Static on purpose
 * (no reveal), so it reads the same with or without JavaScript.
 */
.wif {
  position: relative;
  isolation: isolate;
  overflow: clip;
  color: var(--ink-1);
  background:
    radial-gradient(60% 46% at 50% 58%, rgba(255, 233, 214, 0.42) 0%, rgba(255, 233, 214, 0) 100%),
    linear-gradient(180deg, var(--t56) 0%, #b89487 18%, #c9a393 52%, #d6b19d 82%, var(--t6s) 100%);
  --qa-line: rgba(20, 32, 26, 0.17);
  --qa-ink: var(--ink-1);
  --qa-ink-2: rgba(20, 32, 26, 0.84);
  --qa-plus-bg: rgba(255, 255, 255, 0.34);
  --qa-plus-hover: rgba(255, 255, 255, 0.55);
}

/* Grain, so the sky never bands (as the other bands). */
.wif::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  background-image: var(--grain);
  pointer-events: none;
}

.wif-in {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 132px 0 108px;
}

.wif-title {
  font-size: 46px;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-align: center;
  text-wrap: balance;
}

.wif-def {
  max-width: 32em;
  margin: 22px auto 0;
  font-size: 20px;
  line-height: 1.55;
  letter-spacing: -0.008em;
  text-align: center;
  color: rgba(20, 32, 26, 0.88);
  text-wrap: pretty;
}

.wif-qa {
  margin-top: 54px;
}

@media not all and (min-width: 960px) and (min-aspect-ratio: 6/5) and (min-height: 560px) {
  .wif-in {
    padding: 88px max(16px, calc(22 * var(--p))) 104px;
  }

  .wif-title {
    font-size: calc(32 * var(--p));
  }

  .wif-def {
    margin-top: 16px;
    font-size: 17px;
  }

  .wif-qa {
    margin-top: 38px;
  }
}
