/*
 * Isolation layer — hand written, not generated.
 *
 * cenote's stylesheet styles bare elements (a, button, ul, li, p, img, h1-h6)
 * and also claims the class name `.site-header`, which the ported Combine
 * header uses. Those rules would bleed into the shop header/footer.
 *
 * Everything here is scoped to .ed-shop-scope, which sits on exactly two
 * elements: the header container and the footer container. Nothing in this
 * file can affect the rest of the WordPress page.
 *
 * Loaded AFTER shop-header.css / shop-footer.css so it wins ties, but kept
 * deliberately low-specificity so the ported Combine rules still win where
 * they are more specific.
 */

/* ----------------------------------------------------------------- font --
   The site's Customizer "Additional CSS" (wp-custom-css) ships:

     body, body p, body a, body li, body span, body div, … {
       font-family: FuturaLTPro-Light, … !important;
     }

   It is printed after every enqueued stylesheet, and !important beats anything
   we can do with ordering alone, so the shop chrome has to answer in kind.
   `.ed-shop-scope *` is (0,1,0) and outranks `body span` (0,0,2), so this wins
   the !important contest without needing to touch the user's own CSS. */
.ed-shop-scope,
.ed-shop-scope * {
  font-family: var(--font-stack-body-primary) !important;
}

/* ---------------------------------------------------------------- links --
   cenote: a{color:#16181a} and a:hover,a:focus,a:active{color:#de7b85}
   The pink hover is the visible offender. Inherit the shop's colour instead. */
.ed-shop-scope a,
.ed-shop-scope a:link,
.ed-shop-scope a:visited {
  color: inherit;
  transition: none;
}
.ed-shop-scope a:hover,
.ed-shop-scope a:focus,
.ed-shop-scope a:active {
  color: inherit;
  outline: 0;
}

/* …but `inherit` must not swallow the shop's own per-region link colours.
   `.site-header a` and `.main-footer a` are both (0,1,1) — exactly the same
   weight as the rule above, which loads later and therefore wins.
   That is invisible on the desktop footer (the inherited colour happens to be
   right) but fatal inside `.toggle__content`: component-toggle.css sets it to
   `var(--color-text-main)` — #101010, meant for light backgrounds — so the
   expanded mobile footer menu inherited near-black text on the black footer.
   Restore the regional colours at (0,2,1). */
.ed-shop-scope .site-header a,
.ed-shop-scope .site-nav a {
  color: var(--color-text-header);
}

.ed-shop-scope.main-footer a,
.ed-shop-scope.main-footer .toggle__content {
  color: var(--color-text-footer);
}

/* -------------------------------------------------------------- buttons --
   cenote: .button,button{background-color:#16181a;color:#fff;padding:20px;
   text-transform:uppercase;font-size:14px}. The ported reset zeroes padding
   and font, but not colour or text-transform. */
.ed-shop-scope button,
.ed-shop-scope .button {
  background-color: transparent;
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
  line-height: inherit;
  border-radius: 0;
}
.ed-shop-scope button:hover,
.ed-shop-scope .button:hover {
  background-color: transparent;
  color: inherit;
}

/* …but that reset must not swallow the shop's OWN button component. The rules
   above are (0,1,1)/(0,2,0) and load after the ported CSS, so they were beating
   `.button--solid` and turning the newsletter's black pill into transparent,
   square, lower-case text. Re-assert the component at (0,2,0)+. */
.ed-shop-scope .button--solid {
  background-color: var(--color-text-main);
  border: var(--border-width-buttons) solid var(--color-text-main);
  color: var(--color-background-main);
  border-radius: var(--border-radius-buttons);
}
.ed-shop-scope .newsletter .button {
  text-transform: uppercase;
  padding: var(--input-padding) 2.1875rem;
  border-radius: var(--border-radius-buttons);
}
.ed-shop-scope .newsletter .button--solid {
  background-color: #000;
  border-color: #000;
  color: #fff;
}
.no-touchevents .ed-shop-scope .newsletter .button--solid:hover {
  background-color: #000;
  color: #fff;
  opacity: .86;
}

