/* Morrison Analytics — Lumonics-inspired redesign (OKLCH) */

@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&family=Outfit:wght@300;400;500;600&display=swap");

:root {
  /* Lumonics cyan — hue 222, dusty/muted chroma matching 1960s card stock */
  --cyan-900: oklch(0.25 0.06 222);
  --cyan-800: oklch(0.32 0.08 222);
  --cyan-700: oklch(0.40 0.09 222);
  --cyan-600: oklch(0.50 0.10 222);
  /* 550: lightest step that still carries white text at AA (4.7:1) */
  --cyan-550: oklch(0.55 0.10 222);
  --cyan-500: oklch(0.60 0.10 222);
  --cyan-400: oklch(0.68 0.09 222);
  --cyan-300: oklch(0.76 0.07 222);
  --cyan-200: oklch(0.84 0.04 222);
  --cyan-100: oklch(0.92 0.02 222);

  /* Coral accent — links, CTAs, emphasis (slightly desaturated to match dustier palette) */
  --coral-700: oklch(0.40 0.13 24);
  --coral-600: oklch(0.50 0.14 24);
  --coral-500: oklch(0.60 0.15 24);
  --coral-400: oklch(0.70 0.12 24);
  --coral-300: oklch(0.80 0.07 24);

  /* Neutrals — warm ink, cream-tinted paper */
  --ink: oklch(0.18 0.015 222);
  --ink-muted: oklch(0.38 0.02 222);
  --rule: oklch(0.88 0.01 222);
  --paper: oklch(0.97 0.005 80);

  /* Semantic */
  --color-field: var(--cyan-550);
  --color-field-deep: var(--cyan-600);
  --color-field-hover: var(--cyan-400);
  --color-field-darkest: var(--cyan-800);
  --color-accent: var(--coral-500);
  --color-accent-on-field: var(--coral-300);
  /* Coral as text on paper: 500 is 3.9:1, so links take the 600 step (5.9:1) */
  --color-link: var(--coral-600);
  --color-link-hover: var(--coral-700);

  --color-text: var(--ink);
  --color-text-muted: var(--ink-muted);
  --color-on-field: oklch(1 0 0);
  /* AA on field-deep only (5.0:1); on --color-field use full white */
  --color-on-field-muted: oklch(1 0 0 / 0.9);

  --hairline-on-field: oklch(1 0 0 / 0.22);
  --hairline-paper: oklch(0 0 0 / 0.08);

  /* White rule weights (on field backgrounds) */
  --rule-hairline: oklch(1 0 0 / 0.15);
  --rule-light: oklch(1 0 0 / 0.28);
  --rule-medium: oklch(1 0 0 / 0.35);

  /* White rule weights (on paper backgrounds) */
  --rule-hairline-paper: oklch(0 0 0 / 0.08);
  --rule-light-paper: oklch(0 0 0 / 0.14);
  --rule-medium-paper: oklch(0 0 0 / 0.20);

  --max-width: 52rem;
  --nav-height: 4.25rem;
  --font-display: "Jost", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font: var(--font-body);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--paper);
}

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

a {
  color: var(--color-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

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

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

/* ─── Uppercase UI (nav, headings, labels) — Jost display font ─────────── */
.nav-links a,
.page-header h1,
.page-header .breadcrumb,
.hero h1,
main > h1,
.section > h1,
.section-heading,
.service-card h3,
.service-card h3 a,
.contact-item h2,
.offering-item h2,
.offering-item h2 a,
.case-study h3,
.footer-links a,
.footer-copy,
.data-flow,
.card-link,
.read-more,
.button {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── White rule system ────────────────────────────────────────────────── */

/* On colored (field) backgrounds */
.rule-hairline { border-top: 1px solid var(--rule-hairline); }
.rule-light    { border-top: 1px solid var(--rule-light); }
.rule-medium   { border-top: 2px solid var(--rule-medium); }

/* On paper (white) backgrounds */
.rule-hairline-paper { border-top: 1px solid var(--rule-hairline-paper); }
.rule-light-paper    { border-top: 1px solid var(--rule-light-paper); }
.rule-medium-paper   { border-top: 2px solid var(--rule-medium-paper); }

/* Standalone horizontal rule element */
hr.rule        { border: none; height: 0; margin: 2rem 0; }
hr.rule-hairline       { border-top: 1px solid var(--rule-hairline); }
hr.rule-light          { border-top: 1px solid var(--rule-light); }
hr.rule-medium         { border-top: 2px solid var(--rule-medium); }
hr.rule-hairline-paper { border-top: 1px solid var(--rule-hairline-paper); }
hr.rule-light-paper    { border-top: 1px solid var(--rule-light-paper); }
hr.rule-medium-paper   { border-top: 2px solid var(--rule-medium-paper); }

/* ─── Mottled texture overlay (Lumonics dye-on-paperboard) ─────────────── */
.textured {
  position: relative;
  overflow: hidden;
}

/* Sticky nav already has position:sticky — don't override to relative */
nav.textured {
  position: sticky;
}

.textured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: oklch(0.50 0.06 222);
  filter: url(#paper-grain);
  opacity: 0.10;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 0;
}

.textured > * {
  position: relative;
  z-index: 1;
}

/* ─── Nav ─────────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-field-deep);
  border-bottom: 1px solid var(--rule-hairline);
  box-shadow: 0 1px 0 oklch(0 0 0 / 0.06);
}

.nav-inner {
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Ground-free horizontal lockup, full bar height: the PNG carries its own
   clear space, which puts the wordmark at nav-link size. The negative margin
   cancels the side clear space so the mark lines up with the text column. */
.nav-logo img {
  height: var(--nav-height);
  width: auto;
  margin-left: -0.82rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--color-on-field-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
  letter-spacing: 0.1em;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--color-on-field);
  background: oklch(1 0 0 / 0.08);
}

.nav-links a.active {
  color: var(--color-on-field);
  background: oklch(1 0 0 / 0.1);
  box-shadow: inset 0 -2px 0 var(--color-accent-on-field);
}

.nav-links a:focus-visible {
  outline-color: var(--color-accent-on-field);
}

/* ─── Hero (home) ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--color-field);
  color: var(--color-on-field);
  padding: 3rem 1.5rem 4rem;
  overflow: hidden;
}

/* Blueprint grid — subtle data/lab cue */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule-hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-hairline) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.45;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Exported horizontal lockup (mark + wordmark, ground-free for field surfaces) */
.brand-lockup {
  display: block;
  width: 15rem;
  max-width: 100%;
  height: auto;
}

.hero h1 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-on-field);
  margin-bottom: 1.25rem;
  max-width: 28ch;
}

