/* Plant Pharm Biomed — design system
   Re-skinned to the deep-forest/cream palette + Playfair Display / Manrope / DM Mono
   typography developed on the companion Codex build, while keeping this site's own
   content, structure, and specimen-plate section devices.
   NOTE ON ACCENT USAGE: --lime is a pale accent that only reads clearly against the
   dark --forest / --forest-deep backgrounds (hero, page-header, spotlight, statement).
   On light --cream/--surface backgrounds, thin accent lines/borders use --sage instead —
   --lime there would be nearly invisible (light-on-light). See report for details. */

:root {
  --forest: #173e32;
  --forest-deep: #0c2520;
  --sage: #b5c6a5;
  --lime: #dbe6be;
  --cream: #f7f6f0;
  --surface: #ffffff;
  --tint: #eef0e6;
  --ink: #17221e;
  --muted: #5d6761;
  --mist: rgba(23, 62, 50, 0.16);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --content-max: 72rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.65rem); letter-spacing: -0.03em; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest-deep); }

em { font-style: italic; color: var(--forest-deep); }

/* focus ring — visible everywhere, never removed without replacement */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  border-radius: 2px;
}
/* on dark sections the forest outline would vanish against the forest background — use lime */
.hero :focus-visible,
.page-header :focus-visible,
.spotlight :focus-visible,
.statement :focus-visible,
.site-header :focus-visible {
  outline-color: var(--lime);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--forest-deep);
  color: var(--cream);
  padding: 0.75em 1.25em;
  z-index: 1000;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.skip-link:focus {
  left: var(--gutter);
  top: 0.75rem;
}

.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header / nav ---------- */

.site-header {
  background: transparent;
  border-bottom: 1px solid transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
/* JS adds this once the page scrolls past a small threshold */
.site-header.is-scrolled {
  background: var(--surface);
  border-bottom-color: var(--mist);
  box-shadow: 0 8px 24px rgba(12, 37, 32, 0.06);
}
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.35rem;
  gap: 1.5rem;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.brand img { height: 42px; width: auto; display: block; }
.brand-wordmark {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

/* plain nav links directly on the header — no pill/box background */
.primary-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(247, 246, 240, 0.5);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  transition: border-color 220ms ease;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  margin: 4px 0;
  transition: background-color 220ms ease;
}
.site-header.is-scrolled .nav-toggle { border-color: var(--mist); }
.site-header.is-scrolled .nav-toggle span { background: var(--ink); }

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 2rem);
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.primary-nav a:not(.nav-cta) {
  color: rgba(247, 246, 240, 0.9);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding-block: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: color 220ms ease, border-color 220ms ease;
}
.primary-nav a:not(.nav-cta):hover,
.primary-nav a:not(.nav-cta)[aria-current="page"] {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.site-header.is-scrolled .primary-nav a:not(.nav-cta) { color: var(--ink); }
.site-header.is-scrolled .primary-nav a:not(.nav-cta):hover,
.site-header.is-scrolled .primary-nav a:not(.nav-cta)[aria-current="page"] {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

/* Contact — plain outlined button, not a filled pill */
.nav-cta {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 0.92rem;
  font-weight: 600;
  background: transparent;
  color: var(--cream) !important;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--lime);
  border-radius: 3px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease;
}
.nav-cta:hover { background: rgba(219, 230, 190, 0.15); }
.site-header.is-scrolled .nav-cta {
  color: var(--forest) !important;
  border-color: var(--forest);
}
.site-header.is-scrolled .nav-cta:hover { background: var(--tint); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; flex-direction: column; align-items: center; }
  .primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 16px 40px rgba(12, 37, 32, 0.22);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul { flex-direction: column; gap: 0.9rem; }
  .primary-nav a,
  .site-header.is-scrolled .primary-nav a { color: var(--ink); }
  .nav-cta { text-align: center; color: var(--forest) !important; border-color: var(--forest); }
  .site-header.is-scrolled .nav-cta { color: var(--forest) !important; }
}

/* ---------- Specimen-plate section device ---------- */

