/* =========================================================
   lasermarking.cz — společný styl
   Paleta vychází z náběhových barev popouštění nerezi
   (ocelová šeď, oxidová modř, mosazná sláma).
   ========================================================= */

:root {
  /* Ocel a hliník */
  --plate-900: #0F1317;
  --plate-800: #161C22;
  --plate-700: #212932;
  --plate-600: #313B45;
  --plate-line: #39444F;

  --alu-050: #F5F7F8;
  --alu-100: #EAEEF1;
  --alu-200: #D7DEE3;
  --alu-300: #B9C4CC;

  --ink: #121920;
  --ink-2: #3E4A55;
  --ink-muted: #66727D;

  /* Náběhové barvy */
  --oxide: #1B4D8F;
  --oxide-600: #16406F;
  --oxide-bright: #4A8FE0;
  --straw: #C08F2E;

  --etch: #EDF1F4;

  /* Rytmus */
  --wrap: 1180px;
  --gap: clamp(1rem, 2.5vw, 2rem);
  --sec: clamp(3.5rem, 8vw, 6.5rem);
  --r: 4px;

  --ff-display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --ff-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --ff-mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--alu-050);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--oxide); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--oxide-600); }

:focus-visible {
  outline: 2px solid var(--oxide-bright);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--plate-900); color: #fff; padding: .8rem 1.2rem; z-index: 999;
}
.skip:focus { left: 0; }

/* ---------- Typografie ---------- */

h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; margin: 0; }

.display   { font-size: clamp(2.3rem, 6vw, 4.1rem); font-weight: 700; }
.h-section { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.h-card    { font-size: 1.18rem; letter-spacing: -.01em; }

.lead { font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: var(--ink-2); max-width: 62ch; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--straw);
  flex: none;
}
.plate .eyebrow { color: var(--alu-300); }

.mono { font-family: var(--ff-mono); font-size: .82rem; letter-spacing: .02em; }

/* ---------- Hlavička a navigace ---------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,247,248,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--alu-200);
}

.head-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); }
.brand img, .brand svg { height: 34px; width: auto; }
.brand b {
  font-family: var(--ff-display); font-weight: 600; font-size: 1rem;
  letter-spacing: -.01em; line-height: 1.15;
}
.brand span {
  display: block; font-family: var(--ff-mono); font-size: .62rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); font-weight: 400;
}

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  font-family: var(--ff-mono); font-size: .76rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
  padding: .55rem .7rem; border-radius: var(--r);
  white-space: nowrap;
}
.nav a:hover { background: var(--alu-100); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--straw); }
.nav a.is-accent { color: var(--oxide); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--alu-200);
  border-radius: var(--r); padding: .5rem .7rem; cursor: pointer;
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink);
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--alu-050); border-bottom: 1px solid var(--alu-200);
    padding: .5rem clamp(1rem, 4vw, 2rem) 1rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem .4rem; border-bottom: 1px solid var(--alu-100); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--straw); }
}

/* ---------- Tlačítka ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--ff-mono); font-size: .8rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .95rem 1.5rem; border-radius: var(--r);
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn--primary { background: var(--oxide); color: #fff; }
.btn--primary:hover { background: var(--oxide-600); color: #fff; }
.btn--ghost { border-color: var(--alu-300); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.plate .btn--ghost { border-color: var(--plate-600); color: var(--etch); }
.plate .btn--ghost:hover { border-color: var(--alu-300); color: #fff; }
.btn--lg { padding: 1.1rem 1.9rem; font-size: .86rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ---------- Tmavá deska ---------- */

