/* SanusBio improved static site — Cloudflare ready
   Dual-entry Farms | Research. Professional biotech + animal models.
   Large type, high contrast, warm paper + navy + green. */
:root {
  --ink: #0f243d;
  --ink-2: #2c3e50;
  --paper: #f8f5ef;
  --paper-2: #efeae0;
  --line: rgba(15, 36, 61, 0.1);
  --accent: #0f5a43;
  --accent-2: #c45a28;
  --white: #ffffff;
  --muted: #5a6570;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(18px, 4vw, 56px);
  --max: 1120px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.15rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
}
.skip:focus {
  left: 16px; top: 16px; background: var(--white); color: var(--ink);
  padding: 12px 16px; border: 2px solid var(--ink); text-decoration: none; font-weight: 600;
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 14px var(--pad);
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(248, 245, 239, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.mark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 600; letter-spacing: -0.02em;
  font-size: 1.4rem; text-decoration: none; color: var(--ink);
}
.mark img { width: 160px; height: 40px; object-fit: contain; border-radius: 6px; }
.mark span { color: var(--accent); }

.nav-toggle {
  display: none; border: 1px solid var(--line); background: var(--white);
  padding: 10px 14px; cursor: pointer; border-radius: 6px;
}
#site-nav {
  display: flex; gap: 8px 22px; flex-wrap: wrap; align-items: center;
}
#site-nav a {
  text-decoration: none; font-size: 1rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-2); font-weight: 600;
}
#site-nav a:hover, #site-nav a:focus-visible, #site-nav a[aria-current="page"] {
  color: var(--accent); text-decoration: underline; text-underline-offset: 5px;
}
.top-cta {
  background: var(--ink) !important; color: var(--paper) !important;
  padding: 10px 18px; border-radius: 6px; text-decoration: none !important;
}
.top-cta:hover, .top-cta:focus-visible { background: var(--accent) !important; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  min-height: calc(100svh - 72px); background: var(--ink); color: var(--paper);
}
.hero-solo { grid-template-columns: 1fr; min-height: auto; padding: 40px 0; }
.hero-copy {
  padding: clamp(48px, 7vw, 88px) var(--pad);
  display: flex; flex-direction: column; justify-content: center; max-width: 44rem;
}
.kicker {
  font-family: var(--mono); letter-spacing: 0.16em;
  text-transform: uppercase; margin: 0; color: var(--accent); font-weight: 700; font-size: 1rem;
}
.hero h1, .page-head h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -0.03em;
  margin: 14px 0 18px;
}
.lede { font-size: 1.25rem; max-width: 40em; margin: 0; color: #e0dcd0; }
.page-head .lede, .band .lede { color: var(--ink-2); font-size: 1.2rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; align-items: center; }

.hero-fig, .visual-slot {
  position: relative; overflow: hidden; background: #121820; min-height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.hero-fig img { width: 100%; height: 100%; object-fit: cover; }
.cap {
  position: absolute; left: 16px; bottom: 16px; font-size: 1rem; color: #f0ece4;
  background: rgba(15, 36, 61, 0.7); padding: 8px 12px; border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px;
  text-decoration: none; border: none; cursor: pointer; background: var(--ink);
  color: var(--paper); font-weight: 600; font-size: 1.05rem; border-radius: 6px;
  transition: background 0.15s;
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: var(--white); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--white); }
.btn-ghost { border: 1px solid #8a908c; color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--paper); background: rgba(255,255,255,0.1); }
.btn-ghost-ink { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-ghost-ink:hover { background: var(--ink); color: var(--paper); }

/* Bands */
.band { padding: clamp(56px, 8vw, 96px) var(--pad); background: var(--paper); }
.band-alt { background: var(--paper-2); }
.band-ink { background: var(--ink); color: var(--paper); }
.wrap { max-width: var(--max); margin: 0 auto; }
.page-head { padding: clamp(48px, 6vw, 72px) var(--pad) 0; max-width: var(--max); margin: 0 auto; }
.band h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -0.025em; margin: 0 0 14px;
}
.sub { max-width: 48em; color: var(--ink-2); margin: 0 0 1.2em; }
.band-ink .sub { color: #d0cbc0; }

/* Dual doors */
.doors {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px;
}
.door {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
  text-decoration: none; color: inherit; min-height: 240px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.door:hover, .door:focus-visible {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(15, 36, 61, 0.12);
}
.door h2, .door h3 {
  font-family: var(--display); font-weight: 500; font-size: 1.75rem;
  margin: 0 0 12px; letter-spacing: -0.02em; color: var(--ink);
}
.door p { margin: 0; color: var(--ink-2); flex: 1; }
.door .door-cta {
  margin-top: 24px; font-family: var(--mono); font-size: 1rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); font-weight: 600;
}

/* Media */
.media-slot {
  margin: 28px 0; border: 1px solid var(--line); background: var(--white);
  border-radius: var(--radius); overflow: hidden;
}
.media-slot img { width: 100%; height: auto; max-height: 480px; object-fit: cover; }
.media-slot figcaption {
  font-size: 1rem; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--line);
}
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-top: 28px;
}
.media-grid img {
  width: 100%; height: 180px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); background: var(--white);
}

