/* Arctic Leaf apps. The company's night navy and glacier palette (shared with Lockbox), Manrope
   throughout, and the ice gradient saved for one thing: the search field when it has focus, since
   typing there is how most people will use this page. */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --night: #0b1621;
  --band: #0b1621;
  --band-field: rgba(255, 255, 255, 0.07);
  --band-rule: rgba(255, 255, 255, 0.16);
  --band-ink: #ffffff;
  --band-muted: #93a7b8;
  --frost: #edf3f6;
  --snow: #ffffff;
  --glacier: #19434f;
  --iris: #4338ca;
  --iris-wash: #e7e6fb;
  --slate: #4f6070;
  --rule: #d3dee5;
  --ice: linear-gradient(90deg, #b8fbf5, #b6dcfa 50%, #b8a9ff);
  --focus: #4338ca;
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --night: #e6eef3;
    --band: #060e16;
    --band-field: rgba(255, 255, 255, 0.05);
    --band-rule: rgba(255, 255, 255, 0.12);
    --frost: #0b1621;
    --snow: #111f2c;
    --glacier: #7cc4cf;
    --iris: #a5a0ff;
    --iris-wash: #24264d;
    --slate: #9fb0be;
    --rule: #233545;
    --focus: #a5a0ff;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--frost);
  color: var(--night);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--iris); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h2, p { margin: 0; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--snow);
  color: var(--night);
  font-weight: 700;
  z-index: 10;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ---------- the band ---------- */

.band {
  background: var(--band);
  color: var(--band-ink);
  padding: 22px 0 30px;
  border-bottom: 1px solid var(--band-rule);
}
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.005em;
  border-radius: 8px;
}
.brand:focus-visible { outline-color: var(--band-ink); outline-offset: 4px; }
.brand img { display: block; }
.band arctic-apps { color: var(--band-ink); }

.find {
  position: relative;
  margin-top: 30px;
  border-radius: 16px;
  border: 2px solid var(--band-rule);
  background: var(--band-field);
  transition: border-color 120ms ease;
}
.find:focus-within {
  border-color: transparent;
  background:
    linear-gradient(var(--band), var(--band)) padding-box,
    var(--ice) border-box;
}
.find-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  color: var(--band-muted);
  pointer-events: none;
}
.find:focus-within .find-icon { color: var(--band-ink); }
.find input {
  display: block;
  width: 100%;
  height: 68px;
  padding: 0 64px 0 62px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--band-ink);
  font: 600 22px/1 var(--sans);
  letter-spacing: -0.01em;
  outline: none;
}
.find input::placeholder { color: var(--band-muted); font-weight: 500; opacity: 1; }
.find input::-webkit-search-cancel-button { display: none; }
.slash {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--band-rule);
  border-radius: 7px;
  color: var(--band-muted);
  font: 600 14px/1 var(--mono);
}
.find:focus-within .slash { display: none; }
.hint {
  margin-top: 10px;
  min-height: 20px;
  color: var(--band-muted);
  font-size: 13.5px;
  visibility: hidden;
}
.find:focus-within + .hint { visibility: visible; }
@media (hover: none) {
  .slash, .hint { display: none; }
}

/* ---------- the apps ---------- */

main { padding-top: 8px; padding-bottom: 24px; }
main:focus { outline: none; }

.group { margin-top: 30px; }
.group h2 {
  margin: 0 0 8px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate);
}

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 2px 14px;
}
.tile { position: relative; }
.tile a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 48px 12px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}
.tile a:hover { background: var(--snow); border-color: var(--rule); }
.tile a:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; background: var(--snow); }
.tile.is-first a {
  background: var(--snow);
  border-color: var(--iris);
  box-shadow: 0 0 0 1px var(--iris);
}
.tile img {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: contain;
  display: block;
}
@media (prefers-color-scheme: dark) {
  .tile img.plate { background: #e6eef3; padding: 5px; }
}
.tile .text { min-width: 0; display: grid; gap: 1px; }
.tile .name { font-size: 16px; font-weight: 700; letter-spacing: -0.005em; line-height: 1.3; }
.tile .desc { font-size: 14px; color: var(--slate); line-height: 1.4; }
.tile .enter {
  display: none;
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--iris-wash);
  color: var(--iris);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
@media (hover: hover) {
  .tile.is-first .enter { display: inline-block; }
  .tile.is-first a { padding-right: 12px; }
  .tile.is-first .pin { display: none; }
}

.pin {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  opacity: 0;
}
.pin svg { width: 18px; height: 18px; display: block; }
.tile:hover .pin, .pin:focus-visible, .pin[aria-pressed="true"] { opacity: 1; }
.pin:hover { background: var(--frost); color: var(--night); }
.pin[aria-pressed="true"] { color: var(--glacier); }
.pin[aria-pressed="true"] svg { fill: currentColor; }
@media (hover: none) {
  .pin { opacity: 0.55; }
}

.empty {
  margin-top: 40px;
  padding: 0 12px;
  color: var(--slate);
  font-size: 16px;
  max-width: 60ch;
}
.empty strong { color: var(--night); }

/* ---------- footer ---------- */

.foot { padding-top: 24px; padding-bottom: 48px; }
.foot details {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin: 0 12px;
}
.foot summary {
  cursor: pointer;
  color: var(--slate);
  font-size: 14px;
  font-weight: 600;
  width: fit-content;
  border-radius: 4px;
}
.foot summary:hover { color: var(--night); }
.dev { max-width: 72ch; margin-top: 14px; font-size: 14.5px; display: grid; gap: 10px; }
.dev code { font-family: var(--mono); font-size: 0.9em; }
.dev pre {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--snow);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .band { padding: 16px 0 20px; }
  .find { margin-top: 20px; }
  .find input { height: 56px; font-size: 17px; padding-left: 50px; padding-right: 16px; }
  .find-icon { left: 16px; width: 21px; height: 21px; }
  .tiles { grid-template-columns: 1fr; }
  .group { margin-top: 22px; }
  .group h2 { margin-left: 4px; }
  .tile a { padding-left: 4px; min-height: 66px; }
  .foot details { margin: 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
