/* neverminds.css — shared design system + responsive rules for the site.
   Layout/grids live here; dynamic brand colours stay inline where pages need them. */

:root {
  --nm-navy:   #071A35;
  --nm-teal:   #12C8BE;
  --nm-lime:   #86D11F;
  --nm-orange: #FF7A00;
  --nm-purple: #7436E8;
  --nm-cream:  #FBF7F0;
  --nm-sand:   #F2EBDF;
  --nm-mute:   #5B6677;
  --nm-line:   rgba(7,26,53,0.08);
  --nm-line-2: rgba(7,26,53,0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--nm-cream);
  color: var(--nm-navy);
}
h1,h2,h3,h4,p { text-wrap: pretty; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.nm-wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px); }
.nm-section { margin-top: clamp(48px, 7vw, 88px); }

/* ---------- NAV ---------- */
.nm-nav-outer {
  --nm-nav-top-gap: clamp(8px, 1.2vw, 16px);
  position: sticky; top: 0; z-index: 50; padding-top: var(--nm-nav-top-gap);
}
.nm-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: #fff; border: 1px solid var(--nm-line); border-radius: 999px;
  padding: 11px 12px 11px 24px; box-shadow: 0 10px 30px rgba(7,26,53,0.07);
}
.nm-nav-links { display: flex; gap: clamp(16px, 2vw, 30px); align-items: center; font-size: 15px; }
.nm-nav-links a { opacity: 0.78; transition: opacity .15s; }
.nm-nav-links a:hover { opacity: 1; }
.nm-nav-links a.active { opacity: 1; font-weight: 600; }
.nm-cta {
  background: var(--nm-orange); color: #fff; padding: 11px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform .15s, filter .15s;
}
.nm-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.nm-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px;
  width: 44px; height: 44px; align-items: center; justify-content: center; }
.nm-burger span { display: block; width: 22px; height: 2px; background: var(--nm-navy); position: relative; }
.nm-burger span::before, .nm-burger span::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--nm-navy); transition: transform .2s; }
.nm-burger span::before { top: -7px; } .nm-burger span::after { top: 7px; }

