@import "reset.css";
@import "root.css";

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

button {
    color: floralwhite;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: auto;
  padding: 18px;
  background: linear-gradient(#0f172a, var(--panel));
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 18px;
}

.brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-image: url("../images/polares-logo-round.png");
  box-shadow: 0 4px 22px rgba(125, 211, 252, .35);
}

.logo img {
    width: 100%;
}

.brand h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-group {
  margin-top: 14px;
}

.nav h2 {
  margin: 18px 10px 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #c7d2fe;
  border: 1px solid transparent;
}

.nav a:hover {
  background: #0b1220;
  border-color: #1f2a3a;
}

.nav a.active {
  background: linear-gradient(180deg, rgba(125, 211, 252, .08), rgba(167, 139, 250, .08));
  border-color: #25405a;
  color: var(--text);
}

.helplink {
    color: var(--warning);
}

.main {
  position: relative;
}

header.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(11, 13, 16, .75), rgba(11, 13, 16, .35));
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0e1420;
  border: 1px solid #213047;
  border-radius: 12px;
  padding: 8px 12px;
  width: min(680px, 96%);
}

.search input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 4px;
}

.content {
  padding: 20px clamp(16px, 3vw, 36px) 80px;
  max-width: 1300px;
}

.content {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

.sections {
  display: grid;
  gap: 24px;
  scroll-snap-type: y proximity;
}

section {
  background: #0c111a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 10px 30px rgba(0, 0, 0, .35);
  scroll-margin-top: 76px;
  scroll-snap-align: start;
}

section h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.2vw, 28px);
}

section p.lead {
  color: #cbd5e1;
  margin: 0 0 14px;
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.callout {
  border: 1px dashed #2b3a50;
  padding: 12px;
  border-radius: 12px;
  background: #0a1220;
}

.steps {
  counter-reset: s;
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid #1f2a3a;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(125, 211, 252, .03), transparent);
}

.screenshot {
    width: 100%;
}

.screenshot img {
    width: 100%;
    border-radius: 8px;
}

.step::before {
  counter-increment: s;
  content: counter(s);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #0b0d10;
  font-weight: 700;
}

pre {
  background: #0a1018;
  border: 1px solid #1f2a3a;
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
}

.kebab {
  font-size: 12px;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #1f2a3a;
  background: #0b1220;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0d141e;
  cursor: pointer;
  display: none;
}

.to-top.show {
  display: inline-flex;
}

.menu-btn {
  display: none;
}

@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 30% 0 0;
    transform: translateX(-110%);
    transition: transform .25s ease;
    z-index: 30;
  }

  .sidebar.open {
    transform: translateX(0);
    min-height: 100vh;
  }

  .menu-btn {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 5px 8px;
    margin-right: 5px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0d141e;
  }

  .scrim {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(2px);
    background: rgba(0, 0, 0, .35);
    display: none;
    z-index: 20;
  }

  .scrim.show {
    display: block;
  }

  .content {
    padding-bottom: 120px;
  }
}
