/* SPDX-FileCopyrightText: Copyright (c) 2026 cautem */
/* SPDX-License-Identifier: Apache-2.0 */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap");

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

.ws-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 5rem) 0 4rem;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(0, 167, 182, 0.28), transparent 35%),
    linear-gradient(135deg, #17131c 0%, #332522 54%, #78401f 100%);
}

.ws-hero__inner {
  display: grid;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  padding: 0 0.8rem;
}

.ws-hero__image {
  position: relative;
  z-index: 3;
  --terminal-offset: 9.5rem;
  width: min(100%, 33rem);
  margin: 0 auto 1.5rem;
  padding-top: var(--terminal-offset);
}

.ws-hero__image::before {
  position: absolute;
  top: 1rem;
  right: 0;
  width: min(70%, 23rem);
  height: 13rem;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(16 121 255 / 18%), transparent 68%);
  content: "";
  pointer-events: none;
}

.ws-hero__image img {
  display: block;
  width: 100%;
  height: auto;
}

.ws-hero__mascot-track {
  position: absolute;
  z-index: 2;
  top: -2.8rem;
  right: 0;
  left: 0;
  width: 100%;
  height: auto;
  background: transparent;
  pointer-events: none;
}

.ws-hero__mascot-art {
  position: absolute;
  top: 0;
  left: 50%;
  width: 88%;
  aspect-ratio: 720 / 658;
  transform: translateX(-50%) translate(
    calc(var(--look-x, 0) * 0.22rem),
    calc(var(--look-y, 0) * 0.14rem + var(--peek-y, 0px))
  );
  transition: transform 460ms cubic-bezier(0.2, 0.7, 0.2, 1);
  filter: drop-shadow(0 0.45rem 0.8rem rgb(0 0 0 / 22%));
}

.ws-hero__mascot-track.is-peeking .ws-hero__mascot-art { --peek-y: -3.2rem; }

.ws-hero__mascot-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ws-hero__pupil {
  position: absolute;
  z-index: 1;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 48% 42%, #fff 0 9%, #fff 10% 100%);
}

.ws-hero__pupil::after {
  position: absolute;
  top: 6%;
  left: 6%;
  width: 88%;
  height: 88%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #4a4a4e 0, #111116 29%, #030307 76%);
  box-shadow: 0 0.06rem 0.14rem rgb(0 0 0 / 35%);
  content: "";
  transform: translate(calc(var(--look-x, 0) * 0.4rem), calc(var(--look-y, 0) * 0.28rem));
  transition: transform 100ms ease-out;
}

.ws-hero__pupil--left { top: 41.2%; left: 44.9%; }
.ws-hero__pupil--right { top: 39%; left: 64.9%; }

.ws-mac-terminal {
  position: relative;
  z-index: 3;
  overflow: hidden;
  border: 1px solid rgb(218 205 245 / 32%);
  border-radius: 0.7rem;
  background: #161720;
  box-shadow: 0 1rem 2.4rem rgb(8 8 30 / 35%);
}

.ws-mac-terminal__bar {
  position: relative;
  z-index: 3;
  height: 1.95rem;
  border-bottom: 1px solid #171823;
  color: #c6c5cc;
  background: #30303a;
  font: 500 0.65rem/1.95rem "IBM Plex Sans", sans-serif;
  text-align: center;
}

.ws-mac-terminal__lights {
  position: absolute;
  top: 0.68rem;
  left: 0.7rem;
  width: 0.43rem;
  height: 0.43rem;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 0.75rem 0 #febc2e, 1.5rem 0 #28c840;
}

