/* 4ancap: retro desktop in Monero colours. Dark windows by default, light on request. */

@font-face {
  font-family: "Unifont";
  src: url("/assets/fonts/unifont-ui.woff2") format("woff2"); /* cut from GNU Unifont 18.0.01 by pyftsubset */
  /* Latin and symbols only: Georgian falls through to Noto Sans Georgian */
  unicode-range: U+0000-024F, U+2000-206F, U+20A0-20CF, U+2190-21FF, U+2500-25FF, U+2600-27BF;
  size-adjust: 114.29%; /* at 14px this draws Unifont at its native 16px */
  font-display: swap;
}

:root {
  --orange: #F26822; --orange-d: #B8470F; --grey: #4D4D4D;
  --chrome: "Unifont", "Noto Sans Georgian", sans-serif;
  --serif: "Noto Serif Georgian", Georgia, serif;
  --shadow: rgba(0,0,0,.35) 0 50px 80px -50px;
}
html[data-theme="light"] {
  --bg: #fff; --fg: #000; --line: #000; --soft: #C8C8C8; --muted: #4D4D4D; --stripe: #e6e6e6;
  --key: rgb(140,140,140) -1px -1px 0 0 inset, #fff 1px 1px 0 0 inset, #000 0 0 0 1px;
  --tile: #fff 1px 1px 0 0 inset, rgba(0,0,0,.18) 0 -4px 0 0 inset;
}
html[data-theme="dark"] {
  --bg: #000; --fg: #fff; --line: #fff; --soft: #3a3a3a; --muted: #b5b5b5; --stripe: #262626;
  --key: #2a2a2a -1px -1px 0 0 inset, #8a8a8a 1px 1px 0 0 inset, #fff 0 0 0 1px;
  --tile: #3a3a3a 1px 1px 0 0 inset, rgba(255,255,255,.18) 0 -4px 0 0 inset;
}

/* language: show only the chosen one */
html[data-lang="ka"] body [lang="en"], html[data-lang="en"] body [lang="ka"] { display: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--orange); color: var(--fg); font-family: var(--chrome); font-size: 14px; overflow: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- menu bar ---------- */
.menu { position: fixed; top: 0; display: flex; height: 32px; z-index: 9000; }
.menu.l { left: 0; } .menu.r { right: 0; }
.menu > * { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-top: 0; display: flex; align-items: center; padding: 0 10px; text-decoration: none; white-space: nowrap; }
.menu > * + * { border-left: 0; }
.menu .logo { background: var(--fg); color: var(--orange); width: 32px; justify-content: center; padding: 0; font-size: 16px; }
.menu.l > :last-child { border-radius: 0 0 4px 0; }
.menu.r > :first-child { border-radius: 0 0 0 4px; overflow: hidden; }
.seg { padding: 0 !important; }
.seg button { height: 100%; padding: 0 9px; }
html[data-lang="ka"] [data-set-lang="ka"], html[data-lang="en"] [data-set-lang="en"] { background: var(--fg); color: var(--bg); }
.theme { width: 34px; justify-content: center; padding: 0 !important; font-size: 16px; }
html[data-theme="dark"] .theme .moon, html[data-theme="light"] .theme .sun { display: none; }

/* ---------- windows ---------- */
.desk { position: fixed; inset: 0; }
.win { position: absolute; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100% - 130px); }
.bar { display: flex; align-items: center; gap: 8px; height: 26px; flex: none; padding: 0 4px 4px; cursor: grab; user-select: none; touch-action: none; }
.bar:active { cursor: grabbing; }
.bar .x { width: 20px; height: 20px; display: grid; place-items: center; font-size: 14px; border-radius: 2px; }
.bar .x:hover { background: var(--fg); color: var(--bg); }
.bar .t { margin-left: auto; font-family: var(--serif); font-stretch: 62.5%; font-weight: 600; font-size: 18px; letter-spacing: .02em; text-transform: uppercase; }
.well { flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 4px; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); scrollbar-width: thin; scrollbar-color: var(--orange) var(--bg); }
.well::-webkit-scrollbar { width: 12px; }
.well::-webkit-scrollbar-track { border-left: 1px solid var(--line); background: repeating-linear-gradient(0deg, var(--bg) 0 1px, var(--stripe) 1px 2px); }
.well::-webkit-scrollbar-thumb { background: var(--orange); border: 1px solid var(--line); border-radius: 2px; }
.status { flex: none; font-size: 12px; font-family: "Noto Sans Georgian", var(--chrome); padding: 5px 4px 0; display: flex; justify-content: space-between; gap: 12px; min-height: 22px; }
.status:empty { display: none; }
.copy { text-decoration: underline; text-underline-offset: 2px; }

