/*
Theme Name: Northspring Mosaic
Author: Rowan Vale Studio
Description: A classic mobile-first WordPress theme with an Ecospire-inspired sustainability mosaic layout.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: t9s-theme
*/

:root {
  --t9s-night: #0a0a0a;
  --t9s-ink: #161616;
  --t9s-muted: #6c6c6c;
  --t9s-line: rgba(10, 10, 10, 0.13);
  --t9s-paper: #fbf7f4;
  --t9s-white: #ffffff;
  --t9s-lime: #d1f843;
  --t9s-lime-soft: #e9fc8e;
  --t9s-lime-pale: #f9fed9;
  --t9s-glass: rgba(255, 255, 255, 0.08);
  --t9s-shadow: 0 18px 54px rgba(10, 10, 10, 0.14);
  --t9s-radius: 8px;
  --t9s-font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--t9s-paper);
  color: var(--t9s-ink);
  font-family: var(--t9s-font);
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

.t9s-body {
  min-height: 100vh;
}

.t9s-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--t9s-lime);
  color: var(--t9s-night);
  font-weight: 800;
}

.t9s-skip-link:focus {
  transform: translateY(0);
}

.t9s-shell {
  width: min(92vw, 1180px);
  margin-inline: auto;
}

.t9s-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--t9s-night);
  color: var(--t9s-white);
}

.t9s-nav-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding-block: 14px;
}

.t9s-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  color: var(--t9s-white);
  font-weight: 900;
  text-decoration: none;
}

.t9s-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--t9s-lime);
  box-shadow: inset 0 0 0 8px var(--t9s-night), 0 0 0 1px var(--t9s-lime);
  flex: 0 0 auto;
}

.t9s-brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t9s-brand-tagline {
  display: none;
  margin: 2px 0 0 44px;
  color: #e6e6e6;
  font-size: 0.78rem;
}

.t9s-nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--t9s-glass);
  color: var(--t9s-white);
  cursor: pointer;
}

.t9s-nav-toggle-line,
.t9s-nav-toggle-line::before,
.t9s-nav-toggle-line::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.t9s-nav-toggle-line {
  position: relative;
}

.t9s-nav-toggle-line::before,
.t9s-nav-toggle-line::after {
  position: absolute;
  left: 0;
}

.t9s-nav-toggle-line::before {
  top: -5px;
}

.t9s-nav-toggle-line::after {
  top: 5px;
}

.t9s-primary-nav {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
}

.t9s-site-header.t9s-nav-open .t9s-primary-nav {
  max-height: 520px;
}

.t9s-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 10px 0 4px;
  list-style: none;
}

.t9s-menu ul {
  margin: 8px 0 0;
  padding: 8px 0 0 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  list-style: none;
}

.t9s-menu a {
  display: block;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 999px;
  color: #e6e6e6;
  text-decoration: none;
}

.t9s-menu a:hover,
.t9s-menu a:focus {
  background: var(--t9s-lime);
  color: var(--t9s-night);
}

.t9s-main {
  min-height: 60vh;
}

.t9s-hero {
  overflow: hidden;
  background: var(--t9s-night);
  color: var(--t9s-white);
}

.t9s-hero-grid {
  display: grid;
  gap: 28px;
  padding-block: 44px 34px;
}

.t9s-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: var(--t9s-glass);
  color: var(--t9s-lime-soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.t9s-kicker::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--t9s-lime);
  content: "";
}

.t9s-hero-title {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.35rem, 8vw, 5.9rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
}

.t9s-hero-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: #e6e6e6;
  font-size: clamp(1rem, 3vw, 1.18rem);
}

.t9s-button-row,
.t9s-chip-rack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.t9s-button-row {
  margin-top: 24px;
}

.t9s-chip-rack {
  margin-top: 20px;
}

.t9s-button,
.t9s-tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.t9s-button {
  min-height: 46px;
  padding: 12px 16px;
}

.t9s-button-primary {
  background: var(--t9s-lime);
  color: var(--t9s-night);
}

.t9s-button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--t9s-glass);
  color: var(--t9s-white);
}

.t9s-tag-chip {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--t9s-line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--t9s-night);
  font-size: 0.83rem;
}

.t9s-hero .t9s-tag-chip {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: var(--t9s-white);
}

.t9s-tag-chip:hover,
.t9s-tag-chip:focus {
  background: var(--t9s-lime);
  color: var(--t9s-night);
}

.t9s-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 74px;
  gap: 8px;
  min-height: 390px;
}

.t9s-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--t9s-radius);
  background: var(--t9s-glass);
}

.t9s-tile-lime {
  grid-column: span 4;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: var(--t9s-lime);
  color: var(--t9s-night);
}

.t9s-tile-dark {
  grid-column: span 2;
  grid-row: span 2;
  background: #151515;
}

.t9s-tile-paper {
  grid-column: span 3;
  grid-row: span 2;
  padding: 16px;
  background: var(--t9s-paper);
  color: var(--t9s-night);
}

