/* Nira site: the app's Nira Dark palette (crates/nira/src/themes/dark.css). */
:root {
  --bg: #16171A;
  --chrome: #111214;
  --surface: #1A1C1F;
  --raised: #23262B;
  --raised-hover: #2A2E34;
  --border: #33373D;
  --divider: #26292E;
  --text: #ECEDEE;
  --text-soft: #C9CED4;
  --text-dim: #9BA1A8;
  --accent: #4C8DFF;
  --accent-hover: #6A9FFF;
  --link: #8DB6FF;
  --link-hover: #B5CFFF;
  --amber: #F2B45A;
  --radius: 12px;
  --mono: ui-monospace, "JetBrains Mono", "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Cantarell, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: .9em; color: var(--text-soft); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(17, 18, 20, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}
.top-row { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand:hover { color: var(--text); text-decoration: none; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top .top-download { margin-left: 22px; padding: 6px 16px; font-size: 15px; }
.top nav a { color: var(--text-dim); font-size: 15px; }
.top nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
/* Kept to three short rows so most of the screenshot is above the fold. */
.hero {
  padding: 28px 0 40px;
  /* Accent blue glow top left, amber glow top right, from the palette above. */
  background:
    radial-gradient(ellipse 55% 50% at 12% 0%, rgba(76, 141, 255, .22), transparent 70%),
    radial-gradient(ellipse 50% 45% at 88% 5%, rgba(242, 180, 90, .12), transparent 70%),
    var(--bg);
}
.hero-text { text-align: left; }
h1 { font-size: 40px; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
.tagline { font-size: 19px; color: var(--text-soft); margin: 6px 0 0; }
.actions { display: flex; gap: 12px 16px; justify-content: center; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.actions .btn { padding: 8px 18px; }
.meta { color: var(--text-dim); font-size: 14px; margin: 0 0 0 8px; }

.btn {
  display: inline-block; padding: 11px 22px; border-radius: 10px;
  background: var(--raised); color: var(--text); border: 1px solid var(--border);
  font-weight: 600;
}
.btn:hover { background: var(--raised-hover); color: var(--text); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Screenshots */
.shot { margin: 0; }
.shot img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.hero-shot { margin-top: 24px; }
figcaption { color: var(--text-dim); font-size: 15px; margin-top: 12px; text-align: center; }

/* Sections */
.section { padding: 80px 0; }
.section.alt { background: var(--chrome); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
h2 { font-size: 34px; margin: 0 0 8px; letter-spacing: -.01em; }
.sub { color: var(--text-dim); margin: 0 0 32px; }

.features { margin: 24px 0 0; padding-left: 20px; color: var(--text-soft); list-style: "-  "; }
.features li { margin: 0 0 8px; }

/* Theme gallery */
.gallery-frame { position: relative; }
.gallery-frame img { transition: opacity .2s; }
.gallery-frame .spinner {
  position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 4px solid rgba(255, 255, 255, .25); border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0; visibility: hidden; pointer-events: none;
  animation: spin .8s linear infinite;
}
/* Shown only after a short delay so cached images don't flash a spinner. */
.gallery-frame.loading img { opacity: .5; }
.gallery-frame.loading .spinner { opacity: 1; visibility: visible; transition: opacity .2s .15s; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .gallery-frame .spinner { animation-duration: 2.4s; }
}
.thumbs {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
.thumbs a {
  display: block; padding: 6px 6px 8px; border-radius: 10px;
  border: 1px solid var(--divider); background: var(--surface); color: var(--text-dim);
  font-size: 14px; text-align: center;
}
.thumbs a:hover { border-color: var(--border); color: var(--text); text-decoration: none; }
.thumbs a[aria-current="true"] { border-color: var(--accent); color: var(--text); background: #1c2433; }
.thumbs img { border-radius: 6px; margin-bottom: 6px; }

/* Columns sized by each screenshot's aspect ratio (1440x900 and 1440x859)
   so both images come out the same height. */
.pair { display: grid; grid-template-columns: 1.6fr 1.676fr; gap: 32px; margin-top: 32px; }

/* Formats */
table { width: 100%; border-collapse: collapse; margin: 24px 0; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--divider); }
th { color: var(--text-soft); width: 110px; font-weight: 600; }
td { color: var(--text-dim); }
.plain { color: var(--text-dim); padding-left: 20px; }
.section p { color: var(--text-dim); }

/* Download */
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.platform { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius); padding: 20px 22px 6px; }
.platform h3 { margin: 0 0 8px; font-size: 20px; }
.platform .plain { margin: 0 0 14px; }
.platform li { margin: 0 0 8px; }
.platform strong { color: var(--text-soft); }

/* Footer */
.foot { padding: 40px 0 56px; color: var(--text-dim); font-size: 14px; border-top: 1px solid var(--divider); }
.foot p { margin: 6px 0; }
.foot img { display: inline-block; vertical-align: -4px; margin-right: 6px; }
.credit { color: #8A9098; }

/* Small screens */
@media (max-width: 900px) {
  .thumbs { grid-template-columns: repeat(3, 1fr); }
  .pair { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top nav a:not(:last-child) { display: none; }
  h1 { font-size: 38px; }
  .tagline { font-size: 18px; }
  .section { padding: 56px 0; }
  h2 { font-size: 28px; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
}