.hero .tagline {
  font-size: 1.05rem;
  color: var(--color-on-field);
  max-width: 38rem;
  margin-bottom: 2rem;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.6;
}

.data-flow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 1rem 1.35rem;
  border: 1px solid var(--rule-hairline);
  background: oklch(0 0 0 / 0.12);
  font-size: 0.8125rem;
  font-weight: 600;
}

.data-flow .arrow {
  color: var(--color-accent-on-field);
  font-size: 1rem;
  letter-spacing: 0;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* White on coral-600 clears AA; coral-500 does not */
.button-primary {
  background: var(--coral-600);
  color: var(--color-on-field);
}

.button-primary:hover {
  background: var(--coral-700);
  color: var(--color-on-field);
}

.button-secondary {
  background: transparent;
  color: var(--color-on-field);
  border-color: var(--rule-medium);
}

.button-secondary:hover {
  background: oklch(1 0 0 / 0.1);
  color: var(--color-on-field);
  border-color: var(--color-on-field);
}

.hero .button:focus-visible {
  outline-color: var(--color-accent-on-field);
}

/* ─── Page header (inner pages) ─────────────────────────────────────────── */
.page-header {
  background: var(--color-field);
  color: var(--color-on-field);
  padding: 2.5rem 1.5rem 2.25rem;
  border-bottom: 1px solid var(--rule-hairline);
}

.page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header .breadcrumb {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-on-field);
  margin-bottom: 0.5rem;
}

/* Full white on the field for contrast, so the underline marks the link */
.page-header .breadcrumb a {
  color: var(--color-on-field);
}

.page-header .breadcrumb a:hover {
  text-decoration-thickness: 2px;
}

.page-header .breadcrumb .sep {
  margin: 0 0.5rem;
  opacity: 0.6;
}

.page-header .breadcrumb .current {
  color: var(--color-on-field);
}

.page-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--color-on-field);
}

/* ─── Main content ─────────────────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}


main > h1,
.section > h1,
.section-heading {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-field-deep);
  margin-bottom: 1.25rem;
}

main > p,
main > ul,
main > ol {
  margin-bottom: 1.25rem;
}

main ul,
main ol {
  padding-left: 1.35rem;
}

main li {
  margin-bottom: 0.4rem;
}

main strong {
  font-weight: 700;
  color: var(--ink);
}

/* ─── Service cards ─────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Three cards: stacked or three across, never 2 + 1. The text column only
   just fits three, so the row breaks out of it once the viewport has room. */
@media (min-width: 52rem) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 70rem) {
  .services-grid {
    margin-inline: -6rem;
  }
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--hairline-paper);
  border-top: 3px solid var(--color-accent);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 1px 0 var(--rule);
}

.service-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.service-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.service-card h3 a:hover {
  color: var(--color-link);
}

.service-card p {
  font-size: 0.98rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  text-transform: none;
  letter-spacing: 0;
}

.service-card p:last-child {
  margin-bottom: 0;
}

.card-link {
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-link);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-link:hover {
  color: var(--color-link-hover);
}

/* ─── Section divider ───────────────────────────────────────────────────── */
.section {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}

