/*
Theme Name: Nest LMS
Theme URI: https://nestlms.com
Author: IndiEgg Studios
Author URI: https://indieggstudios.com
Description: A minimalist editorial WordPress block theme for the Nest LMS plugin marketplace and LMS sites built on it. Cream + sage palette, Newsreader serif paired with Sora sans, full-site editing, wide-format layouts, six built-in patterns covering hero, plugin catalog, bundle pricing, and more.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nest-lms
Tags: full-site-editing, block-patterns, wide-blocks, education, blog, business, custom-colors, custom-logo, custom-menu, editor-style, featured-images, threaded-comments
*/

/* ────────────────────────────────────────────────────────────────────────── */
/* Base                                                                       */
/* ────────────────────────────────────────────────────────────────────────── */

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #6a8a6f; color: #f6f1e6; }

a { color: inherit; }

/* The constrained content size is set in theme.json (1440px), but we still
   need horizontal padding on full-bleed sections so content doesn't kiss
   the viewport edge at 1441–1600px. */
.wp-site-blocks > .wp-block-template-part,
.wp-site-blocks > main {
  --nl-side-pad: 64px;
}
@media (max-width: 900px) {
  .wp-site-blocks > .wp-block-template-part,
  .wp-site-blocks > main { --nl-side-pad: 28px; }
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Header                                                                     */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(217, 208, 191, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(31, 27, 22, 0.08);
}

.nl-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.nl-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1f1b16;
}

