/* Farsight's landing page: the glasses. Farsight's own mark is the instrument: the green lens
   counts what is up, the red lens what is down, and the server prints both on every visit.
   Paper, ink and the two lens colours. Soul sheet: docs/landing-pages/farsight.md.
   Everything is in rem and one column holds the first screen, every section and the top bar.
   From 1024 px up the root size follows the window, so a 4K screen shows the same page larger
   instead of a small page in a field. */

/* The page's faces (the owner's pick, 2026-11-06): Funnel Display for the headlines, the brand
   and the lens numbers, Funnel Sans for the text. To change them: this block and the two
   families below it, the preloads in page.html, the files in fonts/ and their names in mod.rs (`font`). */
@font-face { font-family: 'Funnel Display'; src: url('/welcome/fonts/funnel-display-v3.woff2') format('woff2'); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Funnel Sans'; src: url('/welcome/fonts/funnel-sans-v3.woff2') format('woff2'); font-weight: 300 800; font-style: normal; font-display: swap; }
/* The app's own mono, already served for the status page: addresses, times and the command only. */
@font-face { font-family: 'Geist Mono'; src: url('/status/fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --font: 'Funnel Sans', ui-sans-serif, system-ui, 'Segoe UI', Roboto, sans-serif;
  --display: 'Funnel Display', 'Funnel Sans', ui-sans-serif, system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --h-weight: 700; --h1-track: -0.02em; --h2-track: -0.012em;
  --ground: #fbfbf8; --raised: #ffffff; --raised-2: #f3f3ee;
  --ink: #16181b; --soft: #565c64; --faint: #6c727a; --rule: #e2e3dd;
  --up: #0a7a4c; --up-fill: #10a56a; --down-fill: #dc3b3b; --warn-fill: #e0a02a; --none-fill: #dcddd6;
  --btn: #16181b; --btn-ink: #ffffff; --btn-hover: #2c3036;
  --pill: rgb(255 255 255 / 0.8); --pill-line: rgb(22 24 27 / 0.1); --pill-shadow: rgb(22 24 27 / 0.12);
  --ring: rgb(22 24 27 / 0.1); --focus: #1f6feb; --mark: #18181b; --select: #cdeede;
  --pad: 1.25rem;
  --column: 100vw;
  --bar: 3.75rem;
  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
}
@media (min-width: 64rem) {
  :root { --pad: 2.5rem; --column: 72rem; --bar: 4.25rem; }
  html { font-size: clamp(100%, min(1.1111vw, 1.7778vh), 250%); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--select); color: var(--ink); }
svg { display: block; max-width: 100%; }
h1, h2, p, dl, dd, ol { margin: 0; padding: 0; }
ol { list-style: none; }
h1, h2 { font-family: var(--display); font-weight: var(--h-weight); text-wrap: balance; }
h1 { letter-spacing: var(--h1-track); line-height: 1.04; }
h2 { font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3.25rem); line-height: 1.1; letter-spacing: var(--h2-track); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 0.5rem; }

/* one column: the first screen and every section share these two edges */
.col { padding-inline: max(var(--pad), calc((100% - var(--column)) / 2)); }

/* top bar: the full width at the top, a pill once the page moves, always on screen */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; pointer-events: none; }
.bar-in {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.75rem;
  height: var(--bar); max-width: 100%; margin-inline: auto; border-radius: 999px;
  transition: max-width 0.34s var(--ease), margin-top 0.34s var(--ease), padding 0.34s var(--ease), height 0.34s var(--ease), background-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.bar.is-pill .bar-in {
  max-width: min(34rem, 100%); height: 3.25rem; margin-top: 0.625rem; padding-inline: 1.125rem 0.4375rem;
  background: var(--pill); box-shadow: 0 0 0 1px var(--pill-line), 0 0.625rem 1.75rem var(--pill-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
}
.brand { display: inline-flex; align-items: center; gap: 0.5625rem; min-height: 2.75rem; font-family: var(--display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.015em; white-space: nowrap; }
.brand svg { width: 1.875rem; height: 1.875rem; flex: none; }
.brand .fr { fill: var(--mark); }
.brand .arm { stroke: var(--mark); }
.bar-nav { display: flex; align-items: center; gap: 1.5rem; }
.bar-link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; font-size: 0.9375rem; color: var(--soft); white-space: nowrap; transition: color 0.16s ease-out; }
@media (hover: hover) { .bar-link:hover { color: var(--ink); } }
/* three controls do not fit a phone with room between them: Docs, then Sign in, move to the close */
@media (max-width: 39.99rem) { .bar-nav { gap: 1.25rem; } .bar-docs { display: none; } }
@media (max-width: 24.49rem) { .bar-signin { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3.125rem; padding-inline: 1.625rem; border-radius: 999px;
  background: var(--btn); color: var(--btn-ink); font-weight: 650; font-size: 1.0625rem; white-space: nowrap;
  transition: transform 0.16s ease-out, background-color 0.16s ease-out;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { background: var(--btn-hover); } }
.btn-s { height: 2.375rem; padding-inline: 1.0625rem; font-size: 0.9375rem; }

/* first screen: the headline, one line, the glasses and the live line. No button here: the bar has it. */
.hero {
  min-height: 100svh;
  padding-top: calc(var(--bar) + clamp(0.5rem, 2svh, 1.5rem)); padding-bottom: clamp(0.875rem, 3svh, 2rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
/* sized so the two words stay on one line down to a 360 px phone */
.hero h1 { font-size: clamp(2.75rem, 1.2rem + 7.6vw, 6rem); }
.hero-line { margin-top: clamp(0.625rem, 1.8svh, 1.125rem); max-width: 37rem; color: var(--soft); font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.3125rem); line-height: 1.45; text-wrap: balance; }

/* the glasses are 2:1. They take what the window's height leaves, so the first screen is
   always the headline, the line, the glasses and the live line, whole. */
.specs { display: block; width: min(100%, 54rem, calc((100svh - var(--bar) - 20.5rem) * 2)); min-width: min(100%, 15rem); margin-top: clamp(1rem, 3.6svh, 2.5rem); border-radius: 1.5rem; }
.specs svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 1.125rem 1.25rem rgb(22 24 27 / 0.16)); transition: transform 0.3s var(--ease); }
@media (hover: hover) { .specs:hover svg { transform: translateY(-0.1875rem); } }
.specs text { font-family: var(--display); font-weight: 700; fill: #ffffff; }
.specs .n { font-size: 56px; letter-spacing: -0.03em; }
.specs .l { font-size: 22px; font-weight: 650; letter-spacing: 0; }

.live { display: inline-flex; align-items: center; gap: 0.5625rem; margin-top: clamp(0.875rem, 3svh, 2rem); color: var(--soft); font-size: 0.9375rem; text-align: left; }
.live time { color: var(--ink); font-weight: 600; }

/* every section: a centred headline, one line, then one object */
.sec { padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.sec > h2, .sec > .lede { text-align: center; margin-inline: auto; }
.sec > h2 { max-width: 20em; }
.sec > .lede { max-width: 37rem; margin-top: 1rem; color: var(--soft); font-size: 1.125rem; text-wrap: pretty; }
.sec > .obj { margin-top: clamp(2.25rem, 5vw, 3.75rem); }
.under { max-width: 37rem; margin: 1.5rem auto 0; text-align: center; color: var(--soft); text-wrap: balance; }
.under a, .lb-foot a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--faint); }
@media (hover: hover) { .under a:hover, .lb-foot a:hover { text-decoration-color: currentColor; } }

.panel { max-width: 46rem; margin-inline: auto; border-radius: 1.125rem; background: var(--raised); box-shadow: 0 0 0 1px var(--ring); }
.dot { display: inline-block; width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--up-fill); flex: none; }

/* six kinds of check: the app's own kind of list */
.kinds { padding: 0 1.375rem; }
.kinds > div { display: grid; grid-template-columns: 0.5625rem 9.5rem 1fr auto; align-items: center; column-gap: 1rem; padding: 1.0625rem 0; }
.kinds > div + div { border-top: 1px solid var(--rule); }
.kinds dt { font-weight: 650; }
.kinds .for { color: var(--soft); }
.kinds .eg { font-family: var(--mono); font-size: 0.8125rem; color: var(--faint); text-align: right; white-space: nowrap; }
@media (max-width: 47.99rem) {
  .kinds { padding: 0 1.125rem; }
  .kinds > div { grid-template-columns: 0.5625rem 1fr; row-gap: 0.125rem; padding: 0.9375rem 0; }
  .kinds .for, .kinds .eg { grid-column: 2; text-align: left; }
  .kinds .eg { margin-top: 0.125rem; white-space: normal; overflow-wrap: anywhere; }
}

/* what happened, in Farsight's own sentences */
.tl { padding: 0.375rem 1.375rem; }
.tl li { display: grid; grid-template-columns: 0.5625rem 4.75rem 1fr; align-items: baseline; column-gap: 0.875rem; padding: 0.9375rem 0; }
.tl li + li { border-top: 1px solid var(--rule); }
.tl .dot { align-self: center; }
.tl time { font-family: var(--mono); font-size: 0.8125rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.tl .k-failing .dot { background: var(--warn-fill); }
.tl .k-down .dot { background: var(--down-fill); }
.tl .k-alert .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--faint); }
@media (max-width: 39.99rem) {
  .tl { padding: 0.25rem 1.125rem; }
  .tl li { grid-template-columns: 0.5625rem 1fr; row-gap: 0.0625rem; padding: 0.75rem 0; }
  .tl time { grid-column: 2; font-size: 0.75rem; }
  .tl li > span:last-child { grid-column: 2; }
  .tl .dot { grid-row: 1 / span 2; align-self: start; margin-top: 0.4375rem; }
}

