/* Matusinsky Portfolio: scoped presentation refinements.
   The existing Flickr Album Typography plugin retains ownership of captions. */

body.mmp-polish {
  --mmp-heading-font: "Manrope", "DM Sans", system-ui, sans-serif;
  --mmp-body-font: "DM Sans", system-ui, sans-serif;
  --mmp-focus: #c9ae87;
  --mmp-menu-bg: #191a16;
  --mmp-menu-text: #f5f1e8;
  --mmp-menu-border: rgba(215, 202, 180, .25);
}

/* Semantic icons do not depend on the device's Unicode/emoji font. */
body.mmp-polish .mmp-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: 0 0 1em;
  vertical-align: -.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keep the established typefaces, with more space inside large titles. */
body.mmp-polish .mp-hero h1,
body.mmp-polish .mp-subhero h1,
body.mmp-polish .mp-editorial-hero h1,
body.mmp-polish .mp-wed-hero-copy h1 {
  font-family: var(--mmp-heading-font);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.04em;
}
body.mmp-polish .mp-editorial-hero h1 {
  font-size: clamp(46px, 7.5vw, 112px);
}
body.mmp-polish .mp-section-head h2,
body.mmp-polish .mp-about h2 {
  font-family: var(--mmp-heading-font);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.04em;
}
body.mmp-polish .mp-about-image {
  height: auto;
  aspect-ratio: 719 / 720;
}
body.mmp-polish .mp-about-image img {
  object-position: center;
}

/* A consistent reading measure and scale for the travel articles. */
body.mmp-polish .mp-editorial-body.entry-content :where(p, li) {
  font-family: var(--mmp-body-font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.75;
}
body.mmp-polish .mp-editorial-body.entry-content p {
  margin-block-end: 1.35em;
}
body.mmp-polish .mp-editorial-body.entry-content > p:first-child:not(.mmp-story-date) {
  font-size: clamp(20px, 1.7vw, 22px);
  font-style: normal;
  line-height: 1.6;
}
body.mmp-polish .mp-editorial-body.entry-content h2 {
  margin-block: 1.8em .7em;
  font-family: var(--mmp-heading-font);
  font-size: clamp(34px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -.025em;
  scroll-margin-top: 112px;
}
body.mmp-polish .mp-editorial-body.entry-content h3 {
  margin-block: 1.7em .7em;
  font-family: var(--mmp-heading-font);
  font-size: clamp(25px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -.02em;
  scroll-margin-top: 112px;
}
body.mmp-polish .mp-editorial-body.entry-content .mmp-story-date {
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: .04em;
  opacity: .8;
}
body.mmp-polish .mp-editorial-body.entry-content .mmp-story-date em {
  font-style: normal;
}

/* Bring the first photographs closer to the gallery introduction. */
body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) #main > .mp-subhero {
  min-height: 0;
  padding: 124px 0 32px;
}
body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) .mp-subhero .mp-kicker {
  margin-bottom: 14px;
}
body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) .mp-subhero h1 {
  margin: 0;
  font-size: clamp(46px, 6.4vw, 88px);
}
body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) .mp-subhero p {
  max-width: 660px;
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 1.65;
}
body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) #main > .mp-subhero + .mp-section {
  padding-top: 40px;
  padding-bottom: 72px;
}
body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) #main > .mp-subhero + .mp-section .mp-page-content {
  padding-top: 0;
  padding-bottom: 0;
}
body.mmp-polish.mmp-page-flickr .mp-flickr-page > .mp-kicker {
  margin-bottom: 20px;
}

/* Retain the theme's navigation wrapper and hamburger behaviour. */
body.mmp-polish #mp-nav .mmp-nav-list {
  align-items: center;
  gap: clamp(.8rem, 1.2vw, 1.25rem);
}
body.mmp-polish #mp-nav .mmp-nav-list > li {
  position: relative;
  margin: 0;
}
body.mmp-polish #mp-nav .mmp-nav-list > li > a,
body.mmp-polish #mp-nav .mmp-nav-group > summary {
  font-family: var(--mmp-body-font);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .065em;
  white-space: nowrap;
}
body.mmp-polish #mp-nav .mmp-nav-list > li > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
}
body.mmp-polish #mp-nav .mmp-nav-group {
  position: relative;
}
body.mmp-polish #mp-nav .mmp-nav-group > summary {
  display: flex;
  align-items: center;
  gap: .4em;
  min-height: 44px;
  padding: 8px 0;
  color: inherit;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}
