/* Central extension point for lightweight, reusable visual tweaks. */

:root {
  --md-primary-fg-color: #15110d;
  --md-accent-fg-color: #d85228;
  --oasis-accent: #135d7f;
  --fire-ink: #15110d;
  --fire-paper: #fff7ea;
  --fire-ember: #d85228;
  --fire-gold: #f2b84b;
  --fire-moss: #496044;
  --fire-sky: #2c6f84;
}

/* Keep documentation text breathable without flattening the homepage hero. */
.md-content h1 {
  margin-bottom: 0.5rem;
}

.md-content > p:first-of-type:not(.fire-kicker) {
  font-size: 1.05rem;
  max-width: 68ch;
}

/* Subtle polish for Material buttons used across docs. */
.md-button {
  border-radius: 999px;
}

.md-header {
  background: var(--fire-ink);
}

.md-header__button.md-logo img,
.md-nav__button.md-logo img {
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.92);
}

.oasis-hover-button {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.oasis-hover-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.3rem 0.9rem rgba(19, 93, 127, 0.22);
}

/* Reusable responsive embed wrapper for iframes and maps. */
.oasis-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.12);
}

.oasis-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Figure galleries used by the manuscript reproduction page. */
.figure-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.4rem 0 2.2rem;
}

.figure-gallery--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.figure-gallery figure {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(21, 17, 13, 0.12);
  border-radius: 0.45rem;
  overflow: hidden;
  background: #fffaf2;
  box-shadow: 0 0.45rem 1.2rem rgba(21, 17, 13, 0.08);
}

.figure-gallery img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  background: #ffffff;
}

.figure-gallery figcaption {
  padding: 0.85rem 1rem 1rem;
  color: rgba(21, 17, 13, 0.78);
  font-size: 0.76rem;
  line-height: 1.42;
}

.figure-gallery figcaption p {
  margin: 0;
}

/* Homepage: bold science storytelling with a compact supplement workflow. */
.md-content:has(.fire-home-hero) {
  max-width: none;
}

.md-content:has(.fire-home-hero) .md-content__inner {
  margin: 0;
  padding: 0;
}

.md-content:has(.fire-home-hero) .md-content__inner::before {
  display: none;
}

.md-content:has(.fire-home-hero) .md-content__inner > h1:first-child {
  display: none;
}

.fire-home-hero {
  position: relative;
  min-height: min(68vh, 620px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  margin: -1.2rem -1.2rem 2.2rem;
  padding: clamp(2rem, 5vw, 4.8rem);
  color: #fffaf2;
  background:
    radial-gradient(circle at 76% 42%, rgba(216, 82, 40, 0.34), rgba(216, 82, 40, 0) 34%),
    radial-gradient(circle at 84% 18%, rgba(242, 184, 75, 0.20), rgba(242, 184, 75, 0) 26%),
    linear-gradient(90deg, rgba(10, 9, 7, 0.98), rgba(10, 9, 7, 0.88) 42%, rgba(10, 9, 7, 0.64)),
    var(--fire-ink);
}

.fire-home-hero__content {
  position: relative;
  z-index: 2;
  width: min(820px, 100%);
}

.fire-hero-vase {
  position: absolute;
  z-index: 1;
  top: -34%;
  right: -22%;
  height: 162%;
  max-width: none;
  opacity: 0.88;
  transform: rotate(-4deg);
  filter:
    drop-shadow(0 2.2rem 2.2rem rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 2.2rem rgba(216, 82, 40, 0.32))
    saturate(1.12);
  pointer-events: none;
}

.fire-home-hero h1 {
  margin: 0;
  color: #fffaf2;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.fire-home-hero h2 {
  max-width: 760px;
  margin: 1.1rem 0 0;
  color: #fff0d6;
  font-size: clamp(1.25rem, 2vw, 2rem);
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 700;
}

.fire-home-hero p:not(.fire-kicker) {
  max-width: 660px;
  margin: 1rem 0 1.4rem;
  color: #fff7ea;
  font-size: 1.02rem;
}

.fire-kicker {
  margin: 0 0 0.65rem;
  color: var(--fire-ember);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fire-home-hero .fire-kicker {
  color: var(--fire-gold);
}

.fire-home-hero .md-button--primary {
  color: #fffaf2;
  background: var(--fire-ember);
  border-color: var(--fire-ember);
}

.fire-home-hero .md-button:not(.md-button--primary) {
  color: #fffaf2;
  border-color: var(--fire-gold);
}

.fire-home-hero .md-button:hover {
  color: var(--fire-ink);
  background: var(--fire-gold);
  border-color: var(--fire-gold);
}

.fire-button {
  margin-right: 0.45rem;
  margin-bottom: 0.45rem;
  border-radius: 999px;
  font-weight: 700;
}

.fire-home-strip,
.fire-home-intro,
.fire-home-pathways,
.fire-home-links {
  width: min(1120px, calc(100% - 2.4rem));
  margin-right: auto;
  margin-left: auto;
}

.fire-home-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: -3.4rem;
  margin-bottom: 3rem;
  color: var(--fire-paper);
  background: rgba(21, 17, 13, 0.24);
  border-radius: 0.45rem;
  box-shadow: 0 1rem 2.5rem rgba(21, 17, 13, 0.18);
}

.fire-home-strip > div {
  min-height: 7.5rem;
  padding: 1.1rem;
  background: var(--fire-ink);
}

.fire-home-strip span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--fire-gold);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1;
  font-weight: 850;
}

