:root {
  --bg: #07090d;
  --bg-2: #10151c;
  --paper: #f3efe6;
  --paper-2: #e9e4d8;
  --ink: #14171c;
  --muted: #5e676f;
  --line: rgba(92, 225, 212, 0.14);
  --line-dark: rgba(20, 23, 28, 0.12);
  --accent: #e07a3d;
  --accent-hover: #c8682f;
  --cyan: #5ce1d4;
  --steel: #9aa8b4;
  --max: 1120px;
  --font: "Outfit", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(calc(100% - 2.4rem), var(--max));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 9, 13, 0.96);
  color: #f4f0e7;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.6rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 4rem;
  width: auto;
  max-width: 19rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: rgba(244, 240, 231, 0.82);
}

.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="page"] {
  color: #fff;
}

.nav a[aria-current="page"] {
  color: var(--cyan);
}

.nav-cta {
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.45rem 0.85rem;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(224, 122, 61, 0.28);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--accent-hover);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1px;
  margin: 6px 5px;
  background: #f4f0e7;
}

.hero-page {
  min-height: auto;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link:hover,
.card-link:focus-visible {
  border-color: rgba(224, 122, 61, 0.55);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: calc(100svh - 4.25rem);
  background: var(--bg);
  color: #f4f0e7;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(92, 225, 212, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 225, 212, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 18%, transparent 74%);
  animation: grid-shift 28s linear infinite;
}

.hero-glow {
  position: absolute;
  width: 28rem;
  height: 28rem;
  right: 8%;
  top: 18%;
  background: radial-gradient(circle, rgba(92, 225, 212, 0.16), transparent 68%);
  pointer-events: none;
}

.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 3px,
    rgba(255, 255, 255, 0.015) 3px 4px
  );
  pointer-events: none;
}

.hero-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-status li {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  border: 1px solid rgba(92, 225, 212, 0.28);
  padding: 0.35rem 0.65rem;
}

.hud {
  position: relative;
  padding: 1.2rem;
}

.hud::before,
.hud::after {
  content: "";
  position: absolute;
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid var(--cyan);
}

.hud::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.hud::after {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
}

.hero-inner {
  position: relative;
  align-self: center;
  padding: 4.5rem 0 5rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.4vw, 3.35rem);
  max-width: 18ch;
}

.lead {
  margin-top: 1.3rem;
  max-width: 38rem;
  color: rgba(244, 240, 231, 0.72);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero-panel {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--steel);
  padding: 2rem;
}

.part-drawing {
  width: min(100%, 380px);
  opacity: 0.9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0 1.15rem;
  text-decoration: none;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 22px rgba(224, 122, 61, 0.32);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
}

.btn-ghost {
  border-color: rgba(92, 225, 212, 0.4);
  color: #f4f0e7;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: #f4f0e7;
}

.strip {
  background: var(--bg-2);
  color: var(--steel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 4.2rem;
  align-items: center;
}

.strip-inner p {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-right: 1px solid var(--line);
}

.strip-inner p:last-child {
  border-right: 0;
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: var(--paper-2);
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.6rem;
}

.section-head h2,
.about h2,
.contact-copy h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
}

.section-lead {
  margin-top: 0.9rem;
  color: var(--steel);
  max-width: 36rem;
}

.faq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.faq article {
  background: #fff;
  border: 1px solid var(--line-dark);
  padding: 1.3rem 1.25rem 1.4rem;
}

.faq h3 {
  font-size: 1.08rem;
  margin-bottom: 0.55rem;
}

.faq p {
  color: var(--muted);
}

.section-print {
  background: var(--bg-2);
  color: #f4f0e7;
}

.section-print .eyebrow {
  color: var(--cyan);
}

.print-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.print-photo {
  margin: 0;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(224, 122, 61, 0.12);
}

.print-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.print-copy h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
}

.print-copy p {
  margin-top: 1rem;
  color: rgba(244, 240, 231, 0.72);
}

.print-points {
  margin: 1.3rem 0 1.6rem;
  padding: 0;
  list-style: none;
}

.print-points li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--steel);
}

.print-points li::before {
  content: "▸ ";
  color: var(--accent);
  font-family: var(--mono);
}

.print-gallery {
  margin-top: 3.2rem;
}

.gallery-grid:empty::before {
  content: "Ukážky vytlačených dielov doplním.";
  color: var(--steel);
  font-size: 0.95rem;
}

.section-parts {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(92, 225, 212, 0.08), transparent 46%),
    var(--bg);
  color: #f4f0e7;
}