.eyebrow {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 0.9rem;
}
/* inherits whichever color context sets on .eyebrow (forest on light sections, lime on dark) */
.eyebrow::before {
  content: "";
  width: 1.1em;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

.plate {
  border-top: 1px solid var(--mist);
  padding-top: 2.75rem;
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.section--tint { background: var(--tint); }
.section--surface { background: var(--surface); }

.section-head {
  max-width: 46rem;
  margin-bottom: 2.75rem;
}
.section-head p { color: var(--muted); font-size: 1.08rem; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest);
  background: var(--tint);
  border: 1px solid var(--mist);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

/* ---------- Hero (full-bleed dark forest — index.html only) ---------- */

.hero {
  background: var(--forest);
  color: var(--cream);
  /* extra top clearance so content clears the fixed floating header */
  padding-block: clamp(7.5rem, 13vw, 10.5rem) clamp(2.75rem, 6vw, 4.5rem);
  position: relative;
  overflow: hidden;
}
.hero-orb {
  position: absolute;
  border: 1px solid rgba(219, 230, 190, 0.18);
  border-radius: 50%;
  pointer-events: none;
}
.hero-orb--one { width: 420px; height: 420px; right: 6%; top: -12%; }
.hero-orb--two { width: 220px; height: 220px; right: 28%; bottom: -8%; }
.hero-orb--three { width: 90px; height: 90px; right: 2%; top: 38%; }

/* rendered in Blender — a real 3D capsule, floating near the headline */
@keyframes pill-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-4deg); }
}

.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 0.5em; color: var(--cream); }
.hero .eyebrow { color: var(--lime); }
.hero .lede {
  font-size: 1.15rem;
  color: rgba(247, 246, 240, 0.78);
  max-width: 38rem;
}
.hero .btn--primary { background: var(--cream); color: var(--forest); border-color: var(--cream); }
.hero .btn--primary:hover { background: var(--lime); color: var(--forest-deep); border-color: var(--lime); }
.hero .btn--ghost { color: var(--cream); border-color: var(--lime); }
.hero .btn--ghost:hover { background: rgba(219, 230, 190, 0.15); }

/* the hero's main visual — a real 3D-rendered capsule, floating freely (no box/border) */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 1.5rem;
}
.hero-pill-3d {
  width: min(100%, 420px);
  height: auto;
  filter: drop-shadow(0 24px 30px rgba(4, 16, 11, 0.5));
  animation: pill-float 6.5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-pill-3d { animation: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid var(--forest);
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn--primary {
  background: var(--forest);
  color: #fff;
}
.btn--primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--forest);
}
.btn--ghost:hover { background: var(--tint); }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* ---------- Benefit / feature grid (no numbering — parallel items) ---------- */

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 2.25rem 2rem;
}
.benefit {
  border-top: 2px solid var(--sage);
  padding-top: 1.1rem;
}
.benefit h3 { font-size: 1.08rem; margin-bottom: 0.4em; }
.benefit p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Applications preview cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.75rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--mist);
  display: flex;
  flex-direction: column;
}
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card-body h3 { margin-bottom: 0; }
.card-body p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.card-link { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* optional contrast card — middle card of a 3-up applications preview */
.card--featured {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}
.card--featured h3 { color: var(--cream); }
.card--featured .card-media { background: rgba(255, 255, 255, 0.06); }
.card--featured .card-body p { color: rgba(247, 246, 240, 0.75); }
.card--featured .card-link { color: var(--lime); }
.card--featured .card-link:hover { color: var(--cream); }

/* ---------- Image placeholder (for REPLACE-classified / missing assets) ---------- */

.img-placeholder {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(135deg, var(--tint), var(--tint) 10px, var(--surface) 10px, var(--surface) 20px);
  border: 1px dashed var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}
.img-placeholder span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--forest);
}

/* ---------- Figure / image with caption ---------- */