/* --------------------------------------------- newsletter vertical rhythm --
   DELIBERATE DEVIATION FROM THE SHOP.

   The shop stacks its spacing unevenly around this section:

     above heading = .container--vertical-space margin-top (80px)
                   + .newsletter padding-top (30px, from its custom-style.css)
                   = 110px
     below form    = .newsletter padding-bottom (50px)
                   + .container--negative-margin (-80px) collapsing against
                     .main-footer margin-top (+80px) → 0
                   = 50px

   i.e. 110 above, 50 below. Reproduced faithfully at first; the client asked
   for it balanced.

   Splitting the same total (160px) evenly gives 80/80, so the block occupies
   exactly the height it did before — it is only centred. Using the theme
   variable keeps it responsive, since the shop redefines
   --container-vertical-space at each breakpoint. */
.ed-newsletter .container--vertical-space {
  margin-top: 0;
}
.ed-newsletter .card.newsletter {
  padding-top: var(--container-vertical-space);
  padding-bottom: var(--container-vertical-space);
}

/* Status line under the newsletter form (ours, not the shop's). */
.ed-newsletter__note {
  margin-top: 1rem;
  line-height: 1.4;
}
.ed-newsletter__note.is-ok    { color: var(--color-text-main); }
.ed-newsletter__note.is-error { color: #b3261e; }
.ed-newsletter form fieldset:has(+ [aria-hidden="true"]) { margin-bottom: 0; }

/* Same story for form controls: the reset below zeroes border-radius, but the
   shop runs pill-shaped inputs (--border-radius-forms: 30px). */
.ed-shop-scope .newsletter input[type="email"],
.ed-shop-scope .newsletter__input {
  border-radius: var(--border-radius-forms);
  border-style: solid;
  padding: var(--input-padding);
}

/* ------------------------------------------------- .site-header collision --
   cenote clearfixes .site-header with ::before/::after{display:table}.
   Combine uses #site-header:after as the bottom hairline border, so the
   ::before must go and the ::after must not be forced to display:table. */
.ed-shop-scope .site-header::before {
  content: none;
  display: none;
}
.ed-shop-scope .site-header::after {
  clear: none;
}

/* ---------------------------------------------------------------- lists --
   cenote: ul,ol{margin:0 0 1.6rem 1.6rem} ul{list-style:square} */
.ed-shop-scope ul,
.ed-shop-scope ol,
.ed-shop-scope li {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------- images --
   cenote's img{max-width:100%;height:auto} is harmless and even desirable,
   but it must not override the logo's explicit sizing. */
.ed-shop-scope img {
  max-width: 100%;
}

/* ----------------------------------------------------------- paragraphs --
   cenote: p{margin:0 0 10px;line-height:1.8}. The footer menus are built from
   <p> inside <a>, so the stray bottom margin shows up as uneven link spacing. */
.ed-shop-scope p {
  margin: 0;
  line-height: inherit;
}
/* the shop's own custom-style.css re-adds this one deliberately */
.ed-shop-scope .footer-item__content p {
  margin-bottom: .5rem;
}

/* --------------------------------------------------------------- inputs --
   Really Simple Security / cenote form styling should not reach the
   localization control or any future footer form. */
.ed-shop-scope input,
.ed-shop-scope select,
.ed-shop-scope textarea {
  font-family: inherit;
  border-radius: 0;
}

/* ------------------------------------------------------------- headings --
   cenote: h1-h6{font-family:Catamaran;color:#16181a;font-weight:700} */
.ed-shop-scope h1,
.ed-shop-scope h2,
.ed-shop-scope h3,
.ed-shop-scope h4,
.ed-shop-scope h5,
.ed-shop-scope h6 {
  font-family: inherit;
  color: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
}

/* ------------------------------------------------- WordPress admin bar ----
   The sticky header is position:fixed;top:0 and would sit under the admin
   bar for logged-in users. */
body.admin-bar .sticky-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar .sticky-header {
    top: 46px;
  }
}

/* --------------------------------------------------- layout integration --
   The shop header is position:relative here (see header.php) rather than
   Shopify's position:absolute, because the WordPress pages have no hero
   section for it to overlay. Give the footer the same top margin the shop
   uses so the spacing above it matches.                                   */
.main-footer {
  margin-top: var(--container-vertical-space);
}

/* cenote wraps page content in .tg-container; the shop chrome brings its own
   .container--large, so make sure the two never nest-indent each other. */
.ed-shop-scope .container--large {
  box-sizing: border-box;
}