.nl-brand-logo {
  width: 80px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nl-brand-logo img {
    width: 100px;
}

.nl-brand-wordmark {
  font-family: "Newsreader", serif;
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-bottom: -10px;
}
.nl-brand-wordmark em {
  color: #6a8a6f;
  font-style: normal;
}

.nl-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 15px;
}
.nl-nav a {
  color: #3a342d;
  text-decoration: none;
  font-weight: 500;
}
.nl-nav a:hover { color: #6a8a6f; }

.nl-header-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nl-header-cta a.signin {
  color: #3a342d;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.nl-btn-pill {
  background: #6a8a6f;
  color: #f6f1e6 !important;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: background .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nl-btn-pill:hover { background: #4f6b54; }
.nl-btn-pill.is-ink { background: #1f1b16; }
.nl-btn-pill.is-ink:hover { background: #3a342d; }

@media (max-width: 900px) {
  .nl-header-inner { padding: 16px 28px; gap: 20px; }
  .nl-nav { display: none; }
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Generic editorial helpers                                                  */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-eyebrow {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6a8a6f;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nl-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: #6a8a6f;
  display: block;
}

.nl-meta-row {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(31, 27, 22, 0.6);
}
.nl-meta-row .dot {
  width: 4px;
  height: 4px;
  background: rgba(31, 27, 22, 0.35);
  border-radius: 2px;
}

.nl-text-link {
  color: #1f1b16;
  padding: 16px 4px;
  border-bottom: 1.5px solid #1f1b16;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.nl-text-link.on-ink {
  color: #f6f1e6;
  border-bottom-color: #f6f1e6;
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Hero vignette (CourseChrome)                                               */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-chrome {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 460px;
  margin-left: auto;
}
.nl-chrome-back {
  position: absolute;
  inset: 8% -6% -2% 12%;
  background: #e6ede6;
  border-radius: 16px;
  border: 1px solid rgba(31, 27, 22, 0.08);
}
.nl-chrome-front {
  position: absolute;
  inset: 0 8% 8% -4%;
  background: #fbf8f0;
  border-radius: 16px;
  border: 1px solid rgba(31, 27, 22, 0.14);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 24px 50px -24px rgba(31, 27, 22, 0.18);
}
.nl-chrome-front .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nl-chrome-front .head .tag {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(31, 27, 22, 0.6);
  text-transform: uppercase;
}
.nl-chrome-front .head .dots { display: flex; gap: 6px; }
.nl-chrome-front .head .dots span {
  width: 8px; height: 8px; border-radius: 999px; background: #efe9d9;
}
.nl-chrome-front .head .dots span:first-child { background: #cdd9cf; }
.nl-chrome-front .title {
  font-family: "Newsreader", serif;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: #1f1b16;
}
.nl-chrome-front .lessons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.nl-chrome-front .lesson {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(31, 27, 22, 0.08);
}
.nl-chrome-front .lesson.is-current {
  background: #e6ede6;
  border-color: #cdd9cf;
}
.nl-chrome-front .lesson .pill {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f6f1e6;
  border: 1px solid rgba(31, 27, 22, 0.14);
  color: rgba(31, 27, 22, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
}
.nl-chrome-front .lesson.is-done .pill {
  background: #6a8a6f;
  border: none;
  color: #fbf8f0;
}
.nl-chrome-front .lesson .name {
  flex: 1;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  color: #1f1b16;
  font-weight: 500;
}
.nl-chrome-front .lesson .status {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  color: rgba(31, 27, 22, 0.6);
}
.nl-chrome-chip {
  position: absolute;
  bottom: -4%;
  right: -2%;
  background: #1f1b16;
  color: #fbf8f0;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 18px 36px -16px rgba(31, 27, 22, 0.4);
}
.nl-chrome-chip .live {
  width: 8px; height: 8px; border-radius: 999px; background: #6a8a6f;
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Catalog                                                                    */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-catalog { display: flex; flex-direction: column; gap: 80px; }

.nl-cat-group .nl-cat-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #1f1b16;
}
.nl-cat-head .name {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1f1b16;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nl-cat-head .name::before {
  content: "·";
  color: #6a8a6f;
  font-size: 18px;
  line-height: 1;
}
.nl-cat-head .blurb {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-size: 18px;
  color: #3a342d;
}

.nl-row {
  display: grid;
  grid-template-columns: 0.6fr 2.4fr 0.7fr 32px;
  align-items: center;
  gap: 28px;
  padding: 22px 4px;
  border-bottom: 1px solid rgba(31, 27, 22, 0.08);
  color: #1f1b16;
  text-decoration: none;
  transition: padding-left .18s ease;
}
.nl-row:hover {
  padding-left: 18px;
  background: linear-gradient(90deg, rgba(106, 138, 111, 0.06), transparent 60%);
}
.nl-row-name {
  font-family: "Newsreader", serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #1f1b16;
}
.nl-row-desc {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  color: #3a342d;
  line-height: 1.45;
}
.nl-row-price {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  color: #1f1b16;
  font-weight: 500;
}
.nl-row-price.is-free { color: #6a8a6f; }
.nl-row-arrow {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(31, 27, 22, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 27, 22, 0.6);
  font-size: 14px;
  transition: all .15s;
}
.nl-row:hover .nl-row-arrow {
  background: #6a8a6f;
  border-color: #6a8a6f;
  color: #f6f1e6;
  transform: translateX(4px);
}

.nl-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.nl-filters button {
  border: 1px solid rgba(31, 27, 22, 0.14);
  background: transparent;
  color: #3a342d;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.nl-filters button.is-active {
  border-color: #1f1b16;
  background: #1f1b16;
  color: #f6f1e6;
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Bundle (ink-on-cream inverted block)                                       */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-bundle-card {
  background: rgba(246, 241, 230, 0.04);
  border: 1px solid rgba(246, 241, 230, 0.14);
  border-radius: 18px;
  padding: 36px;
}
.nl-bundle-card .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
}
.nl-bundle-card .head .label {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(246, 241, 230, 0.55);
  text-transform: uppercase;
}
.nl-bundle-card .head .count {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  color: #6a8a6f;
}
.nl-bundle-card .item {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(246, 241, 230, 0.08);
  font-family: "Sora", sans-serif;
  font-size: 14px;
  color: #f6f1e6;
}
.nl-bundle-card .item:last-child { border-bottom: none; }
.nl-bundle-card .item .val {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  color: rgba(246, 241, 230, 0.6);
}
.nl-bundle-card .item .val.is-included {
  color: #6a8a6f;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Principles                                                                 */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-principle {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid rgba(31, 27, 22, 0.14);
}
.nl-principle:last-child { border-bottom: 1px solid rgba(31, 27, 22, 0.14); }
.nl-principle .num {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  color: #6a8a6f;
  letter-spacing: 0.1em;
}
.nl-principle h3 {
  font-family: "Newsreader", serif;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: #1f1b16;
}
.nl-principle p {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #3a342d;
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Newsletter                                                                 */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-newsletter-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fbf8f0;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(31, 27, 22, 0.14);
  min-width: 380px;
}
.nl-newsletter-form input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  padding: 12px 18px;
  font-size: 15px;
  color: #1f1b16;
  font-family: "Sora", sans-serif;
}
.nl-newsletter-form button {
  background: #6a8a6f;
  color: #f6f1e6;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: "Sora", sans-serif;
}
.nl-newsletter-form button:hover { background: #4f6b54; }

/* ────────────────────────────────────────────────────────────────────────── */
/* Footer                                                                     */
/* ────────────────────────────────────────────────────────────────────────── */

.nl-footer {
  background: #1f1b16;
  color: #f6f1e6;
  padding: 100px 0 50px;
}
.nl-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
}
.nl-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(246, 241, 230, 0.12);
}
.nl-footer-grid h4 {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 241, 230, 0.5);
  margin: 0 0 18px;
  font-weight: 400;
}
.nl-footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nl-footer-grid a {
  color: rgba(246, 241, 230, 0.85);
  text-decoration: none;
  font-family: "Sora", sans-serif;
  font-size: 14px;
}
.nl-footer-grid a:hover { color: #6a8a6f; }
.nl-footer-blurb {
  font-family: "Sora", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(246, 241, 230, 0.6);
  margin: 0;
  max-width: 320px;
}
.nl-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: -50px;
  margin-right: 40px;
}
.nl-footer-brand .logo-slot {
  width: 140px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-slot img {
    width: 150px;
}
.nl-footer-brand .wordmark {
  font-family: "Newsreader", serif;
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-botton: -15px;
}
.nl-footer-brand .wordmark em { color: #6a8a6f; font-style: normal; }
.nl-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  gap: 24px;
  flex-wrap: wrap;
}
.nl-footer-bottom .copyright {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(246, 241, 230, 0.45);
  text-transform: uppercase;
}
.nl-footer-bottom .socials { display: flex; gap: 24px; }
.nl-footer-bottom .socials a {
  color: rgba(246, 241, 230, 0.6);
  font-family: "Sora", sans-serif;
  font-size: 13px;
  text-decoration: none;
}

/* ────────────────────────────────────────────────────────────────────────── */
/* Responsive – consolidate the heavy grids                                   */
/* ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .nl-cat-group .nl-cat-head { grid-template-columns: 1fr; gap: 12px; }
  .nl-row { grid-template-columns: 1fr 1fr; }
  .nl-row .nl-row-desc { grid-column: 1 / -1; }
  .nl-row .nl-row-arrow { justify-self: end; }
  .nl-footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nl-newsletter-form { min-width: 0; width: 100%; }
  .nl-footer-grid { grid-template-columns: 1fr; }
  .nl-row { grid-template-columns: 1fr; gap: 8px; }
  .nl-row-price { text-align: left; }
}