.plate {
  background: var(--plate-900);
  color: var(--etch);
  position: relative;
  overflow: hidden;
}
/* jemné broušení kovu */
.plate::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(96deg, rgba(255,255,255,.024) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 12% 0%, rgba(74,143,224,.16), transparent 62%);
  pointer-events: none;
}
.plate > * { position: relative; z-index: 1; }
.plate p { color: #B9C4CC; }
.plate a { color: var(--oxide-bright); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(4rem, 11vw, 8rem); }
.hero .display { color: var(--etch); max-width: 15ch; }
.hero .lead { color: #AEB9C3; margin-top: 1.6rem; }

.hero-meta {
  margin-top: 3.2rem; padding-top: 1.4rem;
  border-top: 1px solid var(--plate-line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.4rem;
}
.hero-meta div { font-family: var(--ff-mono); font-size: .78rem; color: #93A0AB; }
.hero-meta b { display: block; color: var(--etch); font-weight: 500; font-size: .95rem; margin-bottom: .2rem; }

/* Gravírovací animace */
.engrave__line { display: block; width: fit-content; max-width: 100%; position: relative; }
.engrave__txt { display: inline-block; clip-path: inset(0 101% 0 0); animation: etch .95s cubic-bezier(.25,.85,.3,1) .15s forwards; }
.engrave__line--2 .engrave__txt { animation-delay: .7s; }
@keyframes etch { to { clip-path: inset(0 -3% 0 0); } }

.engrave__beam {
  position: absolute; top: -.05em; bottom: -.05em; left: 0; width: 2px;
  background: linear-gradient(180deg, transparent, #D9EAFF 20%, #7FB6FF 80%, transparent);
  box-shadow: 0 0 14px 4px rgba(110,175,255,.5);
  opacity: 0; animation: beam .95s cubic-bezier(.25,.85,.3,1) .15s forwards;
}
.engrave__line--2 .engrave__beam { animation-delay: .7s; }
@keyframes beam {
  0%   { opacity: 0; left: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .engrave__txt { clip-path: none; animation: none; }
  .engrave__beam { display: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Sekce ---------- */

.section { padding-block: var(--sec); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.section-head { max-width: 68ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Karty ---------- */

.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px; background: var(--alu-200);
  border: 1px solid var(--alu-200); border-radius: var(--r); overflow: hidden;
}
.cards > article {
  background: #fff; padding: clamp(1.4rem, 2.6vw, 2rem);
}
.cards > article .h-card { margin-bottom: .5rem; }
.cards > article p { font-size: .95rem; color: var(--ink-2); }
.cards .tag {
  font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--straw); display: block; margin-bottom: .9rem;
}

.panel {
  background: #fff; border: 1px solid var(--alu-200); border-radius: var(--r);
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

/* rohové značky jako na výkresu */
.marked { position: relative; }
.marked::before, .marked::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
}
.marked::before { top: -1px; left: -1px; border-top: 2px solid var(--straw); border-left: 2px solid var(--straw); }
.marked::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--straw); border-right: 2px solid var(--straw); }

/* ---------- Specifikace (definiční seznam) ---------- */

.specs { margin: 0; border-top: 1px solid var(--alu-200); }
.specs > div {
  display: grid; grid-template-columns: minmax(140px, 34%) 1fr; gap: 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--alu-200);
}
.specs dt {
  font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted); padding-top: .15rem;
}
.specs dd { margin: 0; font-size: .95rem; }
.plate .specs, .plate .specs > div { border-color: var(--plate-line); }
.plate .specs dt { color: #8B98A3; }
.plate .specs dd { color: var(--etch); }

/* ---------- Seznam s odrážkami ---------- */

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.ticks li { position: relative; padding-left: 1.7rem; font-size: .97rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 10px; height: 1px; background: var(--oxide);
}
.plate .ticks li::before { background: var(--oxide-bright); }

/* ---------- Galerie ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery button {
  padding: 0; border: 1px solid var(--alu-200); background: var(--alu-100);
  border-radius: var(--r); overflow: hidden; cursor: pointer; aspect-ratio: 1;
  display: block; width: 100%;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.gallery button:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; background: rgba(12,15,18,.94); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1000px, 92vw); max-height: 84vh; border-radius: var(--r); object-fit: contain; }
.lightbox figcaption {
  font-family: var(--ff-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--alu-300); text-align: center; margin-top: 1rem;
}
.lb-btn {
  position: absolute; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  font-size: 1.3rem; line-height: 1; display: grid; place-items: center;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ---------- Ke stažení ---------- */

.dl {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
}
@media (max-width: 800px) { .dl { grid-template-columns: 1fr; } }

.dl-box {
  border: 1px solid var(--plate-line); border-radius: var(--r);
  padding: clamp(1.4rem, 3vw, 1.9rem); background: rgba(255,255,255,.03);
}
.dl-box .btn { width: 100%; justify-content: center; }
.dl-note { font-family: var(--ff-mono); font-size: .72rem; color: #8B98A3; margin-top: 1rem; line-height: 1.6; }

.hash {
  font-family: var(--ff-mono); font-size: .68rem; word-break: break-all;
  color: #8B98A3; background: rgba(0,0,0,.25); padding: .5rem .6rem; border-radius: var(--r);
  display: block; margin-top: .4rem;
}

/* ---------- Články / changelog ---------- */

.entries { display: grid; gap: 0; border-top: 1px solid var(--alu-200); }
.entries > article {
  padding: 1.6rem 0; border-bottom: 1px solid var(--alu-200);
  display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: clamp(1rem, 3vw, 2.5rem);
}
@media (max-width: 700px) { .entries > article { grid-template-columns: 1fr; gap: .5rem; } }
.entries time {
  font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .08em;
  color: var(--ink-muted); padding-top: .3rem;
}
.entries h3 { margin-bottom: .5rem; }
.entries p { font-size: .96rem; color: var(--ink-2); }
.ver {
  display: inline-block; font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .08em;
  border: 1px solid var(--alu-300); border-radius: 999px; padding: .12rem .6rem; margin-left: .5rem;
  color: var(--ink-muted); vertical-align: middle;
}

/* ---------- Formulář ---------- */

.form { display: grid; gap: 1.2rem; max-width: 640px; }
.form label { font-family: var(--ff-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); display: block; margin-bottom: .4rem; }
.form input, .form textarea, .form select {
  width: 100%; font: inherit; font-size: .98rem; color: var(--ink);
  padding: .8rem .9rem; background: #fff;
  border: 1px solid var(--alu-300); border-radius: var(--r);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--oxide); box-shadow: 0 0 0 3px rgba(27,77,143,.12);
}
.form textarea { resize: vertical; min-height: 150px; }
.form .hint { font-size: .82rem; color: var(--ink-muted); margin-top: .4rem; }
.req { color: var(--straw); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  border-left: 3px solid var(--straw); background: #fff;
  border: 1px solid var(--alu-200); border-left: 3px solid var(--straw);
  padding: 1rem 1.2rem; border-radius: var(--r); margin-bottom: 1.8rem; font-size: .95rem;
}
.alert--ok { border-left-color: var(--oxide); }

/* ---------- Patička ---------- */

.site-foot { background: var(--plate-900); color: #93A0AB; padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; }
.site-foot h4 {
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--alu-300); font-weight: 500; margin-bottom: 1rem;
}
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-foot a { color: #B9C4CC; text-decoration: none; font-size: .93rem; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-bar {
  margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--plate-line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--ff-mono); font-size: .72rem; letter-spacing: .04em; color: #6C7883;
}
.code-mark { opacity: .5; }

/* ---------- Vektorový editor: plátno v hlavičce ---------- */

.canvas-hero {
  background: #fff; border: 1px solid var(--alu-200); border-radius: var(--r);
  background-image:
    linear-gradient(var(--alu-100) 1px, transparent 1px),
    linear-gradient(90deg, var(--alu-100) 1px, transparent 1px);
  background-size: 26px 26px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.path-draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.2s ease-out .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.node-in { opacity: 0; animation: pop .35s ease-out forwards; }
.node-in:nth-of-type(1) { animation-delay: 1.7s; }
.node-in:nth-of-type(2) { animation-delay: 1.85s; }
.node-in:nth-of-type(3) { animation-delay: 2s; }
.node-in:nth-of-type(4) { animation-delay: 2.15s; }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
