/* Nanomolar Limited — www.nanomolar.ai
   Brand: deep blue #005BD4, teal #2493C8 (taken from the logo mark) */

:root {
  --ink:        #14181d;
  --ink-soft:   #454d57;
  --ink-faint:  #6f7883;
  --rule:       #e2e6ea;
  --paper:      #ffffff;
  --paper-alt:  #f5f7f9;
  --blue:       #005bd4;
  --blue-dark:  #00459f;
  --teal:       #2493c8;
  --measure:    68ch;
  --pad:        clamp(1.25rem, 4vw, 2.5rem);
  --gap:        clamp(2rem, 5vw, 3.5rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.005em; }
p  { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--pad); }
.wrap.narrow { max-width: 800px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 68px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.brand-name { font-size: 1.05rem; letter-spacing: 0.16em; font-weight: 400; }

.site-header nav ul {
  display: flex; flex-wrap: wrap; gap: clamp(0.9rem, 2.2vw, 1.75rem);
  list-style: none; margin: 0; padding: 0;
}
.site-header nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 0.94rem;
  padding-block: 0.2rem;
  border-bottom: 1px solid transparent;
}
.site-header nav a:hover { color: var(--ink); border-bottom-color: var(--teal); }

/* ---------- hero ---------- */

.hero { padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero h1 { max-width: 22ch; }
.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1.4rem;
}
.lede { font-size: clamp(1.05rem, 1.5vw, 1.19rem); color: var(--ink-soft); max-width: 62ch; }
.hero-meta {
  font-size: 0.88rem; color: var(--ink-faint); margin: 0;
  padding-top: 1.75rem; border-top: 1px solid var(--rule);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 1.5rem; }
.btn {
  display: inline-block; padding: 0.7rem 1.4rem;
  background: var(--blue); color: #fff; text-decoration: none;
  font-size: 0.95rem; font-weight: 500; border-radius: 2px;
  border: 1px solid var(--blue);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: var(--paper-alt); color: var(--ink); border-color: var(--ink-faint); }

/* ---------- sections ---------- */

.section { padding: clamp(3rem, 7vw, 5rem) 0; border-top: 1px solid var(--rule); }
.section-alt { background: var(--paper-alt); }
.section-lede { color: var(--ink-soft); max-width: 60ch; margin-bottom: 2.5rem; }
.note { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- services ---------- */

.cards {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  background: var(--rule);
  border: 1px solid var(--rule);
}
.card {
  background: var(--paper); padding: clamp(1.35rem, 2.5vw, 1.85rem);
  transition: background 0.15s ease;
}
.card:hover { background: var(--paper-alt); }
.card h3 { color: var(--ink); margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- how we work ---------- */

.flow { display: flex; flex-direction: column; gap: 1.75rem; }
.flow-step { flex: 1 1 0; min-width: 0; }
.flow-step p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.flow-step h3 { margin-bottom: 0.4rem; }
.step-n {
  display: block; font-size: 0.8rem; letter-spacing: 0.14em;
  color: var(--teal); margin-bottom: 0.4rem;
}
.flow-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--rule);
  color: var(--blue); margin-bottom: 0.85rem;
}
.flow-icon svg { width: 22px; height: 22px; }
.flow-arrow { align-self: center; color: var(--ink-faint); flex: 0 0 auto; }
.flow-arrow svg { display: block; width: 20px; height: 20px; transform: rotate(90deg); }

@media (min-width: 860px) {
  .flow { flex-direction: row; align-items: flex-start; }
  .flow-arrow { margin-top: 22px; }
  .flow-arrow svg { transform: rotate(0deg); }
}

/* ---------- team tags ---------- */

.tags { list-style: none; margin: 1.75rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li {
  border: 1px solid var(--rule); background: var(--paper);
  padding: 0.4rem 0.8rem; font-size: 0.9rem; color: var(--ink-soft); border-radius: 2px;
}

/* ---------- about ---------- */

.about-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(200px, 260px) 1fr; align-items: start; }
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; } }

.portrait { margin: 0; }
.portrait img { width: 100%; border: 1px solid var(--rule); }
.portrait figcaption {
  margin-top: 0.9rem; font-size: 0.9rem; font-weight: 500; color: var(--ink);
}
.portrait figcaption span { display: block; font-weight: 400; color: var(--ink-faint); }
.about-copy p { color: var(--ink-soft); }
.about-copy p:first-child { color: var(--ink); font-size: 1.05rem; }

.facts { margin: 2rem 0 0; display: grid; gap: 0; }
.facts > div { padding: 0.9rem 0; border-top: 1px solid var(--rule); display: grid; gap: 0.2rem 1.5rem; }
@media (min-width: 620px) { .facts > div { grid-template-columns: 150px 1fr; } }
.facts dt { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.facts dd { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- engagements ---------- */

.engagements { display: grid; gap: 1.75rem; margin-bottom: 2.25rem; }
.engagements article { padding-left: 1.25rem; border-left: 2px solid var(--rule); }
.engagements h3 { margin-bottom: 0.35rem; }
.engagements p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- enquiry form ---------- */

.enquiry { display: grid; gap: 1.25rem; margin-bottom: 3rem; max-width: 46rem; }
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.field label {
  font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint);
}
.req { color: var(--teal); }

.enquiry input, .enquiry select, .enquiry textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.65rem 0.75rem; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.enquiry textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }
.enquiry input:hover, .enquiry select:hover, .enquiry textarea:hover { border-color: var(--ink-faint); }
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 91, 212, 0.14);
}
.enquiry .invalid { border-color: #b4232a; }
.enquiry .invalid:focus { box-shadow: 0 0 0 3px rgba(180, 35, 42, 0.14); }

.field-hint { font-size: 0.87rem; color: var(--ink-faint); margin: 0; }
.field-error { font-size: 0.87rem; color: #a51f26; margin: 0; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; gap: 0.85rem 1.5rem; align-items: center; }
.form-foot .btn { flex: 0 0 auto; }
.form-foot .field-hint { flex: 1 1 20rem; max-width: 34rem; }
.enquiry button[disabled] { opacity: 0.6; cursor: progress; }

.form-status {
  margin: 0; padding: 0.8rem 1rem; font-size: 0.94rem;
  border-left: 2px solid var(--rule); background: var(--paper-alt);
}
.form-status.success { border-left-color: #1c7c4a; }
.form-status.error { border-left-color: #b4232a; }
.form-status.info { border-left-color: var(--teal); }

/* ---------- contact ---------- */

.contact-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.contact-list li {
  display: grid; gap: 0.15rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--rule);
  font-size: 0.97rem; color: var(--ink-soft);
}
@media (min-width: 620px) { .contact-list li { grid-template-columns: 150px 1fr; } }
.contact-label { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.contact-list .contact-email { font-weight: 500; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--rule); background: var(--paper-alt); padding: 2.25rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); display: flex; align-items: center; gap: 0.55rem; }
.footer-mark { width: 22px; height: 22px; }
.footer-inner .small {
  display: block; color: var(--ink-faint); font-size: 0.85rem; line-height: 1.55;
}
@media (min-width: 760px) { .footer-inner .small { text-align: right; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .hero-actions, .skip { display: none; }
  body { font-size: 11pt; }
  .section { border-top: none; page-break-inside: avoid; }
}
