:root {
    color-scheme: dark;
    --ink: #f4f4f2;
    --muted: #999c9f;
    --paper: #0c0d0f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(ellipse at 12% 35%, #1b1e22 0%, transparent 48%),
        radial-gradient(ellipse at 90% 75%, #16191c 0%, transparent 45%),
        var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 32px 48px 24px;
}

.home-page, .contact-page, .catalog-page {
    --muted: #c8cbce;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 20px;
    font-size: .875rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.domain {
    color: var(--muted);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dot {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background: #79886a;
}

main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 60px 0;
}

.content {
    position: relative;
    width: min(100%, 560px);
    text-align: center;
}

.content::before {
    content: "";
    position: absolute;
    inset: -100px -70px;
    z-index: -1;
    background: radial-gradient(ellipse, #0c0d0fc9 15%, #0c0d0f00 70%);
}

.logo {
    display: block;
    width: min(100%, 440px);
    height: auto;
    margin: 0 auto;
    fill: var(--ink);
    filter: drop-shadow(0 0 24px #ffffff08);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.line {
    height: 1px;
    width: 40px;
    background: #b5bba9;
    margin: 0 auto 30px;
}

h1 {
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 400;
    letter-spacing: -.035em;
    margin: 0 0 14px;
}

p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 auto;
    max-width: 360px;
}

.home-page .research-tagline, .contact-page .research-tagline, .catalog-page .research-tagline {
    width: min(100%, 440px);
    max-width: none;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: .15em;
    text-align: right;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: #f4f4f2;
    color: #0c0d0f;
    min-height: 54px;
    padding: 17px 24px;
    margin-top: 30px;
    border-radius: 5px;
    font-size: 14px;
    transition: background .2s, transform .2s;
}

.home-page .button, .contact-page .button, .catalog-page .button {
    font-size: 1rem;
}

.button:hover {
    background: #d8d8d5;
    transform: translateY(-2px);
}

.button:focus-visible {
    outline: 3px solid #999c9f;
    outline-offset: 4px;
}

.button svg {
    width: 17px;
    height: 17px;
}

.button-arrow {
    width: 22px;
    height: 22px;
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

.disclaimer {
    margin-top: 18px;
    font-size: 12px;
}

.home-page .disclaimer {
    font-size: 1rem;
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 20px;
    border-top: 1px solid #ffffff1a;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.6;
}

.home-page footer, .contact-page footer, .catalog-page footer {
    font-size: .875rem;
}

footer a {
    color: inherit;
    text-decoration: none;
}

footer a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.lab-background {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.lab-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(#c8ced509 1px, transparent 1px),
        linear-gradient(90deg, #c8ced509 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, transparent 20%, #000 100%);
}

.molecule {
    position: absolute;
    width: 560px;
    height: 440px;
    color: #a1a8b0;
    opacity: .19;
}

.molecule-left {
    left: -210px;
    top: 17%;
    transform: rotate(-12deg);
}

.molecule-right {
    right: -170px;
    bottom: 7%;
    transform: rotate(18deg);
}

@media (max-width: 600px) {
    .page {
        padding: 24px 22px 20px;
    }

    .site-header {
        letter-spacing: .1em;
    }

    main {
        padding: 48px 0;
    }

    .logo {
        width: min(100%, 340px);
        margin-bottom: 0;
    }

    .home-page .research-tagline {
        width: min(100%, 340px);
        font-size: 1rem;
    }

    p {
        font-size: 14px;
    }

    .button {
        font-size: 13px;
        gap: 16px;
    }

    footer {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .molecule {
        width: 380px;
        height: 300px;
        opacity: .14;
    }

    .molecule-left {
        left: -245px;
        top: 9%;
    }

    .molecule-right {
        right: -240px;
        bottom: 12%;
    }

    .lab-background::before {
        background-size: 36px 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .button {
        transition: none;
    }
}

/* Contact page */
.contact-page {
    --contact-brand-width: 300px;
}

.contact-page main {
    padding: 48px 0 64px;
}

:where(.contact-page) .contact-content {
    width: min(100%, 520px);
}

:where(.contact-page) .contact-logo {
    width: min(100%, var(--contact-brand-width));
    margin: 0 auto .875rem;
}

:where(.contact-page) .contact-content .research-tagline {
    width: min(100%, var(--contact-brand-width));
    margin: 0 auto 2rem;
    font-size: .85rem;
}

:where(.contact-page) .contact-content .line {
    background: #999c9f;
    margin-bottom: 24px;
}

:where(.contact-page) .intro {
    margin-bottom: 28px;
    font-size: 1rem;
}

:where(.contact-page) form {
    text-align: left;
}

:where(.contact-page) .required-note {
    max-width: none;
    margin: 0 0 18px;
    font-size: .875rem;
}

:where(.contact-page) .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

:where(.contact-page) .field {
    min-width: 0;
    margin-bottom: 20px;
}

:where(.contact-page) label {
    display: block;
    margin-bottom: 9px;
    font-size: 1rem;
    color: var(--ink);
}

:where(.contact-page) :is(input, select, textarea) {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #ffffff80;
    border-radius: 6px;
    background: #ffffff05;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

:where(.contact-page) select {
    color-scheme: dark;
}

:where(.contact-page) textarea {
    min-height: 152px;
    resize: vertical;
}

:where(.contact-page) :is(input, select, textarea):hover {
    border-color: #ffffffa3;
}

:where(.contact-page) :is(input, select, textarea):focus-visible,
:where(.contact-page) a:focus-visible, :where(.contact-page) button:focus-visible {
    outline: 2px solid #b5bba9;
    outline-offset: 4px;
}

:where(.contact-page) [aria-invalid="true"] {
    border-color: #dba99f;
}

:where(.contact-page) .field-hint, :where(.contact-page) .field-error, :where(.contact-page) .privacy-note {
    max-width: none;
    margin: 8px 0 0;
    font-size: .875rem;
    line-height: 1.6;
}

:where(.contact-page) .field-error {
    color: #ffd0c6;
}

:where(.contact-page) .contact-content .button {
    width: 100%;
    justify-content: space-between;
    margin-top: 0;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
}

:where(.contact-page) .button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

:where(.contact-page) .privacy-note {
    margin-top: 16px;
    text-align: center;
}

:where(.contact-page) .honeypot {
    display: none;
}

:where(.contact-page) .notice {
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid #dba99f66;
    border-radius: 6px;
    background: #dba99f09;
    text-align: left;
}

:where(.contact-page) .notice p, :where(.contact-page) .notice a {
    max-width: none;
    color: #ffd3cb;
    font-size: 1rem;
    line-height: 1.6;
}

:where(.contact-page) .notice ul {
    padding-left: 18px;
    margin: 8px 0 0;
}

:where(.contact-page) .success-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    border: 1px solid #b5bba966;
    border-radius: 50%;
    color: #b5bba9;
    font-size: 24px;
}

@media (max-width: 600px) {
    .contact-page main {
        padding: 36px 0 44px;
    }

    .contact-page {
        --contact-brand-width: 260px;
    }

    :where(.contact-page) .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Shared page navigation */
.site-header .site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: .25rem 1.25rem;
    max-width: 100%;
    margin-left: auto;
}

.site-header .domain, .site-header .site-nav a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.75rem;
    color: var(--muted);
    text-decoration: none;
    line-height: 1.6;
}

.site-header .domain:hover,
.site-header .site-nav a:hover, .site-header .site-nav a[aria-current="page"] {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: .35em;
}

.site-header .domain:focus-visible, .site-header .site-nav a:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 4px;
    color: var(--ink);
}

/* Catalog: the same body, label and secondary type scale as Contact. */
.catalog-page {
    --catalog-brand-width: 300px;
}

.catalog-content {
    width: min(100%, 1180px);
    margin-right: auto;
    margin-left: auto;
}

.catalog-page main {
    display: block;
    padding: 48px 0 64px;
}

.catalog-page p {
    max-width: none;
    font-size: 1rem;
}

.catalog-brand {
    width: min(100%, var(--catalog-brand-width));
    margin: 0 auto 2.5rem;
}

.catalog-logo {
    width: 100%;
    margin: 0 auto .875rem;
}

.catalog-brand .research-tagline {
    width: 100%;
    margin: 0;
    font-size: .85rem;
}

.catalog-intro {
    max-width: 38rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.catalog-intro h1 {
    margin-bottom: .875rem;
}

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.catalog-section-title {
    margin: 0 0 .5rem;
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 400;
}

.catalog-page .catalog-meta, .catalog-page .catalog-card-note,
.catalog-page .catalog-image-note {
    margin: 0;
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.6;
}

.catalog-search {
    display: grid;
    gap: .5rem;
    width: min(100%, 32rem);
    margin: 0;
}

.catalog-search label {
    font-size: 1rem;
    line-height: 1.6;
}

.catalog-search-row {
    display: flex;
    gap: .75rem;
}

.catalog-search input {
    width: 100%;
    min-width: 0;
    padding: .75rem .875rem;
    border: 1px solid #ffffff80;
    border-radius: 6px;
    background: #111315;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    line-height: 1.5;
}

.catalog-search input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.catalog-search .button {
    flex-shrink: 0;
    margin: 0;
    padding: .75rem 1.25rem;
    font-family: inherit;
    cursor: pointer;
}

.catalog-clear, .catalog-research a {
    width: fit-content;
    color: var(--ink);
    font-size: .875rem;
    line-height: 1.6;
    text-underline-offset: .2em;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog-grid > li {
    min-width: 0;
}

.catalog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid #ffffff33;
    border-radius: 12px;
    background: #141619;
}

.catalog-vial {
    /* One template keeps every vial the same size, with names rendered as text. */
    --vial-x: 364;
    --vial-y: 25;
    --vial-width: 528;
    --vial-height: 1201;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: 1px solid #ffffff26;
    background: radial-gradient(ellipse at center, #282c30, #141619 75%);
}

.catalog-vial-frame {
    position: absolute;
    top: .75rem;
    left: 50%;
    height: calc(100% - 1.5rem);
    aspect-ratio: 11 / 25;
    transform: translateX(-50%);
}

.catalog-vial img, .catalog-vial-label {
    position: absolute;
    top: calc(-100% * var(--vial-y) / var(--vial-height));
    left: calc(-100% * var(--vial-x) / var(--vial-width));
    display: block;
    width: calc(100% * 1254 / var(--vial-width));
    height: calc(100% * 1254 / var(--vial-height));
    max-width: none;
}

.catalog-vial-label {
    fill: #0c0d0f;
    font-weight: 700;
    pointer-events: none;
    user-select: none;
}

.catalog-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    padding: 1.25rem;
}

.catalog-card h3, .catalog-empty h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.catalog-documents {
    margin-bottom: .25rem;
}

.catalog-documents summary {
    width: fit-content;
    padding: .25rem 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.6;
    cursor: pointer;
}

.catalog-documents ul {
    margin: .75rem 0;
    padding-left: 1.25rem;
}

.catalog-documents li + li {
    margin-top: .75rem;
}

.catalog-documents a {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    text-underline-offset: .2em;
}

.catalog-flyer {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: .45rem;
    min-height: 44px;
    padding: .4rem .75rem;
    border: 1px solid #f3cd8255;
    border-radius: 999px;
    background: #f3cd8212;
    color: #ffe2a4;
    font-size: .9rem;
    text-decoration: none;
}

.catalog-flyer svg {
    flex: none;
    width: 1.1rem;
    height: 1.1rem;
}

.catalog-flyer:hover, .catalog-flyer:focus-visible {
    border-color: currentColor;
    background: #f3cd8226;
    color: #fff0cd;
}

@media (prefers-reduced-motion: no-preference) {
    .catalog-flyer svg {
        transition: transform 160ms ease-out;
    }

    .catalog-flyer:hover svg, .catalog-flyer:focus-visible svg {
        transform: rotate(-12deg) translateY(-1px);
    }
}

.catalog-flyer-dialog {
    width: min(48rem, calc(100% - 1.5rem));
    max-height: calc(100% - 1.5rem);
    box-sizing: border-box;
    overflow: auto;
    padding: 1rem;
    border: 1px solid #ffffff40;
    border-radius: 12px;
    background: #141619;
    color: #fff;
}

.catalog-flyer-dialog::backdrop {
    background: #000c;
}

.catalog-flyer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

.catalog-flyer-header h2 {
    margin: 0;
    color: #ffe2a4;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.catalog-flyer-header form {
    flex: none;
    margin: 0;
}

.catalog-flyer-close {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid #ffffff40;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.catalog-flyer-close:hover, .catalog-flyer-close:focus-visible {
    background: #ffffff1a;
}

.catalog-flyer-dialog img:not([hidden]) {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(70vh, 48rem);
    margin-inline: auto;
}

.catalog-flyer-footer {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid #ffffff26;
    text-align: right;
}

.catalog-flyer-original {
    color: #ffe2a4;
}

.catalog-card .catalog-inquire {
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding: .75rem 1rem;
    border-radius: 6px;
}

.catalog-page .catalog-image-note {
    margin-top: 1.25rem;
}

.catalog-empty, .catalog-research {
    padding: 1.5rem;
    border: 1px solid #ffffff33;
    border-radius: 10px;
    background: #141619;
}

.catalog-empty p {
    margin-top: .75rem;
}

.catalog-empty a {
    color: var(--ink);
}

.catalog-research {
    display: grid;
    gap: .5rem;
    margin-top: 2.5rem;
}

.catalog-research p {
    margin: 0;
}

.catalog-dialog {
    width: min(32rem, calc(100% - 2rem));
    max-height: calc(100svh - 2rem);
    margin: auto;
    padding: 2rem;
    overflow: auto;
    border: 1px solid #ffffff66;
    border-radius: 12px;
    background: #141619;
    color: var(--ink);
}

.catalog-dialog::backdrop {
    background: #000000cc;
}

.catalog-dialog form {
    display: grid;
    gap: 1.125rem;
}

.catalog-dialog h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.4;
}

.catalog-dialog p {
    margin: 0;
}

.catalog-check {
    display: flex;
    align-items: start;
    gap: .75rem;
    padding: .5rem 0;
    font-size: 1rem;
    line-height: 1.6;
    cursor: pointer;
}

.catalog-check input {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin: .2rem 0 0;
    accent-color: var(--ink);
}

.catalog-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.catalog-dialog-actions .button {
    flex: 1 1 10rem;
    justify-content: center;
    margin: 0;
    padding: .75rem 1rem;
    border: 1px solid var(--ink);
    font-family: inherit;
    cursor: pointer;
}

.catalog-dialog .catalog-secondary {
    background: transparent;
    color: var(--ink);
}

.catalog-dialog button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.catalog-page :is(a, button, input, summary):focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 4px;
}

@media (max-width: 1000px) {
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .catalog-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .catalog-page {
        --catalog-brand-width: 260px;
    }

    .catalog-page main {
        padding: 36px 0 44px;
    }

    .catalog-dialog {
        padding: 1.25rem;
    }
}
