/* Landing page of WoW Tools. Design system shared with gold.gronck.com (Currency to Gold):
   flat dark surfaces, one gold accent, square corners, parchment text on slate.
   No external requests from CSS: the only font is self-hosted Open Sans (SIL OFL 1.1, see fonts/OFL.txt). */

/* Open Sans variable font (wdth=100, wght 400-700), Latin, Latin-1, Latin Extended-A and Cyrillic subset.
   Source: github.com/googlefonts/opensans @ bd7e37632246368c60fdcbd374dbf9bad11969b6
   (fonts/variable/OpenSans[wdth,wght].ttf), cut with fonttools:
   fonttools varLib.instancer <ttf> wdth=100 wght=400:700, then pyftsubset --flavor=woff2
   --unicodes=U+0000-017F,U+0400-045F,U+0490-0491,U+2000-206F,U+20AC,U+2116,U+2190-2193,U+2212,U+2715. */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/OpenSans-var.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --bg-page: #170e09;
  --bg-section: #141a24;
  --bg-control: #000000;
  --bg-raised: #211510;
  --row-stripe: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: #504137;
  --line-control: #7a6656;

  --gold: #f8b700;
  --gold-hover: #ffd045;
  --ink-heading: #ffffff;
  --ink: #ebdec2;
  --ink-muted: #b1997f;
  --ink-on-gold: #211510;

  --good: #1ec51e;
  --warn: #f0a020;
  --focus: #ffffff;

  --font: "Open Sans", Arial, Helvetica, sans-serif;
  --mono: Consolas, "Cascadia Mono", Menlo, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.9rem;
  --fs-md: 1.08rem;
  --fs-lg: 1.296rem;
  --fs-xl: 2.24rem;
  --fs-2xl: 3.225rem;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 32px;
  --sp-7: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg-page);
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--gold-hover);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ink-heading);
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-heading);
  line-height: 1.15;
}

h1 {
  font-size: var(--fs-2xl);
  font-weight: 700;
}

h2 {
  font-size: var(--fs-xl);
  font-weight: 400;
}

h3 {
  font-size: var(--fs-md);
  font-weight: 700;
}

p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Frame ---- */

.frame {
  max-width: 90rem;
  margin: 0 auto;
  padding-inline: 40px;
}

.sheet {
  background: var(--bg-section);
  padding: var(--sp-7) 40px 56px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) 40px;
  background: var(--bg-section);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--ink-heading);
  font-weight: 700;
  font-size: var(--fs-lg);
}

.brand:hover {
  color: var(--ink-heading);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  font-size: var(--fs-sm);
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line-strong);
}

.lang a,
.lang span {
  padding: 2px 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lang span {
  background: var(--gold);
  color: var(--ink-on-gold);
}

.lang a:hover {
  text-decoration: none;
}

section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-width: 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.lede {
  max-width: 65ch;
  color: var(--ink);
}

.muted {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

/* ---- Hero ---- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-7);
  align-items: center;
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  min-width: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.tag {
  padding: 2px 6px;
  background: var(--gold);
  color: var(--ink-on-gold);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.pill {
  padding: 1px 8px;
  border: 1px solid var(--ink-muted);
  border-radius: 2px;
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.hero .lede {
  font-size: var(--fs-lg);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 24px;
  border: 1px solid var(--gold);
  border-radius: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--ink-on-gold);
}

.btn-primary:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--ink-on-gold);
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
}

.btn-secondary:hover {
  border-color: var(--gold-hover);
  color: var(--gold-hover);
  text-decoration: none;
}

.btn svg {
  flex: none;
}

.release-note {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

.shot {
  display: block;
  border: 1px solid var(--line-strong);
  background: var(--bg-control);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.hero .shot {
  width: 360px;
}

/* ---- Features ---- */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.feature {
  padding: var(--sp-5) var(--sp-5) var(--sp-5) 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: var(--sp-4);
  min-width: 0;
}

.feature .n {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}

.feature div {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.feature p {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* ---- Screenshots ---- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
  align-items: start;
}

.gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}

.gallery figcaption {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}

/* ---- Install table ---- */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

th {
  text-align: left;
  color: var(--gold);
  font-size: var(--fs-md);
  font-weight: 700;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:nth-child(odd) {
  background: var(--row-stripe);
}

td:first-child {
  padding-left: 12px;
  white-space: nowrap;
}

td:first-child strong {
  display: block;
  color: var(--ink-heading);
  font-size: var(--fs-md);
  font-weight: 400;
}

td:first-child a strong {
  color: var(--gold);
}

td:first-child a:hover strong {
  color: var(--gold-hover);
}

td:last-child {
  max-width: 65ch;
}

tr.soon td {
  color: var(--ink-muted);
}

tr.soon td:first-child strong {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--ink-muted);
}

tr.soon code {
  color: var(--ink-muted);
}

/* ---- Notices, two columns ---- */

.cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-7);
}