figure { margin: 0; }
figure img { border: 1px solid var(--mist); }
figcaption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.6rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem 2rem;
}
.team-card { border-top: 1px solid var(--mist); padding-top: 1.25rem; }
.team-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 1px solid var(--mist);
}
.team-card h3 { margin-bottom: 0.15em; font-size: 1.15rem; }
.team-role {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--forest);
  display: block;
  margin-bottom: 0.75rem;
}
.team-card p { color: var(--muted); font-size: 0.93rem; }
.in-memoriam {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--mist);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  margin-left: 0.5rem;
}

.notice {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  border-left: 2px solid var(--sage);
  padding-left: 1rem;
  max-width: 44rem;
  margin-bottom: 2.75rem;
}

/* ---------- Timeline (news & events) ---------- */

.timeline { display: flex; flex-direction: column; gap: 2.25rem; }
.timeline-item {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1.5rem;
  border-top: 1px solid var(--mist);
  padding-top: 1.5rem;
}
@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; gap: 0.4rem; }
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.timeline-item h3 { font-size: 1.1rem; margin-bottom: 0.35em; }
.timeline-item p { color: var(--muted); font-size: 0.95rem; }
.status-past {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--mist);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  margin-left: 0.4rem;
}

/* ---------- Callout / spotlight (full-bleed dark forest) ---------- */

.spotlight {
  background: var(--forest);
  color: var(--cream);
  padding: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 860px) { .spotlight { grid-template-columns: 1fr; } }
.spotlight .eyebrow { color: var(--lime); }
.spotlight h2 { color: var(--cream); }
.spotlight p { color: rgba(247, 246, 240, 0.78); }
.spotlight .btn--ghost { color: var(--cream); border-color: var(--lime); }
.spotlight .btn--ghost:hover { background: rgba(219, 230, 190, 0.15); }
.spotlight .btn--primary { background: var(--cream); color: var(--forest); border-color: var(--cream); }
.spotlight .btn--primary:hover { background: var(--lime); color: var(--forest-deep); border-color: var(--lime); }

/* ---------- Statement (full-bleed pull-quote, near-black green) ---------- */

.statement {
  background: var(--forest-deep);
  color: var(--cream);
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  text-align: center;
}
.statement-inner { max-width: 52rem; margin-inline: auto; }
.statement .eyebrow { color: var(--lime); justify-content: center; }
.statement blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.statement cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

/* ---------- Data list (contact / investor facts) ---------- */

.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.fact-list dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.fact-list dd { margin: 0.15rem 0 0; font-size: 1.05rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--mist);
  background: var(--surface);
  padding-block: 3rem 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.site-footer a { color: var(--ink); text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: var(--forest); }
.footer-bottom {
  border-top: 1px solid var(--mist);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-bottom a { color: var(--muted); }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: opacity 1ms linear; transform: none; }
}

/* ---------- Page header (interior pages — full-bleed dark forest band) ---------- */

.page-header {
  background: var(--forest);
  color: var(--cream);
  /* extra top clearance so content clears the fixed floating header */
  padding-block: clamp(7rem, 11vw, 9rem) clamp(2.25rem, 5vw, 3.5rem);
}
.page-header h1 { color: var(--cream); }
.page-header .eyebrow { color: var(--lime); }
.page-header .lede { color: rgba(247, 246, 240, 0.78); font-size: 1.08rem; max-width: 42rem; }

/* ---------- Signature pathway diagram (sits on the dark hero) ---------- */

.pathway-diagram { width: 100%; height: auto; overflow: visible; }
.pathway-diagram .stroke { fill: none; stroke: var(--lime); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pathway-diagram .stroke-thin { fill: none; stroke: var(--lime); stroke-width: 1.4; stroke-linecap: round; }
.pathway-diagram .dotted { stroke-dasharray: 2 7; stroke-linecap: round; }
.pathway-diagram .accent-dot { fill: var(--lime); stroke: none; }
.pathway-diagram .surface-fill { fill: rgba(255, 255, 255, 0.05); stroke: var(--lime); stroke-width: 2; }
.pathway-diagram .soil-line { stroke: var(--sage); stroke-dasharray: 3 4; stroke-width: 1; }
.pathway-diagram .diagram-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--sage);
}

/* ---------- Utility ---------- */

.stack { display: grid; gap: 1.25rem; }
.mono-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