.t9s-tile-line {
  grid-column: span 3;
  grid-row: span 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.t9s-tile-mini,
.t9s-tile-quiet {
  grid-column: span 2;
  grid-row: span 1;
}

.t9s-tile-mini {
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.t9s-tile-quiet {
  background: var(--t9s-lime-pale);
}

.t9s-tile-title {
  margin: 0;
  font-size: clamp(1.3rem, 6vw, 2.25rem);
  font-weight: 900;
  line-height: 1;
}

.t9s-tile-caption,
.t9s-tile-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.t9s-section {
  padding-block: 48px;
}

.t9s-section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.t9s-section-label {
  color: var(--t9s-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.t9s-section-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.t9s-section-copy {
  max-width: 650px;
  margin: 0;
  color: var(--t9s-muted);
}

.t9s-widget-grid,
.t9s-post-grid,
.t9s-pulse-strip,
.t9s-post-nav {
  display: grid;
  gap: 16px;
}

.t9s-home-panel {
  padding-block: 32px 0;
  background: var(--t9s-paper);
}

.t9s-widget,
.t9s-empty-state {
  padding: 18px;
  border: 1px solid var(--t9s-line);
  border-radius: var(--t9s-radius);
  background: var(--t9s-white);
}

.t9s-post-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--t9s-line);
  border-radius: var(--t9s-radius);
  background: var(--t9s-white);
  box-shadow: var(--t9s-shadow);
}

.t9s-post-media {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--t9s-lime-pale);
  text-decoration: none;
}

.t9s-post-media-empty {
  display: grid;
  place-items: center;
}

.t9s-post-media-empty::before {
  width: min(48%, 170px);
  aspect-ratio: 1;
  border: 18px solid var(--t9s-lime);
  border-radius: 50%;
  content: "";
}

.t9s-post-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t9s-post-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.t9s-post-meta,
.t9s-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--t9s-muted);
  font-weight: 800;
}

.t9s-post-title {
  margin: 0;
  font-size: clamp(1.3rem, 5vw, 1.82rem);
  font-weight: 900;
  line-height: 1.08;
}

.t9s-post-title a,
.t9s-post-link,
.t9s-back-link,
.t9s-post-nav a {
  text-decoration: none;
}

.t9s-post-excerpt {
  margin: 0;
  color: var(--t9s-muted);
}

.t9s-post-link {
  width: fit-content;
  font-weight: 900;
}

.t9s-post-link::after {
  content: " ->";
}

.t9s-pulse-strip {
  padding-block: 0 48px;
}

.t9s-mini-card {
  padding: 18px;
  border-radius: var(--t9s-radius);
  background: var(--t9s-lime);
}

.t9s-mini-card:nth-child(2) {
  background: var(--t9s-night);
  color: var(--t9s-white);
}

.t9s-mini-card:nth-child(3) {
  background: var(--t9s-white);
}

.t9s-mini-value {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
}

.t9s-mini-label {
  margin: 6px 0 0;
  font-weight: 800;
}

.t9s-page-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.t9s-page-nav a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--t9s-night);
  color: var(--t9s-white);
  font-weight: 800;
  text-decoration: none;
}

.t9s-single-shell {
  width: min(80vw, 980px);
  margin: 0 auto;
  padding-block: 42px 64px;
}

.t9s-back-link {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  color: var(--t9s-muted);
  font-weight: 900;
}

.t9s-single-title {
  margin: 0;
  font-size: clamp(2.2rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
}

.t9s-single-content {
  overflow-wrap: anywhere;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--t9s-line);
}

.t9s-single-content blockquote {
  margin-inline: 0;
  padding: 16px 18px;
  border-left: 6px solid var(--t9s-lime);
  background: var(--t9s-white);
}

.t9s-single-content table {
  width: 100%;
  border-collapse: collapse;
}

.t9s-single-content th,
.t9s-single-content td {
  padding: 10px;
  border: 1px solid var(--t9s-line);
}

.t9s-single-footer {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--t9s-line);
}

.t9s-post-nav a {
  display: block;
  padding: 14px;
  border: 1px solid var(--t9s-line);
  border-radius: var(--t9s-radius);
  background: var(--t9s-white);
  font-weight: 900;
}

.t9s-site-footer {
  background: var(--t9s-night);
  color: var(--t9s-white);
}

.t9s-footer-grid {
  display: grid;
  gap: 24px;
  padding-block: 42px 24px;
}

.t9s-footer-title {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
}

.t9s-footer-copy {
  max-width: 560px;
  color: #e6e6e6;
}

.t9s-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #e6e6e6;
  font-size: 0.86rem;
}

.t9s-search-form {
  display: flex;
  gap: 8px;
  width: min(100%, 420px);
  margin-top: 18px;
}

.t9s-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.t9s-search-field {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--t9s-white);
}

.t9s-search-submit {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--t9s-lime);
  color: var(--t9s-night);
  font-weight: 900;
  cursor: pointer;
}

@media (min-width: 700px) {
  .t9s-brand-tagline {
    display: block;
  }

  .t9s-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    padding-block: 64px 54px;
  }

  .t9s-widget-grid,
  .t9s-pulse-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .t9s-post-grid,
  .t9s-post-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .t9s-nav-shell {
    grid-template-columns: auto 1fr;
    padding-block: 18px;
  }

  .t9s-nav-toggle {
    display: none;
  }

  .t9s-primary-nav {
    grid-column: auto;
    max-height: none;
    overflow: visible;
    justify-self: end;
  }

  .t9s-menu {
    flex-direction: row;
    align-items: center;
    padding: 0;
  }

  .t9s-menu ul {
    position: absolute;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--t9s-radius);
    background: var(--t9s-night);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  .t9s-menu li {
    position: relative;
  }

  .t9s-menu li:hover > ul,
  .t9s-menu li:focus-within > ul {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .t9s-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .t9s-post-card:first-child {
    grid-column: span 2;
  }
}
