/* Oxynus lab site.
   Colours, faces and motifs from the Oxynus brand kit (BRAND.md): Kuro ground, Shu vermilion as the one
   accent, Syne for display, Plus Jakarta Sans for text, IBM Plex Mono for labels. Fonts are self-hosted
   (assets/fonts, SIL OFL). Phantom's screens have their own namespaced sheet, phantom-ui.css. */

@font-face { font-family: Syne; font-weight: 700; font-display: swap; src: url(fonts/syne-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Jakarta; font-weight: 400; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Jakarta; font-weight: 500; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Jakarta; font-weight: 600; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Plex; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Plex; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

:root {
  --kuro: #000;
  --raised: #0d0d0d;
  --raised-2: #161616;
  --fg: #ededed;
  --fg-muted: #a3a3a3;
  --fg-faint: #8f8f8f;             /* 6.4:1 on Kuro, for labels and meta */
  --shu: #FF4429;                  /* the lab's vermilion: lines, labels, marks; 6.1:1 on Kuro */
  --shu-solid: #FF4429;            /* button fill, carries black text (6.1:1) */
  --shu-soft: rgba(255, 68, 41, .13);
  --shu-strong: rgba(255, 68, 41, .28);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);

  --display: Syne, system-ui, sans-serif;
  --text: Jakarta, system-ui, sans-serif;
  --mono: Plex, ui-monospace, Consolas, monospace;

  --nav: 72px;
  --gut: 80px;
  --gap: 24px;
  --section: 160px;                /* the space above every section's heading */
  --radius: 14px;

  --t-h1: clamp(44px, 5.6vw + 4px, 88px);
  --t-h2: clamp(30px, 2.4vw + 14px, 48px);
  --t-statement: clamp(40px, 3.6vw + 18px, 68px);
  --t-lead: clamp(18px, .4vw + 14px, 20px);
  --t-card: 20px;
}
@media (max-width: 1023px) { :root { --gut: 48px; --section: 120px; } }
@media (max-width: 639px)  { :root { --gut: 24px; --nav: 60px; --section: 88px; --gap: 16px; } }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav); background: var(--kuro); }

body { margin: 0; background: var(--kuro); color: var(--fg); font: 400 16px/1.6 var(--text);
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd, pre { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(100% - 2 * var(--gut), 1280px); margin-inline: auto; }
.muted { color: var(--fg-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: var(--gut); top: -100px; z-index: 30; padding: 10px 16px; border-radius: 8px;
             background: var(--fg); color: var(--kuro); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -.025em; max-width: 22ch; }
h3 { font: 500 var(--t-card)/1.3 var(--text); letter-spacing: -.01em; }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--fg); max-width: 44ch; }
.label { font: 400 13px/1.3 var(--mono); letter-spacing: .04em; color: var(--fg-faint); }
.state { font: 400 13px/1 var(--mono); color: var(--fg-faint); }
.state--on { color: var(--shu); }

/* the thread: one 2px vermilion line with its soft halo, the brand's one motif */
.thread { display: block; height: 2px; width: 72px; background: var(--shu); box-shadow: 0 0 0 2.5px rgba(255, 68, 41, .18); }

/* ---------------------------------------------------------------- links and buttons */
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--fg); text-decoration: none;
        background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 100% 1px no-repeat; }
.link::after { content: "\2192"; transition: transform .2s ease; }
.link:hover::after { transform: translateX(3px); }
.links { display: flex; flex-wrap: wrap; gap: 0 28px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px;
       border-radius: 10px; font: 500 16px/1 var(--text); text-decoration: none; white-space: nowrap;
       transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--shu-solid); color: #000; }
