/* Homepage hierarchy and the left navigation from reviews/home-hierarchy.
   These rules apply only to the homepage. Artwork proportions stay in garden-tulips.css. */
:root {
  --rail-left: max(120px, 7vw);
  --rail-right: 7vw;
  --reading-width: min(800px, calc(100vw - var(--rail-left) - var(--rail-right)));
  --reading-left: max(var(--rail-left), calc((100vw - 800px) / 2));
  --section-clearance: 64px;
  --heading-gap: 24px;
}

/* Page > section > subsection > item > supporting information. */
main .section-wrap .section-title {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.project-title h3, .bookshelf-label {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
}
#projects-track h3 { font-size: 18px; line-height: 1.4; }
/* Full-height botanical silhouettes, optically centred beside Mori labels. */
#projects-track .project-status-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 400;
  white-space: nowrap;
  color: #62695e;
  background: #eeece6;
}
#projects-track .project-status-icon {
  --icon-size: 18px;
  display: block;
  flex: none;
  width: var(--icon-size);
  height: var(--icon-size);
  background: currentColor;
  mask-repeat: no-repeat;
}
#projects-track .project-status-pill--early .project-status-icon {
  mask-image: url('assets/project-status-single-leaf.png');
  mask-size: calc(var(--icon-size) * 1.741667) calc(var(--icon-size) * 1.741667);
  mask-position: calc(var(--icon-size) * -0.436806) calc(var(--icon-size) * -0.431944);
}
#projects-track .project-status-pill--progress .project-status-icon {
  mask-image: url('assets/project-status-staggered-leaves.png');
  mask-size: calc(var(--icon-size) * 1.393333) calc(var(--icon-size) * 1.393333);
  mask-position: calc(var(--icon-size) * -0.228333) calc(var(--icon-size) * -0.196667);
}
#projects-track .project-status-pill--ready .project-status-icon {
  mask-image: url('assets/project-status-flower-head.png');
  mask-size: calc(var(--icon-size) * 1.429875) calc(var(--icon-size) * 1.429875);
  mask-position: calc(var(--icon-size) * -0.214937) calc(var(--icon-size) * -0.215507);
}
#projects-track .project-status-pill > span:last-child {
  /* Mori’s visible letterforms sit slightly above its line-box centre. */
  transform: translateY(1px);
}
#projects-track .project-status-pill + .project-cta {
  margin-top: 0;
  padding-top: 0;
}
#projects-track .project-status-pill--progress {
  color: #aa4b25;
  background: #f4e8d8;
}
#projects-track .project-status-pill--ready {
  color: #416343;
  background: #e8eddf;
}
#stories h4 { font-size: 16px; line-height: 1.4; }
.small, .book-author { font-size: 14px; }
.favourite-note { font-size: 15px; line-height: 1.5; }
.favourite-book {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  grid-template-rows: 120px auto;
  column-gap: 14px;
  row-gap: 18px;
  align-content: start;
}
.favourite-book .cover-frame { grid-column: 1; grid-row: 1; margin-bottom: 0; }
.favourite-book > div { grid-column: 2; grid-row: 1; }
.favourite-book .favourite-note {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
}
.projects-heading h2 { max-width: none; }

/* Reserve the same unobstructed rail used in the earlier menu review. */
main > .section-wrap, #stories > .section-wrap {
  width: min(1280px, calc(100% - var(--reading-left) - var(--rail-right)));
  margin-left: var(--reading-left);
  margin-right: var(--rail-right);
}
main > .about, main > #work {
  width: var(--reading-width);
  max-width: none;
  margin-left: var(--reading-left);
  margin-right: 0;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--heading-gap);
}
.about-heading, .about-copy, #work .award-tiles { grid-column: 1; }
.about-copy { max-width: none; }

/* Base clearance; garden-spacing.js accounts for visible text and painted edges. */
main > .about, main > #work, main > #little-tools,
#stories > .section-wrap, main > #enthusiasms {
  padding-block: 0;
  border-top: 0;
}
main > .about { padding-top: var(--section-clearance); }
/* The botanical footer supplies the clearance after tastings. */
main > #enthusiasms { padding-bottom: 0; }
.tulip-divider {
  width: var(--reading-width);
  margin: var(--section-clearance) 0;
  margin-left: var(--reading-left);
}
.projects-heading, .tasting-intro .section-row { margin-bottom: var(--heading-gap); }
.projects-subtitle { margin-top: 16px; }
.featured-shelf-scroll { margin-top: var(--heading-gap); }
#projects-track { padding-block: 3px; }
/* A direct text-to-heading gap also precedes Contact; the artwork keeps its frame. */
#contact { bottom: auto; top: var(--section-clearance); }
/* Keep the phone's footer painting below the contact copy. */
@media (max-width: 700px) { .botanical-closing { min-height: 480px; } }
.carousel-edge--prev { left: -12px; }
main > section[id] { scroll-margin-top: 32px; }

