/* Cinderella's header (includes/header.inc, assets/js/header.js), on every page.
   A sage top row over the cream menu row with its gold menu bar; the sign hangs from the top over both rows. Scrolling:
   the top row slides away and the sign docks into the menu row at once; much further down the menu row shrinks
   (two measured thresholds, so it never bounces). Sizes of the visible sign come from the logo file: its pixels
   start 2.5% of the height in from the left and 1.5% down, and reach the foot. */

:root {
  --cc-top-h: 44px;
  --cc-menu-h: 96px;
  --cc-menu-h-c: 70px;
  --cc-rule: 3px;
  --header-h: calc(var(--cc-top-h) + var(--cc-menu-h));
  --cc-logo-h: 150px;
  --cc-logo-top: 6px;
  --cc-dock-h: calc(var(--cc-menu-h) - 22px);
  --cc-stuck-h: calc(var(--cc-menu-h-c) - 16px);
  --cc-sage: #5F7F6B;
  --cc-sage-dd: #3E5A48;
  --cc-ink-green: #2E4537;
  --cc-gold: #D8B35A;
  --cc-cream: #FAFAF7;
  --cc-ease: cubic-bezier(.23, 1, .32, 1);
}
html { scroll-padding-top: calc(var(--cc-menu-h-c) + 16px); }
html.cc-growing, html.cc-gliding { overflow-anchor: none; }
html.cc-nav-open { overflow: hidden; }
.cc-no-anim, .cc-no-anim * { transition: none !important; }

.cc-skip { position: absolute; left: 12px; top: -100px; z-index: 2000; padding: 10px 16px; border-radius: 8px;
  background: var(--cc-cream); color: var(--cc-sage-dd); font: 600 17px/1 "Poppins", sans-serif; }
.cc-skip:focus { top: 10px; }

.cc-header { position: sticky; top: calc(var(--cc-top-h) * -1); z-index: 1000; transition: box-shadow .3s var(--cc-ease); }
.cc-header.is-stuck { box-shadow: 0 8px 26px rgba(40, 55, 40, .18); }
.cc-header ul { list-style: none; margin: 0; padding: 0; }
.cc-ico { width: 18px; height: 18px; flex: none; display: block; }