.ws-mac-terminal__prompt { color: #ff9a43; }
.ws-mac-terminal__success { color: #81d8a0; }
.ws-mac-terminal__cursor {
  display: inline-block;
  width: 0.45em;
  height: 1em;
  vertical-align: -0.16em;
  background: #ff9a43;
  animation: ws-cursor 1.1s steps(1) infinite;
}

@keyframes ws-cursor { 50% { opacity: 0; } }

.ws-flow__tabs {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.2rem;
  padding: 0.38rem 0.55rem 0;
  border-bottom: 1px solid #363744;
  background: #24252f;
}

.ws-flow__tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.46rem 0.25rem 0.5rem;
  border: 0;
  border-radius: 0.35rem 0.35rem 0 0;
  color: #a8a8b9;
  background: transparent;
  font: 600 0.63rem/1.1 "IBM Plex Sans", sans-serif;
  text-align: center;
  cursor: pointer;
}

.ws-flow__tab span { margin-right: 0.3em; color: #77778e; font-family: "IBM Plex Mono", monospace; }
.ws-flow__tab[aria-selected="true"] { color: #f5f1ff; background: #161720; }
.ws-flow__tab[aria-selected="true"] span { color: #ff9a43; }
.ws-flow__tab:is(:hover, :focus-visible) { color: #fff; }
.ws-flow__tab:focus-visible { outline: 2px solid #10a9b4; outline-offset: -2px; }

.ws-flow__screen {
  min-height: 12.2rem;
  padding: 1.05rem 1.15rem 0.8rem;
  color: #fff2df;
  font: 500 clamp(0.58rem, 1vw, 0.7rem)/1.75 "IBM Plex Mono", monospace;
  overflow-x: auto;
}

.ws-flow__panel[hidden] { display: none; }
.ws-flow__line { white-space: nowrap; }
.ws-flow__indent { padding-left: 1.2em; }
.ws-flow__muted { color: #9193a8; }
.ws-flow__success, .ws-flow__selected span { color: #80d5a0; }
.ws-flow__title { margin-top: 0.55rem; color: #ffb16b; font-weight: 700; }
.ws-flow__title span { margin-left: 0.65rem; color: #80d5a0; font-weight: 500; }
.ws-flow__selected { width: fit-content; margin: 0.35rem 0; padding: 0.06rem 0.5rem; color: #fff; background: #70421f; }
.ws-flow__selected span { margin: 0 0.8rem; }
.ws-flow--playing .ws-flow__panel:not([hidden]) .ws-flow__line { opacity: 0; transform: translateY(0.3rem); }
.ws-flow--playing .ws-flow__panel:not([hidden]) .ws-flow__line.is-visible { opacity: 1; transform: none; transition: opacity 280ms ease, transform 280ms ease; }

.ws-flow__progress { display: flex; gap: 0.35rem; padding: 0 1.15rem 0.8rem; }
.ws-flow__progress span { height: 0.15rem; flex: 1; border-radius: 1rem; background: #393844; }
.ws-flow__progress span.is-complete { background: #b88cfb; }
.ws-flow__note {
  margin: 0.6rem 0 0;
  color: #d8cee9;
  font: 500 0.62rem/1.45 "IBM Plex Sans", sans-serif;
  text-align: right;
}

.ws-hero__content {
  position: relative;
  z-index: 3;
  max-width: 31rem;
  padding-bottom: 1.5rem;
}

.ws-hero__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(224, 203, 255, 0.35);
  border-radius: 0.3rem;
  color: #e4d6ff;
  background: rgba(15, 16, 52, 0.22);
  font: 600 0.64rem/1.25 "IBM Plex Mono", monospace;
  letter-spacing: 0.09em;
 }

.ws-hero .md-typeset h1 {
  max-width: 13ch;
  margin: 0 0 1.2rem;
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: #fff;
}

.ws-hero__content p {
  max-width: 47ch;
  margin: 0 0 1.5rem;
  font-size: clamp(0.9rem, 1.5vw, 1.08rem);
  line-height: 1.65;
  color: #e8e3f6;
}

.ws-hero__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.7rem;
  align-items: stretch;
 }

.ws-hero .md-typeset .ws-hero__actions .md-button {
  display: inline-flex;
  min-height: 2.9rem;
  margin: 0;
  padding: 0.65rem 1.05rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.48);
}

.ws-hero .md-typeset .ws-hero__actions .md-button--primary {
  color: #282056;
  background-color: #fff;
  border-color: #fff;
}

.ws-hero .md-typeset .ws-hero__actions .md-button:is(:hover, :focus-visible) {
  color: #24204e;
  background-color: #e4d6ff;
  border-color: #e4d6ff;
}

.ws-hero .md-typeset .ws-hero__actions .md-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.ws-hero__wave {
  position: absolute;
  z-index: 2;
  bottom: -1px;
  left: 0;
  display: block;
  width: 100%;
  height: 4rem;
  fill: var(--md-default-bg-color);
  pointer-events: none;
}

@media screen and (max-width: 29.99em) {
  .ws-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .ws-hero .md-typeset .ws-hero__actions .md-button {
    padding-right: 0.4rem;
    padding-left: 0.4rem;
  }
}

@media screen and (min-width: 60em) {
  .ws-hero__inner {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    min-height: 29rem;
  }

  .ws-hero__content {
    padding-bottom: 3rem;
  }

  .ws-hero__image {
    width: min(100%, 33rem);
    margin: 0 0 2rem auto;
  }
}

@media screen and (max-width: 42em) {
  .ws-hero__image { --terminal-offset: clamp(4.7rem, calc(36vw - 2rem), 8.4rem); }
  .ws-hero__mascot-track { top: -2.15rem; }
  .ws-hero__mascot-art { width: 91%; }
  .ws-hero__mascot-track.is-peeking .ws-hero__mascot-art { --peek-y: -2rem; }
  .ws-flow__screen { min-height: 11.4rem; padding-right: 0.65rem; padding-left: 0.65rem; }
  .ws-flow__note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-mac-terminal__cursor { animation: none; }
  .ws-hero__pupil::after { transition: none; }
  .ws-hero__mascot-art { transition: none; }
  .ws-flow--playing .ws-flow__panel:not([hidden]) .ws-flow__line { opacity: 1; transform: none; }
}

/* ---------- Site navigation ---------- */

.md-header { background: #242141; }
.md-header__button.md-logo img { width: 1.85rem; height: 1.85rem; object-fit: contain; }
.md-nav--primary .md-nav__title[for="__drawer"] { background: #34306b; }
.md-header__title { font-weight: 700; letter-spacing: -0.025em; }
.md-tabs { border-bottom: 1px solid rgb(255 255 255 / 12%); background: #242141; }
.md-tabs__list { gap: 0.22rem; }
.md-tabs__link {
  height: auto;
  margin: 0.25rem 0;
  padding: 0.45rem 0.72rem;
  border-radius: 0.38rem;
  opacity: 0.8;
  transition: background-color 150ms ease, opacity 150ms ease;
}
.md-tabs__link:is(:hover, :focus-visible),
.md-tabs__item--active .md-tabs__link { background: rgb(193 155 255 / 18%); opacity: 1; }
.md-nav__link--active { font-weight: 700; }
.md-nav__link:is(:hover, :focus-visible) { color: #8051c5; }

/* ---------- macOS terminal for shell snippets ---------- */

.md-typeset :is(.language-bash, .language-sh, .language-shell, .language-console).highlight {
  --md-code-bg-color: #1e1f22;
  --md-code-fg-color: #e6e6e6;
  --md-code-hl-color: rgba(255, 255, 255, 0.08);
  --md-code-hl-comment-color: #7f848e;
  --md-code-hl-string-color: #98c379;
  --md-code-hl-keyword-color: #c678dd;
  --md-code-hl-function-color: #61afef;
  --md-code-hl-name-color: #e6e6e6;
  --md-code-hl-variable-color: #e5c07b;
  --md-code-hl-number-color: #d19a66;
  --md-code-hl-constant-color: #d19a66;
  --md-code-hl-operator-color: #56b6c2;
  --md-code-hl-punctuation-color: #abb2bf;
  --md-code-hl-special-color: #e06c75;
  --md-code-hl-generic-color: #abb2bf;
  --md-default-fg-color--lighter: rgba(255, 255, 255, 0.45);
  --md-default-fg-color--lightest: rgba(255, 255, 255, 0.3);

  margin: 1em 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--md-code-bg-color);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.md-typeset :is(.language-bash, .language-sh, .language-shell, .language-console).highlight::before {
  content: "zsh";
  display: block;
  height: 1.7rem;
  padding: 0 4rem;
  font: 500 0.62rem/1.7rem var(--md-text-font-family, sans-serif);
  text-align: center;
  color: #9da1a8;
  background-color: #2b2d31;
  background-image:
    radial-gradient(circle at 0.9rem 50%, #ff5f57 0.3rem, transparent 0.32rem),
    radial-gradient(circle at 1.7rem 50%, #febc2e 0.3rem, transparent 0.32rem),
    radial-gradient(circle at 2.5rem 50%, #28c840 0.3rem, transparent 0.32rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}

.md-typeset :is(.language-bash, .language-sh, .language-shell, .language-console).highlight pre {
  margin: 0;
}

.md-typeset :is(.language-bash, .language-sh, .language-shell, .language-console).highlight pre > code {
  padding: 0.9em 1.2em;
  border-radius: 0;
}

/* ---------- Status badges ---------- */

.ws-badge {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 1rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.ws-badge--ok {
  color: #1b8f36;
  background: rgba(40, 200, 64, 0.15);
}

.ws-badge--soon {
  color: #b25e00;
  background: rgba(255, 152, 0, 0.18);
}

[data-md-color-scheme="slate"] .ws-badge--ok {
  color: #5fd47a;
}

[data-md-color-scheme="slate"] .ws-badge--soon {
  color: #ffb74d;
}

/* ---------- Coming-soon pages ---------- */

.ws-soon {
  margin: 1.5rem 0 2rem;
  text-align: center;
}

.ws-soon img {
  max-width: 100%;
}

.ws-soon p:last-child {
  font-size: 1rem;
}

:root {
  --md-status--soon: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.5 3h3l1.2 4.5h-5.4zM9.1 9h5.8l1.1 4H8zm-1.5 5.5h8.8L17.6 19H6.4zM4 20h16v2H4z"/></svg>');
}

.md-status--soon::after {
  background-color: #ff9800;
  -webkit-mask-image: var(--md-status--soon);
  mask-image: var(--md-status--soon);
}
