/* ==========================================================================
   News & Media — listing page and article pages
   Loaded after styles.css. Keeps the site palette (forest green, pollen
   yellow) and Outfit; adds a greenhouse-hoop frame for the lead story.
   ========================================================================== */

:root {
  --forest: #1E4229;
  --leaf: #2B5C3A;
  --shoot: #3A7A4E;
  --pollen: #FACC15;
  --ink: #1E293B;
  --ink-soft: #475569;
  --film: #F4F7F2;
  --rule: #DCE5DA;
  --news-max: 1200px;
}

/* ---------- Shared bits ---------- */

.story-cat {
  color: var(--shoot);
  font-weight: 600;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}

.story-meta time {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
video:focus-visible {
  outline: 3px solid var(--pollen);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Listing page
   ========================================================================== */

body.news-page {
  background: var(--film);
}

.news-masthead {
  background: var(--forest);
  color: #fff;
  padding: 4.5rem 2rem 0;
  position: relative;
  overflow: hidden;
}

/* faint greenhouse-film texture: vertical hoops */
.news-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 120px);
  pointer-events: none;
}

.news-masthead-inner {
  max-width: var(--news-max);
  margin: 0 auto;
  position: relative;
}

.news-masthead h1 {
  color: #fff;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 1rem;
}

.news-masthead-intro {
  max-width: 34rem;
  color: #C9DCCD;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Lead story ---------- */

.lead-story {
  max-width: var(--news-max);
  margin: 3.5rem auto 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 4rem;
  align-items: end;
  padding-bottom: 4.5rem;
}

.lead-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  margin: 1.5rem 1.5rem 0 0;
}

/* the greenhouse hoop: an arched frame offset behind the photo */
.lead-media::before {
  content: "";
  position: absolute;
  inset: -1.25rem -1.25rem 1.25rem 1.25rem;
  border: 2px solid var(--pollen);
  border-radius: 50% 50% 14px 14px / 30% 30% 14px 14px;
  pointer-events: none;
}

.lead-media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50% 50% 14px 14px / 30% 30% 14px 14px;
  display: block;
}

