/* pyrocko.org landing page */

:root {
  --bg: #ffffff;
  --text: #1c1f24;
  --muted: #5b6370;
  --faint: #8a929e;
  --rule: #e4e7eb;
  --accent: #366ba1;         /* pyrocko whale */
  --accent-strong: #215587;
  --accent-soft: #e8f1fc;
  --code-bg: #14171c;
  --code-text: #e9edf2;
  /* Lato has 400, 700, 900 only (see fonts/fonts.css) */
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Inconsolata Pyrocko", ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --text: #e6e9ee;
    --muted: #a0a8b4;
    --faint: #6f7884;
    --rule: #2a3038;
    --accent: #95c2f0;       /* pyrocko whale-light */
    --accent-strong: #bcdbfb;
    --accent-soft: #1f2b3c;
    --code-bg: #0b0d10;
    color-scheme: dark;
  }
  .partners img { filter: grayscale(1) invert(1) brightness(1.4); }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5em, 3vw, 1.9em); font-weight: 700; }
h3 { font-size: 1.1em; font-weight: 700; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 40px; } }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* top bar */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
/* same as the top bar of the manual (sphinx-pyrocko-theme): full width,
   18px base size (also on small screens, where the body text gets smaller) */
.topbar { font-size: 18px; }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 3.5rem; padding: 0 16px;
}
@media (min-width: 720px) { .topbar-inner { padding: 0 24px; } }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 700; font-size: 1.1em; }
.brand:hover { text-decoration: none; }
/* logo: pyrocko-dark.svg (white ring around the circle) in dark mode, via <picture> */
.brand picture { display: flex; }
/* the logo files have space around the circle (room for the ring of the
   dark variant): 30px image = 28px circle */
.brand img { width: 30px; height: 30px; }
.topbar nav { display: flex; gap: 1.5rem; }
.topbar nav a { color: var(--muted); font-weight: 400; }
.topbar nav a:hover { color: var(--text); text-decoration: none; }

/* hero */

.hero { margin-top: 2rem; padding: 4.5rem 0 0; }
@media (min-width: 960px) { .hero { padding-top: 6.5rem; } }
.hero h1 { font-size: clamp(2.6em, 6vw, 3.8em); font-weight: 900; margin-bottom: .15em; }
.subtitle { font-size: clamp(1.15em, 2.2vw, 1.4em); color: var(--muted); margin: 0 0 1.5rem; }
.lead { max-width: 40em; margin: 0 0 2.5rem; }
.hero-logo { display: none; }
@media (min-width: 860px) {
  .hero-head { display: flex; gap: 2.5rem; align-items: flex-start; margin-bottom: 2rem; }
  /* 137px image = 128px circle; the negative margin aligns the circle */
  .hero-logo { display: block; flex: none; width: 137px; height: 137px; margin: -4.5px 0 0 -4.5px; }
  .hero-logo img { display: block; width: 100%; height: 100%; }
}