@media (max-width: 1150px) {
  .bookshelf-featured { display: flex; flex-direction: column; gap: 28px; }
  .bookshelf-current { order: -1; border: 0; padding: 0; }
}
@media (max-width: 950px) {
  .favourites-controls { display: flex; }
  .favourite-grid { display: flex; gap: 24px; overflow-x: auto; padding: 3px; }
  .favourite-book { flex: 0 0 min(300px, 75%); scroll-snap-align: start; }
}

/* Unboxed left menu: 44px targets, visible focus and a non-colour current marker. */
.masthead {
  position: fixed;
  inset: var(--menu-top, 500px) auto auto 20px;
  width: auto;
  margin: 0;
  padding: 0;
  z-index: 5;
  background: none;
}
.masthead nav {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  font-size: 14px;
}
.masthead a {
  position: relative;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0 0 14px;
  color: var(--ink);
}
.masthead a[aria-current] { font-weight: 600; }
.masthead a[aria-current]::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(50% - 8px);
  height: 16px;
  width: 2px;
  background: currentColor;
}
.masthead a:hover { color: var(--link-orange); }
.masthead a:focus-visible { outline: 2px solid var(--link-orange); outline-offset: 3px; }

@media (max-width: 700px) {
  :root {
    --rail-left: 92px;
    --rail-right: 16px;
    --section-clearance: 48px;
  }
  main .section-wrap .section-title { font-size: 26px; }
  .masthead { left: 8px; }
  .masthead nav { font-size: 12px; }
  .masthead a { padding-left: 8px; }
  .opening-text {
    margin-left: var(--rail-left);
    margin-right: var(--rail-right);
    width: calc(100% - var(--rail-left) - var(--rail-right));
  }
}

@media (max-width: 700px) { .favourite-book { flex-basis: 100%; } }

/* Let the tasting introduction use the same reading width as its section. */
.tasting-copy { max-width: none; }

/* One continuous reading column, framed by the original flowers at upper right. */
.opening--botanical {
  --opening-copy-width: min(640px, calc(100vw - var(--reading-left) - 30vw - 40px));
  --hero-art-width: min(52vw, 880px);
  overflow: clip;
}
.opening--botanical .hero-botanical {
  left: auto;
  right: 0;
  width: var(--hero-art-width);
  transform: scaleX(-1);
}
.opening--botanical .opening-text {
  margin-left: var(--reading-left);
  margin-right: 0;
  width: var(--opening-copy-width);
  max-width: none;
  padding: 80px 0 0;
}
.opening--botanical .about {
  display: block;
  width: var(--reading-width);
  max-width: none;
  margin: 40px 0 0 var(--reading-left);
  padding: 0;
}
.opening--botanical .about-heading { margin: 0 0 24px; }
.opening--botanical .about-copy { display: flow-root; max-width: none; }
/* Reserve only the lines beside the hanging flower; text below can use the full width. */
.opening--botanical .about-copy::before {
  content: '';
  float: right;
  width: max(0px, calc(100% - var(--opening-copy-width)));
  height: var(--about-art-clearance, 0px);
}
.opening--botanical .about-column { margin: 0; }
.opening--botanical .about-column + .about-column { margin-top: 18px; }
.opening--botanical .about-copy p { margin: 0 0 18px; }
.opening--botanical .about-copy p:last-child { margin-bottom: 0; }
.opening--botanical .about-column:first-child > p:first-child {
  max-width: var(--opening-copy-width);
}
@media (max-width: 850px) {
  .opening--botanical .opening-text { padding-top: 64px; }
}
@media (max-width: 700px) {
  .opening--botanical {
    --opening-copy-width: calc(100vw - var(--rail-left) - var(--rail-right));
    --hero-art-width: 87vw;
  }
  .opening--botanical .opening-text {
    margin-left: var(--rail-left);
    padding-top: calc(58vw + 24px);
  }
  .opening--botanical .about { margin: 32px 0 0 var(--rail-left); }
}
