/* ==================================================================================================================================================
   LiteFX site styles.

   The brand colors are used sparingly: pink and cyan as highlights (title, buttons, links, icons), the dark gradient for the header and the hero.
   ================================================================================================================================================ */

:root {
  --lfx-pink: #e356d6;
  --lfx-cyan: #42eddd;
  --lfx-dark: #282835;
  --lfx-dark-light: #485055;
  --lfx-gradient-dark: linear-gradient(150deg, var(--lfx-dark) 0%, var(--lfx-dark-light) 100%);
  --lfx-gradient-highlight: linear-gradient(120deg, var(--lfx-pink) 0%, var(--lfx-cyan) 100%);
}

/* -------------------------------------------------------------- Color schemes --------------------------------------------------------------- */

/* The header and tabs use the dark banner color in both schemes. */
:root,
[data-md-color-scheme="default"],
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--lfx-dark);
  --md-primary-fg-color--light: var(--lfx-dark-light);
  --md-primary-fg-color--dark: #1f1f2a;
  --md-primary-bg-color: #ffffff;
}

/* Light scheme: darker variants of the highlights, so that links remain readable on white. */
[data-md-color-scheme="default"] {
  --md-accent-fg-color: #b93aae;
  --md-accent-fg-color--transparent: rgba(227, 86, 214, 0.1);
  --md-typeset-a-color: #9b2f92;
}

/* Dark scheme: a slightly cool, desaturated background derived from the banner colors. */
[data-md-color-scheme="slate"] {
  --md-hue: 240;
  --md-default-bg-color: #1d1d27;
  --md-code-bg-color: #25252f;
  --md-footer-bg-color: #17171f;
  --md-footer-bg-color--dark: #121218;
  --md-accent-fg-color: var(--lfx-pink);
  --md-accent-fg-color--transparent: rgba(227, 86, 214, 0.12);
  --md-typeset-a-color: var(--lfx-cyan);
}

.md-header,
.md-tabs {
  background: var(--lfx-dark);
}

/* ---------------------------------------------------------------- Buttons ------------------------------------------------------------------- */

.md-typeset .md-button {
  border-radius: 2rem;
  padding: 0.55em 1.6em;
  font-weight: 600;
  transition: transform 125ms, box-shadow 125ms, background-color 125ms, border-color 125ms, color 125ms;
}

.md-typeset .md-button svg {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  vertical-align: -0.2em;
  margin-right: 0.25em;
}

.md-typeset .md-button--primary {
  background: var(--lfx-pink);
  border-color: var(--lfx-pink);
  color: #ffffff;
}

.md-typeset .md-button:focus,
.md-typeset .md-button:hover {
  transform: translateY(-1px);
}

.md-typeset .md-button--primary:focus,
.md-typeset .md-button--primary:hover {
  background: #eb6fdf;
  border-color: #eb6fdf;
  color: #ffffff;
  box-shadow: 0 0.4rem 1.2rem rgba(227, 86, 214, 0.35);
}

/* ------------------------------------------------------------------ Hero -------------------------------------------------------------------- */

.lfx-hero {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Full screen below the header and tabs. */
  min-height: calc(100vh - 4.8rem);
  min-height: calc(100svh - 4.8rem);
  background: var(--lfx-gradient-dark);
  color: #ffffff;
}

.lfx-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The overlay keeps the text readable on any video and ties it to the banner gradient. Two faint glows add the highlight colors. */
.lfx-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(227, 86, 214, 0.16), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(66, 237, 221, 0.12), transparent 45%),
    linear-gradient(150deg, rgba(40, 40, 53, 0.92) 0%, rgba(40, 40, 53, 0.78) 45%, rgba(72, 80, 85, 0.88) 100%);
}

.lfx-hero__content {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 3rem;
  padding-bottom: 5rem;
  text-align: center;
}

.lfx-hero__logo {
  width: clamp(6rem, 18vmin, 10rem);
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0.5rem 2rem rgba(0, 0, 0, 0.35));
}

/* Title and subtitle: the animated gradient from the original website. */
.md-typeset .title-gradient {
  --bg-size: 400%;
  --color-one: #84d0e5;
  --color-two: #f3a8f2;
  font-family: sans-serif;
  background: linear-gradient(
      240deg,
      var(--color-one),
      var(--color-two),
      var(--color-one)
    ) 0 0 / var(--bg-size) 100%;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.md-typeset h1.title-gradient {
  margin: 0;
  /* The original size, limited by the viewport width, so that the letter-spaced title never wraps on narrow screens. */
  font-size: min(clamp(2rem, 18vmin, 8rem), 11vw);
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: 0.4em;
  line-height: 1.1;
  /* Compensate the trailing letter spacing, so that the title stays centered. */
  margin-right: -0.4em;
}

.md-typeset .lfx-hero__subtitle.title-gradient {
  margin: 1rem 0 0;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  line-height: 1.3;
  margin-right: -0.4em;
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .lfx-hero__subtitle.title-gradient {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    margin-right: -0.2em;
  }
}

.md-typeset .lfx-hero__tags {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.lfx-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.5rem;
}

/* Secondary buttons on the hero: translucent outlines with a cyan hover. */
.lfx-hero .md-button:not(.md-button--primary) {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(4px);
}

.lfx-hero .md-button:not(.md-button--primary):focus,
.lfx-hero .md-button:not(.md-button--primary):hover {
  color: var(--lfx-cyan);
  border-color: var(--lfx-cyan);
  background: rgba(66, 237, 221, 0.08);
}

.lfx-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  width: 2.4rem;
  height: 2.4rem;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  transition: color 125ms;
}

