/* Hydra64 website — the palette of the application and of the manual. */
:root {
  --window: #18181a; --panel: #212124; --panel-alt: #262629; --header: #2a2a2e;
  --raised: #333338; --border: #0e0e10; --border-soft: #36363b;
  --text: #d6d6da; --text-dim: #8e8e96; --text-faint: #5c5c64; --bright: #ececef;
  --accent: #e68a35; --accent-soft: rgba(230, 138, 53, .16);
  --red: #d3162a; --good: #5cb87e; --info: #6fa3d8;
  --mono: "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--window); scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; color: var(--text); background: var(--window);
  font: 16px/1.6 "Inter", "Segoe UI", "Noto Sans", "DejaVu Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] .fr, html[lang="fr"] .en { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--bright); font-weight: 600; }
code { font-family: var(--mono); font-size: .86em; background: var(--raised); padding: 1px 6px; border-radius: 4px; color: var(--bright); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---- Menu ---- */
.nav {
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border);
  background: rgba(24, 24, 26, .88); backdrop-filter: blur(10px);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--bright); font-weight: 700; font-size: 17px; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand b { color: var(--accent); font-weight: 700; }
.menu { display: flex; gap: 4px; margin-left: 8px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { color: var(--text-dim); font-size: 14px; padding: 6px 11px; border-radius: 6px; white-space: nowrap; }
.menu a:hover { color: var(--bright); background: var(--panel-alt); text-decoration: none; }
.menu a.on { color: var(--accent); }
.nav-end { display: flex; align-items: center; gap: 10px; flex: none; }
#lang { display: flex; border: 1px solid var(--border-soft); border-radius: 6px; overflow: hidden; }
#lang button { border: 0; background: var(--panel); color: var(--text-dim); padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: .08em; cursor: pointer; }
#lang button.on { background: var(--accent); color: #18181a; }
.gh { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; padding: 5px 11px; border: 1px solid var(--border-soft); border-radius: 6px; }
.gh:hover { border-color: var(--accent); text-decoration: none; }
.gh svg { width: 17px; height: 17px; fill: currentColor; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--header), var(--window) 70%); }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -260px; width: 900px; height: 620px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(211, 22, 42, .22), rgba(211, 22, 42, 0)); pointer-events: none;
}
.hero .wrap { position: relative; padding-top: 64px; text-align: center; }
.hero-logo { width: 104px; height: 104px; margin: 0 auto 18px; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .55)); }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-faint); }
h1 { margin: 10px auto 14px; max-width: 18ch; font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; letter-spacing: -.02em; color: var(--bright); font-weight: 800; }
h1 em { font-style: normal; color: var(--accent); }
.lead { margin: 0 auto; max-width: 62ch; font-size: 18px; color: var(--text-dim); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: 15px; border: 1px solid var(--border-soft); color: var(--text); background: var(--panel); }
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--bright); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #18181a; }
.btn.primary:hover { filter: brightness(1.08); color: #18181a; }
.fine { font-size: 13px; color: var(--text-faint); }
.hero-shot { margin: 44px auto 0; max-width: 1060px; padding: 0 0 0; }
.frame { border: 1px solid var(--border-soft); border-radius: 10px; overflow: hidden; background: var(--panel); box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.hero-shot .frame { border-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -10px 80px rgba(230, 138, 53, .10), 0 24px 70px rgba(0, 0, 0, .6); }
button.shot { all: unset; display: block; cursor: zoom-in; width: 100%; }
button.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Figures ---- */
.figures { border-bottom: 1px solid var(--border); background: var(--panel); }
.figures .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.figure { padding: 26px 18px; text-align: center; border-left: 1px solid var(--border-soft); }
.figure:first-child { border-left: 0; }
.figure .n { font-size: 30px; font-weight: 800; color: var(--bright); letter-spacing: -.02em; line-height: 1.1; }
.figure .n small { font-size: 16px; font-weight: 600; color: var(--accent); margin-left: 3px; }
.figure .l { margin-top: 4px; font-size: 13.5px; color: var(--text-dim); }

/* ---- Sections ---- */
section { padding: 84px 0 0; }
section:last-of-type { padding-bottom: 84px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
h2 { margin: 8px 0 12px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -.015em; color: var(--bright); font-weight: 800; }
.intro { margin: 0 0 34px; max-width: 70ch; color: var(--text-dim); font-size: 17px; }
h3 { margin: 0 0 8px; font-size: 18px; color: var(--bright); font-weight: 700; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 20px; }
li { margin: 4px 0; }
li::marker { color: var(--text-faint); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 22px 22px 18px; box-shadow: 0 1px 0 var(--border-soft) inset; }
.card > :last-child { margin-bottom: 0; }
.card p { color: var(--text-dim); font-size: 15px; }
.card .ico { font-size: 26px; color: var(--accent); line-height: 1; margin-bottom: 12px; }

/* ---- Tour ---- */
.tour { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 40px; align-items: center; margin-top: 64px; }
.tour:first-of-type { margin-top: 0; }
.tour.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
.tour.flip .tour-text { order: 2; }
.tour-text .key { display: inline-block; font-family: var(--mono); font-size: 12px; padding: 1px 8px; border-radius: 4px; background: var(--panel-alt); border: 1px solid var(--border-soft); border-bottom-width: 2px; color: var(--bright); margin-left: 8px; vertical-align: middle; }
.tour-text h3 { font-size: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.tour-text h3 .glyph { color: var(--accent); margin-right: 10px; }
.tour-text p, .tour-text li { color: var(--text-dim); font-size: 15.5px; }
.tour-text a.more { font-size: 14.5px; font-weight: 600; }

/* ---- Formats ---- */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 11px 16px; vertical-align: top; }
th { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border-soft); background: var(--panel-alt); }
tbody tr { border-bottom: 1px solid var(--border-soft); }
tbody tr:last-child { border-bottom: 0; }
td:first-child { color: var(--bright); }
td .ext { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.chip { display: inline-block; font-size: 11.5px; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.chip.direct { background: rgba(92, 184, 126, .16); color: var(--good); }
.chip.conv { background: var(--accent-soft); color: var(--accent); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

/* ---- Download ---- */
.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dl { display: flex; flex-direction: column; }
.dl .os { font-size: 22px; font-weight: 800; color: var(--bright); }
.dl .file { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); margin: 2px 0 12px; word-break: break-all; }
.dl ul { color: var(--text-dim); font-size: 15px; flex: 1; }
.dl .btn { align-self: flex-start; margin-top: 8px; }
pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; background: var(--panel-alt); border: 1px solid var(--border); border-radius: 8px; color: var(--bright); }
pre .c { color: var(--text-faint); }

/* ---- Links ---- */
.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.link { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; color: var(--text); transition: border-color .15s, background .15s; }
.link:hover { border-color: var(--accent); background: var(--panel-alt); text-decoration: none; }
.link .name { font-weight: 700; color: var(--bright); }
.link .name::after { content: " ↗"; color: var(--text-faint); font-weight: 400; }
.link .what { font-size: 13.5px; color: var(--text-dim); margin-top: 3px; }
.link .lic { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; letter-spacing: .04em; }

/* ---- Footer ---- */
.strip { display: flex; height: 6px; }
.strip i { flex: 1; background: #c4c8ce; }
.strip i:nth-child(even) { background: #707a87; }
footer { background: var(--panel); border-top: 1px solid var(--border); padding: 28px 0 36px; font-size: 13.5px; color: var(--text-dim); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* ---- Enlarged screenshot ---- */
dialog#zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; cursor: zoom-out; }
dialog#zoom::backdrop { background: rgba(8, 8, 10, .88); }
dialog#zoom img { max-width: 96vw; max-height: 94vh; border-radius: 8px; border: 1px solid var(--border-soft); }

@media (max-width: 980px) {
  .cards, .links { grid-template-columns: 1fr 1fr; }
  .tour, .tour.flip { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tour.flip .tour-text { order: 0; }
  .figures .wrap { grid-template-columns: 1fr 1fr; }
  .figure:nth-child(3) { border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
  .gh span { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 8px 12px; }
  .brand { flex: 1; }
  .menu { order: 3; flex: 0 0 100%; margin: 0 -6px; padding-bottom: 8px; }
  html { scroll-padding-top: 104px; }
  .hero .wrap { padding-top: 40px; }
  .cards, .links, .downloads, .split { grid-template-columns: 1fr; }
  section { padding-top: 60px; }
  .lead, .intro { font-size: 16px; }
}