.install { max-width: 44rem; margin-bottom: 3rem; }
.install-tabs { display: flex; gap: .25rem; }
.install-tabs button {
  font: inherit; font-size: .85em; font-weight: 700;
  padding: .3rem .8rem; border: 0; border-radius: 6px 6px 0 0;
  background: transparent; color: var(--muted); cursor: pointer;
}
.install-tabs button[aria-selected="true"] { background: var(--code-bg); color: var(--code-text); }
.install-cmd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  background: var(--code-bg); color: var(--code-text);
  border-radius: 0 8px 8px 8px;
  padding: .8rem 1rem; font-family: var(--mono); font-size: .9em;
}
.install-cmd pre {
  margin: 0; font: inherit; line-height: 1.5; white-space: pre;
  overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: thin;
}
.install-cmd button.copy { margin: -.15rem -.4rem 0 0; }
.install-note code { font-size: .9em; }
.prompt { color: #7d8794; user-select: none; }
.install-note { font-size: .85em; color: var(--muted); margin: .6rem 0 0; }

button.copy {
  border: 0; background: transparent; color: inherit; opacity: .7;
  cursor: pointer; padding: .25rem; border-radius: 6px; display: inline-flex;
}
button.copy:hover { opacity: 1; background: rgba(127, 127, 127, .2); }
button.copy.done { color: #4caf50; opacity: 1; }

.quick-links {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: .9rem 2rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.quick-links a { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; }
.quick-links .icon { color: var(--accent); }
.note { color: var(--muted); font-size: .9em; margin: 1.5rem 0 0; max-width: 46em; }

.seismogram {
  display: block; width: 100%; height: 70px; margin-top: 4rem;
  fill: none; stroke: var(--faint); stroke-width: 1; vector-effect: non-scaling-stroke;
  opacity: .7;
}

/* live spectrogram strip (shown once the embedded page reports data) */

.bfo { margin: 0; height: 0; overflow: hidden; }
.bfo.ready { height: auto; margin-top: 4rem; overflow: visible; position: relative; }
.bfo-tip {
  position: absolute; z-index: 5; pointer-events: none;
  padding: .35rem .6rem; border-radius: 5px;
  background: rgba(20, 20, 26, .94); color: #f2f2f2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  font-size: .8em; line-height: 1.35; white-space: nowrap;
  /* fade in after a short delay, so that sweeping across the strip does
     not flash tooltips; fade out quickly */
  opacity: 0; visibility: hidden;
  transition: opacity .12s, visibility 0s .12s;
}
.bfo-tip.on {
  opacity: 1; visibility: visible;
  transition: opacity .15s .12s, visibility 0s .12s;
}
@media (prefers-reduced-motion: reduce) {
  .bfo-tip, .bfo-tip.on { transition: none; }
}
.bfo-tip b { font-weight: 700; }
.bfo iframe { display: block; width: 100%; height: 200px; border: 0; background: #0b0b10; }
.bfo figcaption { font-size: .85em; color: var(--muted); padding-top: .75rem; max-width: 1100px; }

/* sections */

.section { padding: 5rem 0; border-top: 1px solid var(--rule); }
.hero + .section { border-top: 0; }
.section-lead { color: var(--muted); max-width: 42em; margin: 0 0 3rem; font-size: 1.05em; }

.feature-grid { display: grid; gap: 2.25rem 3rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.feature h3 { margin-bottom: .35em; }
.feature p { margin: 0; color: var(--muted); font-size: .95em; }

/* apps: one full-width row per app */

.app {
  display: grid; gap: 1.75rem; align-items: start;
  padding: 3.5rem 0;
}
.app-head, .no-image .app-body { grid-column: 1 / -1; }
.app-head { margin-bottom: -.25rem; }
.no-image .app-body { max-width: 46rem; }
.app-head > p { margin: 0; }
.app + .app { border-top: 1px solid var(--rule); }
.app:first-of-type { padding-top: 1rem; }
@media (min-width: 860px) {
  .app { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; }
}
.app-image { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.app-image img, .app-image video { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.app-image.contain img { object-fit: contain; padding: 1rem; }
.app-image.logo img { object-fit: contain; padding: 18%; }
@media (prefers-color-scheme: dark) { .app-image { outline: 1px solid var(--rule); } }

.app-body > p { margin: 0 0 1rem; }
.app-head h3 { font-size: 1.6em; margin: 0; }
.app-head h3 a { color: var(--text); }
.tagline { color: var(--muted); font-size: 1.05em; margin-top: .2rem !important; }
.badge {
  display: inline-block; margin: 0 0 .6rem !important;
  font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
}
.badge.standalone { color: var(--faint); }
.points { margin: 0 0 1.25rem; padding-left: 1.2rem; }
.points li { margin-bottom: .2rem; }
.app-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-weight: 700; font-size: .95em; }
.app-links .doi { color: var(--faint); font-weight: 400; }

/* cite */

.two-col { display: grid; gap: 3rem; }
@media (min-width: 960px) { .two-col { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.citation { padding-left: 1rem; border-left: 3px solid var(--accent); overflow-wrap: anywhere; }
.bibtex summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.bibtex-box { position: relative; margin-top: .75rem; }
.bibtex-box pre {
  margin: 0; padding: 1rem; overflow-x: auto; border-radius: 8px;
  background: var(--code-bg); color: var(--code-text); font: .8em/1.5 var(--mono);
}
.bibtex-box .copy { position: absolute; top: .5rem; right: .5rem; color: var(--code-text); }
.pubs, .material { padding-left: 1.2rem; font-size: .93em; }
.pubs li, .material li { margin-bottom: .75rem; overflow-wrap: anywhere; }
.pubs { color: var(--muted); }
#material { margin-top: 2.5rem; }

/* footer */

.site-footer { padding: 4rem 0 2.5rem; font-size: .9em; color: var(--muted); border-top: 1px solid var(--rule); }
.home-base { max-width: 46em; margin-top: 0; }
.partners {
  list-style: none; padding: 0; margin: 2rem 0 3rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.75rem;
}
.partners img { height: 2.1rem; width: auto; filter: grayscale(1); opacity: .75; transition: filter .15s, opacity .15s; }
.partners a:hover img { filter: none; opacity: 1; }
.legal { margin: 0; }
.legal a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .topbar nav { gap: 1rem; font-size: .92em; }
  .topbar nav a[href="#cite"] { display: none; }
  .quick-links { grid-template-columns: 1fr 1fr; }
  .section { padding: 3.5rem 0; }
  .app { padding: 2.5rem 0; }
}
