/* Windhawk Setups gallery.
   Palette: cool slate with an amber "hawk eye" accent. Type: Segoe UI Variable, native to the
   Windows desktops this site is about, with no web fonts (no third-party requests).
   One decorative element: screenshots framed as Windows 11 windows. */

:root {
  --bg: #eef0f6;
  --surface: #ffffff;
  --surface-2: #e2e5ee;
  --text: #1f2233;
  --muted: #5b6178;
  --line: #d3d7e3;
  --accent: #a35f00;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9cc;
  --warn-bg: #fff4e0;
  --radius-window: 8px;
  --radius-small: 4px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1d2a;
    --surface: #24273a;
    --surface-2: #2e3248;
    --text: #e6e8f2;
    --muted: #a0a6bf;
    --line: #3a3f58;
    --accent: #f2a541;
    --accent-ink: #1b1d2a;
    --accent-soft: #3d3221;
    --warn-bg: #33291b;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-small);
}

img { max-width: 100%; display: block; }

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

/* ---------- Masthead ---------- */

.masthead, .detail-header, main, .site-footer {
  width: min(1240px, 100% - 2.5rem);
  margin-inline: auto;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding: 4rem 0 2.25rem;
}

.masthead h1, .detail-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0 0 0.6rem;
}

.masthead h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); }

.masthead p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.125rem;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.button {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { border-color: var(--accent); }
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.button.primary:hover { filter: brightness(1.08); }

/* ---------- Filters ---------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 0 1.75rem;
}

.controls input, .controls select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  padding: 0.55rem 0.8rem;
}
.controls .search { flex: 1 1 18rem; }
.controls .search input { width: 100%; }

/* ---------- Window frame ---------- */

.window {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-window);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 2rem;
  padding-left: 0.75rem;
  background: var(--surface-2);
  font-size: 0.75rem;
  color: var(--muted);
}

.window-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.window-buttons { display: flex; height: 100%; flex: none; }
.window-buttons i {
  width: 2.6rem;
  height: 100%;
  position: relative;
}
/* minimize, maximize, close glyphs */
.window-buttons i::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-color: var(--muted);
}
.window-buttons i:nth-child(1)::before { width: 0.6rem; border-top: 1px solid; }
.window-buttons i:nth-child(2)::before { width: 0.55rem; height: 0.55rem; border: 1px solid; border-radius: 1px; }
.window-buttons i:nth-child(3)::before,
.window-buttons i:nth-child(3)::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0.75rem;
  border-top: 1px solid var(--muted);
}
.window-buttons i:nth-child(3)::before { transform: translate(-50%, -50%) rotate(45deg); }
.window-buttons i:nth-child(3)::after { transform: translate(-50%, -50%) rotate(-45deg); }

.window img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }

/* ---------- Gallery ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 2.25rem 1.75rem;
}

.card { color: inherit; text-decoration: none; display: block; }
.card:hover .window { border-color: var(--accent); }
.card:hover .window-buttons i:nth-child(3) { background: #c42b1c; }
.card:hover .window-buttons i:nth-child(3)::before,
.card:hover .window-buttons i:nth-child(3)::after { border-color: #fff; }

@media (min-width: 900px) {
  .card.featured { grid-column: span 2; grid-row: span 2; }
  .card.featured h2 { font-size: 1.6rem; }
}

.card-body { padding: 0.85rem 0.15rem 0; }
.card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}
.byline { margin: 0.15rem 0 0; color: var(--muted); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 0;
  padding: 0;
}
.chips li {
  font-size: 0.8rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.chips li.more { background: transparent; border: 1px dashed var(--line); }

.empty, .empty-state { color: var(--muted); }
.empty-state {
  text-align: center;
  padding: 5rem 1rem 6rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-window);
}
.empty-state h2 { color: var(--text); font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 0.4rem; }
.empty-state p { margin: 0 0 1.5rem; }

/* ---------- Detail page ---------- */

.detail-header { padding: 2.5rem 0 2rem; }
.detail-header h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-top: 1.25rem; }
.back { font-weight: 600; text-decoration: none; }
.back::before { content: "‹ "; }
.description { max-width: 70ch; white-space: pre-line; margin: 1rem 0 0; }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 2.5rem;
  align-items: start;
}
.primary { display: grid; gap: 2.5rem; min-width: 0; }
.shots { display: grid; gap: 1.75rem; }
.shots .window img { aspect-ratio: auto; object-fit: contain; }

.side { position: sticky; top: 1.5rem; display: grid; gap: 1.75rem; }
.download { text-align: center; padding-block: 0.85rem; font-size: 1.05rem; }

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1.25rem;
  margin: 0;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.howto h2, .mods h2, .notice h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}
.howto ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }

.notice {
  background: var(--warn-bg);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-small);
}
.notice p { margin: 0 0 0.5rem; }
.notice ul { margin: 0; padding-left: 1.2rem; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td:first-child { white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .side { position: static; order: -1; }
}

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

.site-footer {
  margin-top: 5rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer p { margin: 0; max-width: 60ch; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }

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

.grid.filtered .card.featured { grid-column: auto; grid-row: auto; }
.card[hidden] { display: none; }