.key { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 2px; background: var(--orange); color: #000; box-shadow: var(--key); text-decoration: none; }
.key.w { background: var(--bg); color: var(--fg); }

/* default places on a laptop screen */
#w-welcome { width: 560px; left: calc(50% - 280px); top: max(48px, calc(50% - 250px)); }
#w-news, #w-dossier { width: 520px; height: min(640px, calc(100% - 64px - 100px)); left: max(16px, calc(50% - 470px)); top: 64px; }
#w-dossier { left: max(40px, calc(50% - 440px)); top: 92px; height: min(640px, calc(100% - 92px - 100px)); }
#w-about { width: 440px; height: min(520px, calc(100% - 80px - 100px)); left: min(calc(100% - 456px), calc(50% + 60px)); top: 80px; }
#w-contact { width: 400px; height: min(360px, calc(100% - 140px - 100px)); left: min(calc(100% - 416px), calc(50% + 100px)); top: 140px; }
.win.article { width: min(680px, calc(100% - 32px)); height: calc(100% - 44px - 100px); left: max(16px, min(calc(100% - 696px), calc(50% - 150px))); top: 44px; }

/* pages: welcome, about, contact */
.page { padding: 28px 32px; }
.page h1 { font-family: var(--serif); font-weight: 300; font-stretch: 62.5%; font-size: 64px; line-height: 1.08; margin: 0 0 18px; }
.page .body h2 { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.3; margin: 26px 0 8px; }
.page .body h2:first-child { margin-top: 0; }
.page .body p, .page .body li { font-family: var(--serif); font-size: 17px; line-height: 1.65; }
.page .body p { margin: 0 0 18px; }
.page .keys { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.page .sig { margin-top: 26px; font-size: 14px; }

/* category lists */
.mast { margin: 0 22px; padding: 22px 0 6px; border-bottom: 1px solid var(--line); }
.mast h2 { font-family: var(--serif); font-weight: 300; font-stretch: 62.5%; font-size: 68px; line-height: 1.08; margin: 0; }
.mast div { font-family: "Noto Sans Georgian", sans-serif; font-size: 12px; margin: 12px 0 12px; }
.item { display: flex; gap: 16px; align-items: center; padding: 14px 22px; text-decoration: none; }
.item + .item { border-top: 1px dashed var(--soft); }
.item:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.thumb { width: 124px; height: 92px; flex: none; border: 2px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--grey); }
.item h3 { font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.3; margin: 0 0 6px; }
.item .d { font-family: "Noto Sans Georgian", sans-serif; font-size: 12px; color: var(--muted); }
.empty { padding: 20px 22px; font-family: "Noto Sans Georgian", sans-serif; }

/* pictures: shown after the retro filter has drawn them */
html.js img.retro { visibility: hidden; } /* without JS the photo shows as it is */
.thumb img, .thumb canvas, .cover img, .cover canvas, .pic img, .pic canvas { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }

/* article */
.art { max-width: 580px; margin: 0 auto; padding: 34px 24px 40px; }
.art .kicker { text-align: center; font-size: 14px; margin-bottom: 14px; }
.art h1 { text-align: center; font-family: var(--serif); font-weight: 300; font-stretch: 62.5%; font-size: 54px; line-height: 1.05; margin: 0 0 16px; }
.art .date { text-align: center; font-family: "Noto Sans Georgian", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .06em; margin-bottom: 26px; }
.cover { border: 2px solid var(--line); border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 26px; background: var(--grey); }
.body { font-family: var(--serif); font-size: 17px; line-height: 1.75; }
.body p, .body ul, .body ol { margin: 0 0 18px; }
.body h2 { font-family: var(--serif); font-weight: 400; font-stretch: 75%; font-size: 30px; line-height: 1.1; margin: 30px 0 12px; }
.body h3 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 24px 0 8px; }
.body a { text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.body blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 4px solid var(--orange); font-style: italic; }
.body code { font-family: var(--chrome); font-size: 14px; }
.pic { margin: 0 0 22px; border: 2px solid var(--line); border-radius: 4px; overflow: hidden; }
.pic figcaption { font-family: "Noto Sans Georgian", sans-serif; font-size: 12px; padding: 6px 8px; border-top: 1px solid var(--line); }
.src { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 12px; font-family: "Noto Sans Georgian", sans-serif; font-size: 13px; line-height: 1.6; }
.src ul { padding-left: 18px; margin: 6px 0 12px; }
.src b { font-weight: normal; font-family: var(--chrome); font-size: 14px; }
.disc { color: var(--muted); }

/* ---------- dock ---------- */
.dock { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; overflow: hidden; z-index: 9000; }
.tile { width: 96px; height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding-bottom: 6px; text-decoration: none; color: var(--fg); box-shadow: var(--tile); }
.tile + .tile { border-left: 1px solid var(--line); }
.tile img { width: 48px; height: 48px; image-rendering: pixelated; }
.tile span { font-family: "Noto Sans Georgian", var(--chrome); font-size: 12px; line-height: 1; }
.tile.on { background: var(--soft); }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  .menu .name { display: none; }
  .menu .date { display: none; }
  .win { left: 8px !important; right: 8px; width: auto !important; top: 44px !important; height: auto !important; bottom: 96px; max-height: none; }
  #w-welcome { bottom: auto; max-height: calc(100% - 140px); }
  .bar { cursor: default; }
  .page { padding: 20px 18px; }
  .page h1 { font-size: 48px; }
  .mast { margin: 0 14px; }
  .mast h2 { font-size: 54px; }
  .item { padding: 12px 14px; gap: 12px; }
  .thumb { width: 96px; height: 72px; }
  .item h3 { font-size: 16px; }
  .art { padding: 22px 16px 32px; }
  .art h1 { font-size: 42px; }
  .dock { width: calc(100% - 16px); }
  .tile { flex: 1; width: auto; }
}

/* social links (contact window): icon, "X :", handle, all one link */
.socials { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 8px; }
.social { display: inline-flex; align-items: center; gap: 12px; padding: 6px 16px 6px 8px; border-radius: 2px; color: var(--fg); text-decoration: none; }
.social:hover { background: var(--orange); color: #000; box-shadow: var(--key); }
.social img { width: 48px; height: 48px; image-rendering: pixelated; flex: none; }
.social .lab { font-family: var(--chrome); font-size: 14px; }
.social b { font-family: var(--chrome); font-weight: normal; font-size: 14px; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.social:hover b { text-decoration-color: #000; }