.fire-home-intro {
  margin-bottom: 1.4rem;
}

.fire-home-intro h2 {
  max-width: 820px;
  margin: 0;
  color: var(--fire-ink);
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

.fire-home-intro p:not(.fire-kicker) {
  max-width: 780px;
  font-size: 1.04rem;
}

.fire-home-pathways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 3.2rem;
}

.fire-pathway {
  display: block;
  min-height: 11.5rem;
  padding: 1.15rem;
  color: var(--fire-ink);
  text-decoration: none;
  border: 1px solid rgba(21, 17, 13, 0.12);
  border-top: 0.42rem solid var(--fire-ember);
  border-radius: 0.45rem;
  background: #fffaf2;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.fire-pathway:hover {
  color: var(--fire-ink);
  transform: translateY(-3px);
  box-shadow: 0 0.9rem 1.8rem rgba(21, 17, 13, 0.12);
}

.fire-pathway span {
  display: inline-block;
  margin-bottom: 1.8rem;
  color: var(--fire-ember);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fire-pathway h2 {
  margin: 0 0 0.6rem;
  color: var(--fire-ink);
  font-size: 1.25rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.fire-pathway p {
  margin: 0;
  color: rgba(21, 17, 13, 0.76);
  font-size: 0.76rem;
  line-height: 1.42;
}

.fire-pathway--data {
  border-top-color: var(--fire-ember);
}

.fire-pathway--pipeline {
  border-top-color: var(--fire-gold);
}

.fire-pathway--figures {
  border-top-color: var(--fire-sky);
}

.fire-pathway--methods {
  border-top-color: var(--fire-moss);
}

.fire-pathway--evidence {
  border-top-color: var(--oasis-accent);
}

.fire-home-links {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  color: var(--fire-paper);
  border-radius: 0.45rem;
  background: var(--fire-ink);
}

.fire-home-links h2 {
  margin-top: 0;
  color: var(--fire-paper);
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.fire-home-links a {
  color: #ffd984;
}

.fire-home-links .md-button {
  color: #fffaf2;
  border-color: rgba(255, 250, 242, 0.72);
}

.fire-home-links .md-button:hover {
  color: var(--fire-ink);
  background: var(--fire-gold);
  border-color: var(--fire-gold);
}

.validation-embed {
  width: 100%;
  margin: 1.25rem 0;
  overflow: hidden;
  border: 1px solid rgba(36, 52, 61, 0.18);
  border-radius: 0.45rem;
  background: #fff;
  box-shadow: 0 0.6rem 1.6rem rgba(36, 52, 61, 0.08);
}

.validation-embed iframe {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  border: 0;
}

.validation-embed--cube iframe {
  height: min(78vh, 860px);
}

@media screen and (max-width: 980px) {
  .figure-gallery--compact {
    grid-template-columns: 1fr;
  }

  .fire-home-pathways {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 720px) {
  .fire-home-hero {
    min-height: 560px;
    margin-right: 0;
    margin-left: 0;
    padding: 2rem 1.25rem;
    background:
      radial-gradient(circle at 86% 42%, rgba(216, 82, 40, 0.34), rgba(216, 82, 40, 0) 40%),
      linear-gradient(90deg, rgba(10, 9, 7, 0.98), rgba(10, 9, 7, 0.82)),
      var(--fire-ink);
  }

  .fire-hero-vase {
    top: 4%;
    right: -76%;
    height: 112%;
    opacity: 0.48;
  }

  .fire-home-strip,
  .fire-home-pathways,
  .fire-home-links {
    grid-template-columns: 1fr;
  }

  .fire-home-strip {
    margin-top: -2.4rem;
  }

  .fire-home-links {
    padding: 1.35rem;
  }
}