.nm-drawer { display: none; }
.nm-drawer.open { display: flex; flex-direction: column; gap: 4px; margin-top: 10px;
  background: #fff; border: 1px solid var(--nm-line); border-radius: 22px; padding: 10px; box-shadow: 0 14px 40px rgba(7,26,53,0.10); }
.nm-drawer a { padding: 14px 18px; border-radius: 14px; font-size: 17px; }
.nm-drawer a:hover { background: var(--nm-cream); }
.nm-drawer a.active { background: var(--nm-cream); font-weight: 600; }

/* ---------- BENTO HERO ---------- */
.nm-bento {
  display: grid; gap: clamp(12px, 1.3vw, 18px);
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(168px, auto);
  grid-template-areas:
    "head head img  img"
    "head head img  img"
    "head head purp purp";
}
.bento-head { grid-area: head; } .bento-teal { grid-area: teal; }
.bento-lime { grid-area: lime; } .bento-img  { grid-area: img;  }
.bento-navy { grid-area: navy; } .bento-purp { grid-area: purp; }

/* ---------- GENERIC RESPONSIVE GRIDS ---------- */
.nm-grid-4 { display: grid; gap: clamp(12px, 1.3vw, 18px); grid-template-columns: repeat(4, 1fr); }
.nm-grid-3 { display: grid; gap: clamp(14px, 1.6vw, 22px); grid-template-columns: repeat(3, 1fr); }
.nm-grid-2 { display: grid; gap: clamp(16px, 2.5vw, 40px); grid-template-columns: repeat(2, 1fr); }

.nm-card { background: #fff; border: 1px solid var(--nm-line); border-radius: 24px; box-shadow: 0 4px 16px rgba(7,26,53,0.05); }
.nm-card-h { transition: transform .18s, box-shadow .18s; }
.nm-card-h:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(7,26,53,0.10); }

.nm-feat { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
@media (max-width: 760px) { .nm-feat { grid-template-columns: 1fr; } .nm-feat .nm-feat-img { min-height: 220px; } }

.nm-row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- JOURNAL TOOLBAR ---------- */
.nm-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nm-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--nm-line-2); border-radius: 999px; padding: 13px 22px; color: var(--nm-mute); font-size: 15px; }
.nm-search input { border: none; outline: none; background: none; font: inherit; color: var(--nm-navy); flex: 1; }
.nm-search .nm-search-clear { cursor: pointer; color: var(--nm-mute); background: none; border: none; font: inherit; padding: 0; display: none; }
.nm-chip-btn { padding: 12px 18px; border-radius: 999px; font-size: 14px; white-space: nowrap;
  background: #fff; border: 1px solid var(--nm-line-2); cursor: pointer; transition: all .15s; color: var(--nm-navy); font: inherit; }
.nm-chip-btn:hover { border-color: var(--nm-navy); }
.nm-chip-btn.active { background: var(--nm-navy); color: #fff; border-color: var(--nm-navy); }

/* ---------- WORTH YOUR TIME ---------- */
.nm-featured-row {
  display: grid; grid-template-columns: minmax(0,2fr) minmax(240px,1fr);
  gap: clamp(14px,1.6vw,22px); align-items: stretch;
}
.nm-featured-row > .nm-card { height: 100%; }
.nm-journal-trove-link {
  display: grid; grid-template-rows: minmax(148px, .9fr) minmax(190px, 1.1fr); overflow: hidden;
  background: #fff; border: 1px solid var(--nm-line-2); border-radius: 28px; transition: transform .18s, box-shadow .18s;
}
.nm-journal-trove-link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(7,26,53,0.08); }
.nm-journal-trove-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: clamp(26px,3vw,40px);
  background: var(--nm-navy); color: #fff;
}
.nm-journal-trove-head > span:first-child { display: flex; flex-direction: column; gap: 8px; }
.nm-journal-trove-link strong { font-size: clamp(22px,2.2vw,30px); line-height: 1.08; font-weight: 600; letter-spacing: -.025em; }
.nm-journal-trove-link small { color: rgba(255,255,255,.68); font-size: 15px; line-height: 1.5; }
.nm-journal-trove-arrow { flex-shrink: 0; color: var(--nm-orange); font-size: 36px; line-height: 1; }
.nm-book-shelf {
  display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 30px clamp(20px,2.5vw,34px) 24px;
  position: relative; overflow: hidden;
}
.nm-book-shelf::after {
  content: ""; position: absolute; left: clamp(18px,2vw,28px); right: clamp(18px,2vw,28px); bottom: 21px;
  height: 8px; border-radius: 999px; background: var(--nm-navy);
}
.nm-book {
  display: block; width: 16%; max-width: 48px; min-width: 28px; border-radius: 6px 6px 2px 2px; position: relative; z-index: 1;
}
.nm-book::before { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 3px; background: rgba(255,255,255,.72); }
.nm-book:nth-child(1) { height: 78%; background: var(--nm-orange); }
.nm-book:nth-child(2) { height: 62%; background: var(--nm-teal); }
.nm-book:nth-child(3) { height: 88%; background: var(--nm-lime); }
.nm-book:nth-child(4) { height: 74%; background: var(--nm-purple); transform: rotate(7deg); transform-origin: bottom center; margin: 0 5px 0 3px; }
.nm-book:nth-child(5) { height: 55%; background: var(--nm-sand); border: 1px solid var(--nm-line-2); }
.nm-book:nth-child(5)::before { background: rgba(7,26,53,.18); }
.nm-book:nth-child(6) { height: 70%; background: var(--nm-navy); }

