:root {
  --bg: #F5F5F0;
  --surface: #EBEBE6;
  --text: #333333;
  --muted: #777777;
  --primary: #A5A58D;
  --secondary: #6B705C;
  --accent: #B7B7A4;
  --border: rgba(0, 0, 0, 0.05);
  --biotech-grid: rgba(107, 112, 92, 0.06);
  --biology-pattern: rgba(165, 165, 141, 0.12);
  --lab-data-line: rgba(107, 112, 92, 0.2);
  --future-medicine-glow: rgba(183, 183, 164, 0.25);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  background-image:
    linear-gradient(160deg, var(--bg) 0%, var(--surface) 45%, var(--bg) 100%),
    radial-gradient(ellipse 70% 40% at 85% 10%, var(--future-medicine-glow) 0%, transparent 70%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--biotech-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--biotech-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 80%, var(--biology-pattern) 0%, transparent 35%),
    radial-gradient(circle at 90% 20%, var(--lab-data-line) 0%, transparent 30%);
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: var(--secondary);
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

.nav-checkbox,
.cookie-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.disclosure-bar {
  position: relative;
  z-index: 100;
  display: flex;
  width: 100%;
  min-height: auto;
}

.disclosure-icon-zone {
  flex: 0 0 40px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  font-size: 18px;
  font-weight: 700;
}

.disclosure-text-zone {
  flex: 1;
  background: var(--surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

.disclosure-text-zone p {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  text-align: left;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  background: var(--secondary);
  height: 52px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 16px;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-cta {
  margin-left: auto;
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  background: var(--primary);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--text);
}

.burger-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.burger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--bg);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-checkbox:checked ~ .site-header .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-checkbox:checked ~ .site-header .burger-line:nth-child(2) {
  opacity: 0;
}

.nav-checkbox:checked ~ .site-header .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(51, 51, 51, 0.5);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.nav-checkbox:checked ~ .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

body:has(#nav-toggle:checked) {
  overflow: hidden;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background: var(--secondary);
  z-index: 96;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 72px 28px 32px;
  overflow-y: auto;
}

.nav-checkbox:checked ~ .nav-drawer {
  transform: translateX(0);
}

.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-drawer-links a {
  display: block;
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.2s ease;
}

.nav-drawer-links a:hover {
  color: var(--accent);
}

main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
}

.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.footer-logo img {
  height: 32px;
  width: auto;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.footer-badges a,
.footer-badges span {
  display: block;
}

.footer-badges img {
  height: 48px;
  width: auto;
}

.footer-nz-disclosure {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 900px;
  margin-top: 16px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  margin-top: 20px;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--secondary);
  color: var(--bg);
  padding: 20px 24px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.35s ease;
}

.cookie-checkbox:checked ~ .cookie-banner {
  transform: translateY(110%);
  pointer-events: none;
}

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-inner p {
  font-size: 13px;
  flex: 1;
  min-width: 200px;
}

.cookie-accept-label {
  display: inline-block;
  background: var(--primary);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-accept-label:hover {
  background: var(--accent);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.legal-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 4px solid var(--text);
}

.legal-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 28px 0 12px;
}

.legal-content p {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 15px;
}

.legal-content ul {
  margin: 0 0 16px 20px;
}

.legal-content li {
  margin-bottom: 8px;
  font-size: 15px;
}

.legal-content a {
  color: var(--secondary);
  text-decoration: underline;
}

.contact-form-wrap {
  margin-top: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 4px;
  margin-bottom: 4px;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  margin-bottom: 4px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.field-error {
  display: none;
  font-size: 12px;
  color: #8b4513;
  margin-bottom: 14px;
}

.contact-form input:user-invalid:not(:focus) + .field-error,
.contact-form textarea:user-invalid:not(:focus) + .field-error {
  display: block;
}

.contact-form-submit {
  display: inline-block;
  background: var(--secondary);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 32px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s ease;
}

.contact-form-submit:hover {
  background: var(--primary);
  color: var(--text);
}

.contact-form-wrap:has(#sent:target) .contact-form {
  display: none;
}

.contact-success {
  display: none;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--primary);
  border-radius: 6px;
}

.contact-form-wrap:has(#sent:target) .contact-success {
  display: block;
}

.contact-success p {
  font-size: 16px;
  color: var(--secondary);
  font-weight: 600;
}

.sent-anchor {
  position: absolute;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.page-404 {
  text-align: center;
  padding: 80px 24px;
  max-width: 600px;
  margin: 0 auto;
}

.page-404 h1 {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  color: var(--secondary);
  line-height: 1;
  margin-bottom: 16px;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
}

.page-404 p {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 32px;
}

.page-404 a {
  display: inline-block;
  background: var(--secondary);
  color: var(--bg);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
}

.page-404 a:hover {
  background: var(--primary);
  color: var(--text);
}

@media (max-width: 640px) {
  .burger-label {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .disclosure-text-zone {
    padding: 8px 12px;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