.lfx-hero__scroll:hover {
  color: var(--lfx-cyan);
}

.lfx-hero__scroll svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .md-typeset .title-gradient {
    animation: move-bg 20s linear infinite;
  }

  .lfx-hero__scroll {
    animation: lfx-bounce 2.5s ease-in-out infinite;
  }

  @keyframes move-bg {
    to { background-position: var(--bg-size) 0; }
  }

  @keyframes lfx-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 0.4rem); }
  }
}

/* ------------------------------------------------------------ Landing content --------------------------------------------------------------- */

/* The landing page starts directly below the hero. */
.md-content__inner:has(> .lfx-lead) {
  margin-top: 0;
  padding-top: 2rem;
}

.md-typeset .lfx-lead {
  max-width: 46rem;
  margin: 2rem auto 3rem;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}

.md-typeset .lfx-section-title {
  margin: 3.5rem 0 1.5rem;
  font-weight: 600;
  text-align: center;
}

/* A short highlight line below section titles. */
.md-typeset .lfx-section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0.8rem auto 0;
  border-radius: 2px;
  background: var(--lfx-gradient-highlight);
}

.md-typeset .lfx-section-title .headerlink {
  display: none;
}

/* Feature cards: icons in the highlight colors, subtle hover. */
.md-typeset .lfx-features.grid.cards > ul > li {
  border-radius: 0.6rem;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}

.md-typeset .lfx-features.grid.cards > ul > li:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 0.5rem 1.5rem var(--md-accent-fg-color--transparent);
  transform: translateY(-2px);
}

.md-typeset .lfx-features .lg {
  width: 2rem;
  height: 2rem;
  color: var(--lfx-pink);
}

.md-typeset .lfx-features li:nth-child(even) .lg {
  color: var(--lfx-cyan);
}

[data-md-color-scheme="default"] .md-typeset .lfx-features li:nth-child(even) .lg {
  color: #14a79a;
}

/* Showcase rows: image and text side by side, alternating, stacked on small screens. */
.md-typeset .lfx-showcase {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 3rem 0;
}

.md-typeset .lfx-showcase:nth-child(even) {
  flex-direction: row-reverse;
}

.md-typeset .lfx-showcase > p:first-child {
  flex: 0 0 42%;
  margin: 0;
}

.md-typeset .lfx-showcase > div {
  flex: 1 1 auto;
}

.md-typeset .lfx-showcase img {
  display: block;
  width: 100%;
  border-radius: 0.6rem;
  box-shadow: 0 0.8rem 2rem rgba(10, 10, 20, 0.35);
}

.md-typeset .lfx-showcase h3 {
  margin-top: 0;
}

@media screen and (max-width: 59.9375em) {
  .md-typeset .lfx-showcase,
  .md-typeset .lfx-showcase:nth-child(even) {
    flex-direction: column;
    gap: 1rem;
  }
}

.md-typeset .lfx-cta {
  margin: 4rem 0 2rem;
  text-align: center;
}

/* ------------------------------------------------------------ API reference ----------------------------------------------------------------- */
/* Tables generated by MrDocs (content/api/) carry their own class, so they are styled like the default Material tables here. */

.md-typeset .mrdocs-table-wrap {
  margin: 1em 0;
  overflow-x: auto;
}

.md-typeset .mrdocs-table {
  width: 100%;
  border-collapse: collapse;
  border: 0.05rem solid var(--md-typeset-table-color);
  border-radius: 0.1rem;
  font-size: 0.64rem;
}

.md-typeset .mrdocs-table th {
  padding: 0.9375em 1.25em;
  font-weight: 700;
  text-align: left;
  background-color: var(--md-default-fg-color--lightest);
}

.md-typeset .mrdocs-table td {
  padding: 0.9375em 1.25em;
  vertical-align: top;
  border-top: 0.05rem solid var(--md-typeset-table-color);
}

.md-typeset .mrdocs-table tbody tr:hover {
  background-color: var(--md-accent-fg-color--transparent);
}