.nm-founder-context { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nm-about-reading-link {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 19px;
  background: #fff; border: 1px solid var(--nm-line); border-radius: 18px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.nm-about-reading-link:hover { transform: translateY(-2px); border-color: var(--nm-line-2); box-shadow: 0 10px 24px rgba(7,26,53,.07); }
.nm-about-reading-link > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.nm-about-reading-link small { color: var(--nm-orange); font-family: 'JetBrains Mono',monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.nm-about-reading-link strong { font-size: 18px; font-weight: 600; }
.nm-about-reading-link strong + span { color: var(--nm-mute); font-size: 13px; line-height: 1.4; }
.nm-about-reading-link > span:last-child { flex-shrink: 0; color: var(--nm-orange); font-size: 26px; }

.wyt-category-nav { display: flex; flex-wrap: wrap; gap: 9px; margin-top: clamp(26px,4vw,40px); }
.wyt-category-link { display: inline-flex; align-items: center; gap: 8px; }
.wyt-category-link:hover { background: var(--nm-navy); color: #fff; }
.wyt-category-link span { font-size: 11px; }
.wyt-category-nav + .nm-section { margin-top: clamp(40px,6vw,72px); }
.wyt-category-nav ~ section[id] { scroll-margin-top: 130px; }
.wyt-category-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.wyt-category-heading > div { display: flex; align-items: center; gap: 13px; }
.wyt-category-heading h2 { font-size: clamp(27px,3.5vw,38px); letter-spacing: -.03em; line-height: 1.08; }
.wyt-category-heading p { max-width: 440px; color: var(--nm-mute); line-height: 1.5; text-align: right; font-size: 14px; }
.wyt-category-mark { width: 11px; height: 38px; border-radius: 999px; flex-shrink: 0; }
.wyt-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: clamp(12px,1.3vw,18px); align-items: stretch; }
.wyt-book { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.wyt-cover { height: 310px; position: relative; display: flex; justify-content: center; align-items: center; padding: 28px 24px 22px; background: linear-gradient(150deg,#f8f4ed,#ebe4d8); border-bottom: 4px solid var(--wyt-accent); }
.wyt-cover img { display: block; width: auto; height: auto; max-width: 88%; max-height: 255px; object-fit: contain; filter: drop-shadow(0 12px 12px rgba(7,26,53,.17)); }
.wyt-cover img.wyt-bookshot { transform: scale(1.42); }
.wyt-book-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 21px; }
.wyt-type { color: var(--nm-mute); font-family: 'JetBrains Mono',monospace; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.wyt-book h3 { margin-top: 9px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.wyt-author { margin-top: 5px; color: var(--nm-mute); font-size: 13px; }
.wyt-book p { margin-top: 16px; color: #344155; font-size: 14px; line-height: 1.55; }
.wyt-edition { margin-top: 12px; padding: 7px 9px; border-radius: 8px; background: var(--nm-cream); color: var(--nm-mute); font-size: 11px; line-height: 1.4; }
.wyt-read { margin-top: auto; padding-top: 19px; font-size: 13px; font-weight: 600; }

/* ---------- ARTICLE ---------- */
.nm-prose { max-width: 720px; margin: 0 auto; }
.nm-prose p { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.72; color: #1c2a3f; margin: 0 0 22px; }
.nm-prose h2 { font-size: clamp(24px, 3vw, 31px); letter-spacing: -0.02em; font-weight: 600; margin: 44px 0 14px; }
.nm-prose h3 { font-size: clamp(19px, 2vw, 22px); font-weight: 600; margin: 32px 0 10px; }
.nm-prose ul { padding-left: 22px; margin: 0 0 22px; }
.nm-prose li { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; color: #1c2a3f; margin-bottom: 10px; }
.nm-prose blockquote { margin: 30px 0; padding: 4px 0 4px 26px; border-left: 4px solid var(--nm-teal);
  font-size: clamp(20px, 2.2vw, 25px); line-height: 1.4; font-weight: 500; letter-spacing: -0.01em; }
.nm-prose strong { font-weight: 600; }
.nm-prose .nm-subtitle { font-size: clamp(18px, 2vw, 22px); color: var(--nm-mute); font-weight: 500; margin: 10px 0 0; }
.nm-prose p a, .nm-prose li a, .nm-prose blockquote a { color: var(--nm-orange); text-decoration: underline; text-decoration-color: rgba(255,122,0,0.35); text-underline-offset: 2px; }
.nm-prose p a:hover, .nm-prose li a:hover, .nm-prose blockquote a:hover { text-decoration-color: currentColor; }

.nm-next-article {
  display: block; margin: 40px 0 8px; padding: clamp(22px, 4vw, 30px);
  background: #fff; border: 1px solid var(--nm-line-2); border-radius: 22px;
  box-shadow: 0 4px 16px rgba(7,26,53,.05);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.nm-next-article:hover {
  transform: translateY(-2px); border-color: rgba(134,209,31,.55);
  box-shadow: 0 14px 32px rgba(7,26,53,.09);
}
.nm-next-article-label {
  display: block; margin-bottom: 10px; color: var(--nm-lime);
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
}
.nm-next-article-content { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nm-next-article-content > span:first-child { display: flex; flex-direction: column; gap: 8px; }
.nm-next-article strong { font-size: clamp(20px, 2.5vw, 25px); line-height: 1.2; letter-spacing: -.02em; }
.nm-next-article-copy { color: var(--nm-mute); font-size: 15px; line-height: 1.55; }
.nm-next-article-arrow {
  flex-shrink: 0; color: var(--nm-orange); font-size: 34px; line-height: 1;
  transition: transform .18s;
}
.nm-next-article:hover .nm-next-article-arrow { transform: translateX(4px); }

/* Article images: not carousel images, not explicitly opted out */
.nm-prose img:not(.image-gallery-index img):not(.no-lightbox) {
  width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(7,26,53,0.12); margin: 12px 0; display: block;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nm-prose img:not(.image-gallery-index img):not(.no-lightbox):hover {
  transform: translateY(-2px); box-shadow: 0 4px 16px rgba(7,26,53,0.16);
}

/* ---------- CAROUSEL / IMAGE GALLERY ---------- */
.image-gallery-index { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; margin: 12px 0; }
.image-gallery-index a { display: block; text-decoration: none !important; flex: 1; min-width: 0; }
.image-gallery-index a:only-child { flex: 1 1 100%; }
.image-gallery-index a:nth-last-child(2):first-child,
.image-gallery-index a:nth-last-child(2):first-child + a { flex: 1 1 calc(50% - 6px); }
.image-gallery-index a:nth-child(n+4) { flex: 1 1 calc(33.333% - 8px); }
.image-gallery-index img {
  width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(7,26,53,0.12); display: block; transition: transform .2s ease, box-shadow .2s ease;
}
.image-gallery-index img:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(7,26,53,0.16); }
.image-gallery-index .carousel-image--top { object-position: top; }
.image-gallery-index .carousel-image--center { object-position: center; }
.image-gallery-index .carousel-image--bottom { object-position: bottom; }
.image-gallery-index span { display: block; text-align: center; padding: 8px 0; font-style: italic; font-size: 14px; color: var(--nm-mute); }

/* ---------- DOWNLOAD NOTE / CHANGELOG ---------- */
.download-note { background: rgba(255,122,0,0.06); border-left: 3px solid var(--nm-orange); padding: 12px 16px; margin: 0 0 24px; border-radius: 0 4px 4px 0; }
.download-note p { margin: 0 !important; font-size: 14px !important; color: var(--nm-navy); line-height: 1.5; }
.download-note a { font-weight: 500; text-decoration: underline; }

.changelog { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--nm-line-2); }
.changelog h3 { font-size: 20px; font-weight: 600; color: var(--nm-mute); margin-bottom: 16px; }
.changelog--content { border: 1px solid var(--nm-line); border-radius: 8px; padding: 20px; }
.changelog--entry { margin-bottom: 16px; }
.changelog--entry:last-child { margin-bottom: 0; }
.changelog--date { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--nm-mute); font-weight: 500; }
.changelog--content ul { margin: 6px 0 0; padding-left: 20px; }
.changelog--content li { font-size: 14px !important; line-height: 1.5 !important; color: #1c2a3f; margin-bottom: 4px !important; }

/* ---------- PLACEHOLDER (striped cover when no image is set) ---------- */
.nm-placeholder {
  position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 1px solid rgba(255,255,255,0.16);
}
.nm-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 11px, rgba(255,255,255,0.10) 11px 22px);
}
.nm-placeholder span {
  position: relative; font-family: 'JetBrains Mono','Courier New',monospace; font-size: 12px;
  letter-spacing: 0.04em; color: rgba(255,255,255,0.55); text-transform: uppercase; padding: 4px 10px;
}

/* ---------- FOOTER ---------- */
.nm-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  color: var(--nm-mute); font-size: 14px; }
.nm-footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.nm-footer-links a:hover { color: var(--nm-navy); }
.nm-footer-legal { flex: 1; text-align: center; color: var(--nm-mute); font-size: 12px; }
.nm-footer-legal a { color: inherit; }
.nm-footer-legal a:hover { color: var(--nm-navy); }

/* ---------- BREAKPOINTS ---------- */
@media (max-width: 1024px) {
  .nm-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .wyt-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .nm-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(150px, auto);
    grid-template-areas:
      "head head"
      "img  img"
      "purp purp";
  }
}
@media (max-width: 900px) {
  .nm-featured-row { grid-template-columns: 1fr; }
  .nm-journal-trove-link { min-height: 340px; grid-template-rows: minmax(140px,.8fr) minmax(190px,1fr); }
  .nm-book { max-width: 64px; }
}
@media (max-width: 760px) {
  .nm-nav-links { display: none; }
  .nm-burger { display: flex; }
  .nm-grid-3 { grid-template-columns: 1fr; }
  .nm-grid-2 { grid-template-columns: 1fr; }
  .wyt-category-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .wyt-category-heading p { padding-left: 24px; text-align: left; }
}
@media (max-width: 600px) {
  .nm-home-section-heading { flex-direction: column; align-items: flex-start; }
  .nm-grid-4 { grid-template-columns: 1fr; }
  .nm-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    grid-template-areas: "head" "img" "purp";
  }
  .bento-img { min-height: 240px; }
  .nm-footer { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
  .nm-footer-legal { flex: none; }
  .nm-footer-links { justify-content: center; }
  .wyt-grid { grid-template-columns: 1fr; }
  .wyt-cover { height: 290px; }
}
