/* Future journal redesign: bright editorial color, full-bleed imagery and asymmetric rhythm. */
:root {
  --radius: 0.65rem;
  --background: #f4f1e9;
  --foreground: #132c2a;
  --surface: #e7eee8;
  --card: #ffffff;
  --card-foreground: #132c2a;
  --popover: #ffffff;
  --popover-foreground: #132c2a;
  --primary: #167c72;
  --primary-foreground: #ffffff;
  --secondary: #f29a72;
  --secondary-foreground: #132c2a;
  --muted: #e5e8df;
  --muted-foreground: #64716c;
  --accent: #d5ed8f;
  --accent-foreground: #132c2a;
  --border: #c5cec5;
  --input: #a7b5ab;
  --ring: #167c72;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --default-font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-sans);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: rgba(16, 36, 33, 0.9) !important;
  color: #ffffff;
  backdrop-filter: blur(16px);
}

header > div { max-width: 94rem !important; }

header a[href="#top"] {
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 700;
}

header a[href="#top"] span:last-child { color: var(--accent) !important; }

header nav a {
  color: #d5e0d8 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0;
}

header nav a:hover { color: var(--accent) !important; }

header a[href="#newsletter"] {
  border-color: var(--accent) !important;
  border-radius: var(--radius) !important;
  color: #132c2a !important;
  background: var(--accent) !important;
}

header button {
  border-color: rgba(255, 255, 255, 0.35) !important;
  border-radius: var(--radius) !important;
  color: #ffffff;
}

#top {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - 4.5rem);
  overflow: hidden;
  border: 0 !important;
  color: #ffffff;
  background: #102421;
}

#top::before,
#top::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
}

#top::before {
  background: linear-gradient(90deg, rgba(7, 21, 18, 0.92) 0%, rgba(7, 21, 18, 0.62) 43%, rgba(7, 21, 18, 0.08) 72%);
}

#top::after {
  inset: auto 0 0;
  height: 13rem;
  background: linear-gradient(0deg, rgba(7, 21, 18, 0.76), transparent);
}

#top > div {
  position: relative;
  min-height: calc(100svh - 4.5rem);
  max-width: 94rem !important;
  grid-template-columns: minmax(0, 0.74fr) minmax(19rem, 1.26fr) !important;
  align-items: end !important;
  gap: 4rem !important;
  padding-block: 6.5rem 4.5rem !important;
}

#top > div > div:first-child {
  position: relative;
  z-index: 3;
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

#top > div > div:last-child {
  position: absolute !important;
  inset: 0 calc(50% - 50vw) 0 calc(50% - 50vw);
  z-index: 0;
  grid-column: auto;
  grid-row: auto;
}

#top p:first-child {
  margin-bottom: 1.5rem;
  border: 0 !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  font-size: 0.78rem !important;
  letter-spacing: 0 !important;
}

#top h1 {
  max-width: 11ch;
  color: #ffffff;
  font-size: 5.4rem !important;
  font-weight: 600;
  line-height: 0.98 !important;
  text-wrap: balance;
}

#top h1 + p {
  max-width: 36rem;
  color: #e0e8e1 !important;
  font-size: 1.08rem !important;
  line-height: 1.65 !important;
}

#top img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: cover;
  object-position: 62% center;
  filter: saturate(0.8) contrast(1.04);
}

#top img + * { display: none; }

#top a {
  min-height: 3rem;
  border-radius: var(--radius) !important;
  font-family: var(--font-display);
  font-weight: 600;
}

#top a[href="#latest-news"] {
  color: #132c2a !important;
  background: var(--accent) !important;
  box-shadow: none !important;
}

#top a[href="#newsletter"] {
  border-color: rgba(255, 255, 255, 0.48) !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

#featured {
  max-width: none !important;
  padding: 0 !important;
  background: #ffffff;
}

#featured > h2 {
  max-width: 94rem;
  margin: 0 auto;
  padding: 4.5rem 2rem 1.5rem;
  color: #167c72;
  font-size: 0.82rem !important;
  letter-spacing: 0 !important;
}

#featured > h2::before {
  display: inline-block;
  width: 2.75rem;
  height: 0.7rem;
  margin-right: 0.8rem;
  content: "";
  background: var(--secondary);
}

#featured article {
  display: grid !important;
  grid-template-columns: minmax(0, 1.18fr) minmax(25rem, 0.82fr) !important;
  max-width: 94rem;
  min-height: 36rem;
  margin: 0 auto 5rem;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: #132c2a !important;
  box-shadow: none !important;
}

#featured article > img {
  order: 1;
  width: 100%;
  height: 100%;
  min-height: 36rem;
  object-fit: cover;
  object-position: 63% center;
}