body.mmp-polish #mp-nav .mmp-nav-group > summary::-webkit-details-marker {
  display: none;
}
body.mmp-polish #mp-nav .mmp-nav-group > summary::marker {
  content: "";
}
body.mmp-polish #mp-nav .mmp-nav-group > summary .mmp-icon {
  width: .85em;
  height: .85em;
  flex-basis: .85em;
  transition: transform .16s ease;
}
body.mmp-polish #mp-nav .mmp-nav-group[open] > summary .mmp-icon {
  transform: rotate(180deg);
}
body.mmp-polish #mp-nav .mmp-nav-submenu {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: -16px;
  min-width: 210px;
  margin: 0;
  padding: 8px;
  list-style: none;
  color: var(--mmp-menu-text);
  background: var(--mmp-menu-bg);
  border: 1px solid var(--mmp-menu-border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .24);
}
body.mmp-polish #mp-nav .mmp-nav-group:not([open]) > .mmp-nav-submenu {
  display: none;
}
body.mmp-polish #mp-nav .mmp-nav-group[open] > .mmp-nav-submenu {
  display: grid;
  gap: 2px;
}
body.mmp-polish #mp-nav .mmp-nav-submenu > li {
  margin: 0;
  padding: 0;
}
body.mmp-polish #mp-nav .mmp-nav-submenu > li > a {
  display: block;
  min-height: 44px;
  padding: 11px 12px;
  color: var(--mmp-menu-text);
  font-family: var(--mmp-body-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  text-decoration: none;
}
body.mmp-polish #mp-nav .mmp-nav-submenu > li > a:hover {
  color: #fff;
  background: rgba(215, 202, 180, .1);
}

/* The contact anchor belongs to the actual contact information. */
body.mmp-polish .mp-contact-content#contact {
  scroll-margin-top: 112px;
}

/* A directly accessible story selection before the interactive map. */
body.mmp-polish .mmp-stories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 26px;
  margin: 36px 0 58px;
  scroll-margin-top: 112px;
}
body.mmp-polish .mmp-stories-carousel .mmp-story-placeholder {
  display: flex;
  width: 100%;
  aspect-ratio: 3 / 2;
  align-items: center;
  justify-content: center;
  background: #24271f;
  color: #c9ae87;
  font-family: var(--mmp-heading-font);
  font-size: 24px;
  letter-spacing: .1em;
}
body.mmp-polish .mmp-story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 22px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 202, 180, .22);
}
body.mmp-polish .mmp-story-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
body.mmp-polish .mmp-story-card h3 {
  margin: 18px 0 8px;
  color: inherit;
  font-family: var(--mmp-heading-font);
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.025em;
  text-transform: none;
}
body.mmp-polish .mmp-story-card p {
  margin: 0;
  color: inherit;
  font-family: var(--mmp-body-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  opacity: .82;
}
body.mmp-polish a.mmp-story-card:hover h3,
body.mmp-polish a.mmp-story-card:focus-visible h3 {
  color: #d2bb98;
}

/* Keep the light navigation readable above the cream wedding hero. */
body.mmp-polish.mmp-page-svatby #mp-header {
  color: #f5f1e8;
  background: #191a16;
  border-bottom: 1px solid rgba(215, 202, 180, .2);
}

