/* Future_Ag_EnS landing page. Colours from the EMS graphical abstract (handoff section 5). */
:root {
  --stable: #1f4e3d;
  --extreme: #5f9160;
  --outside: #dba63f;
  --novel: #f2d79b;
  --text: #1f1f1f;
  --secondary: #555555;
  --panel: #f1f4ef;
  --page: #ffffff;
  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

h1, h2, h3 { color: var(--stable); line-height: 1.25; }
h2 { font-size: 1.6rem; margin: 0 0 0.8rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }

a { color: var(--stable); }

section { padding: 2.5rem 0; }
section + section { border-top: 1px solid #dfe5dc; }

/* Banner */
.banner { border-bottom: 1px solid #dfe5dc; padding: 1.5rem 0 1rem; }
/* Banner box styled after the platform's header: blue gradient, white logo and text */
.banner-box { display: flex; align-items: center; gap: 2rem; padding: 1.6rem 2.2rem; border-radius: 8px;
  background: linear-gradient(100deg, #1f4e3d 0%, #2b6650 50%, #3a7d5f 100%); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); }
  /* blue version (platform colours), kept for reference: linear-gradient(100deg, #204f7a 0%, #265f94 50%, #2f74b5 100%) */
.banner h1 { font-size: 2.4rem; margin: 0; color: #ffffff; }
.banner-logo { height: 40px; width: auto; flex: none; }
.tagline { color: #ffffff; font-weight: 700; font-size: 1.15rem; margin: 0.35rem 0 0; }
/* Fused banner: near-black box with the globe from RJZ's deck on the right, edges faded into the black */
.banner-box.fused { position: relative; overflow: hidden; min-height: 135px; padding-top: 1rem; padding-bottom: 1rem; background: #0f241b; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.banner-box.fused .banner-logo, .banner-box.fused .banner-title { position: relative; z-index: 1; }
.banner-box.fused .banner-title { text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85); }
.banner-box.fused .banner-logo { align-self: flex-start; margin-right: 1.2rem; }   /* logo at the top of the box, set apart from the title so it reads as a logo (RJZ) */
.banner-box.fused .tagline { white-space: nowrap; }   /* one line on wide screens (RJZ) */
@media (max-width: 960px) { .banner-box.fused .tagline { white-space: normal; } }   /* too narrow for one line: let it wrap rather than be cut off */
.banner-globe { position: absolute; right: -30px; top: 50%; transform: translateY(-50%); height: 195px; width: auto;
  -webkit-mask-image: radial-gradient(circle at 51% 50%, #000 54%, transparent 70%); mask-image: radial-gradient(circle at 51% 50%, #000 54%, transparent 70%); }
.menu { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.25rem; font-size: 0.95rem; }
.menu a { text-decoration: none; }
.menu a:hover, .menu a:focus { text-decoration: underline; }

/* Opening */
.opening p { max-width: 50rem; font-size: 1.1rem; }

.button {
  display: inline-block;
  background: var(--stable);
  color: #ffffff;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.button:hover, .button:focus { background: #163a2d; }

/* Graphical abstract */
.figure-wide { margin: 0; }
.figure-wide img { display: block; width: 100%; height: auto; border: 1px solid #dfe5dc; border-radius: 6px; }
.figure-wide figcaption { font-size: 0.85rem; color: var(--secondary); margin-top: 0.4rem; }

/* Three class cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.card { background: var(--panel); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.card-band { padding: 0.8rem 1.1rem; font-size: 1.25rem; font-weight: 700; }
.card-body { padding: 0.9rem 1.1rem 1.1rem; }
.card-body p { margin: 0; }
.band-stable { background: var(--stable); color: #ffffff; }
.band-extreme { background: var(--extreme); color: #ffffff; }   /* large bold text: 3.68:1, passes AA for large text */
.band-outside { background: var(--outside); color: var(--text); }
.band-novel { background: var(--novel); color: var(--text); }

/* Key results */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; margin: 1rem 0; }
.stat { background: var(--panel); border-radius: 6px; padding: 0.55rem 0.8rem; border-left: 5px solid var(--secondary); }
.stat .value { display: block; font-size: 1.2rem; font-weight: 700; color: var(--stable); }
.stat .label { display: block; color: var(--text); font-size: 0.85rem; line-height: 1.35; }
.stat-stable { border-left-color: var(--stable); }
.stat-extreme { border-left-color: var(--extreme); }
.stat-outside { border-left-color: var(--outside); }
.stat-novel { border-left-color: var(--novel); }

/* Explore the results: shaded panel, example question, four output tiles */
.platform-panel { background: var(--panel); border-radius: 10px; padding: 1.8rem 2rem; border-left: 6px solid var(--stable); }
.query { background: #ffffff; border: 1px solid #cfd8cb; border-radius: 14px; padding: 0.8rem 1.2rem; font-style: italic; font-size: 1.1rem; max-width: 40rem; }
.outputs { list-style: none; padding: 0; margin: 0.6rem 0 1.2rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; }
.outputs li { background: #ffffff; border-radius: 8px; padding: 0.8rem 1rem; font-weight: 600; color: var(--stable); border-top: 5px solid var(--stable);
  display: flex; flex-direction: column; gap: 0.45rem; }
.outputs svg { width: 52px; height: 42px; stroke-linejoin: round; }  /* icons drawn as in the EMS graphical abstract (make_graphical_abstract.py) */
.outputs .out-2 { border-top-color: var(--extreme); }
.outputs .out-3 { border-top-color: var(--outside); }
.outputs .out-4 { border-top-color: var(--novel); }
.platform-top { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.platform-map { margin: 0; }
.platform-map img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid #cfd8cb; background: #ffffff; }
.platform-map figcaption { font-size: 0.78rem; line-height: 1.35; color: var(--secondary); margin-top: 0.35rem; }
@media (max-width: 760px) { .outputs { grid-template-columns: 1fr 1fr; } .platform-panel { padding: 1.2rem; }
  .platform-top { grid-template-columns: 1fr; } .platform-map { max-width: 360px; } }

/* Publications */
.pubs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.pub { background: var(--panel); border-radius: 8px; padding: 1rem; display: flex; flex-direction: column; }
.pub img { display: block; width: 100%; height: auto; border-radius: 4px; background: #ffffff; }
.pub .credit { font-size: 0.8rem; color: var(--secondary); margin: 0.3rem 0 0.8rem; }
.pub .status { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--stable); border: 1px solid var(--stable); border-radius: 4px; padding: 0 0.4rem; margin-bottom: 0.5rem; }
.pub .citation { font-size: 0.9rem; color: var(--secondary); }
.pub .links { margin-top: auto; padding-top: 0.6rem; font-size: 0.95rem; }

/* Data and code */
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid #dfe5dc; vertical-align: top; }
table.data td a { word-break: break-all; }
.subhead { margin-top: 1.8rem; }

/* Global AI-PET link card */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1rem 0 0.5rem; }
.feature { display: flex; flex-direction: column; gap: 0.6rem; background: var(--panel); border-radius: 8px; padding: 1rem; }
.feature img { display: block; width: 100%; height: auto; border-radius: 4px; }
.feature h3, .feature p { margin: 0; }
.feature .feature-link { margin-top: auto; padding-top: 0.4rem; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }

/* Team */
.team { list-style: none; padding: 0; margin: 0 0 1rem; }
.team li { margin-bottom: 0.8rem; }
.team strong { color: var(--text); }

/* Contact form */
.contact { max-width: 560px; margin: 0 0 2rem; display: grid; gap: 0.8rem; }
.contact label { display: grid; gap: 0.25rem; font-weight: 600; }
.contact input, .contact textarea { font: inherit; padding: 0.5rem; border: 1px solid #b9c2b5; border-radius: 4px; }
.contact .button { border: 0; cursor: pointer; justify-self: start; font: inherit; font-weight: 600; }
.contact .hp { position: absolute; left: -10000px; }
.form-note { font-size: 0.85rem; color: var(--secondary); margin: 0; }

/* Funding logos */
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.25rem 2rem; margin-top: 1.5rem; }
.logos img { height: 56px; width: auto; }
.logos img.logo-lg { height: 76px; }

/* Footer */
footer { background: var(--panel); padding: 2rem 0; font-size: 0.9rem; color: var(--secondary); margin-top: 1rem; }
footer p { margin: 0 0 0.6rem; }


/* Narrow screens: publication cards one per row */
@media (max-width: 900px) {
  .pubs { grid-template-columns: 1fr; max-width: 560px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}

/* Phone */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .banner h1 { font-size: 1.9rem; }
  .banner-box { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.2rem 1.2rem; }
  .banner-box.fused { min-height: 0; }
  .banner-box.fused .tagline { white-space: normal; }
  .banner-globe { height: 200px; right: -50px; opacity: 0.45; }
  .banner-logo { height: 34px; }
  .cards, .pubs { grid-template-columns: 1fr; }
  section { padding: 1.8rem 0; }
}