/* Anchor targets land below the sticky nav */
main section[id],
.service-card[id] {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.section > p {
  margin-bottom: 1.1rem;
}

/* ─── Audience list ─────────────────────────────────────────────────────── */
main .audience-list {
  list-style: none;
  padding-left: 0;
}

.audience-list li {
  padding: 0.9rem 0 0.9rem 1.1rem;
  border-left: 3px solid var(--color-accent);
  margin-bottom: 0.85rem;
}

/* ─── Closing call to action ────────────────────────────────────────────── */
.closing-cta {
  margin-top: 3.5rem;
  padding: 2.25rem 1.75rem;
  background: oklch(0.97 0.02 222);
  border-top: 3px solid var(--color-field);
}

.closing-cta p {
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

/* ─── Case study ────────────────────────────────────────────────────────── */
.case-study {
  position: relative;
  background: oklch(0.97 0.02 222);
  border-left: 3px solid var(--color-field);
  padding: 1.35rem 1.5rem;
  margin: 2rem 0;
}

.case-study h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan-700);
  margin-bottom: 1rem;
}

.case-study p {
  margin-bottom: 0.65rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.98rem;
}

.case-study p:last-child {
  margin-bottom: 0;
}

/* ─── Offerings list ─────────────────────────────────────────────────────── */
.offering-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.offering-item:last-child {
  border-bottom: none;
}

.offering-item h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.offering-item h2 a {
  color: var(--ink);
  text-decoration: none;
}

.offering-item h2 a:hover {
  color: var(--color-link);
}

.offering-item p {
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.read-more {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-link);
}

.read-more:hover {
  color: var(--color-link-hover);
}

/* ─── Contact ─────────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.contact-item {
  border: 1px solid var(--hairline-paper);
  border-top: 3px solid var(--color-field);
  padding: 1.25rem 1.2rem;
  background: var(--paper);
}

.contact-item h2 {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.65rem;
  letter-spacing: 0.12em;
}

.contact-item p {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.98rem;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
footer {
  background: var(--color-field-deep);
  color: var(--color-on-field);
  border-top: 1px solid var(--rule-hairline);
}

.footer-inner {
  max-width: calc(var(--max-width) + 3rem);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand .brand-lockup {
  width: 13rem;
  margin-left: -0.66rem;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
}

.footer-links a {
  color: var(--color-on-field-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

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

.footer-copy {
  font-size: 0.7rem;
  color: var(--color-on-field-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── Brand guide ──────────────────────────────────────────────────── */

.brand-guide h2.guide-subhead {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-field-deep);
  margin: 2rem 0 0.75rem;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.swatch {
  aspect-ratio: 3 / 2;
  border-radius: 3px;
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.specimen {
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
}

.specimen-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-field-deep);
  margin-bottom: 1rem;
}

.specimen-display {
  font-size: 2rem;
  line-height: 1.35;
  margin-bottom: 1.25rem;
  word-break: break-all;
}

.specimen-weights {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.specimen-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0 1.5rem;
}

.guide-table th {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--rule);
}

.guide-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.guide-table code {
  font-size: 0.82rem;
  background: oklch(0.95 0.01 222);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.texture-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.texture-sample {
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  color: var(--color-on-field);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rule-demo {
  border-radius: 3px;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
}

.rule-demo code {
  font-size: 0.82rem;
  background: oklch(1 0 0 / 0.12);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.code-block {
  background: oklch(0.22 0.02 222);
  color: oklch(0.88 0.02 222);
  padding: 1.25rem 1.5rem;
  border-radius: 3px;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  font-size: inherit;
  background: none;
  padding: 0;
}

.donts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.do-box,
.dont-box {
  padding: 1.25rem;
  border-radius: 3px;
}

.do-box {
  background: oklch(0.95 0.03 130);
  border-left: 3px solid oklch(0.55 0.15 130);
}

.dont-box {
  background: oklch(0.95 0.03 24);
  border-left: 3px solid oklch(0.55 0.15 24);
}

.do-box ul,
.dont-box ul {
  padding-left: 1.2rem;
  font-size: 0.92rem;
}

.do-box li,
.dont-box li {
  margin-bottom: 0.4rem;
}

.logo-demo {
  border-radius: 3px;
  margin: 1rem 0 1.5rem;
}

@media (max-width: 600px) {
  .donts-grid,
  .texture-compare {
    grid-template-columns: 1fr;
  }
}

/* The nav is a fixed-height, non-wrapping row: logo + three links. At phone
   widths that row is wider than the viewport, which pushes the last link
   off-screen AND makes the whole page scroll sideways (the body stretches to
   the nav's min-content width, clipping body copy too). Letting the row wrap
   to a second line removes the pixel budget entirely, so no future logo or
   link-label change can reintroduce the overflow. The full-size row (lockup +
   links) needs about 605px, hence the 640px threshold. */
@media (max-width: 640px) {
  .nav-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 0.55rem 1rem;
    gap: 0.4rem 0.75rem;
  }

  .nav-logo img {
    height: 3.5rem;
    margin-left: -0.67rem;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
  }
}