/* top row */
.cc-top {
  height: var(--cc-top-h); overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #5E806A 0%, #52745E 100%);
  font: 600 17px/1 "Open Sans", sans-serif;
}
.cc-top-inner { display: flex; align-items: center; justify-content: flex-end; height: 100%; }
.cc-top-list { display: flex; align-items: center; gap: 30px; height: 100%; }
.cc-top-link { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.cc-top-link .cc-ico { color: #F2D891; }
.cc-top a, .cc-top .protectEmail { color: #fff !important; font-weight: 600 !important; text-decoration: none; }
.cc-top a:hover { text-decoration: underline; text-underline-offset: .22em; }

/* menu row */
.cc-bar { position: relative; height: var(--cc-menu-h); background: var(--cc-cream); transition: height .3s var(--cc-ease); }
.cc-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--cc-rule);
  background: linear-gradient(180deg, #E2C273, #C9A247); pointer-events: none; }
.cc-header.is-stuck .cc-bar { height: var(--cc-menu-h-c); }
.cc-bar-inner { position: relative; display: flex; align-items: center; height: calc(100% - var(--cc-rule)); }

.cc-brand {
  position: absolute; z-index: 2; display: block;
  left: calc(12px - var(--cc-logo-h) * .025);
  top: calc(var(--cc-logo-top) - var(--cc-top-h));
  height: var(--cc-logo-h);
  filter: drop-shadow(0 6px 10px rgba(30, 40, 30, .22));
  transition: top .3s var(--cc-ease), left .3s var(--cc-ease), height .3s var(--cc-ease), filter .3s;
}
.cc-brand img { display: block; width: auto; height: 100%; max-width: none; }
.cc-header.is-docked .cc-brand {
  height: var(--cc-dock-h); left: calc(12px - var(--cc-dock-h) * .025);
  top: calc((var(--cc-menu-h) - var(--cc-rule) - var(--cc-dock-h) * .985) / 2 - var(--cc-dock-h) * .015);
  filter: none;
}
.cc-header.is-stuck .cc-brand {
  height: var(--cc-stuck-h); left: calc(12px - var(--cc-stuck-h) * .025);
  top: calc((var(--cc-menu-h-c) - var(--cc-rule) - var(--cc-stuck-h) * .985) / 2 - var(--cc-stuck-h) * .015);
}

/* the menu, as the site had it before the new header (Joshua, round 5: "revert the style of the menu to how it was"):
   a flat gold bar with a fine gold outline and square ends, white Poppins 21px (20px from 1200 to 1399), the current
   page and the one pointed at cream with sage words; Stay With Us drops a gold list, right-aligned, rising into place.
   Values read from the live site's own computed styles. Structure here; the look is for 1200px and wider only. */
.cc-nav { margin-left: auto; }
.cc-link {
  display: flex; align-items: center; margin: 0; border: 0; background: none; cursor: pointer; white-space: nowrap;
  font-family: "Poppins", sans-serif; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.cc-chev { display: none; }
.cc-has-sub { position: relative; }
.cc-sub a { display: block; white-space: nowrap; font-family: "Poppins", sans-serif; text-decoration: none; }
@media (min-width: 1200px) {
  .cc-menu { display: flex; align-items: center; border: 1px solid #D8B35A; }
  .cc-link {
    padding: 11px 15px 9px; font-size: 21px; font-weight: 400; line-height: 1.5;
    color: #FAFAF7; background: #D8B35A; transition: .3s;
  }
  .cc-link:hover, .cc-has-sub:hover > .cc-link, .cc-has-sub.is-open > .cc-link,
  .cc-link[aria-current="page"], .cc-has-sub.is-current > .cc-link { color: #5F7F6B; background: #FAFAF7; }
  .cc-link:focus-visible { outline: 3px solid #3E5A48; outline-offset: 2px; color: #5F7F6B; background: #FAFAF7; }
  .cc-sub {
    position: absolute; right: 0; top: calc(100% + 30px); z-index: 99; margin: 0; padding: 0;
    background: #fff; border: 1px solid #D8B35A; box-shadow: 0 0 30px rgba(127, 137, 161, .25);
    opacity: 0; visibility: hidden; transition: .3s;
  }
  .cc-has-sub:hover > .cc-sub, .cc-has-sub.is-open > .cc-sub, .cc-has-sub:focus-within > .cc-sub { opacity: 1; top: 100%; visibility: visible; }
  .cc-sub a { padding: 11px 15px 9px; font-size: 20px; font-weight: 400; line-height: 1.5; color: #fff; background: #D8B35A; transition: .3s; }
  .cc-sub a:hover, .cc-sub a:focus-visible, .cc-sub a[aria-current="page"] { color: #5F7F6B; background: #FAFAF7; }
  .cc-sub a:focus-visible { outline: 3px solid #3E5A48; outline-offset: -3px; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .cc-link { padding: 11px 12px 9px; font-size: 20px; }
}
.cc-nav-contact { display: none; }

.cc-toggle { display: none; }
.cc-scrim[hidden] { display: none; }

/* 1200-1399: a little less room */
@media (max-width: 1399px) {
  :root { --cc-logo-h: 136px; }
}

/* under 1200: the Menu button and a panel from the right */
@media (max-width: 1199px) {
  :root { --cc-menu-h: 86px; --cc-menu-h-c: 66px; --cc-logo-h: 130px; }
  .cc-toggle {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto; padding: 8px 0 8px 10px;   /* the word's right edge on the container's, like the top row's */
    border: 0; background: none; cursor: pointer; color: var(--cc-ink-green);
    font: 600 19px/1 "Poppins", sans-serif; -webkit-tap-highlight-color: transparent;
    position: relative; z-index: 1102;
  }
  .cc-toggle svg { width: 30px; height: 30px; }
  .cc-toggle-close, .cc-toggle[aria-expanded="true"] .cc-toggle-open { display: none; }
  .cc-toggle[aria-expanded="true"] .cc-toggle-close { display: block; }
  .cc-toggle:focus-visible { outline: 3px solid var(--cc-sage-dd); outline-offset: 2px; border-radius: 8px; }
  .cc-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1101; width: min(420px, 100%); margin: 0;
    padding: calc(var(--cc-menu-h) + 6px) 26px 32px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--cc-cream); box-shadow: -18px 0 44px rgba(30, 40, 30, .25);
    transform: translateX(105%); visibility: hidden;
    transition: transform .3s var(--cc-ease), visibility 0s linear .3s;
  }
  .cc-nav::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--cc-gold); }
  .cc-nav.is-open { transform: none; visibility: visible; transition: transform .3s var(--cc-ease); }
  .cc-nav:focus { outline: none; }
  .cc-menu { display: block; padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .cc-menu > li { border-bottom: 1px solid rgba(95, 127, 107, .2); }
  .cc-link { gap: .3em; width: 100%; padding: 17px 4px; font-size: 22px; font-weight: 500; line-height: 1; color: var(--cc-ink-green); }
  .cc-link:hover, .cc-link:focus-visible { background: none; color: var(--cc-sage-dd); }
  .cc-link[aria-current="page"] { background: none; box-shadow: none; color: var(--cc-sage-dd); font-weight: 600; }
  .cc-link[aria-current="page"]::before { content: ""; width: 6px; height: 1.1em; margin-right: 6px; border-radius: 3px; background: var(--cc-gold); }
  .cc-has-sub.is-current > .cc-link { background: none; box-shadow: none; }
  .cc-sub-toggle { cursor: default; }
  .cc-chev { display: none; }
  .cc-sub, .cc-has-sub:hover > .cc-sub, .cc-has-sub:focus-within > .cc-sub {
    position: static; min-width: 0; padding: 0 0 12px 14px; background: none; box-shadow: none;
    opacity: 1; visibility: inherit; transform: none; transition: none;
  }
  .cc-sub::before { display: none; }
  .cc-sub a { padding: 12px 10px; border-radius: 8px; font-size: 20px; font-weight: 500; line-height: 1.1; color: var(--cc-ink-green); }
  .cc-sub a:hover { color: var(--cc-sage-dd); }
  .cc-sub a[aria-current="page"] { background: rgba(216, 179, 90, .28); box-shadow: none; font-weight: 600; }
  .cc-nav-contact { display: block; margin-top: 24px; }
  .cc-nav-contact li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; font: 600 18px/1.4 "Open Sans", sans-serif; color: var(--cc-ink-green); }
  .cc-nav-contact a, .cc-nav-contact .protectEmail { display: inline-flex; align-items: center; gap: 12px; color: var(--cc-ink-green) !important; text-decoration: none; }
  .cc-nav-contact .cc-ico { width: 22px; height: 22px; color: var(--cc-sage); }
  .cc-nav-addr { padding-left: 34px; font-weight: 400; }
  .cc-scrim { position: fixed; inset: 0; z-index: 1100; background: rgba(30, 40, 30, .45); }
  html.cc-nav-open .cc-header { z-index: 1101; }
}

/* phones: a shorter top row with the phone and email as icons beside the hanging sign */
@media (max-width: 767px) {
  :root { --cc-top-h: 38px; --cc-menu-h: 72px; --cc-menu-h-c: 62px; --cc-logo-h: min(100px, calc((100vw - 24px - 118px) / 2.78)); --cc-dock-h: 54px; --cc-stuck-h: 46px; }
  .cc-top-list { gap: 4px; }
  .cc-top-link span { display: none; }
  .cc-top-link { position: relative; justify-content: center; width: 36px; height: 34px; }
  .cc-top-link .cc-ico { width: 20px; height: 20px; }
  .cc-top-mail { position: relative; }
  .cc-top-list > li:last-child .cc-top-link, .cc-top-list > li.cc-top-mail { justify-content: flex-end; }   /* the last icon's right edge over the Menu word's */
  .cc-top-mail .protectEmail, .cc-top-mail a { position: absolute; inset: 0; font-size: 0 !important; color: transparent !important; }
  .cc-toggle { font-size: 18px; gap: 8px; }
  .cc-toggle svg { width: 28px; height: 28px; }
  .cc-nav { padding-top: calc(var(--cc-top-h) + var(--cc-menu-h) + 4px); }
}
