/**
 * MyWineMatch integration with the Neve document shell.
 *
 * These selectors are deliberately scoped to exported MyWineMatch pages so
 * generic source-site selectors cannot leak into unrelated WordPress pages.
 */

.mwm-content-page #header-grid {
  position: relative;
  color: #211d1a;
  background: rgb(247 244 239 / 94%);
  border: 0;
}

.mwm-content-page #header-grid::after {
  content: "";
  position: absolute;
  right: clamp(1.25rem, 5vw, 5.25rem);
  bottom: 0;
  left: clamp(1.25rem, 5vw, 5.25rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, #b79758 12%, #b79758 88%, transparent);
  opacity: 0.65;
  pointer-events: none;
}

.mwm-content-page #header-grid .header-main-inner {
  min-height: 92px;
  background: transparent;
}

.mwm-content-page #header-grid .header-main .container {
  width: 100%;
  max-width: none;
  padding-inline: clamp(1.25rem, 5vw, 5.25rem);
}

.mwm-content-page #header-grid .header-main .row--wrapper {
  position: relative;
}

.mwm-content-page #header-grid .header-main[data-show-on="desktop"] .row--wrapper::after {
  content: "Palate guide · edition 01";
  position: absolute;
  top: 50%;
  left: 50%;
  color: #5d6f58;
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.mwm-content-page #header-grid .site-title {
  margin: 0;
  color: #211d1a;
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.45rem, 1.8vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

/**
 * Homepage wordmark.
 *
 * Keep Neve's existing text title and typography intact. The icon is decorative
 * and the hard gradient stops align with the measured "My" / "Wine" glyph
 * boundaries in the rendered title.
 */
.home.mwm-content-page #header-grid .site-logo .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.home.mwm-content-page #header-grid .site-logo .brand::before {
  content: "";
  flex: 0 0 auto;
  width: 1.65rem;
  height: 2.15rem;
  background-image: url("https://mywinematch.com/wp-content/uploads/2026/07/MyWineWatch-Logo-selection_3.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 3.4rem;
}

.home.mwm-content-page #header-grid .site-title {
  width: max-content;
  background: linear-gradient(
    90deg,
    #211d1a 0 22%,
    var(--garnet, #8c1d40) 22% 57.75%,
    #211d1a 57.75% 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.mwm-content-page #header-grid .nav-ul a {
  color: #211d1a;
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mwm-content-page #header-grid .navbar-toggle {
  color: #211d1a;
  background: transparent;
  border: 1px solid #d7d0c6;
  border-radius: 10px;
}

.mwm-content-page #site-footer {
  display: none;
}

.mwm-site-footer {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 5vw, 5.25rem) 2rem;
  color: #f6f1eb;
  background: #211d1a;
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

.mwm-footer-main {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  align-items: start;
  gap: 3rem;
}

.mwm-footer-wordmark {
  width: max-content;
  color: #fffdf9;
  font-size: clamp(1.45rem, 1.8vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
  text-decoration: none;
}

.mwm-footer-main > p {
  max-width: 480px;
  margin: 0;
  color: #cfc7bf;
}

.mwm-footer-main nav {
  justify-self: end;
  display: grid;
  gap: 0.55rem;
  font-size: 0.78rem;
}

.mwm-footer-main nav a {
  width: max-content;
  color: #f6f1eb;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.mwm-footer-main nav a:hover,
.mwm-footer-main nav a:focus-visible {
  border-bottom-color: currentColor;
}

.mwm-footer-legal {
  margin-top: 3.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid #4b4641;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  color: #aaa19a;
  font-size: 0.68rem;
}

.mwm-footer-legal p {
  max-width: 560px;
  margin: 0;
}

@media (max-width: 860px) {
  .mwm-footer-main {
    grid-template-columns: 1fr;
  }

  .mwm-footer-main nav {
    justify-self: start;
  }

  .mwm-footer-legal {
    display: grid;
  }
}

@media (max-width: 620px) {
  .mwm-content-page #header-grid .header-main-inner {
    min-height: 72px;
  }

  .mwm-content-page #header-grid::after {
    right: 1.25rem;
    left: 1.25rem;
  }

  .mwm-site-footer {
    padding-inline: 1.25rem;
  }
}

/**
 * Tactile paper background system.
 *
 * The homepage hero already carries its own framed composition. The shared
 * layer below extends the same paper, botanical and gold-line language across
 * the rest of the site without placing decoration above interactive content.
 */
body.mwm-content-page {
  position: relative;
  background-color: #f7f4ef;
  background-image: url("../images/mwm-paper-grain.png");
  background-repeat: repeat;
  background-size: 192px 192px;
}

body.mwm-content-page::before {
  content: "";
  position: fixed;
  z-index: 9990;
  inset: 0;
  pointer-events: none;
  background-image: url("../images/mwm-paper-grain.png");
  background-repeat: repeat;
  background-size: 192px 192px;
  mix-blend-mode: multiply;
  opacity: 0.72;
}

.mwm-content-page .mwm-site {
  position: relative;
  isolation: isolate;
  background-color: #f7f4ef;
  background-image:
    url("../images/mwm-botanical-paper.svg"),
    url("../images/mwm-paper-grain.png");
  background-position: calc(100% + 90px) 150px, 0 0;
  background-repeat: repeat-y, repeat;
  background-size:
    clamp(390px, 38vw, 650px) auto,
    192px 192px;
}

.mwm-content-page .mwm-site > main {
  position: relative;
  z-index: 1;
}

.mwm-content-page .mwm-site .hero::before {
  background-image: url("../images/mwm-paper-grain.png");
  background-repeat: repeat;
  background-size: 192px 192px;
  opacity: 0.72;
}

.mwm-content-page .legal-page h3 {
  margin: 2rem 0 0.6rem;
  font-family: "Instrument Serif", "Iowan Old Style", Baskerville, Georgia, serif;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.15;
}

body.mwm-content-page:not(.home) .mwm-site::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: clamp(1rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  left: clamp(0.75rem, 2vw, 1.5rem);
  border: 1px solid rgb(183 151 88 / 68%);
  pointer-events: none;
}

@media (max-width: 620px) {
  body.mwm-content-page::before {
    opacity: 0.58;
  }

  .mwm-content-page .mwm-site {
    background-position: calc(100% + 150px) 120px, 0 0;
    background-size:
      390px auto,
      192px 192px;
  }

  body.mwm-content-page:not(.home) .mwm-site::before {
    inset: 0.5rem;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body.mwm-content-page::before {
    display: none;
  }
}
