/* Lyvyl site styles */

@font-face {
  font-family: "Archivo";
  src: url("https://cdn.lyvyl.xyz/fonts/archivo-var.woff2") format("woff2-variations"),
       url("https://cdn.lyvyl.xyz/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F4F7F9;
  --paper-2: #E9EFF3;
  --ink: #14202B;
  --mist: #566778;
  --isobar: #2D63A6;
  --isobar-hover: #1F4C85;
  --contour: #CCD8E2;
  --panel: #13202B;
  --panel-2: #1B2B39;
  --panel-text: #D9E5EE;
  --signal: #E8A33D;
  --ok: #23845A;
  --warn: #B7791F;
  --down: #B83B3B;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.25rem;
  --step-4: clamp(2.5rem, 2rem + 2.4vw, 3.5rem);
  --step-5: clamp(2.9rem, 2rem + 4.2vw, 5rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --radius-panel: 18px;
  --radius-control: 8px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0F1A23;
    --paper-2: #15232F;
    --ink: #E4ECF2;
    --mist: #9AAFC0;
    --isobar: #8DB8EA;
    --isobar-hover: #B4D2F0;
    --contour: #26394A;
    --panel: #13202B;
    --panel-2: #1B2B39;
    --ok: #5FC08A;
    --warn: #E8B45D;
    --down: #E07A7A;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-stretch: 100%;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }

a { color: var(--isobar); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--isobar-hover); }

:focus-visible {
  outline: 2px solid var(--isobar);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  margin: 0;
  font-stretch: 72%;
  font-weight: 640;
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: 1.12; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

code, pre { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--paper-2);
  border: 1px solid var(--contour);
  border-radius: 5px;
  padding: 0.08em 0.36em;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-control);
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--mist);
  max-width: 34em;
}

.measure { max-width: 40em; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--contour);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-stretch: 78%;
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.005em;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 30px; height: 30px; color: var(--isobar); }

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav__list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-control);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
}
.nav__link:hover { background: var(--paper-2); color: var(--ink); }
.nav__link[aria-current="page"] {
  color: var(--isobar);
  box-shadow: inset 0 -2px 0 var(--isobar);
  border-radius: 0;
}
.nav__toggle {
  display: none;
  margin-left: auto;
  font: inherit;
  font-size: 0.97rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--contour);
  border-radius: var(--radius-control);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius-control);
  border: 1px solid var(--isobar);
  background: var(--isobar);
  color: #fff;
  font: inherit;
  font-weight: 560;
  font-size: 0.97rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--isobar-hover); border-color: var(--isobar-hover); color: #fff; }
.button--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--contour);
}
.button--quiet:hover { background: var(--paper-2); color: var(--ink); border-color: var(--contour); }
@media (prefers-color-scheme: dark) {
  .button { color: var(--panel); }
  .button:hover { color: var(--panel); }
  .button--quiet, .button--quiet:hover { color: var(--ink); }
}

@media (max-width: 52rem) {
  .nav__toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute;
    inset: 4.25rem 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--contour);
    padding: 0.75rem var(--gutter) 1.25rem;
    flex-direction: column;
    align-items: stretch;
    z-index: 5;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; }
  .nav__link[aria-current="page"] { box-shadow: inset 2px 0 0 var(--isobar); }
  .nav .button { margin-top: 0.5rem; }
  .site-header { position: relative; }
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2rem, 1rem + 3vw, 3.5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: center;
}
.hero__title { font-size: var(--step-5); max-width: 9.5em; }
.hero .lede { margin-top: 1.4rem; }
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.hero__note {
  margin-top: 1.1rem;
  font-size: var(--step--1);
  color: var(--mist);
}

.map {
  margin: 0;
}
.map__frame {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--panel) url("https://media.lyvyl.xyz/img/pressure-map-poster.webp") center / cover no-repeat;
}
.map__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.map__pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transform: translate(-7px, -50%);
  color: var(--panel-text);
  font-size: 0.875rem;
  font-weight: 560;
  font-stretch: 85%;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.map__pin::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.22), 0 0 0 9px rgba(232, 163, 61, 0.08);
}
.map__pin span { color: #8EA3B5; font-weight: 420; }
.map__pin--fra { left: 56%; top: 47%; }
.map__pin--ams { left: 38%; top: 30%; }
.map__pin--hel { left: 70%; top: 18%; }
.map__pin--iad { left: 14%; top: 66%; }
.map__caption {
  margin-top: 0.75rem;
  font-size: var(--step--1);
  color: var(--mist);
}

@media (max-width: 52rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .map__pin span { display: none; }
}

/* the occluded-front divider: the one decorative device on the site */
.front {
  height: 18px;
  background: url("https://static.lyvyl.xyz/img/front.svg") left center / 56px 18px repeat-x;
  opacity: 0.9;
}
@media (prefers-color-scheme: dark) {
  .front { opacity: 0.75; }
  .map__frame, .feature__media img { box-shadow: 0 0 0 1px var(--contour); }
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}
.section--tint { background: var(--paper-2); }
.section__head { max-width: 40em; }
.section__head p { margin-top: 1rem; color: var(--mist); font-size: var(--step-1); line-height: 1.5; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 1rem + 3vw, 4.5rem);
  align-items: center;
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}
.feature--flip { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.feature--flip .feature__media { order: -1; }
.feature__text p { margin-top: 1rem; }
.feature__media img { border-radius: var(--radius-panel); width: 100%; height: auto; }

.facts {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--contour);
}
.facts li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--contour);
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1rem;
}
.facts dt, .facts strong { font-weight: 600; }
.facts span { color: var(--mist); }