/* the last 30 days, as the status page draws them */
.livebars { padding: 0.375rem 1.375rem 0; }
.lb-row { display: grid; grid-template-columns: 9.5rem 1fr 4.25rem; align-items: center; column-gap: 1.25rem; padding: 0.875rem 0; }
.lb-row + .lb-row { border-top: 1px solid var(--rule); }
.lb-name { font-weight: 650; overflow-wrap: anywhere; }
.lb-bars { display: flex; gap: 0.1875rem; height: 1.875rem; }
/* 90 days in a phone's width: a hair between them, so each day keeps its 2 px */
.lb-dense .lb-bars { gap: 1px; }
.lb-bars i { flex: 1 1 0; min-width: 0; border-radius: 0.1875rem; background: var(--up-fill); }
.lb-bars .s-warn { background: var(--warn-fill); }
.lb-bars .s-bad { background: var(--down-fill); }
.lb-bars .s-not_watched, .lb-bars .s-no_data { background: var(--none-fill); }
.lb-up { text-align: right; font-weight: 650; color: var(--up); }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.5rem 0 0.5625rem; border-top: 1px solid var(--rule); color: var(--soft); }
.lb-foot b { color: var(--ink); font-weight: 650; }
.lb-foot a { min-height: 2.75rem; display: inline-flex; align-items: center; }
@media (max-width: 39.99rem) {
  .livebars { padding: 0.25rem 1.125rem 0; }
  .lb-row { grid-template-columns: 1fr auto; row-gap: 0.4375rem; padding: 0.75rem 0; }
  .lb-bars { grid-column: 1 / -1; grid-row: 2; height: 1.5rem; gap: 0.125rem; }
}