.btn--primary:hover { background: #ff5a42; }
.btn--secondary { color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--secondary:hover { box-shadow: inset 0 0 0 1px var(--fg-muted); }
.btn svg { width: 14px; height: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; height: var(--nav); background: var(--kuro); border-bottom: 1px solid var(--line); }
button { font: inherit; color: inherit; }
.nav__bar { height: 100%; display: flex; align-items: center; gap: 40px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.logo svg { width: 26px; height: 26px; flex: none; }
.logo span { font: 700 20px/1 var(--display); letter-spacing: -.03em; }
.nav__links { display: flex; gap: 4px; }
.nav__links a, .nav__end > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 500; font-size: 15px; text-decoration: none; color: var(--fg); border-radius: 8px; }
.nav__links a:hover, .nav__end > a:not(.btn):hover { background: var(--raised-2); }
.nav__end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav__end .btn { height: 44px; }
.nav__toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 0; background: none; color: var(--fg);
               box-shadow: inset 0 0 0 1px var(--line-strong); cursor: pointer; }
.nav__toggle svg { margin: auto; }
@media (max-width: 899px) {
  .nav__links, .nav__end > a:not(.btn) { display: none; }
  .nav__toggle { display: grid; }
  .nav__end { gap: 12px; }
  .nav.is-open .nav__links { display: flex; flex-direction: column; position: fixed; inset: var(--nav) 0 0; padding: 24px var(--gut);
    background: var(--kuro); gap: 0; }
  .nav.is-open .nav__links a { min-height: 60px; font-size: 22px; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; }
}
@media (max-width: 399px) { .nav__end .btn { display: none; } }

/* ---------------------------------------------------------------- sections */
main > section { padding-top: var(--section); }
.section-head { display: grid; gap: 20px; margin-bottom: 56px; }
.section-head p { max-width: 56ch; color: var(--fg-muted); font-size: var(--t-lead); line-height: 1.55; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 899px) { .grid { grid-template-columns: minmax(0, 1fr); } .grid > * { grid-column: 1 / -1 !important; min-width: 0; } }

/* ---------------------------------------------------------------- hero */
.hero { padding-top: calc(var(--nav) + 56px); }
.hero__head { display: flex; align-items: flex-start; gap: 28px; }
.hero__mark { width: clamp(40px, 4vw, 64px); height: auto; flex: none; margin-top: .12em; }
.hero h1 { max-width: 13ch; }
.hero__body { margin-top: 48px; align-items: start; }
.hero__copy { grid-column: 1 / span 5; display: grid; gap: 28px; align-content: start; }
.hero__motto { font: 700 clamp(22px, .8vw + 16px, 28px)/1.1 var(--display); letter-spacing: -.02em; color: var(--fg); display: flex; align-items: center; gap: 16px; }
.hero__motto em, .footer__tagline em { font-style: normal; color: var(--shu); }
.footer__brand .footer__tagline { font: 700 20px/1.2 var(--display); letter-spacing: -.02em; color: var(--fg); }
.hero__art { grid-column: 6 / span 7; position: relative; }
@media (max-width: 1023px) { .hero__copy { grid-column: 1 / span 6; } .hero__art { grid-column: 7 / span 6; } }
@media (max-width: 899px) { .hero__body { gap: 40px; } .hero h1 { max-width: 14ch; } .hero__head { gap: 16px; } }
@media (max-width: 639px) { .hero { padding-top: calc(var(--nav) + 40px); min-height: 0; } .hero__body { margin-top: 28px; }
  .hero__copy .btn-row .btn { flex: 1 1 100%; } }

/* the collage: Phantom's proxy, one finding card and one Genesis card; still, nothing cycles */
.art-card { position: absolute; padding: 20px 22px; background: var(--raised); border: 1px solid var(--line-strong);
            border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.art-card .label b { color: var(--shu); font-weight: 500; margin-right: .6em; }
.art-card p.t { font: 700 20px/1.15 var(--display); letter-spacing: -.015em; margin-top: 10px; }
.art-card p.s { font-size: 14px; color: var(--fg-muted); margin-top: 6px; }
.art-card--finding { left: -32px; bottom: -40px; width: 300px; }
.hero__art .screen { margin-bottom: 40px; }
@media (max-width: 1279px) { .art-card--finding { left: 16px; } }
@media (max-width: 639px) { .art-card--finding { position: relative; left: auto; bottom: auto; width: auto; margin-top: -24px; margin-inline: 16px; }
  .hero__art .screen { margin-bottom: 0; } }

/* ---------------------------------------------------------------- Phantom screens */
/* drawn at their real size (1180 x 660) and scaled to the frame by site.js */
.screen { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1180 / 660; border-radius: var(--radius);
          background: #000; box-shadow: 0 0 0 1px var(--line-strong), 0 40px 100px rgba(0, 0, 0, .7); }
.screen .px { position: absolute; left: 0; top: 0; width: 1180px; height: 660px; transform-origin: 0 0; transform: scale(var(--k, .5)); }
@media (max-width: 639px) { .screen[data-crop] { aspect-ratio: 720 / 660; } }

/* ---------------------------------------------------------------- research directions */
.directions { grid-column: 1 / span 6; }
.directions li { padding: 24px 0; border-top: 1px solid var(--line); }
.directions li:last-child { border-bottom: 1px solid var(--line); }
.dir-head { display: flex; align-items: baseline; gap: 12px; }
.directions p { margin-top: 6px; max-width: 52ch; color: var(--fg-muted); }
.directions .links { margin-top: 4px; }
.hub-frame { grid-column: 7 / span 6; align-self: stretch; display: grid; place-items: center; padding: 24px;
             border-radius: var(--radius); background: var(--raised); border: 1px solid var(--line); }
.hub { width: 100%; max-width: 560px; height: auto; }
.hub text { font-family: var(--mono); font-size: 14px; fill: var(--fg-faint); letter-spacing: .04em; }
.hub text.on { fill: var(--fg); }
.hub__line { stroke: var(--shu); stroke-width: 2; fill: none; }
.hub__halo { stroke: rgba(255, 68, 41, .18); stroke-width: 7; fill: none; }
.hub__line--open { stroke: rgba(255, 68, 41, .5); stroke-dasharray: 4 6; }
.hub__port { fill: #000; stroke: var(--shu); stroke-width: 2; }
.hub__port--fill { fill: var(--shu); }
.hub__pulse { fill: var(--shu); animation: hub-pulse 3.2s linear 1 both; }  /* one pass each, still within 5 s */
.hub__pulse--b { animation-delay: 1.6s; }
@keyframes hub-pulse { from { offset-distance: 0%; opacity: 0; } 10%, 90% { opacity: 1; } to { offset-distance: 100%; opacity: 0; } }
@media (max-width: 899px) { .hub-frame { order: -1; padding: 16px; } }

/* ---------------------------------------------------------------- Phantom section */
.product__copy { grid-column: 1 / span 4; display: grid; gap: 20px; align-content: start; color: var(--fg-muted); }
.product__copy p:first-child { color: var(--fg); }
.product__screen { grid-column: 5 / span 8; }
@media (max-width: 899px) { .product__screen { order: -1; } }

/* ---------------------------------------------------------------- notes */
.note { grid-column: span 4; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) and (max-width: 1179px) { .note { grid-column: span 6; } .note:last-child { grid-column: 1 / -1; } }
.note__frag { height: 220px; margin-bottom: 14px; padding: 24px; border-radius: var(--radius); background: #000;
              border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 12px;
              font: 400 14px/1.6 var(--mono); color: #cfcfcf; overflow: hidden; transition: border-color .2s ease; }
.note:hover .note__frag { border-color: var(--line-strong); }
.note__frag dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; }
.note__frag dt, .note__frag .c { color: var(--fg-faint); }
.note__frag dd { color: var(--fg); }
.note__frag pre { font: inherit; white-space: pre; }
.hl { color: #fff; background: var(--shu-strong); border-radius: 3px; box-shadow: 0 0 0 2px var(--shu-strong); }
.bar { display: inline-block; height: 8px; background: var(--shu); border-radius: 2px; vertical-align: middle; margin-left: 10px; }
.note p { color: var(--fg-muted); }
/* the one change of ground on the page: the notes sit on raised Kuro */
#notes { margin-top: var(--section); padding-block: var(--section); background: var(--raised); }

/* ---------------------------------------------------------------- principles */
.statement { font-size: var(--t-statement); max-width: 14ch; letter-spacing: -.035em; }
.principles { margin-top: 0; }
.principles li { grid-column: span 6; padding-top: 24px; border-top: 1px solid var(--line); }
.principles p { margin-top: 6px; color: var(--fg-muted); max-width: 46ch; }

/* ---------------------------------------------------------------- footer */
.footer { padding-top: var(--section); padding-bottom: 48px; }
.close { display: grid; gap: 28px; padding-bottom: 96px; border-bottom: 1px solid var(--line); }
.close p { max-width: 52ch; color: var(--fg-muted); font-size: var(--t-lead); }
.footer__cols { padding-top: 56px; }
.footer__brand { grid-column: 1 / span 5; display: grid; gap: 16px; align-content: start; }
.footer__brand p { color: var(--fg-muted); max-width: 36ch; }
.footer__col { grid-column: span 2; }
.footer__col h3 { font: 500 14px/1.4 var(--text); letter-spacing: 0; color: var(--fg-faint); margin-bottom: 8px; }
.footer__col a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer__col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__legal { margin-top: 56px; font-size: 14px; color: var(--fg-faint); }
@media (max-width: 899px) { .footer__cols { row-gap: 32px; } .footer__col { grid-column: span 4 !important; } }
@media (max-width: 639px) { .footer__col { grid-column: span 6 !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hub__pulse { display: none; }
}
