/* ModernLab site shell — shared by every page. Page-specific styles live inline in each page. */
@font-face { font-family: "Coolvetica"; src: url("fonts/coolvetica-rg.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Coolvetica"; src: url("fonts/coolvetica-rg-it.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #F7F5F0; --surface: #FFFFFF;
  --ink: #16242E; --ink-2: #51626E; --ink-3: #8A97A0;
  --hair: #CFC9BB; --hair-2: #E4E0D6; --band: #ECE8DE;
  --accent: #478589; --accent-2: #366568; --amber: #B47C12; --green: #2E7D5B; --red: #B3402E;
  --display: "Coolvetica", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: none; }   /* the page scrolls without a visible scroll bar */
html::-webkit-scrollbar { display: none; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6;
       -webkit-font-smoothing: antialiased; position: relative; }
/* The element tile as page texture */
body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1400px; z-index: -1; pointer-events: none;   /* behind the content */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='110' viewBox='0 0 110 110'%3E%3Cdefs%3E%3Cfilter id='s' x='-20%25' y='-20%25' width='140%25' height='170%25'%3E%3CfeGaussianBlur stdDeviation='2.4'/%3E%3C/filter%3E%3C/defs%3E%3Crect x='6.5' y='35' width='76' height='50' rx='10' fill='%2316242E' fill-opacity='0.032' filter='url(%23s)'/%3E%3Crect x='5.5' y='33' width='76' height='50' rx='10' fill='%2316242E' fill-opacity='0.018'/%3E%3Crect x='5.5' y='30.5' width='76' height='50' rx='10' fill='%23FFFFFF' fill-opacity='0.24' stroke='%2316242E' stroke-opacity='0.06'/%3E%3Crect x='30.5' y='42.5' width='26' height='26' rx='4' fill='none' stroke='%2316242E' stroke-opacity='0.065'/%3E%3Cpath d='M44.19 59.5V52.86H42.19L40.99 57.73L39.79 52.86H37.75V59.5H39.04V54.97L40.27 59.5H41.65L42.89 54.95V59.5Z M49.38 59.5V58.29H46.09V52.86H44.7V59.5Z' fill='%2316242E' fill-opacity='0.095'/%3E%3C/svg%3E");   /* a field of sensors, each a small white slab printed with the ML tile */
  background-size: 110px 110px; background-position: calc(50% - 600px) 96px;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}
main, header, footer { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
a:not([href]) { cursor: default; }
h1, h2, h3, p, dd, dt, figure, figcaption { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
/* Coolvetica ships one weight: never let the browser fake a bold (it smears small titles). Small headings
   and emphasis use Plex Sans medium instead of bold so dense text does not compress. */
html { font-synthesis-weight: none; }
h4, h5, h6 { margin: 0; font-family: var(--sans); font-weight: 500; }
strong, b, th, dt, label { font-weight: 500; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap, .container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.kicker, .eyebrow { font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.ph { color: var(--ink-3); }
.rule-double { height: 5px; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--hair); }
.mast-rule { border-top: 1.5px solid var(--ink); }   /* one line under the masthead */
.rule { border-top: 1px solid var(--hair); }

/* Buttons + text links */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; background: var(--accent); color: #FFFFFF; border: 0; cursor: pointer;
       font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; border-radius: 3px; white-space: nowrap; }
.btn:hover { background: var(--accent-2); color: #FFFFFF; }
.btn-sm { padding: 10px 14px; font-size: 11px; }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #0F1A21; }
.btn-primary { background: var(--accent); }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: rgba(22, 36, 46, 0.05); color: var(--ink); }
.tlink { display: inline-flex; align-items: baseline; gap: 8px; font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
         color: var(--ink); padding-bottom: 4px; border-bottom: 1px solid var(--ink); }
.tlink:hover { color: var(--accent); border-color: var(--accent); }

/* ML tile */
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
        background: var(--surface); border: 1.5px solid var(--ink); color: var(--ink); flex-shrink: 0; font-family: var(--mono); }
.tile .num { position: absolute; line-height: 1; }
.tile .sym { font-family: var(--display); line-height: 1; }
.tile .name { letter-spacing: 0.14em; line-height: 1; }
.tile-mark { width: 36px; height: 36px; border-radius: 6px; }
.tile-mark .sym { font-size: 16px; }
.tile-lg { width: 140px; height: 140px; border-radius: 12px; border-width: 2px; }
.tile-lg .num { top: 10px; left: 12px; font-size: 13px; }
.tile-lg .sym { font-size: 54px; margin-top: 8px; }
.tile-lg .name { font-size: 11px; margin-top: 8px; }

/* Masthead */
.masthead { position: relative; padding-top: 16px; }
.mast-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.wordmark { font-family: var(--display); font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.brand-text { display: flex; flex-direction: column; gap: 5px; }
.tagline { font: 400 9px/1 var(--mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }   /* no wider than the wordmark */
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px 24px; }
.nav a { font: 400 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .btn { margin-left: 6px; color: #FFFFFF; }
.mast-meta { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding: 8px 0; font: 500 11px/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }

/* Collapsed menu: brand, Book a pilot, and a three-bar button that drops a list down */
.masthead { z-index: 40; }  /* the open list must paint over the hero's render frame */
.masthead .wrap { position: relative; }
.mast-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
            background: transparent; border: 1px solid var(--ink); border-radius: 3px; cursor: pointer; color: var(--ink); }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--ink); color: #FFFFFF; }
.menu-lines { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.menu-lines i { display: block; height: 1.5px; background: currentColor; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-btn[aria-expanded="true"] .menu-lines i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-lines i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-lines i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.site-menu { position: absolute; right: 28px; top: 62px; z-index: 30; width: 272px;
             background: var(--surface); border: 1px solid var(--ink); border-radius: 8px; padding: 8px 0;
             box-shadow: 0 14px 36px rgba(22, 36, 46, 0.14); animation: menu-in 0.16s ease-out; transform-origin: top right; }
.site-menu[hidden] { display: none; }
.site-menu nav { display: flex; flex-direction: column; }
.menu-group { display: flex; flex-direction: column; padding: 8px 0; }
.menu-group + .menu-group { border-top: 1px solid var(--hair-2); }
.menu-k { font: 500 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); padding: 4px 18px 8px; }
.site-menu nav a { display: block; padding: 9px 18px; font: 500 14.5px/1.3 var(--sans); color: var(--ink); }
.site-menu nav a:hover { background: var(--paper); color: var(--accent); }
.site-menu nav a[aria-current="page"] { color: var(--accent); }
.site-menu nav a.menu-login { display: flex; justify-content: center; margin: 10px 18px 6px; padding: 11px 14px; background: var(--accent);   /* a teal button, like Book a pilot */
                             color: #FFFFFF; font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; border-radius: 3px; }
.site-menu nav a.menu-login:hover { background: #366568; color: #FFFFFF; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .site-menu { animation: none; } }
@media (max-width: 720px) {
  .site-menu { right: 18px; width: calc(100% - 36px); }
}

/* Section head */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-bottom: 8px; margin-bottom: 28px; border-bottom: 1.5px solid var(--ink); }
.sec-head .meta { font: 400 11.5px/1.4 var(--mono); color: var(--ink-2); text-align: right; }
section.wrap { margin-top: 96px; }

/* Page hero (secondary pages) */
.page-hero { padding-top: 48px; max-width: 760px; }
.page-hero h1 { font-size: clamp(36px, 4.5vw, 56px); line-height: 1; letter-spacing: -0.02em; margin-top: 14px; text-wrap: balance; }
.page-hero .lede { margin-top: 16px; font-size: 17px; color: var(--ink-2); max-width: 560px; }

/* Footer */
.foot, .site-footer { border-top: 1px solid var(--hair); margin-top: 80px; padding: 16px 0 40px; }
.foot, .footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
        font: 400 11px/1.6 var(--mono); letter-spacing: 0.06em; color: var(--ink-2); }
.foot ul, .footer-links { display: flex; gap: 20px; }
.footer-links .sep { display: none; }
.foot a:hover, .footer-links a:hover { color: var(--accent); }

/* Scroll reveal: blocks marked data-reveal rise in as they enter the viewport (nav.js adds .in) */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.15, 1); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }
html.static [data-reveal], html.no-observer [data-reveal] { opacity: 1; transform: none; transition: none; }

/* One reveal on load */
.rv { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.15, 1) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rv { animation: none; opacity: 1; transform: none; } }
html.static .rv { animation: none; opacity: 1; transform: none; }

/* Responsive shell */
@media (max-width: 960px) { section.wrap { margin-top: 64px; } }
@media (max-width: 720px) {
  .wrap, .container { padding: 0 18px; }
  .nav a:not(.btn) { display: none; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sec-head .meta { text-align: left; }
}

/* the background sensors' readings (pings.js): a sensor's slab lights up in teal, a soft ripple of light spreads
   under it, and its printed ML tile pops in teal for a moment. Positions are the field's cells. */
.bg-pings { position: absolute; left: 0; top: 0; width: 100%; height: 1400px; overflow: hidden; overflow: clip;   /* the field's 1400px; a reading at the edge never widens the page */
            z-index: -1; pointer-events: none; }
.bg-ping { position: absolute; width: 110px; height: 110px; }
.bg-glow { position: absolute; left: 5.5px; top: 30.5px; width: 76px; height: 50px; border-radius: 10px;   /* the sensor's slab lights, no outline */
           background: rgba(71, 133, 137, 0.1); box-shadow: 0 0 18px 6px rgba(71, 133, 137, 0.14), 0 10px 26px rgba(71, 133, 137, 0.18);
           opacity: 0; animation: bg-glow 2.8s ease-in-out forwards; }
.bg-ripple { position: absolute; left: 43.5px; top: 55.5px; width: 210px; height: 210px; margin: -105px 0 0 -105px; border-radius: 50%;
             background: radial-gradient(circle, rgba(71, 133, 137, 0.24) 0, rgba(71, 133, 137, 0.09) 40%, rgba(71, 133, 137, 0) 68%);
             opacity: 0; transform: scale(0.3); animation: bg-ripple 2.8s cubic-bezier(0.2, 0.6, 0.3, 1) forwards; }
.bg-mark { position: absolute; left: 30.5px; top: 42.5px; width: 26px; height: 26px; border-radius: 4px; background: var(--accent);
           color: #FFFFFF; font: 400 11px/26px var(--display); text-align: center; letter-spacing: 0;
           box-shadow: 0 3px 10px rgba(71, 133, 137, 0.35); opacity: 0; transform: scale(0.85);
           animation: bg-mark 2.8s cubic-bezier(0.3, 1.4, 0.5, 1) forwards; }   /* the sensor's own ML tile pops in teal */
/* the ripple is light, not lines: soft waves swell out from the sensor with no edge, a beat apart */
.bg-wave { position: absolute; left: 43.5px; top: 55.5px; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
           background: radial-gradient(circle, rgba(71, 133, 137, 0) 30%, rgba(71, 133, 137, 0.13) 52%, rgba(71, 133, 137, 0.06) 62%, rgba(71, 133, 137, 0) 72%);
           opacity: 0; animation: bg-wave 2.6s cubic-bezier(0.22, 0.61, 0.36, 1) var(--d, 0s) forwards; }
@keyframes bg-wave { 0% { opacity: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px; }
                     14% { opacity: var(--a, 1); }
                     100% { opacity: 0; width: calc(var(--r, 120px) * 2.4); height: calc(var(--r, 120px) * 2.4);
                            margin: calc(var(--r, 120px) * -1.2) 0 0 calc(var(--r, 120px) * -1.2); } }
/* the wave reaches the neighbours: each glows softly a beat later, fainter with each ring of the grid */
.bg-halo { position: absolute; left: 43.5px; top: 55.5px; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%;
           background: radial-gradient(circle, rgba(71, 133, 137, 0.22) 0, rgba(71, 133, 137, 0.08) 40%, rgba(71, 133, 137, 0) 68%);
           opacity: 0; transform: scale(0.55); animation: bg-halo 2s ease-in-out var(--d, 0s) forwards; }
@keyframes bg-halo { 0% { opacity: 0; transform: scale(0.55); } 32% { opacity: var(--k, 0.6); transform: scale(1); } 100% { opacity: 0; transform: scale(1.12); } }
@keyframes bg-glow { 0% { opacity: 0; } 22% { opacity: 1; } 70% { opacity: 0.8; } 100% { opacity: 0; } }
@keyframes bg-ripple { 0% { opacity: 0; transform: scale(0.3); } 18% { opacity: 1; } 100% { opacity: 0; transform: scale(1.7); } }
@keyframes bg-mark { 0% { opacity: 0; transform: scale(0.85); } 16% { opacity: 1; transform: scale(1.14); } 30% { transform: scale(1); } 72% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
/* reduced motion: a reading is light that fades in place; nothing grows, pops or spreads */
@media (prefers-reduced-motion: reduce) {
  .bg-ripple, .bg-mark { transform: none; animation: bg-fade 2.8s ease-in-out forwards; }
  .bg-halo { transform: none; animation: bg-halo-fade 2s ease-in-out var(--d, 0s) forwards; }
  .bg-wave { display: none; }
}
@keyframes bg-fade { 0% { opacity: 0; } 22% { opacity: 1; } 70% { opacity: 0.9; } 100% { opacity: 0; } }
@keyframes bg-halo-fade { 0% { opacity: 0; } 32% { opacity: var(--k, 0.6); } 100% { opacity: 0; } }

/* the logo and the title sit on a small teal plate, so the sensor field never shows behind them */
.masthead .brand { background: var(--accent); color: #FFFFFF; padding: 7px 16px 7px 7px; border-radius: 10px; }
.masthead .brand:hover { background: var(--accent-2); color: #FFFFFF; }
.masthead .brand .wordmark { color: #FFFFFF; }
.masthead .brand .tagline { color: rgba(255, 255, 255, 0.76); }
.masthead .brand .tile-mark { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
.masthead .brand:focus-visible { outline-color: var(--ink); }