.lead-tag {
  display: inline-block;
  background: var(--pollen);
  color: var(--forest);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.lead-text .story-meta {
  color: #A9C4AF;
  font-size: 0.95rem;
}

.lead-text .story-cat {
  color: var(--pollen);
}

.lead-text h2 {
  text-align: left;
  font-size: clamp(1.9rem, 3.4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  max-width: 20ch;
}

.lead-text h2 a {
  color: #fff;
  text-decoration: none;
}

.lead-text h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--pollen);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.lead-text > p {
  color: #D7E5DA;
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 38rem;
  margin: 0 0 2rem;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

.btn-story {
  display: inline-block;
  background: var(--pollen);
  color: var(--forest);
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-story:hover {
  background: #fff;
}

.lead-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.lead-watch svg {
  flex-shrink: 0;
}

.lead-watch:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  .lead-media img {
    animation: lead-rise 0.9s cubic-bezier(.2,.7,.2,1) both;
  }
  .lead-media::before {
    animation: lead-hoop 1.1s 0.25s cubic-bezier(.2,.7,.2,1) both;
  }
  @keyframes lead-rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes lead-hoop {
    from { opacity: 0; transform: translate(-1.25rem, 1.25rem); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Story index ---------- */

.news-index {
  max-width: var(--news-max);
  margin: 0 auto;
  padding: 4.5rem 2rem 6rem;
}

.news-index-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem 2rem;
  margin-bottom: 2.5rem;
}

.news-index-head h2 {
  text-align: left;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-filters button {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid #B9CBBC;
  border-radius: 50px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-filters button:hover {
  border-color: var(--leaf);
}

.news-filters button[aria-pressed="true"] {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}

.story-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 3.5rem;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.story {
  position: relative;
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 1.25rem;
  row-gap: 0;
  align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.story[hidden] {
  display: none;
}

.story-img {
  grid-row: 1 / span 3;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--rule);
}

.story-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.story .story-meta {
  font-size: 0.8125rem;
  margin-bottom: 0.35rem;
}

.story h3 {
  font-size: 1.075rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story h3 a {
  color: var(--ink);
  text-decoration: none;
}

/* the whole row is clickable through the headline link */
.story h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.story:hover h3 a {
  color: var(--leaf);
}

.story h3 a:focus-visible {
  outline: none;
}

.story:focus-within {
  outline: 3px solid var(--pollen);
  outline-offset: 4px;
  border-radius: 6px;
}

.story p:not(.story-meta) {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-empty {
  color: var(--ink-soft);
  padding: 2rem 0;
}

@media (max-width: 992px) {
  .lead-story {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .lead-media {
    max-width: 420px;
  }
  .story-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .news-masthead {
    padding: 3rem 1rem 0;
  }
  .lead-story {
    margin-top: 2.5rem;
    padding-bottom: 3rem;
  }
  .lead-media {
    margin: 1rem 1rem 0 0;
    aspect-ratio: 1 / 1;
  }
  .lead-media::before {
    inset: -0.9rem -0.9rem 0.9rem 0.9rem;
  }
  .news-index {
    padding: 3rem 1rem 4rem;
  }
  .story {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    column-gap: 1rem;
    padding: 1.1rem 0;
  }
  .story p:not(.story-meta) {
    display: none;
  }
}

/* ==========================================================================
   Article pages
   ========================================================================== */

.article-page-wrapper {
  background: #fff;
  padding-bottom: 4rem;
}

.article-header-section {
  padding: 4.5rem 2rem 7rem !important;
  box-shadow: none;
}

.article-header-container {
  max-width: 760px;
}

.breadcrumb {
  color: #B8CDBD;
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(250, 204, 21, 0.6);
  text-underline-offset: 3px;
}

.article-kicker {
  display: inline-block;
  background: var(--pollen);
  color: var(--forest);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.article-title {
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.article-subtitle {
  border-left: 0;
  padding-left: 0;
  font-size: 1.2rem;
  font-weight: 400;
  color: #D7E5DA;
  max-width: 40rem;
}

.article-meta-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #B8CDBD;
  gap: 1rem;
}

.author-avatar {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.article-dates {
  display: flex;
  gap: 1.25rem;
}

.article-body-container {
  max-width: 820px;
  margin-top: -4rem;
}

.article-featured-image-box {
  border-radius: 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.article-featured-image-box > img,
.article-featured-image-box > video {
  border-radius: 14px;
  box-shadow: 0 24px 48px -24px rgba(30, 66, 41, 0.45) !important;
  background: var(--forest);
}

.image-caption {
  background: transparent;
  border-top: 0;
  border-left: 3px solid var(--pollen);
  color: var(--ink-soft);
  font-style: normal;
  font-size: 0.9rem;
  padding: 0.15rem 0 0.15rem 0.9rem;
  margin-top: 1rem;
}

.image-caption strong {
  color: var(--ink);
}

.article-content {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #334155;
}

.article-content h3 {
  color: var(--forest) !important;
  font-size: 1.5rem !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 3rem 0 1rem !important;
}

.article-content a {
  color: var(--leaf);
  text-underline-offset: 3px;
}

.article-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1.75rem;
}

.article-content ul li::marker {
  color: var(--shoot);
}

.article-content img {
  border-radius: 12px;
}

.quote-callout {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-left: 4px solid var(--pollen);
  padding: 0.25rem 0 0.25rem 1.75rem;
  margin: 3rem 0;
}

.quote-callout p {
  font-size: 1.4rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--forest);
}

.quote-callout .quote-author {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--shoot);
}

.highlight-box-callout {
  background: var(--film);
  border: 0;
  border-top: 4px solid var(--leaf);
  border-radius: 0 0 12px 12px;
  padding: 1.75rem 2rem;
}

.highlight-box-callout h4 {
  color: var(--forest);
}

.highlight-box-callout p {
  color: var(--ink-soft);
}

.highlight-box-callout p + p {
  margin-top: 0.75rem;
}

.article-share-section {
  border-color: var(--rule);
}

.share-btn {
  background: var(--film);
}

/* photo grid used inside articles */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}

.photo-grid figure {
  margin: 0;
}

.photo-grid img,
.photo-grid video {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.photo-grid .span-2 {
  grid-column: 1 / -1;
}

.photo-grid .span-2 img,
.photo-grid .span-2 video {
  aspect-ratio: 16 / 9;
}

.photo-grid figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 0.6rem;
}

/* portrait video presented beside its caption */
.portrait-feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 3rem;
}

.portrait-feature video {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: var(--forest);
  box-shadow: 0 24px 48px -24px rgba(30, 66, 41, 0.45);
  display: block;
}

.portrait-feature .image-caption {
  margin: 0 0 0.5rem;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: var(--shoot);
  font-weight: 500;
}

/* end-of-article navigation */
.article-next {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  align-items: baseline;
}

.article-next a {
  color: var(--leaf);
  font-weight: 600;
  text-decoration: none;
}

.article-next a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-next .read-next {
  max-width: 26rem;
}

.article-next .read-next span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

@media (max-width: 768px) {
  .article-header-section {
    padding: 3rem 1rem 5.5rem !important;
  }
  .article-body-container {
    padding: 0 1rem;
    margin-top: -3rem;
  }
  .portrait-feature {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .photo-grid {
    grid-template-columns: 1fr;
  }
  .photo-grid .span-2 img,
  .photo-grid .span-2 video {
    aspect-ratio: 4 / 3;
  }
}

/* NCAFS article: the four model parts and the scale figures */
.article-content ol.model-parts {
  list-style: none;
  counter-reset: part;
  padding: 0;
  margin: 1.75rem 0;
  border-top: 1px solid var(--rule);
}
.article-content ol.model-parts li {
  counter-increment: part;
  position: relative;
  padding: 1.1rem 0 1.1rem 3rem;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.article-content ol.model-parts li::before {
  content: counter(part);
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--pollen);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}
.article-content ol.model-parts strong {
  display: block;
  color: var(--forest);
  margin-bottom: 0.2rem;
}

.scale-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2.25rem 0;
  background: var(--forest);
  border-radius: 14px;
  overflow: hidden;
}
.scale-figures div {
  padding: 1.5rem 1.4rem;
}
.scale-figures div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
.scale-figures dt {
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--pollen);
  letter-spacing: -0.02em;
}
.scale-figures dd {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #D7E5DA;
}
@media (max-width: 640px) {
  .scale-figures { grid-template-columns: 1fr; }
  .scale-figures div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .scale-figures div { display: flex; align-items: baseline; gap: 1rem; padding: 1.1rem 1.25rem; }
  .scale-figures dt { min-width: 6.5rem; }
  .scale-figures dd { margin: 0; }
}

/* single wide photo inside an article */
.article-figure {
  margin: 2.25rem 0;
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 12px;
}
.article-figure figcaption {
  margin-top: 0.75rem;
  padding-left: 0.85rem;
  border-left: 3px solid var(--pollen);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
