/*
Theme Name: MEN'S LAB Library
Description: A lean Blocksy child theme for the MEN'S LAB editorial library.
Author: MEN'S LAB
Template: blocksy
Version: 1.0.0
Text Domain: menslab-library
*/

:root {
  --mlb-ink: #18251f;
  --mlb-green: #12382a;
  --mlb-gold: #bb914b;
  --mlb-paper: #f7f1e5;
  --mlb-paper-deep: #eee2ca;
  --mlb-line: #d5c5a9;
  --mlb-red: #9b3e35;
  --mlb-serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --mlb-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
}

body {
  color: var(--mlb-ink);
  background: var(--mlb-paper);
  font-family: var(--mlb-sans);
}

.mlb-site-header {
  border-bottom: 1px solid var(--mlb-line);
  background:
    linear-gradient(rgba(24, 37, 31, .028) 1px, transparent 1px),
    var(--mlb-paper);
  background-size: 22px 22px;
}

.mlb-site-header__inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.mlb-brand { min-width: 0; display: inline-flex; align-items: center; color: var(--mlb-ink); text-decoration: none; }
.mlb-brand__image { width: min(286px, 40vw); height: auto; display: block; mix-blend-mode: multiply; }
.mlb-brand__mark { width: 38px; height: 42px; flex: 0 0 auto; position: relative; border-left: 4px solid var(--mlb-green); border-right: 1px solid var(--mlb-gold); background: repeating-linear-gradient(to bottom, transparent 0 6px, rgba(18, 56, 42, .75) 6px 7px); }
.mlb-brand__mark::before, .mlb-brand__mark::after { position: absolute; top: 5px; bottom: 5px; width: 7px; border: 1px solid var(--mlb-green); content: ''; }
.mlb-brand__mark::before { left: 7px; }
.mlb-brand__mark::after { right: 6px; background: var(--mlb-gold); }
.mlb-brand__copy { min-width: 0; display: grid; gap: 1px; }
.mlb-brand__eyebrow { color: var(--mlb-red); font-size: 8px; font-weight: 850; letter-spacing: .18em; line-height: 1.2; }
.mlb-brand__name { font-family: var(--mlb-serif); font-size: clamp(23px, 2.4vw, 31px); font-weight: 800; letter-spacing: .06em; line-height: 1; white-space: nowrap; }
.mlb-brand__name em { color: var(--mlb-gold); font-style: normal; }
.mlb-brand__tagline { color: #5e574d; font-size: 9px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; }
.mlb-header-actions { display: flex; align-items: center; gap: 5px; }
.mlb-header-actions a { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; color: var(--mlb-green); font-size: 12px; font-weight: 800; text-decoration: none; }
.mlb-header-actions a:last-child { border: 1px solid var(--mlb-green); color: #fffaf0; background: var(--mlb-green); }
.mlb-header-actions a:hover { color: var(--mlb-red); }
.mlb-header-actions a:last-child:hover { color: #fffaf0; background: #1a4b39; }

.mlb-site-footer { padding: 38px 0; border-top: 3px solid var(--mlb-green); color: #eee2ca; background: #10291f; }
.mlb-site-footer__inner { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.mlb-site-footer p { margin: 7px 0 0; color: rgba(238, 226, 202, .72); font-size: 12px; }
.mlb-site-footer__links { display: flex; flex-wrap: wrap; gap: 14px; }
.mlb-site-footer__links a { min-height: 36px; display: inline-flex; align-items: center; color: #eee2ca; font-size: 12px; text-decoration: none; }

.mlb-library {
  background:
    linear-gradient(rgba(24, 37, 31, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 37, 31, .035) 1px, transparent 1px),
    var(--mlb-paper);
  background-size: 26px 26px;
}

.mlb-width { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.mlb-section { padding: 72px 0; }
.mlb-kicker { margin: 0 0 8px; color: var(--mlb-red); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.mlb-title { margin: 0; font-family: var(--mlb-serif); font-size: clamp(28px, 4vw, 48px); line-height: 1.3; }

.mlb-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--mlb-line);
  background: rgba(247, 241, 229, .96);
  backdrop-filter: blur(10px);
}

.mlb-nav__inner { min-height: 50px; display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.mlb-nav__link { min-height: 44px; padding: 0 13px; display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--mlb-green); font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.mlb-nav__link:hover, .mlb-nav__link:focus-visible { color: var(--mlb-red); text-decoration: underline; text-underline-offset: 5px; }

.mlb-hero { padding: 62px 0 52px; border-bottom: 1px solid var(--mlb-line); background: linear-gradient(110deg, #12382a, #1b4d3a); color: #fff8ea; }
.mlb-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: 44px; align-items: center; }
.mlb-hero .mlb-kicker { color: #e5c67e; }
.mlb-hero__copy { max-width: 620px; }
.mlb-hero .mlb-title { color: #fff8ea !important; }
.mlb-hero__description { max-width: 41em; margin: 20px 0 0; color: rgba(255, 248, 234, .86); font-size: 16px; line-height: 1.9; }
.mlb-hero__action { min-height: 50px; margin-top: 24px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5c67e; color: #fff8ea; background: transparent; font-weight: 800; text-decoration: none; }
.mlb-hero__action:hover { color: var(--mlb-green); background: #e5c67e; }
.mlb-hero__feature { overflow: hidden; border: 1px solid rgba(229, 198, 126, .65); background: #fffaf0; color: var(--mlb-ink); box-shadow: 12px 12px 0 rgba(0, 0, 0, .14); }
.mlb-hero__feature img { width: 100%; height: 240px; display: block; object-fit: cover; }
.mlb-hero__feature-copy { padding: 20px; }
.mlb-hero__feature-copy strong { display: block; font-family: var(--mlb-serif); font-size: 22px; line-height: 1.5; }
.mlb-hero__feature-copy strong a { color: var(--mlb-ink) !important; text-decoration: none; }
.mlb-hero__feature-copy strong a:hover { color: var(--mlb-red) !important; text-decoration: underline; text-underline-offset: 4px; }
.mlb-meta { margin: 0 0 10px; color: #6d614e; font-size: 12px; font-weight: 750; }

.mlb-heading { margin-bottom: 28px; padding-bottom: 15px; display: flex; align-items: end; justify-content: space-between; gap: 18px; border-bottom: 2px solid var(--mlb-green); }
.mlb-heading h2 { margin: 0; font-family: var(--mlb-serif); font-size: clamp(25px, 3vw, 38px); line-height: 1.25; }
.mlb-heading a { min-height: 44px; display: inline-flex; align-items: center; color: var(--mlb-green); font-size: 13px; font-weight: 800; }

.mlb-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.mlb-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--mlb-line); background: #fffaf0; box-shadow: 4px 5px 0 rgba(24, 37, 31, .08); }
.mlb-card__image { aspect-ratio: 16 / 9; overflow: hidden; background: var(--mlb-paper-deep); }
.mlb-card__image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .25s ease; }
.mlb-card:hover .mlb-card__image img { transform: scale(1.03); }
.mlb-card__body { min-width: 0; padding: 18px; }
.mlb-card__category { margin: 0 0 9px; color: var(--mlb-red); font-size: 11px; font-weight: 850; letter-spacing: .06em; }
.mlb-card h3 { margin: 0; font-family: var(--mlb-serif); font-size: 20px; line-height: 1.5; }
.mlb-card h3 a { color: inherit; text-decoration: none; }
.mlb-card h3 a:hover { color: var(--mlb-red); text-decoration: underline; text-underline-offset: 4px; }
.mlb-card__excerpt { margin: 12px 0 0; color: #5e574d; font-size: 14px; line-height: 1.75; }
.mlb-card__foot { margin-top: auto; padding: 0 18px 18px; color: #6d614e; font-size: 12px; }

.mlb-routes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--mlb-line); }
.mlb-route { min-height: 154px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--mlb-line); color: var(--mlb-green); background: #fffaf0; text-decoration: none; }
.mlb-route:last-child { border-right: 0; }
.mlb-route:hover { color: #fffaf0; background: var(--mlb-green); }
.mlb-route__number { color: var(--mlb-gold); font-size: 12px; font-weight: 800; }
.mlb-route strong { font-family: var(--mlb-serif); font-size: 20px; line-height: 1.42; }
.mlb-route span { font-size: 13px; font-weight: 800; }

.mlb-shelves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.mlb-shelf { padding: 24px; border-top: 4px solid var(--mlb-green); background: #fffaf0; }
.mlb-shelf h3 { margin: 0 0 16px; font-family: var(--mlb-serif); font-size: 28px; }
.mlb-shelf__list { margin: 0; padding: 0; list-style: none; }
.mlb-shelf__list li { border-top: 1px solid var(--mlb-line); }
.mlb-shelf__list a { min-height: 52px; display: flex; align-items: center; color: var(--mlb-ink); font-size: 14px; line-height: 1.55; text-decoration: none; }
.mlb-shelf__list a:hover { color: var(--mlb-red); }

.mlb-page-head { padding: 52px 0 34px; border-bottom: 1px solid var(--mlb-line); background: var(--mlb-paper-deep); }
.mlb-page-head p { max-width: 55em; margin: 16px 0 0; color: #5e574d; line-height: 1.8; }
.mlb-catalog { padding: 60px 0; }
.mlb-catalog .mlb-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mlb-pagination { margin-top: 40px; display: flex; justify-content: center; }
.mlb-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.mlb-pagination a, .mlb-pagination span { min-width: 44px; min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mlb-line); color: var(--mlb-green); background: #fffaf0; text-decoration: none; }
.mlb-pagination .current { color: #fffaf0; background: var(--mlb-green); }

.mlb-article { width: min(820px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 74px; }
.mlb-article__header { margin-bottom: 34px; padding-bottom: 26px; border-bottom: 2px solid var(--mlb-green); }
.mlb-article__header h1 { margin: 0; font-family: var(--mlb-serif); font-size: clamp(30px, 4.5vw, 50px); line-height: 1.42; }
.mlb-article__summary { margin: 22px 0 0; color: #5e574d; font-size: 16px; line-height: 1.9; }
.mlb-article__cover { margin: 0 0 34px; border: 1px solid var(--mlb-line); background: var(--mlb-paper-deep); }
.mlb-article__cover img { width: 100%; max-height: 480px; display: block; object-fit: cover; }
.mlb-content { color: #302f2b; font-size: 17px; line-height: 2; }
.mlb-content > * { max-width: 100%; }
.mlb-content h2 { margin: 2.2em 0 1em; padding: 0 0 .55em; border-bottom: 2px solid var(--mlb-green); font-family: var(--mlb-serif); font-size: clamp(24px, 3vw, 32px); line-height: 1.5; }
.mlb-content h3 { margin: 2em 0 .8em; color: var(--mlb-green); font-family: var(--mlb-serif); font-size: 23px; line-height: 1.5; }
.mlb-content a { color: #7c302c; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.mlb-content img { max-width: 100%; height: auto; }
.mlb-content table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
.mlb-content th, .mlb-content td { padding: 12px; border: 1px solid var(--mlb-line); text-align: left; vertical-align: top; }
.mlb-content th { color: #fffaf0; background: var(--mlb-green); }
.mlb-content .wp-block-table { max-width: 100%; overflow-x: auto; }
.mlb-content blockquote { margin: 2em 0; padding: 22px; border-left: 4px solid var(--mlb-gold); background: #f1e7d4; }
.mlb-content .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; border-radius: 0; background: var(--mlb-green); font-weight: 800; }

.mlb-related { margin-top: 62px; padding-top: 42px; border-top: 1px solid var(--mlb-line); }
.mlb-related h2 { margin: 0 0 22px; font-family: var(--mlb-serif); font-size: 30px; }

@media (max-width: 850px) {
  .mlb-hero__grid, .mlb-cards, .mlb-catalog .mlb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mlb-routes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mlb-route:nth-child(2) { border-right: 0; }
  .mlb-route:nth-child(-n + 2) { border-bottom: 1px solid var(--mlb-line); }
}

@media (max-width: 620px) {
  .mlb-width, .mlb-article { width: min(100% - 28px, 820px); }
  .mlb-section { padding: 48px 0; }
  .mlb-hero { padding: 44px 0; }
  .mlb-hero__grid, .mlb-cards, .mlb-catalog .mlb-cards, .mlb-shelves, .mlb-routes { grid-template-columns: minmax(0, 1fr); }
  .mlb-hero__feature { box-shadow: 6px 6px 0 rgba(0, 0, 0, .14); }
  .mlb-hero__feature img { height: 210px; }
  .mlb-heading { align-items: start; flex-direction: column; gap: 4px; }
  .mlb-card h3 { font-size: 19px; }
  .mlb-route, .mlb-route:nth-child(n) { min-height: 126px; border-right: 0; border-bottom: 1px solid var(--mlb-line); }
  .mlb-route:last-child { border-bottom: 0; }
  .mlb-shelf { padding: 20px; }
  .mlb-article { padding: 42px 0 56px; }
  .mlb-content { font-size: 16px; line-height: 1.95; }
  .mlb-content table { font-size: 13px; }
  .mlb-nav__inner { width: calc(100% - 14px); }
  .mlb-nav__link { padding: 0 10px; font-size: 12px; }
  .mlb-site-header__inner { min-height: 72px; gap: 8px; }
  .mlb-brand__image { width: min(205px, 57vw); }
  .mlb-brand__mark { width: 29px; height: 34px; }
  .mlb-brand__mark::before, .mlb-brand__mark::after { top: 4px; bottom: 4px; width: 5px; }
  .mlb-brand__mark::before { left: 5px; }
  .mlb-brand__mark::after { right: 4px; }
  .mlb-brand__eyebrow, .mlb-brand__tagline { font-size: 7px; }
  .mlb-brand__name { font-size: 22px; }
  .mlb-header-actions a { min-height: 40px; padding: 0 8px; font-size: 11px; }
  .mlb-header-actions a:first-child { display: none; }
  .mlb-site-footer__inner { align-items: start; flex-direction: column; }
}