.notices {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.notice {
  padding: 12px 16px;
  background: var(--bg-raised);
  border-left: 3px solid var(--gold);
  font-size: var(--fs-sm);
  display: flex;
  gap: var(--sp-2);
}

.notice.warn {
  border-left-color: var(--warn);
}

.notice .icon {
  flex: none;
  color: var(--gold);
  font-weight: 700;
}

.notice.warn .icon {
  color: var(--warn);
}

.notice strong {
  color: var(--ink-heading);
}

details {
  border-bottom: 1px solid var(--line);
  padding: var(--sp-3) 0;
  font-size: var(--fs-sm);
}

details:first-of-type {
  border-top: 1px solid var(--line);
}

summary {
  color: var(--gold);
  font-size: var(--fs-md);
  cursor: pointer;
}

summary:hover {
  color: var(--gold-hover);
}

details p {
  margin-top: var(--sp-2);
  max-width: 65ch;
}

ul.plain {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  max-width: 65ch;
}

/* ---- Thanks and feedback ---- */

.thanks {
  padding: var(--sp-6);
  background: var(--bg-raised);
  border-left: 3px solid var(--gold);
}

/* ---- Screenshot viewer ---- */

a.zoom {
  cursor: zoom-in;
}

a.zoom:hover {
  border-color: var(--gold);
}

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.lightbox figure {
  margin: 0;
  max-width: calc(100vw - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  border: 1px solid var(--line-strong);
}

.lightbox figcaption {
  font-size: var(--fs-sm);
  color: var(--ink);
  text-align: center;
}

.lb-count {
  position: fixed;
  top: 24px;
  left: 24px;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.lb-btn {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--gold);
  cursor: pointer;
}

.lb-btn:hover {
  color: var(--gold-hover);
  border-color: var(--gold);
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev {
  left: 24px;
}

.lb-next {
  right: 24px;
}

.lb-close {
  top: 16px;
  right: 16px;
}

/* ---- Footer ---- */

footer {
  padding: var(--sp-6) 40px var(--sp-7);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

footer p {
  max-width: 65ch;
}

footer nav {
  display: flex;
  gap: var(--sp-5);
}

/* ---- Narrow screens ---- */

@media (max-width: 60rem) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .shot {
    width: min(360px, 100%);
  }
}

@media (max-width: 40rem) {
  .frame {
    padding-inline: 0;
  }

  .sheet,
  .topbar,
  footer {
    padding-inline: 16px;
  }

  .sheet {
    padding-top: var(--sp-6);
    gap: var(--sp-7);
  }

  h1 {
    font-size: var(--fs-xl);
  }

  h2 {
    font-size: 1.7rem;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }

  .topnav .hide-narrow {
    display: none;
  }

  td:first-child {
    white-space: normal;
  }

  .lightbox figure {
    max-width: calc(100vw - 32px);
  }

  .lightbox img {
    max-height: calc(100vh - 160px);
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 16px;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  a,
  .lb-btn {
    transition:
      color 120ms,
      background-color 120ms,
      border-color 120ms;
  }
}
