/*
  Copyright (c) 2026 Anton Bespalov. All rights reserved.
  Licensed under the terms specified by the MIT License
  Part of the csiGarland project https://github.com/ABespalov/csigarland

  Purpose: The look of garland.csilab.am, in the palette of the garland's screen, portal and utility
  Contributors: None
*/

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --surface: #172033;
  --border: #334155;
  --text: #e2e8f0;
  --strong: #f8fafc;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --link: #93c5fd;
  --warm: #fbbf24;
  --radius: 10px;
  --width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--link); }
a:hover { color: var(--strong); }
img { max-width: 100%; height: auto; display: block; }
code { font: 0.92em ui-monospace, Consolas, monospace; background: var(--surface); padding: 0.1em 0.35em; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; padding: 8px 12px; background: var(--primary); color: #fff; z-index: 10; }
.skip-link:focus { left: 8px; }

.site-header { position: sticky; top: 0; z-index: 5; background: rgba(15, 23, 42, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header-inner { max-width: var(--width); margin: auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { width: 150px; height: auto; }
.nav { display: flex; gap: 6px 20px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--link); text-decoration: none; padding: 6px 0; font-weight: 500; }
.nav a[aria-current="page"] { color: var(--strong); border-bottom: 2px solid var(--primary); }

main { display: block; }
.section { max-width: var(--width); margin: auto; padding: 56px 20px; }
.section + .section { border-top: 1px solid var(--border); }
.eyebrow { color: var(--primary); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
h1, h2, h3 { color: var(--strong); line-height: 1.2; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 16px; }
.lead { font-size: 19px; color: var(--text); max-width: 760px; }
.muted { color: var(--muted); }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero figure { margin: 0; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; background: #334155; color: var(--text); text-decoration: none; font-weight: 600; border: 0; }
.button:hover { background: #475569; color: var(--strong); }
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover { background: var(--primary-hover); color: #fff; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.gallery figure { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.gallery figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.shot { border-radius: 8px; border: 1px solid var(--border); }
.screens { display: flex; gap: 12px; flex-wrap: wrap; }
.screens img { width: 120px; image-rendering: pixelated; border-radius: 6px; }

.note { background: var(--surface); border-left: 3px solid var(--warm); padding: 12px 16px; border-radius: 6px; color: var(--text); }

.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.docs li { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; }
.docs a, .docs strong { font-weight: 600; color: var(--link); }
.docs span { display: block; color: var(--muted); font-size: 14px; }

.downloads { display: grid; gap: 16px; }
.download { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.download h3 { margin: 0; }
.download .meta { color: var(--muted); font-size: 14px; grid-column: 1; }
.download .hash { font: 12px ui-monospace, Consolas, monospace; color: var(--muted); overflow-wrap: anywhere; grid-column: 1 / -1; }
.download .button { grid-row: 1 / span 2; grid-column: 2; }
.download.unavailable { opacity: 0.6; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.site-footer .section { padding: 28px 20px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .download { grid-template-columns: 1fr; }
  .download .button { grid-row: auto; grid-column: 1; justify-self: start; }
  .nav { margin-left: 0; }
}