/* facts as ruled lines */
.rows { padding: 0 1.375rem; }
.rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding: 1rem 0; }
.rows > div + div { border-top: 1px solid var(--rule); }
.rows dt { font-weight: 600; }
.rows dd { color: var(--soft); text-align: right; }
.rows dd b { color: var(--ink); font-weight: 650; }
.rows .cmd { display: block; }
.rows .cmd dd { text-align: left; font-family: var(--mono); font-size: 0.875rem; color: var(--ink); overflow-wrap: anywhere; }
.rows .cmd dd i { font-style: normal; color: var(--faint); user-select: none; }
@media (max-width: 39.99rem) { .rows { padding: 0 1.125rem; } }

/* the close */
.close { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; padding-top: clamp(4rem, 9vw, 8rem); padding-bottom: clamp(3rem, 6vw, 5rem); text-align: center; border-top: 1px solid var(--rule); }
.close h2 { font-size: clamp(2.25rem, 1.2rem + 3.9vw, 4.75rem); letter-spacing: var(--h1-track); }
.close-links { display: flex; gap: 1.75rem; font-weight: 600; color: var(--soft); }
.close-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
@media (hover: hover) { .close-links a:hover { color: var(--ink); } }
.fine { max-width: 32rem; margin-top: clamp(1rem, 3vw, 2.25rem); color: var(--faint); font-size: 0.875rem; text-wrap: balance; }

@media (prefers-reduced-transparency: reduce) {
  .bar.is-pill .bar-in { background: var(--raised); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