/* Panels */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 32px; }
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.panel h3 { margin: 0 0 10px; font-size: 1.2rem; }
.panel p { margin: 0; font-size: 1.05rem; color: var(--ink-2); }

/* Contact */
.form-grid { display: grid; gap: 18px; max-width: 38rem; margin-top: 28px; }
.field label {
  display: block; font-family: var(--mono); font-size: 1rem; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 6px; color: var(--ink-2);
}
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--white);
  padding: 14px 16px; color: var(--ink); border-radius: 6px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--ink); outline-offset: 3px;
}
.aside-contact {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.aside-contact p { margin: 0 0 10px; }
.aside-contact a { font-weight: 600; }

/* Footer */
.site-footer {
  padding: 36px var(--pad); border-top: 1px solid var(--line);
  background: var(--paper-2); font-size: 1rem;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: baseline;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 14px 20px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.tagline { font-family: var(--display); font-style: italic; color: var(--ink); font-weight: 500; }

/* Mobile */
@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  #site-nav {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    padding: 12px 0 8px; gap: 12px;
  }
  #site-nav.is-open { display: flex; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-fig { min-height: 240px; order: -1; }
  .doors, .panels, .split { grid-template-columns: 1fr; }
}
@media (min-width: 881px) { #site-nav { display: flex !important; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .door { transition: none; }
}

/* Submenu styles */
.nav-item { position: relative; }
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(15, 36, 61, 0.1);
  z-index: 60;
  padding: 8px 0;
}
.nav-item:hover .submenu,
.nav-item:focus-within .submenu { display: block; }
.submenu a {
  display: block;
  padding: 8px 16px;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-2);
}
.submenu a:hover { background: var(--paper-2); color: var(--ink); }
@media (max-width: 880px) {
  .submenu { position: static; box-shadow: none; border: none; background: transparent; }
  .nav-item:hover .submenu { display: block; }
}

/* Submenus */
#site-nav .has-sub { position: relative; }
#site-nav .sub {
  display: none; position: absolute; top: 100%; left: 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 0; min-width: 170px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 70;
}
#site-nav .has-sub:hover .sub, #site-nav .has-sub:focus-within .sub { display: block; }
#site-nav .sub a {
  display: block; padding: 8px 16px; text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--ink);
}
@media (max-width: 860px) {
  #site-nav .sub { position: static; box-shadow: none; border: none; padding-left: 12px; }
  #site-nav .has-sub:hover .sub, #site-nav .has-sub:focus-within .sub { display: block; }
}

/* Logo and contrast fixes */
.mark img {
  width: auto;
  height: 48px;
  max-width: 280px;
}
@media (max-width: 600px) {
  .mark img { height: 36px; }
}

/* Kicker — more visible */
.kicker {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
}
.hero .kicker,
.band-ink .kicker {
  color: #cfe8dd; font-weight: 700; font-size: 1rem;
}

/* Home wordmark contrast */
.hero-copy img {
  filter: none;
  opacity: 1;
  /* If needed, add drop shadow for contrast on dark bg */
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Footer tagline complete */
.tagline {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-2);
}

.mark img { height: 56px; max-width: 320px; }

.hero-copy img {
  background: rgba(255,255,255,0.1);
  padding: 12px;
  border-radius: 8px;
  filter: none;
}

/* v7: low-vision fixes */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero :focus-visible, .band-ink :focus-visible { outline-color: var(--paper); }
.skip:focus { outline: 3px solid var(--ink); outline-offset: 3px; }
.hear-stub, .hear-stub:disabled {
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 6px; padding: 8px 16px; opacity: 1; cursor: not-allowed;
}

/* v7: home hero logo, centered, softened inverse on the navy band */
.hero-copy img.hero-logo {
  display: block; width: min(420px, 80vw); height: auto; margin: 0 auto 28px;
  background: none; padding: 0; border-radius: 0; filter: none;
}
.hero-solo .lede { margin: 0 auto; }

/* v7: contact layout collapses on phones (no horizontal scroll) */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* v7 deploy: Hear this audio buttons */
.hear-btn {
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 6px; padding: 8px 16px; cursor: pointer;
}
.hear-btn[aria-pressed="true"] { color: var(--white); background: var(--ink); }
