/* fotonet site: what every page shares. Tokens, type, buttons, the global nav, the floating local nav,
   the footer and scroll reveal. Page styles live next to each page (ultradense/ultradense.css, home.css, ...). */


:root {
  --black: #000;
  --alt: #1d1d1f;
  --raise: rgba(66, 66, 69, .72);
  --line: rgba(255, 255, 255, .14);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #98989d;
  --light: #f5f5f7;
  --light-ink: #1d1d1f;
  --accent: #3d58d6;
  --accent-hover: #4b67ea;
  --link: #8fa7ff;
  --link-light: #3047b8;
  /* Glacier, the size colours: n, s, m, l. l is the UI accent on dark. */
  --glacier-n: #3b5bdb;
  --glacier-s: #4c7fe8;
  --glacier-m: #6fa6f2;
  --glacier-l: #a7cffa;
  --amber: #f59e0b;
  --chrome: linear-gradient(180deg, #ffffff 0%, #e4ebec 22%, #a6b5b8 46%, #f3f9f7 55%, #b9e9d9 72%, #8d9da1 100%);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 48px;
  --wide: min(1260px, calc(100% - 2 * var(--gutter)));
  --content: min(980px, calc(100% - 2 * var(--gutter)));
  --section-pad: 160px;
  --ease: cubic-bezier(.28, .11, .32, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

@media (max-width: 1068px) {
  :root { --gutter: 40px; --section-pad: 140px; }
}

@media (max-width: 734px) {
  :root { --gutter: max(16px, 5vw); --section-pad: 100px; }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  font-weight: 400;
  letter-spacing: -0.022em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
p, h1, h2, h3, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
code, pre { font-family: var(--mono); letter-spacing: 0; }
sup { font-size: .6em; line-height: 0; vertical-align: super; margin-left: .06em; letter-spacing: 0; font-weight: 400; }
::selection { background: rgba(167, 207, 250, .35); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
[data-theme="light"] :focus-visible { outline-color: var(--link-light); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--text); color: var(--black);
}
.skip:focus { top: 12px; }

.wide { width: var(--wide); margin-inline: auto; }
.content { width: var(--content); margin-inline: auto; }
.center { text-align: center; }
.narrow { max-width: 830px; margin-inline: auto; }
.section { position: relative; padding-block: var(--section-pad); }
.bg-alt { background: var(--alt); }
.bg-light { background: var(--light); color: var(--light-ink); }

/* Type */

.headline-super { font-size: 96px; line-height: 1.04; font-weight: 600; letter-spacing: -0.015em; }
.headline-xl { font-size: 80px; line-height: 1.05; font-weight: 600; letter-spacing: -0.015em; }
.headline-lg { font-size: 64px; line-height: 1.0625; font-weight: 600; letter-spacing: -0.01em; }
.headline-md { font-size: 56px; line-height: 1.07; font-weight: 600; letter-spacing: -0.005em; }
.headline-sm { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: 0; }
.eyebrow { margin-bottom: 14px; font-size: 24px; line-height: 1.17; font-weight: 600; color: var(--text-2); letter-spacing: .009em; }
.intro { margin-top: 40px; font-size: 21px; line-height: 1.38; font-weight: 600; letter-spacing: .011em; color: var(--text-2); }
.intro strong { color: var(--text); font-weight: 600; }
.dim { color: var(--text-2); }
.bg-light .dim { color: var(--text-3); }
.br-sm { display: none; }

.ultra {
  position: relative;
  display: inline-block;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.ultra.is-chrome, [data-chrome].is-chrome { background: none; }
.chrome-probe { display: inline-block; width: 0; height: 0; vertical-align: baseline; }
.chrome-canvas { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }

@media (max-width: 1068px) {
  .headline-super { font-size: 80px; }
  .headline-xl { font-size: 64px; }
  .headline-lg, .headline-md { font-size: 48px; }
  .headline-sm { font-size: 32px; }
  .eyebrow { font-size: 21px; }
  .intro { font-size: 19px; }
}

@media (max-width: 734px) {
  .headline-super { font-size: 48px; line-height: 1.08; }
  .headline-xl { font-size: 40px; line-height: 1.1; }
  .headline-lg, .headline-md { font-size: 32px; line-height: 1.125; }
  .headline-sm { font-size: 28px; line-height: 1.14; }
  .eyebrow { font-size: 19px; }
  .intro { margin-top: 28px; font-size: 19px; line-height: 1.42; }
}

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 22px;
  border: 0; border-radius: 980px;
  font-size: 17px; font-weight: 400; letter-spacing: -0.022em; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; letter-spacing: -0.01em; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55); }
.btn-outline:hover { box-shadow: inset 0 0 0 1px var(--text); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn.is-copied { background: var(--glacier-l); color: #0a1630; }
.btn-icon { width: 1.05em; height: 1.05em; flex: none; }
.localnav-actions .btn-copy [data-label] { font-family: var(--mono); }

/* Global nav */

.globalnav { position: relative; z-index: 30; background: rgba(22, 22, 23, .92); }
.globalnav-inner {
  width: min(1024px, calc(100% - 2 * var(--gutter)));
  height: 44px; margin-inline: auto;
  display: flex; align-items: center; gap: 32px;
}
.globalnav-logo { flex: none; }
.globalnav-logo img { width: 22px; height: 22px; }
.globalnav-list { flex: 1; display: flex; justify-content: space-between; gap: 18px; }
.globalnav-list li { flex: none; }
.globalnav-list a { font-size: 12px; letter-spacing: -0.01em; color: rgba(255, 255, 255, .8); }
.globalnav-list a:hover { color: #fff; text-decoration: none; }

@media (max-width: 734px) {
  .globalnav-inner { gap: 18px; }
  .globalnav-list {
    justify-content: flex-start; gap: 20px;
    overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .globalnav-list::-webkit-scrollbar { display: none; }
}

/* Floating local nav */

.localnav {
  position: fixed; top: 10px; left: 50%; z-index: 50;
  width: min(1024px, calc(100% - 24px));
  opacity: 0; visibility: hidden;
  transform: translate(-50%, -18px);
  transition: transform .5s var(--ease-out), opacity .3s, visibility 0s .5s;
}
.localnav.is-shown {
  opacity: 1; visibility: visible;
  transform: translate(-50%, 0);
  transition: transform .5s var(--ease-out), opacity .3s, visibility 0s;
}
.localnav-wrap {
  height: 52px; padding: 0 12px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 18px;
  background: rgba(29, 29, 31, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .25);
  transition: background-color .3s, box-shadow .3s;
}
.localnav-title { font-size: 19px; font-weight: 600; letter-spacing: .012em; color: var(--text); white-space: nowrap; }
.localnav-title:hover { text-decoration: none; }
.localnav-actions { display: flex; align-items: center; gap: 10px; }
.localnav-menu {
  margin-top: 8px; padding: 10px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px;
  border-radius: 18px;
  background: rgba(29, 29, 31, .86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 40px rgba(0, 0, 0, .35);
}
.localnav-menu[hidden] { display: none; }
.localnav-menu a { padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--text); }
.localnav-menu a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }

.localnav[data-theme="light"] .localnav-wrap { background: rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px #e6e6e8, 0 10px 30px rgba(0, 0, 0, .06); }
.localnav[data-theme="light"] .localnav-title { color: var(--light-ink); }
.localnav[data-theme="light"] .btn-outline { color: var(--light-ink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.localnav[data-theme="light"] .localnav-menu { background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px #e6e6e8, 0 18px 40px rgba(0, 0, 0, .08); }
.localnav[data-theme="light"] .localnav-menu a { color: var(--light-ink); }
.localnav[data-theme="light"] .localnav-menu a:hover { background: rgba(0, 0, 0, .05); }

@media (max-width: 734px) {
  .localnav-wrap { height: 48px; padding: 0 8px 0 16px; border-radius: 16px; }
  .localnav-title { font-size: 17px; }
  .localnav-actions .btn-copy [data-label] { display: none; }
}
/* the smallest phones: "fotonet UltraDense" and both buttons still fit inside the pill */
@media (max-width: 359px) {
  .localnav-wrap { gap: 10px; }
  .localnav-title { font-size: 15px; }
}

/* Get started */

.start { padding-block: 120px; }
.start a { color: var(--link-light); }
.start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.scard {
  padding: 34px 32px 30px;
  display: flex; flex-direction: column; gap: 12px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.scard:hover { transform: scale(1.012); box-shadow: 0 10px 34px rgba(0, 0, 0, .09); }
.scard-kicker { font-size: 12px; font-weight: 600; color: var(--text-3); }
.scard-title { font-size: 28px; line-height: 1.14; font-weight: 600; }
.codebox {
  margin-top: 10px; padding: 10px 10px 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 14px;
  background: var(--light);
  font-size: 14px; color: var(--light-ink);
}
.codebox code { font-size: 14px; }
.codebox-pre { display: block; padding: 16px 18px; overflow-x: auto; line-height: 1.65; }
.bg-light .tok-kw { color: #a5309c; }
.bg-light .tok-str { color: #18765a; }
.scard-note { margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--text-3); }

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

@media (max-width: 734px) {
  .start { padding-block: 90px; }
  .scard { padding: 28px 22px 24px; border-radius: 22px; }
  .codebox, .codebox code { font-size: 13px; }
}

/* Footer */

.footer { padding: 40px 0 26px; background: var(--light); color: var(--text-3); font-size: 12px; line-height: 1.34; letter-spacing: -0.01em; }
.footer a { color: #424245; }
.footnotes { display: grid; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid #d2d2d7; counter-reset: fn; }
.footnotes li { counter-increment: fn; }
.footnotes li::before { content: counter(fn) ". "; }
.directory { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 34px 0 28px; border-bottom: 1px solid #d2d2d7; }
.directory h3 { margin-bottom: 14px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.directory ul { display: grid; gap: 10px; }
.dir-big ul:first-of-type { gap: 6px; }
.dir-big ul:first-of-type a { font-size: 24px; line-height: 1.17; font-weight: 600; letter-spacing: .009em; color: var(--light-ink); }
.dir-small { margin-top: 20px; }
.legal { display: grid; gap: 14px; padding-top: 16px; }
.legal-more a { color: var(--link-light); }
.legal-row { display: flex; align-items: center; gap: 12px; }
.legal-row img { width: 24px; height: 24px; }

@media (max-width: 734px) {
  .directory { grid-template-columns: 1fr; gap: 26px; }
}

/* Scroll reveal */

html.js [data-reveal] { opacity: 0; transform: translateY(48px); transition: opacity 1s var(--ease), transform 1.2s var(--ease-out); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
}

/* Shared pieces: the current page in the nav, more links, tags */

.globalnav-list a[aria-current="page"] { color: #fff; }
.link-more { font-size: 17px; letter-spacing: -0.022em; white-space: nowrap; }
.link-more::after { content: "\00a0\203A"; }
.bg-light .link-more, [data-theme="light"] .link-more { color: var(--link-light); }
.pill-tag { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 980px; background: rgba(255, 255, 255, .1); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; }
/* Code colours, the same as the UltraDense page's */
.tok-kw { color: #ff7ab2; }
.tok-str { color: var(--glacier-l); }
.tok-c { color: var(--text-3); font-style: italic; }
.tok-num { color: #d9c97c; }
.tok-fn { color: #b9c6ff; }

/* fotonet Studio's window, sketched: the Train tab with a run going (home and Studio pages) */
.appwin {
  width: min(880px, 100%); margin-top: auto;
  border-radius: 18px 18px 0 0; overflow: hidden;
  background: #121214; color: #f5f5f7;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), 0 30px 80px rgba(0, 0, 0, .25);
  text-align: left;
}
.appwin-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #1d1d1f; font-size: 12px; color: var(--text-2); }
.appwin-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3c; }
.appwin-bar span { margin-left: 10px; }
.appwin-tabs { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: var(--text-2); overflow: hidden; }
.appwin-tabs span { padding: 6px 12px; border-radius: 980px; white-space: nowrap; }
.appwin-tabs .is-on { background: rgba(255, 255, 255, .12); color: #fff; }
.appwin-body { display: grid; grid-template-columns: 200px 1fr; gap: 18px; padding: 18px; min-height: 250px; }
.appwin-side { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.appwin-side b { display: block; width: 46%; height: 8px; margin-top: 6px; border-radius: 4px; background: rgba(255, 255, 255, .28); }
.appwin-side i { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.appwin-side i.short { width: 64%; }
.appwin-progress { display: block; height: 6px; margin-top: auto; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.appwin-progress em { display: block; width: 43%; height: 100%; background: var(--glacier-m); }
.appwin-stop { margin-top: 8px; padding: 9px 0; border-radius: 10px; background: rgba(255, 255, 255, .1); font-size: 12px; text-align: center; }
.appwin-chart { width: 100%; height: 100%; min-height: 220px; }
.appwin-chart path { fill: none; vector-effect: non-scaling-stroke; }
.appwin-chart .grid { stroke: rgba(255, 255, 255, .08); stroke-width: 1; }
.appwin-chart .band { fill: rgba(111, 166, 242, .18); stroke: none; }
.appwin-chart .map { stroke: var(--glacier-m); stroke-width: 2.5; }
.appwin-chart .forecast { stroke: var(--glacier-l); stroke-width: 2; stroke-dasharray: 5 6; }
.appwin-chart .loss { stroke: var(--amber); stroke-width: 2; opacity: .75; }

@media (max-width: 1068px) {
  .appwin-body { grid-template-columns: 160px 1fr; }
}

@media (max-width: 734px) {
  .appwin-body { grid-template-columns: minmax(0, 1fr); }
  .appwin-side { display: none; }
  .appwin-chart { min-height: 160px; }
}

/* Desktop renders as if the browser were zoomed to 80%, so the sections fit a
   1080p screen. Scripts measure in a zoom-proof way (visual sizes are divided by the zoom). */
@media (min-width: 1069px) {
  html { zoom: .8; }
}

/* Product pages line their parts up with the window on desktop (assets/snap.js); anchor jumps
   put a part's top at the window's top too: the floating bar sits over each part's own padding. */
@media (min-width: 1069px) {
  html:has(main.snap) { scroll-padding-top: 0; }
}

/* --screen is the window's height in the page's own px. Under the desktop zoom (0.8) 100svh is only
   80% of the window, so it is 125svh there. Parts that fill one screen use it. */
:root { --screen: 100vh; }
@supports (height: 100svh) { :root { --screen: 100svh; } }
@media (min-width: 1069px) {
  :root { --screen: 125vh; }
  @supports (height: 100svh) { :root { --screen: 125svh; } }
}