.section-parts .eyebrow {
  color: var(--cyan);
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.part-card {
  background: rgba(16, 21, 28, 0.85);
  border: 1px solid var(--line);
  padding: 0.9rem 0.9rem 1.15rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.part-card:hover,
.part-card:focus-within {
  border-color: rgba(92, 225, 212, 0.45);
  box-shadow: 0 0 28px rgba(92, 225, 212, 0.12);
}

.part-visual {
  background:
    linear-gradient(180deg, rgba(92, 225, 212, 0.06), transparent),
    #0b1016;
  border: 1px solid rgba(92, 225, 212, 0.12);
  margin-bottom: 0.9rem;
  min-height: 9.5rem;
  display: grid;
  place-items: center;
}

.part-visual img {
  width: 86%;
}

.part-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.part-card p {
  color: var(--steel);
  font-size: 0.92rem;
}

.section-drawings {
  background: var(--bg-2);
  color: #f4f0e7;
}

.section-drawings .eyebrow {
  color: var(--cyan);
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.gallery-item {
  display: grid;
  gap: 0.4rem;
  width: 140px;
  max-width: 140px;
  flex: 0 0 140px;
  margin: 0;
  padding: 0.4rem 0.4rem 0.55rem;
  background: rgba(16, 21, 28, 0.85);
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  border-color: rgba(92, 225, 212, 0.45);
  box-shadow: 0 0 22px rgba(92, 225, 212, 0.12);
  outline: none;
}

.gallery-thumb {
  display: block;
  width: 126px;
  height: 126px;
  overflow: hidden;
  background: #0b1016;
  border: 1px solid rgba(92, 225, 212, 0.12);
}

.gallery-thumb img {
  width: 126px;
  height: 126px;
  max-width: 126px;
  object-fit: cover;
  object-position: center;
}

.gallery-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  box-sizing: border-box;
  place-items: center;
  background: rgba(5, 7, 10, 0.94);
  padding: 3.6rem 4.4rem 2.4rem;
  overflow: hidden;
}

.lightbox.is-open {
  display: grid;
}

.lightbox-stage {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 1080px;
  min-width: 0;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  max-height: 76dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
}

.lightbox-stage figcaption {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--steel);
  font-size: 0.95rem;
}

.lightbox-stage a {
  color: var(--cyan);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  background: transparent;
  border: 1px solid var(--line);
  color: #f4f0e7;
  cursor: pointer;
  font: inherit;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 3rem;
  height: 3.4rem;
  transform: translateY(-50%);
  font-size: 2rem;
  line-height: 1;
  color: var(--cyan);
}

.lightbox-prev {
  left: 0.8rem;
}

.lightbox-next {
  right: 0.8rem;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

body.lightbox-open {
  overflow: hidden;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.card {
  background: #fff;
  padding: 1.5rem 1.4rem 1.6rem;
  border: 1px solid var(--line-dark);
  position: relative;
}

.card::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 0.7rem;
  height: 0.7rem;
  border-top: 1px solid var(--cyan);
  border-right: 1px solid var(--cyan);
}

.card-num {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 500;
}

.card h3 {
  margin: 0.7rem 0 0.65rem;
  font-size: 1.2rem;
}

.card p,
.about p,
.contact-copy p,
.steps span {
  color: var(--muted);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 0.3rem;
  border-top: 2px solid var(--accent);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  color: var(--accent);
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
}

.steps strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.12rem;
}

.about,
.contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}

.about p + p {
  margin-top: 1rem;
}

.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line-dark);
}

.checklist li {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line-dark);
}

.checklist li:last-child {
  border-bottom: 0;
}

.checklist li::before {
  content: "▸ ";
  color: var(--accent);
  font-family: var(--mono);
}

.section-contact {
  background: var(--bg);
  color: #f4f0e7;
}

.section-contact .eyebrow {
  color: var(--cyan);
}

.section-contact .contact-copy p {
  color: rgba(244, 240, 231, 0.7);
}

.contact-copy p + p {
  margin-top: 1rem;
}

.contact-mail {
  margin-top: 1.8rem !important;
}

.contact-mail span {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.3rem;
}

.contact-mail a {
  color: #fff;
  font-size: 1.2rem;
}

.form {
  display: grid;
  gap: 0.9rem;
  background: var(--bg-2);
  padding: 1.4rem;
  border: 1px solid var(--line);
  box-shadow: 0 0 40px rgba(92, 225, 212, 0.05);
}

.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}

.optional {
  color: var(--steel);
  font-weight: 400;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #101318;
  color: #f4f0e7;
  font: inherit;
  padding: 0.7rem 0.8rem;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form textarea {
  resize: vertical;
  min-height: 8rem;
}

.form .btn {
  width: fit-content;
  margin-top: 0.3rem;
}

.form-note {
  color: var(--steel);
  font-size: 0.82rem;
}

.form-success,
.form-error {
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
}

.form-success {
  background: rgba(70, 140, 90, 0.2);
  border: 1px solid rgba(120, 190, 130, 0.4);
}

.form-error {
  background: rgba(160, 50, 40, 0.2);
  border: 1px solid rgba(220, 90, 70, 0.45);
}

.hp {
  position: absolute;
  left: -9999px;
}

.site-footer {
  background: #05070a;
  color: var(--steel);
  padding: 1.4rem 0;
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo img {
  height: 2.4rem;
  width: auto;
}

@media (max-width: 900px) {
  .hero,
  .about,
  .contact,
  .cards,
  .steps,
  .strip-inner,
  .parts-grid,
  .print-split,
  .faq {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: grid;
    padding: 0 0 2.4rem;
  }

  .part-drawing {
    width: min(100%, 280px);
    margin-inline: auto;
  }

  .strip-inner p {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    inset: 5.6rem 0 auto;
    background: #07090d;
    flex-direction: column;
    padding: 1rem 1.2rem 1.3rem;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav.open {
    display: flex;
  }

  .lightbox {
    padding: 3.4rem 0.55rem 4.6rem;
    padding-top: max(3.4rem, env(safe-area-inset-top, 0px));
    padding-bottom: max(4.6rem, env(safe-area-inset-bottom, 0px));
  }

  .lightbox-stage {
    align-content: center;
  }

  .lightbox-stage img {
    max-width: 100%;
    max-height: calc(100vh - 9.2rem);
    max-height: calc(100dvh - 9.2rem);
  }

  .lightbox-stage figcaption {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.85rem;
    font-size: 0.88rem;
    text-align: center;
  }

  .lightbox-close {
    top: 0.55rem;
    right: 0.55rem;
    width: 2.4rem;
    height: 2.4rem;
  }

  .lightbox-nav {
    top: auto;
    bottom: 0.7rem;
    transform: none;
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1.7rem;
  }

  .lightbox-prev {
    left: 0.55rem;
  }

  .lightbox-next {
    right: 0.55rem;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .parts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@keyframes grid-shift {
  to {
    background-position: 48px 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-grid {
    animation: none;
  }
}