#featured article > div {
  order: 2;
  justify-content: flex-end !important;
  padding: 3.5rem !important;
}

#featured article > div > span {
  border-radius: var(--radius) !important;
  color: #132c2a !important;
  background: var(--accent) !important;
}

#featured h3 {
  color: #ffffff;
  font-size: 3.25rem !important;
  font-weight: 600;
  line-height: 1.04 !important;
}

#featured article p,
#featured article div > div { color: #c2d0c8 !important; }

#featured article a {
  width: fit-content;
  margin-top: 1rem;
  border-bottom: 2px solid var(--secondary);
  border-radius: 0 !important;
  color: #ffffff !important;
}

section:has(#latest-news) {
  border: 0 !important;
  background: #e7eee8 !important;
}

section:has(#latest-news) > div:last-child {
  max-width: 94rem !important;
  padding-block: 6rem !important;
}

section:has(#latest-news) h2,
section:has(#latest-news) + section h2 {
  max-width: 12ch;
  font-size: 4.2rem !important;
  font-weight: 600;
  line-height: 1.02 !important;
}

section:has(#latest-news) h2 + p {
  color: #64716c !important;
  letter-spacing: 0 !important;
}

section:has(#latest-news) button {
  min-height: 2.6rem;
  border-radius: var(--radius) !important;
  font-family: var(--font-display);
}

section:has(#latest-news) button[aria-pressed="true"] {
  border-color: #167c72 !important;
  background: #167c72 !important;
}

section:has(#latest-news) [aria-label="Filter news by category"] {
  padding: 0.3rem;
  border: 1px solid #c5cec5;
  background: rgba(255, 255, 255, 0.58);
}

section:has(#latest-news) > div:last-child > div:last-child {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1.25rem !important;
}

section:has(#latest-news) article {
  overflow: hidden;
  border: 1px solid #c7d1c8 !important;
  border-radius: var(--radius) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

section:has(#latest-news) article:first-child {
  grid-column: span 2;
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
}

section:has(#latest-news) article:first-child img {
  height: 100%;
  min-height: 24rem;
  aspect-ratio: auto !important;
}

section:has(#latest-news) article:first-child h3 { font-size: 1.75rem !important; }

section:has(#latest-news) article:nth-child(2) { background: var(--accent) !important; }

section:has(#latest-news) article:nth-child(2) p,
section:has(#latest-news) article:nth-child(2) div:last-child { color: #43533b !important; }

section:has(#latest-news) article:nth-child(3n + 3) { border-top: 5px solid var(--secondary) !important; }

section:has(#latest-news) article img {
  object-position: center;
  filter: saturate(0.82) contrast(1.03);
  transition: filter 0.3s ease, transform 0.45s ease;
}

section:has(#latest-news) article:hover {
  border-color: #167c72 !important;
  transform: translateY(-4px);
}

section:has(#latest-news) article:hover img {
  filter: saturate(1) contrast(1.03);
  transform: scale(1.025);
}

section:has(#latest-news) article h3 {
  font-family: var(--font-display);
  letter-spacing: 0;
}

section:has(#latest-news) + section {
  max-width: none !important;
  padding: 6.5rem max(2rem, calc((100vw - 94rem) / 2)) !important;
  color: #ffffff;
  background: #132c2a;
}

section:has(#latest-news) + section > div:first-child p { color: #aebdb4 !important; }

section:has(#latest-news) + section > div:last-child {
  gap: 0 !important;
  border-top: 1px solid #415550;
}

section:has(#latest-news) + section > div:last-child > div {
  min-height: 18rem;
  border: 0 !important;
  border-right: 1px solid #415550 !important;
  border-radius: 0 !important;
  color: #ffffff;
  background: transparent !important;
  box-shadow: none !important;
}

section:has(#latest-news) + section > div:last-child > div:last-child { border-right: 0 !important; }

section:has(#latest-news) + section > div:last-child > div > span {
  border-radius: var(--radius) !important;
  color: #132c2a !important;
  background: var(--accent) !important;
}

section:has(#latest-news) + section > div:last-child > div:nth-child(2) > span { background: var(--secondary) !important; }

section:has(#latest-news) + section p { color: #aebdb4 !important; }

#newsletter {
  border: 0 !important;
  background: var(--secondary) !important;
}

#newsletter > div {
  max-width: 94rem !important;
  padding-block: 5.5rem !important;
}

#newsletter > div > div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(25rem, 1.1fr);
  column-gap: 5rem;
  align-items: center;
  overflow: visible;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#newsletter > div > div > p:first-child,
#newsletter > div > div > h2,
#newsletter > div > div > h2 + p { grid-column: 1; }

#newsletter > div > div > p:first-child {
  color: #132c2a !important;
  letter-spacing: 0 !important;
}

#newsletter h2 {
  max-width: 11ch;
  font-size: 4rem !important;
  font-weight: 600;
  line-height: 1.02 !important;
}

#newsletter form {
  grid-column: 2;
  grid-row: 1 / span 3;
  margin-top: 0 !important;
  padding: 2.25rem;
  border: 2px solid #132c2a;
  background: #f4f1e9;
  box-shadow: 12px 12px 0 #167c72;
}

#newsletter input,
#newsletter button { border-radius: var(--radius) !important; }

#newsletter input { background: #ffffff !important; }
#newsletter button { background: #132c2a !important; }

footer {
  border: 0 !important;
  color: #d5e0d8;
  background: #102421 !important;
}

footer > div { max-width: 94rem !important; }
footer a:hover { color: var(--accent) !important; }

#website-credit {
  padding-inline: 0 !important;
  text-align: left !important;
  font-family: var(--font-sans) !important;
}

.lift { transition: transform 0.3s ease, border-color 0.3s ease, filter 0.3s ease; }
[role="dialog"] { border-radius: var(--radius) !important; }

@media (max-width: 72rem) {
  #top h1 { font-size: 4.5rem !important; }
  #featured article { margin-inline: 2rem; }
  #featured h3 { font-size: 2.7rem !important; }
  section:has(#latest-news) h2,
  section:has(#latest-news) + section h2 { font-size: 3.5rem !important; }
}

@media (max-width: 64rem) {
  #top > div { grid-template-columns: minmax(0, 0.9fr) minmax(15rem, 1.1fr) !important; }
  #top h1 { font-size: 3.8rem !important; }
  #featured article { grid-template-columns: 1fr !important; }
  #featured article > img { min-height: 27rem; max-height: 36rem; }
  #featured article > div { padding: 2.5rem !important; }
  section:has(#latest-news) > div:last-child > div:last-child { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  section:has(#latest-news) article:first-child { grid-column: span 2; }
  #newsletter > div > div {
    grid-template-columns: minmax(0, 0.8fr) minmax(22rem, 1.2fr);
    column-gap: 3rem;
  }
  #newsletter h2 { font-size: 3.2rem !important; }
}

@media (max-width: 56rem) {
  #newsletter > div > div { grid-template-columns: 1fr; }
  #newsletter h2 { max-width: 15ch; }
  #newsletter form {
    grid-column: 1;
    grid-row: auto;
    margin-top: 2rem !important;
  }
}

@media (max-width: 48rem) {
  header > div,
  header > div:last-child { background: #102421 !important; }

  #top { min-height: 45rem; }
  #top::before { background: linear-gradient(0deg, rgba(7, 21, 18, 0.97) 0%, rgba(7, 21, 18, 0.68) 58%, rgba(7, 21, 18, 0.1) 100%); }
  #top > div {
    min-height: 45rem;
    grid-template-columns: 1fr !important;
    padding-block: 15rem 3rem !important;
  }
  #top > div > div:first-child { grid-column: 1; }
  #top h1 { max-width: 12ch; font-size: 3.15rem !important; }
  #top h1 + p { font-size: 1rem !important; }
  #top img { object-position: 48% center; }

  #featured > h2 { padding-inline: 1rem; }
  #featured article { margin: 0 0 4rem; }
  #featured article > img { min-height: 20rem; }
  #featured article > div { padding: 2rem 1rem 2.5rem !important; }
  #featured h3 { font-size: 2.2rem !important; }

  section:has(#latest-news) > div:last-child { padding-block: 4.5rem !important; }
  section:has(#latest-news) h2,
  section:has(#latest-news) + section h2 { font-size: 2.75rem !important; }
  section:has(#latest-news) > div:last-child > div:last-child { grid-template-columns: 1fr !important; }
  section:has(#latest-news) article:first-child { grid-column: auto; grid-template-columns: 1fr; }
  section:has(#latest-news) article:first-child img { min-height: auto; aspect-ratio: 3 / 2 !important; }

  section:has(#latest-news) + section { padding: 4.5rem 1rem !important; }
  section:has(#latest-news) + section > div:last-child > div {
    min-height: auto;
    border-right: 0 !important;
    border-bottom: 1px solid #415550 !important;
  }
  section:has(#latest-news) + section > div:last-child > div:last-child { border-bottom: 0 !important; }

  #newsletter > div { padding-block: 4rem !important; }
  #newsletter h2 { font-size: 2.8rem !important; }
  #newsletter form {
    padding: 1.25rem;
    box-shadow: 7px 7px 0 #167c72;
  }

  #website-credit { text-align: center !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lift,
  section:has(#latest-news) article img { transition: none; }
  section:has(#latest-news) article:hover,
  section:has(#latest-news) article:hover img { transform: none; }
}
