/* waftty: a sky blue theme. The gust from the app icon (a line that ends in
   a three-quarter curl) recurs as the hero's drifting streaks and the
   heading underline. */

:root {
  --sky-50: #f3faff;
  --sky-100: #e2f3fd;
  --sky-200: #bfe5fa;
  --sky-300: #86cff5;
  --sky-400: #4bb7ee;
  --sky-500: #1f9ce0;
  --sky-600: #0e7fc0;
  --sky-700: #0c679d;
  --sky-800: #0f5683;
  --sky-900: #10476b;

  --gust: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 20' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M2 15H100A6.5 6.5 0 1 0 93.5 8.5'/%3E%3C/svg%3E");
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--sky-600);
  --md-primary-fg-color--light: var(--sky-500);
  --md-primary-fg-color--dark: var(--sky-700);
  --md-primary-bg-color: #fff;
  --md-accent-fg-color: var(--sky-500);
  --md-default-bg-color: #fbfdff;
  --md-typeset-a-color: var(--sky-700);
  --md-code-bg-color: var(--sky-50);

  --wf-header: linear-gradient(120deg, var(--sky-700) 0%, var(--sky-600) 55%, var(--sky-500) 100%);
  --wf-hero: linear-gradient(180deg, var(--sky-100) 0%, rgba(226, 243, 253, 0) 100%);
  --wf-streak: var(--sky-400);
  --wf-heading: var(--sky-800);
}

[data-md-color-scheme="slate"] {
  --md-hue: 205;
  --md-primary-fg-color: #12456a;
  --md-primary-fg-color--light: #175a88;
  --md-primary-fg-color--dark: #0d3150;
  --md-primary-bg-color: #e6f3fc;
  --md-accent-fg-color: var(--sky-300);
  --md-default-bg-color: #0c1824;
  --md-default-fg-color: #d8e7f2;
  --md-default-fg-color--light: #b4cadb;
  --md-typeset-color: #d8e7f2;
  --md-typeset-a-color: #74c6f4;
  --md-code-bg-color: #12263a;
  --md-code-fg-color: #d8e7f2;

  --wf-header: linear-gradient(120deg, #0b2f4c 0%, #12456a 60%, #175a88 100%);
  --wf-hero: linear-gradient(180deg, #10283d 0%, rgba(16, 40, 61, 0) 100%);
  --wf-streak: var(--sky-300);
  --wf-heading: #a9dcf8;
}

/* Header and tabs share one sky gradient. */
.md-header,
.md-tabs {
  background: var(--wf-header);
}

.md-header {
  box-shadow: none;
}

.md-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--wf-heading);
}

/* A gust underlines every second-level heading. */
.md-typeset h2::after {
  content: "";
  display: block;
  width: 4.5rem;
  height: 0.75rem;
  margin-top: 0.35rem;
  background: var(--md-accent-fg-color);
  -webkit-mask: var(--gust) no-repeat left center / contain;
  mask: var(--gust) no-repeat left center / contain;
  opacity: 0.7;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  background: var(--wf-hero);
  border-radius: 1.5rem;
}

.hero > *:not(.wind) {
  position: relative;
}

.hero .hero-icon {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 8px 18px rgba(14, 127, 192, 0.35));
}

.md-typeset .hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 0.25rem;
}

/* The page title needs no permalink, and its hidden mark would push the name
   off the icon's center line. */
.md-typeset .hero h1 .headerlink {
  display: none;
}

.hero .tagline {
  font-size: 1.05rem;
  margin: 0 auto 1.5rem;
  max-width: 34rem;
}

.hero img.screenshot {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(10, 60, 100, 0.3);
  margin: 1.5rem 0 0.5rem;
}

/* Streaks of wind drift across the hero, behind its content. */
.hero .wind {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  color: var(--wf-streak);
}

.hero .wind svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero .wind path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.45;
  animation: drift 14s ease-in-out infinite alternate;
}

.hero .wind path:nth-child(even) {
  opacity: 0.3;
  animation-duration: 18s;
  animation-delay: -6s;
}

.hero .wind path:nth-child(3n) {
  animation-duration: 16s;
  animation-delay: -3s;
}

@keyframes drift {
  from {
    transform: translateX(-12px);
  }
  to {
    transform: translateX(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .wind path {
    animation: none;
  }
}

/* Buttons */
.button-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.md-typeset .button-row a {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.md-typeset .button-row a:hover {
  transform: translateY(-1px);
}

.md-typeset .button-row .primary {
  background: linear-gradient(120deg, var(--sky-600), var(--sky-400));
  color: #fff;
  box-shadow: 0 6px 16px rgba(14, 127, 192, 0.3);
}

.md-typeset .button-row .primary:hover {
  color: #fff;
  box-shadow: 0 8px 22px rgba(14, 127, 192, 0.4);
}

.md-typeset .button-row .secondary {
  border: 1.5px solid var(--md-typeset-a-color);
  color: var(--md-typeset-a-color);
}

/* The home page's features: cards in a grid, one column on narrow screens. */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.md-typeset .feature {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--sky-200);
  border-radius: 0.75rem;
  background: var(--sky-50);
}

[data-md-color-scheme="slate"] .md-typeset .feature {
  border-color: #1d3a55;
  background: var(--md-code-bg-color);
}

.md-typeset .feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--md-typeset-a-color);
}

.md-typeset .feature h3 .headerlink {
  display: none;
}

.md-typeset .feature p {
  margin: 0;
}

/* Hide sidebars on desktop only; mobile needs them for the menu. */
@media screen and (min-width: 76.25em) {
  .md-sidebar {
    display: none;
  }
}

.md-content {
  max-width: 52rem;
  margin: 0 auto;
}

.md-typeset table:not([class]) th {
  background: var(--md-code-bg-color);
}