@media (max-width: 52rem) {
  .feature, .feature--flip { grid-template-columns: minmax(0, 1fr); }
  .feature--flip .feature__media { order: 0; }
  .facts li { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  align-items: start;
}
.split > div > p { margin-top: 1rem; }
@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- code ---------- */

.code {
  position: relative;
  margin: 0;
  background: var(--panel);
  color: var(--panel-text);
  border-radius: 12px;
  overflow: hidden;
}
.code + .code { margin-top: 1rem; }
.code__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.9rem 0.55rem 1.1rem;
  font-size: var(--step--1);
  color: #8EA3B5;
  border-bottom: 1px solid #22364A;
}
.code pre {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.55;
  font-size: 0.875rem;
  tab-size: 2;
}
.code .c { color: #7F95A8; }
.code .s { color: #B4D2F0; }
.code .k { color: #E8A33D; }
.copy {
  font: inherit;
  font-size: 0.8125rem;
  color: #B4D2F0;
  background: transparent;
  border: 1px solid #2C4256;
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}
.copy:hover { background: #1B2B39; }

/* ---------- pricing ---------- */

.price-table-wrap { overflow-x: auto; margin-top: 2.5rem; }
.price-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.price-table th, .price-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--contour);
}
.price-table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--ink);
  padding-top: 0;
}
.price-table tbody th { font-weight: 500; color: var(--mist); width: 26%; }
.plan__name {
  display: block;
  font-stretch: 72%;
  font-weight: 650;
  font-size: var(--step-2);
  line-height: 1.1;
}
.plan__price {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--step-1);
  font-weight: 600;
}
.plan__price small { font-size: var(--step--1); font-weight: 400; color: var(--mist); }
.plan__for { display: block; margin-top: 0.3rem; font-weight: 400; font-size: var(--step--1); color: var(--mist); }
.price-table .is-featured { background: color-mix(in srgb, var(--isobar) 7%, transparent); }

.faq { margin-top: 2rem; border-top: 1px solid var(--contour); }
.faq details { border-bottom: 1px solid var(--contour); }
.faq summary {
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.9rem;
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--isobar);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.1rem; max-width: 40em; color: var(--mist); }

/* ---------- docs ---------- */

.docs {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
.docs__toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  font-size: 0.95rem;
}
.docs__toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--contour); }
.docs__toc a {
  display: block;
  padding: 0.35rem 0 0.35rem 1rem;
  color: var(--mist);
  text-decoration: none;
  margin-left: -1px;
  border-left: 1px solid transparent;
}
.docs__toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.docs__body { max-width: 46rem; }
.docs__body h2 { font-size: var(--step-3); margin-top: 3.25rem; scroll-margin-top: 1.5rem; }
.docs__body h1 + h2 { margin-top: 2.25rem; }
.docs__body h3 { font-size: var(--step-1); margin-top: 2rem; font-stretch: 85%; }
.docs__body p, .docs__body .code, .docs__body table, .docs__body ul { margin-top: 1rem; }
.docs__body ul { padding-left: 1.2rem; }
.docs__body li + li { margin-top: 0.35rem; }

.ref {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.ref th, .ref td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--contour);
}
.ref thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
.ref td:first-child { white-space: nowrap; }
.method { font-family: var(--mono); font-size: 0.85em; font-weight: 600; color: var(--isobar); }

@media (max-width: 52rem) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs__toc { position: static; }
  .ref-wrap { overflow-x: auto; }
}

/* ---------- status ---------- */

.status-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 2rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--contour);
  border-radius: 12px;
  font-size: var(--step-1);
  font-weight: 600;
}
.status-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--contour);
}
.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--contour);
}
.status-list .meta { color: var(--mist); }
.dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--mist);
  flex: none;
}
.dot--operational { background: var(--ok); }
.dot--degraded { background: var(--warn); }
.dot--outage { background: var(--down); }
.state { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--mist); }
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  margin-top: 2.5rem;
}
.status-grid h2 { font-size: var(--step-2); }
.status-updated { margin-top: 1.5rem; color: var(--mist); font-size: var(--step--1); }
@media (max-width: 52rem) {
  .status-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- page head (inner pages) ---------- */

.page-head {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0;
}
.page-head .lede { margin-top: 1.1rem; }

.prose { max-width: 40em; }
.prose h2 { font-size: var(--step-3); margin-top: 3rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; }

.region-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; font-variant-numeric: tabular-nums; }
.region-table th, .region-table td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--contour); }
.region-table thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }

.notfound { padding-block: clamp(4rem, 3rem + 6vw, 8rem); }
.notfound p { margin-top: 1.2rem; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 0;
  padding-block: 2.5rem 3rem;
  border-top: 1px solid var(--contour);
  font-size: 0.95rem;
  color: var(--mist);
}
.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .brand { font-size: 1.15rem; }
.site-footer .brand__mark { width: 24px; height: 24px; }
.site-footer__legal { margin-top: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