/* Six original photographs replace the screenshot used as a cover. */
body.mmp-polish .mp-wed-hero {
  --mmp-focus: #746047;
  min-height: 0;
  padding: 140px 0 68px;
}
body.mmp-polish .mp-wed-hero-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 92px);
}
body.mmp-polish .mp-wed-hero-copy h1 {
  font-size: clamp(44px, 6vw, 96px);
}
body.mmp-polish .mp-wed-hero-photo.mmp-wedding-hero {
  height: auto;
  min-height: 0;
  overflow: visible;
  background: transparent;
}
body.mmp-polish .mp-wed-hero-photo.mmp-wedding-hero::before,
body.mmp-polish .mp-wed-hero-photo.mmp-wedding-hero::after {
  content: none;
}
body.mmp-polish .mmp-wedding-collage {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, .62);
}
body.mmp-polish .mmp-wedding-collage > figure,
body.mmp-polish .mmp-wedding-collage > a {
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
body.mmp-polish .mmp-wedding-collage img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}
body.mmp-polish .mmp-wedding-caption {
  position: static;
  margin: 12px 0 0;
  color: #62594b;
  font-family: var(--mmp-body-font);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .07em;
  text-transform: uppercase;
}

/* Article photographs retain their complete original composition. */
body.mmp-polish .mmp-story-photo {
  clear: both;
  width: 100%;
  margin: clamp(32px, 4vw, 56px) 0;
}
body.mmp-polish .mmp-story-photo--portrait {
  max-width: 534px;
  margin-inline: auto;
}
body.mmp-polish .mmp-story-photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}
body.mmp-polish .mmp-story-photo figcaption {
  max-width: 65ch;
  margin: 11px 0 0;
  color: inherit;
  font-family: var(--mmp-body-font);
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.55;
  letter-spacing: .01em;
  opacity: .78;
}

/* Keyboard focus remains visible in both the dark and light sections. */
body.mmp-polish :is(a, button, summary, input):focus-visible {
  outline: 2px solid var(--mmp-focus);
  outline-offset: 5px;
}
body.mmp-polish .mmp-nav-submenu a:focus-visible {
  outline-offset: -3px;
}

/* Match the original theme's 1160 px hamburger breakpoint. */
@media (max-width: 1160px) {
  body.mmp-polish #mp-nav.is-open {
    max-height: calc(100vh - 84px);
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.mmp-polish #mp-nav .mmp-nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  body.mmp-polish #mp-nav .mmp-nav-list > li > a,
  body.mmp-polish #mp-nav .mmp-nav-group > summary {
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: .035em;
  }
  body.mmp-polish #mp-nav .mmp-nav-submenu {
    position: static;
    min-width: 0;
    width: 100%;
    margin: 0 0 10px;
    padding: 0 0 0 14px;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--mmp-menu-border);
    box-shadow: none;
  }
  body.mmp-polish #mp-nav .mmp-nav-submenu > li > a {
    font-size: 15px;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  body.mmp-polish #mp-nav.is-open {
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
  }
  body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) #main > .mp-subhero {
    padding: 108px 0 28px;
  }
  body.mmp-polish:is(.mmp-page-flickr, .mmp-page-portfolio) #main > .mp-subhero + .mp-section {
    padding-top: 30px;
    padding-bottom: 48px;
  }
}

@media (max-width: 980px) {
  body.mmp-polish .mmp-stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.mmp-polish .mp-wed-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  body.mmp-polish .mp-wed-hero-photo.mmp-wedding-hero {
    width: 100%;
    max-width: 680px;
  }
}

@media (max-width: 640px) {
  body.mmp-polish .mp-contact-content#contact {
    scroll-margin-top: 92px;
  }
  body.mmp-polish .mmp-stories-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-block: 28px 42px;
    scroll-margin-top: 92px;
  }
  body.mmp-polish .mp-editorial-hero h1 {
    font-size: clamp(38px, 10vw, 62px);
    letter-spacing: -.035em;
  }
  body.mmp-polish .mp-editorial-body.entry-content h2 {
    font-size: 30px;
    scroll-margin-top: 92px;
  }
  body.mmp-polish .mp-editorial-body.entry-content h3 {
    font-size: 25px;
    scroll-margin-top: 92px;
  }
  body.mmp-polish .mp-wed-hero {
    padding: 112px 0 44px;
  }
  body.mmp-polish .mmp-wedding-collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    aspect-ratio: 4 / 9;
    gap: 4px;
    padding: 4px;
  }
  body.mmp-polish .mmp-story-photo {
    margin-block: 30px;
  }
  body.mmp-polish .mmp-story-photo figcaption {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mmp-polish #mp-nav .mmp-nav-group > summary .mmp-icon {
    transition: none;
  }
}
