/* dbknife.com: one page, no build. Colors from the app icon (resources/icon.svg). */

:root {
  color-scheme: light dark;

  /* the blue band of the hero: the icon's deep blue, the same in both schemes */
  --color-hero: #14467f;
  --color-on-hero: #ffffff;
  --color-on-hero-muted: #c6dbf6;
  --color-background: light-dark(#f6f9fd, #0c1828);
  --color-text: light-dark(#0f2542, #e4edf9);
  --color-text-muted: light-dark(#4d6382, #9fb4cf);
  --color-link: light-dark(#1f6bc2, #7db4f5);
  --color-border: light-dark(#d4dfec, #22385a);
  --color-surface: light-dark(#ffffff, #12233a);
  --color-focus: #f5b83d;

  --font-sans: "Schibsted Grotesk", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.625rem, 1.2rem + 1.4vw, 2.125rem);
  --text-display: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: clamp(3.5rem, 2rem + 6vw, 7rem);

  --page-width: 72rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  /* how far the window of the demo hangs below the blue band */
  --overlap: clamp(5rem, 16vw, 14rem);
}

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

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font: 400 var(--text-base) / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-link);
  text-underline-offset: 0.18em;
}

a:focus-visible,
.table-scroll:focus-visible,
video:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

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

.hero {
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, var(--color-hero) calc(100% - var(--overlap)), transparent 0);
  color: var(--color-on-hero);
}

.hero a {
  color: inherit;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-sm);
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-md) 0;
}

.site-nav__links {
  display: flex;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
}

.site-nav__links a {
  text-decoration: none;
}

.site-nav__links a:hover {
  text-decoration: underline;
}

.hero__intro {
  display: grid;
  gap: var(--space-lg) var(--space-xl);
  align-items: center;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-md) 0 var(--space-lg);
}

@media (min-width: 56rem) {
  .hero__intro {
    grid-template-columns: minmax(14rem, 1fr) 2.4fr;
  }
}

/* the app icon, large, with the name under it */
.hero__brand {
  display: grid;
  justify-items: center;
  gap: var(--space-xs);
}

.hero__logo {
  width: clamp(7rem, 4rem + 12vw, 15rem);
  height: auto;
  /* the icon's drawing leaves a tenth of its size empty around the tile */
  margin: -1rem 0 -0.5rem;
}

.hero__name {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.hero__title {
  max-width: 24ch;
  margin: 0;
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 36rem;
  margin: var(--space-md) 0 0;
  color: var(--color-on-hero-muted);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-lg);
}

.get[hidden] {
  display: none;
}

.get__note {
  max-width: 30rem;
  margin: 0;
  color: var(--color-on-hero-muted);
  font-size: var(--text-sm);
}

.get__note a {
  color: var(--color-on-hero);
}

.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 0.5rem;
  background: var(--color-on-hero);
  color: var(--color-hero);
  font-weight: 700;
  text-decoration: none;
}

.hero .button {
  color: var(--color-hero);
}

.button:hover {
  background: #e3eefc;
}

/* the app window: the video carries the window's own corners and traffic lights */
.window {
  max-width: var(--page-width);
  margin: 0 auto;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #1e1e1e;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.35),
    0 1.5rem 4rem -1rem rgb(5 20 45 / 0.55);
}

.window__video {
  display: block;
  width: 100%;
  height: auto;
}

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

main {
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding-top: var(--space-xl);
}

.section__title {
  margin: 0 0 var(--space-md);
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section__note {
  max-width: 44rem;
  margin: var(--space-md) 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* --- strips: the databases and the systems; names only, since the logos are trademarks
   whose rules don't allow this use (Oracle, Microsoft and Apple want a license) --- */

.symbols {
  position: absolute;
}

.strip {
  padding-top: var(--space-xl);
  text-align: center;
}

.strip--next {
  padding-top: var(--space-lg);
}

.strip__title {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  font-weight: 500;
}

.strip__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.strip__list--wide {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.strip__item {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.3rem 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

.strip__icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.3rem;
  fill: none;
  stroke: var(--color-link);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strip__note {
  max-width: 16rem;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 400;
}

/* --- features ------------------------------------------------------------- */

.features {
  display: grid;
  gap: var(--space-lg) var(--space-xl);
  margin: 0;
}

@media (min-width: 48rem) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.feature dt {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
}

.feature dd {
  max-width: 34rem;
  margin: 0.35rem 0 0;
  color: var(--color-text-muted);
}

/* --- tables --------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  background: var(--color-surface);
}

.engines,
.downloads {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.engines th,
.engines td,
.downloads th,
.downloads td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.engines tbody tr:last-child > *,
.downloads tbody tr:last-child > * {
  border-bottom: 0;
}

.engines thead th,
.downloads thead th {
  font-weight: 700;
  white-space: nowrap;
}

.engines tbody th,
.downloads tbody th {
  font-weight: 500;
}

.engines {
  min-width: 46rem;
}

.downloads {
  min-width: 36rem;
}

.engines__none {
  color: var(--color-text-muted);
}

.beta {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.8em;
  font-weight: 500;
}

.install-notes {
  display: grid;
  gap: var(--space-xs);
  max-width: 48rem;
  margin: var(--space-md) 0 0;
  padding-left: 1.2rem;
}

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

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin: var(--space-xl) auto 0;
  padding: var(--space-md) var(--gutter) var(--space-lg);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.site-footer p {
  margin: 0;
}
