/*
 * The elpan.dev root page. The tokens are the Elpan Design System's, the
 * same as the docs' src/css/custom.css: cyan accent, cool slate neutrals,
 * Geist / Geist Mono, 1px hairlines, modest radii, flat surfaces.
 */

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

:root {
  color-scheme: light dark;

  --el-accent: #0891b2;
  --el-accent-ink: #155e75;
  --el-accent-bright: #67e8f9;

  --el-ink: #052532;
  --el-ink-2: #1a3a47;
  --el-ink-3: #4a6876;
  --el-ink-4: #8aa0ab;
  --el-ink-deep: #06161d;

  --el-paper: #ffffff;
  --el-paper-2: #f6f9fb;
  --el-rule: #dfe6ea;

  --bg: var(--el-paper);
  --bg-2: var(--el-paper-2);
  --fg: var(--el-ink-2);
  --heading: var(--el-ink);
  --muted: var(--el-ink-3);
  --rule: var(--el-rule);
  --link: var(--el-accent);
  --link-hover: var(--el-accent-ink);
  --code-bg: var(--el-paper-2);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--el-ink-deep);
    --bg-2: var(--el-ink);
    --fg: #c4d0d7;
    --heading: #f6f9fb;
    --muted: var(--el-ink-4);
    --rule: #1a3a47;
    --link: var(--el-accent-bright);
    --link-hover: #a5f3fc;
    --code-bg: rgba(246, 249, 251, 0.06);
  }
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

code {
  font-family: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 93%;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.3em;
}

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

/* ---- Header: a flat bar with a hairline, like the docs' navbar --------- */
.top {
  border-bottom: 1px solid var(--rule);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.brand:hover { text-decoration: none; color: var(--heading); }
.mark { display: block; }
.mark-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .mark-light { display: none; }
  .mark-dark { display: block; }
}

/* The Docs dropdown, like the docs sites' navbar dropdown: opens on hover,
   keyboard focus, or a click (.menu--open). */
.nav { margin-left: 16px; }
.menu { position: relative; }
.menu__button {
  font: inherit;
  color: var(--fg);
  background: none;
  border: 0;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
}
.menu__button::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.45em;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-0.2em) rotate(45deg);
}
.menu__button:hover,
.menu__button:focus-visible,
.menu--open .menu__button {
  color: var(--link);
  background: var(--bg-2);
  outline: none;
}
.menu__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 12rem;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(5, 37, 50, 0.04), 0 8px 28px rgba(5, 37, 50, 0.06);
  display: none;
  z-index: 10;
}
.menu:hover .menu__list,
.menu:focus-within .menu__list,
.menu--open .menu__list {
  display: block;
}
.menu__list a {
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--fg);
  white-space: nowrap;
}
.menu__list a:hover,
.menu__list a:focus-visible {
  color: var(--link);
  background: var(--bg-2);
  text-decoration: none;
  outline: none;
}

/* ---- Content ------------------------------------------------------------ */
.page {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}

h1, h2, h3 {
  color: var(--heading);
  font-weight: 600;
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.hero { margin-bottom: 56px; }
.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 600px;
  margin: 16px 0 0;
  text-wrap: pretty;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover,
.card:focus-visible {
  text-decoration: none;
  color: var(--fg);
  border-color: var(--link);
  background: var(--bg-2);
  outline: none;
}
.card p {
  margin: 0 0 16px;
  flex: 1;
}
.go {
  color: var(--link);
  font-weight: 500;
}
.go::after { content: " \2192"; }
.card:hover .go { color: var(--link-hover); }

/* ---- Footer ------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 24px;
  text-align: center;
}
.foot p { margin: 0; }
