/* The photographic stage reaches both viewport edges. Only the content needs clearance. */
:root {
  --mast: 67px;
  --float-top: max(env(safe-area-inset-top), clamp(13px, 2.25dvh, 29px));
  --float-gutter: clamp(17px, 3.3vw, 68px);
  --float-clearance: calc(var(--float-top) + var(--mast));
  --float-rail: max(58px, 7.6dvh);
}
html { scroll-padding-top: calc(var(--float-clearance) + 14px); }
.masthead {
  --bar-ink: #fff9e8;
  --wordmark-filter: brightness(0) invert(97%) sepia(19%) saturate(389%) hue-rotate(337deg);
  inset: var(--float-top) 0 auto;
  width: min(calc(100% - var(--float-gutter) - var(--float-gutter)), 1500px);
  margin-inline: auto;
  border: 0;
  background: transparent;
  color: var(--bar-ink);
  transition: color .38s;
}
/* Fade across the full photograph, independent of the narrower navigation area. */
.masthead::before,.masthead::after {
  content: "";
  position: absolute;
  top: calc(0px - var(--float-top));
  left: 50%;
  width: 100vw;
  height: calc(var(--float-clearance) + 36px);
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  transition: opacity .45s;
}
.masthead::before {
  background: linear-gradient(to bottom, rgb(4 30 21 / 52%), rgb(5 34 23 / 35%) 54%, transparent);
}
.masthead::after {
  opacity: 0;
  background: linear-gradient(to bottom, rgb(255 251 236 / 73%), rgb(255 250 232 / 50%) 54%, transparent);
}
.masthead:is([data-surface="sand"],[data-surface="paper"])::before { opacity: 0; }
.masthead:is([data-surface="sand"],[data-surface="paper"])::after { opacity: 1; }
.masthead[data-surface="paper"]::after {
  background: linear-gradient(to bottom, #fffefa 0%, rgb(255 254 250 / 98%) 65%, transparent);
}
.masthead[data-surface="sand"] {
  --bar-ink: #183e2e;
  --wordmark-filter: brightness(0) saturate(100%) invert(21%) sepia(26%) saturate(783%) hue-rotate(103deg);
}
.masthead[data-surface="paper"] {
  --bar-ink: #174332;
  --wordmark-filter: brightness(0) saturate(100%) invert(21%) sepia(26%) saturate(783%) hue-rotate(103deg);
}
.mast-inner { width: 100%; padding-inline: clamp(15px, 2.45vw, 42px); }
.masthead .identity { width: 106px; }
.masthead .identity img {filter: var(--wordmark-filter);transition: filter .38s;}
.masthead #main-nav a,.masthead .mast-action { color: inherit; }
.masthead #main-nav a:after,.masthead .menu-toggle i { background: currentColor; }
.masthead #main-nav a:after { bottom: 11px; }
.masthead .mast-action { border-color: currentColor; padding: 6px 16px; }
.masthead .mast-action:hover { color: var(--dark); background: #f1d58f; border-color: #f1d58f; }
.hero { padding: 0; min-height: 0; }
.banner-stage { position: absolute; inset: 0; }
.hero .hero-inner,.hero .artboard { padding-top: var(--float-clearance); padding-bottom: var(--float-rail); }
.hero .forest { opacity: .22; }
.hero .hero-art { height: calc(100% - var(--float-clearance) - 17px); bottom: 0; }
.hero-art small,.slide-mentor .art-credit { bottom: calc(var(--float-rail) + 4px); }
.poster-bottom {
  --rail-ink: #fff7df;
  --rail-muted: #e2e6d3;
  --rail-accent: #f2d38b;
  position: absolute; inset: auto 0 0; z-index: 4; border: 0; background: transparent;
  color: var(--rail-ink);
  padding-bottom: env(safe-area-inset-bottom);
}
.poster-bottom::before {
  content: ""; position: absolute; inset: -65% 0 0; z-index: -1; pointer-events: none;
  background: linear-gradient(0deg, rgb(2 29 21 / 78%), rgb(3 34 25 / 32%) 53%, transparent);
}
.poster-bottom .carousel-rail { height: var(--float-rail); }
.poster-bottom .rail-motto { color: var(--rail-muted); }
.poster-bottom i { border-color: var(--rail-accent); color: var(--rail-accent); }
.banner-dots button:before { background: var(--rail-muted); }
#banner-play>span { border-inline-color: var(--rail-ink); }
#banner-play[data-paused=true]>span { border-left-color: var(--rail-accent); }
.hero[data-palette="sand"] .poster-bottom {
  --rail-ink: #234231;
  --rail-muted: #4a573e;
  --rail-accent: #5d5125;
}
.hero[data-palette="sand"] .poster-bottom::before {
  background: linear-gradient(0deg, rgb(248 237 211 / 89%), rgb(248 237 211 / 50%) 48%, transparent);
}
@media(min-width: 761px) and (min-height: 521px) and (orientation: landscape) {
  .hero h1 { font-size: clamp(63px,min(7.9vw,13.3dvh),148px); }
  .hero .poster-copy { padding-bottom: 0; }
  .hero .store-print { top: calc(50% + (var(--float-clearance) - var(--float-rail)) / 2); }
}
@media(max-width: 1000px) and (min-width: 761px) {
  .mast-inner { gap: 13px; padding-inline: 18px; }
  .masthead #main-nav { gap: 17px; }
  .masthead #main-nav a { font-size: 14px; }
  .masthead .identity { width: 93px; }
}
@media(max-width: 760px) {
  :root { --mast: 51px; --float-top: max(env(safe-area-inset-top), 10px); --float-gutter: 12px; --float-rail: 50px; }
  .mast-inner { padding-inline: 11px; }
  .masthead .identity { width: 84px; }
  .masthead .mast-action { padding: 4px 9px; }
  .masthead #main-nav {
    inset: calc(100% + 6px) -1px auto; max-height: calc(100dvh - var(--float-clearance) - 18px);
    overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px 12px;
    border: 1px solid #c5cfc2; border-radius: 15px;
    color: #1b4433; background: #fffef9; box-shadow: 0 12px 28px rgb(13 34 20 / 14%);
  }
  .masthead #main-nav a { padding: 10px 1px; }
  .masthead #main-nav a + a { border-top: 1px solid #e1e6da; }
}
@media(max-width: 820px) and (orientation: portrait) {
  .hero .store-print { top: max(48%,calc(var(--float-clearance) + 33%)); }
  .hero .slide-herb .campaign-image,.hero .slide-mentor .campaign-image { top: 37%; }
}
@media(min-width: 621px) and (max-width: 1000px) and (orientation: portrait) {
  .hero .hero-art { height: 69%; }
  .hero .poster-copy { margin-top: 6.5dvh; }
}
@media(max-width: 620px) and (orientation: portrait) {
  .hero .hero-art { height: 62%; }
  .hero-art small,.slide-mentor .art-credit { bottom: calc(var(--float-rail) + 3px); }
  .hero .frame-copy { padding-top: clamp(18px,3.7dvh,36px); }
}
@media(max-width: 620px) and (max-height: 700px) and (orientation: portrait) {
  .hero .hero-art { height: 51%; }
  .hero .frame-copy { padding-top: 14px; }
  .hero .slide-herb .campaign-image,.hero .slide-mentor .campaign-image { top: 43%; }
}
@media(max-height: 520px) and (orientation: landscape) {
  :root { --float-top: max(env(safe-area-inset-top), 5px); --mast: 41px; --float-rail: 37px; }
  .masthead .identity { width: 76px; }
  .masthead .mast-action { padding-block: 2px; }
  .hero .hero-art { height: calc(100% - var(--float-clearance) - 2px); }
  .masthead #main-nav a:after { bottom: 3px; }
}
@media(prefers-reduced-motion: reduce) {
  .masthead,.masthead *,.masthead::before,.masthead::after,.poster-bottom,.poster-bottom * { transition: none !important; }
}
