/* Robocraftwars: The Red Garden — game website, metal-electric style.
   Author: Skorowid. Copyright (c) 2026 Marcin Artur Wietrzyk, all rights reserved (see LICENSE.md). */

:root {
  --bg: #0d0f10;
  --bg2: #15191b;
  --steel-hi: #5d666b;
  --steel: #3a4145;
  --steel-lo: #23292c;
  --text: #e6e2da;
  --muted: #b3ada3;
  --teal: #2aa39a;
  --teal-glow: #5fe3d6;
  --rust: #a8442e;
  --rust-hi: #e0775c;
  --paper: #efe3cf;
  --radius: 4px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(42, 163, 154, .12), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(168, 68, 46, .12), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .015) 0 2px, transparent 2px 6px),
    var(--bg);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, "DejaVu Sans", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-glow); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--teal-glow); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--teal); color: #000; padding: .5rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; }

h1, h2, h3 {
  font-family: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Liberation Sans Narrow", "DejaVu Sans Condensed", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 .6em;
}
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
section { padding: 4.5rem 0; }

/* Metal plate with bevel and rivets */
.plate {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .07), transparent 40%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, var(--steel), var(--steel-lo));
  border: 1px solid #0a0c0d;
  border-radius: var(--radius);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .18),
    inset -1px -1px 0 rgba(0, 0, 0, .55),
    0 10px 30px rgba(0, 0, 0, .45);
  padding: 1.6rem;
}
.plate::before, .plate::after {
  content: "";
  position: absolute;
  inset: 8px;
  pointer-events: none;
  background:
    radial-gradient(circle at 4px 4px, #9aa3a8 0 1.5px, #3c4347 2.5px, transparent 3.5px) top left / 8px 8px no-repeat,
    radial-gradient(circle at 4px 4px, #9aa3a8 0 1.5px, #3c4347 2.5px, transparent 3.5px) top right / 8px 8px no-repeat,
    radial-gradient(circle at 4px 4px, #9aa3a8 0 1.5px, #3c4347 2.5px, transparent 3.5px) bottom left / 8px 8px no-repeat,
    radial-gradient(circle at 4px 4px, #9aa3a8 0 1.5px, #3c4347 2.5px, transparent 3.5px) bottom right / 8px 8px no-repeat;
}
.plate::after { display: none; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #2b3134, #181c1e);
  border-bottom: 2px solid #000;
  box-shadow: 0 2px 0 rgba(42, 163, 154, .35), 0 6px 20px rgba(0, 0, 0, .5);
}
.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand {
  font-family: "Bahnschrift", "Arial Narrow", "DejaVu Sans Condensed", sans-serif;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: .5rem;
}
.brand svg { width: 28px; height: 28px; }
.brand .ver { font-size: .75rem; color: var(--teal-glow); border: 1px solid var(--teal); padding: 0 .35rem; border-radius: 2px; }
.top nav { margin-left: auto; display: flex; gap: .25rem 1rem; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; text-transform: uppercase; font-size: .85rem; letter-spacing: .08em; }
.top nav a:hover { color: var(--teal-glow); }
.lang {
  display: inline-flex; border: 1px solid #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15);
}
.lang button {
  font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  background: linear-gradient(180deg, #4a5257, #2b3134); color: var(--muted);
  border: 0; padding: .3rem .6rem; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: linear-gradient(180deg, #2fb5ab, #1d7a73); color: #001a18; }

/* Machine-panel buttons */
.btn {
  --c1: #59636a; --c2: #2c3337; --led: var(--teal-glow);
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .85rem 1.3rem .85rem 1rem;
  font-family: "Bahnschrift", "Arial Narrow", "DejaVu Sans Condensed", sans-serif;
  font-size: 1rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--c1), var(--c2));
  border: 1px solid #050606;
  border-radius: var(--radius);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .5);
  transition: filter .15s, transform .15s;
}
.btn::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--led); box-shadow: 0 0 8px var(--led), 0 0 2px #fff inset;
  flex: none;
}
.btn:hover { filter: brightness(1.18); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.primary { --c1: #2fb5ab; --c2: #16645e; color: #001513; }
.btn.primary::before { --led: #eafffd; }
.btn.rust { --c1: #c05a42; --c2: #6f2a1b; --led: #ffd0bf; color: #fff; }
.btn .sub { display: block; font-size: .7rem; font-weight: 400; letter-spacing: .05em; text-transform: none; opacity: .85; }
.btn[aria-disabled="true"] { --led: #6b6b6b; filter: grayscale(1) brightness(.8); cursor: default; }
.buttons { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Hero */
.hero { position: relative; padding: 0; overflow: hidden; border-bottom: 3px solid #000; }
.hero figure { margin: 0; position: relative; }
.hero img { width: 100%; max-height: 70vh; min-height: 420px; object-fit: cover; filter: sepia(.15) contrast(1.05); }
.hero figure::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 15, 16, .1) 30%, rgba(13, 15, 16, .9) 92%, var(--bg));
}
.hero .panel {
  position: relative; z-index: 2;
  margin: -15rem auto 0; max-width: 820px;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.8rem); margin-bottom: .2em; text-shadow: 0 2px 0 #000, 0 0 18px rgba(42, 163, 154, .45); }
.hero h1 small { display: block; font-size: .45em; color: var(--teal-glow); letter-spacing: .3em; }
.hero p.lead { font-size: 1.1rem; color: var(--text); }
.platforms { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.arc { position: absolute; inset: 0; z-index: 1; pointer-events: none; width: 100%; height: 100%; }
.arc path { fill: none; stroke: var(--teal-glow); stroke-width: 2; filter: url(#glow); opacity: 0; animation: zap 5s infinite steps(1); }
.arc path.r { stroke: var(--rust-hi); animation-delay: 2.3s; }
@keyframes zap { 0% { opacity: 0; } 2% { opacity: .95; } 4% { opacity: .2; } 6% { opacity: .9; } 9% { opacity: 0; } }

/* Electric divider */
.bolt-line {
  height: 14px; margin: 0;
  background:
    linear-gradient(90deg, transparent, var(--teal) 20%, var(--teal-glow) 50%, var(--rust) 80%, transparent) center / 100% 2px no-repeat;
  position: relative;
  overflow: hidden;
}
.bolt-line::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: radial-gradient(40px 6px at 50% 50%, rgba(95, 227, 214, .7), transparent);
  animation: sweep 4s linear infinite;
}
@keyframes sweep { from { transform: translateX(-50%); } to { transform: translateX(50%); } }

/* Factions */
.factions { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.faction h3 { font-size: 1.6rem; display: flex; align-items: center; gap: .6rem; }
.faction .tag { font-size: .75rem; padding: .1rem .5rem; border-radius: 2px; letter-spacing: .1em; }
.faction.px { border-top: 4px solid var(--teal); }
.faction.px h3 { color: var(--teal-glow); }
.faction.px .tag { background: var(--teal); color: #001513; }
.faction.bx { border-top: 4px solid var(--rust); }
.faction.bx h3 { color: var(--rust-hi); }
.faction.bx .tag { background: var(--rust); color: #fff; }
.faction p { color: var(--text); }
.faction .counter { color: var(--muted); font-size: .95rem; border-left: 3px solid currentColor; padding-left: .8rem; }

/* Galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1.5rem 0 3rem; }
.card { margin: 0; padding: 0; overflow: hidden; }
.card .frame {
  background: var(--paper); aspect-ratio: 3 / 2; display: flex; align-items: center; justify-content: center;
  border-bottom: 2px solid #000;
}
.card img { width: 100%; height: 100%; object-fit: contain; }
.card figcaption { padding: .7rem 1rem .9rem; }
.card .name { font-weight: 700; letter-spacing: .05em; }
.card .meta { font-size: .85rem; color: var(--muted); }
.card .ab { display: inline-block; font-size: .72rem; margin: .3rem .3rem 0 0; padding: 0 .4rem; border: 1px solid currentColor; border-radius: 2px; }
.px-g .card { border-top: 3px solid var(--teal); }
.px-g .ab { color: var(--teal-glow); }
.bx-g .card { border-top: 3px solid var(--rust); }
.dust-g .card { border-top: 3px solid #c9b48a; }
.dust-g .ab { color: var(--rust-hi); }
.card.plate { padding: 0; }
.card.plate::before { inset: 6px; }

/* Swarm */
.swarm { position: relative; }
.swarm .intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: start; }

/* Campaign */
.acts { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: act; }
.acts li { padding: 1.1rem 1.2rem; }
.acts .num { font-family: "Bahnschrift", "Arial Narrow", sans-serif; color: var(--teal-glow); font-size: .85rem; letter-spacing: .15em; }
.acts .t { font-weight: 700; display: block; margin: .2rem 0 .3rem; }
.acts .m { font-size: .9rem; color: var(--muted); }
.battles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.battles figure { margin: 0; padding: .5rem; }
.battles figcaption { font-size: .85rem; color: var(--muted); padding: .5rem .3rem 0; }

/* Play / CTA */
.cta { text-align: center; }
.cta .plate { max-width: 860px; margin: 0 auto; }
.cta .buttons { justify-content: center; }
.cta ul { text-align: left; max-width: 640px; margin: 1.2rem auto 0; color: var(--muted); }

footer {
  border-top: 2px solid #000; background: linear-gradient(180deg, #1c2124, #0b0d0e);
  padding: 2rem 0; font-size: .85rem; color: var(--muted);
}
footer p { margin: .3rem 0; }

/* Language switching */
html[lang="pl"] [lang="en"]:not(html) { display: none !important; }
html[lang="en"] [lang="pl"]:not(html) { display: none !important; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: 3rem 0; }
  .top nav { display: none; }
  .top .wrap { flex-wrap: nowrap; gap: .5rem; }
  .brand { letter-spacing: .06em; font-size: .95rem; }
  .top .lang { margin-left: auto; }
  .plate { padding: 1.1rem; }
  .hero h1 { font-size: clamp(1.4rem, 7vw, 2.4rem); letter-spacing: .02em; overflow-wrap: anywhere; }
  .hero h1 small { letter-spacing: .2em; }
  .hero img { max-height: 46vh; min-height: 220px; }
  .hero .panel { margin-top: -3rem; }
  .hero .panel { margin: -3rem .75rem 0; }
  .swarm .intro { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: flex-start; }
  .gallery { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .card figcaption { padding: .5rem .6rem .7rem; }
}
@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .arc path { animation: none; opacity: .6; }
  .bolt-line::after { animation: none; }
  .btn { transition: none; }
}
.card .name, .card .meta { display: block; }
.px-h { color: var(--teal-glow); }
.bx-h { color: var(--rust-hi); }
