:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-strong: #f0eadf;
  --ink: #222222;
  --muted: #64615b;
  --line: #d8d1c4;
  --green: #2f6f52;
  --green-soft: #dcebe2;
  --blue: #2e5f8d;
  --blue-soft: #dfeaf3;
  --amber: #a86622;
  --amber-soft: #f5e5d1;
  --red: #a33f34;
  --red-soft: #f0d9d5;
  --shadow: 0 18px 46px rgba(35, 32, 27, 0.11);
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.language-switch__item {
  min-width: 42px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
}

.language-switch__item:hover,
.language-switch__item:focus-visible {
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.language-switch__item--active {
  color: #ffffff;
  background: var(--green);
}

.language-switch__item--active:hover,
.language-switch__item--active:focus-visible {
  color: #ffffff;
  background: var(--green);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(320px, 1.18fr) minmax(0, 0.82fr);
  align-items: center;
  gap: clamp(28px, 5vw, 74px);
  padding: clamp(32px, 7vw, 86px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(246, 244, 239, 0.92), rgba(246, 244, 239, 0.76)),
    url("grafika/old/01ekran.png") center / cover no-repeat;
}

.hero__media {
  align-self: stretch;
  display: grid;
  place-items: center;
}

.hero__media img {
  width: min(980px, 92vw);
  border: 1px solid rgba(39, 36, 31, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.hero__content {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.temporary-note {
  margin: 14px 0 0;
  color: var(--amber);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  font-weight: 800;
  text-transform: uppercase;
}

.lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: #36332f;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero__facts span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(47, 111, 82, 0.26);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  color: #244f3c;
  font-weight: 700;
}

.section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.section__head {
  max-width: 860px;
  margin-bottom: 30px;
}

.section--intro {
  background: var(--surface);
}

.purpose-grid,
.module-grid,
.tech-list {
  display: grid;
  gap: 18px;
}

.purpose-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.purpose-grid article,
.module-card,
.tech-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(35, 32, 27, 0.05);
}

.purpose-grid article,
.tech-list article {
  padding: 24px;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 8px;
}

.module-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card {
  position: relative;
  min-height: 270px;
  padding: 24px;
  overflow: hidden;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--green);
}

.module-card--finance::before,
.module-card--tasks::before {
  background: var(--green);
}

.module-card--people::before,
.module-card--cars::before {
  background: var(--blue);
}

.module-card--notes::before,
.module-card--items::before {
  background: var(--amber);
}

.module-card--places::before,
.module-card--system::before {
  background: var(--red);
}

.module-card--finance,
.module-card--tasks {
  background: linear-gradient(180deg, var(--green-soft), #ffffff 38%);
}

.module-card--people,
.module-card--cars {
  background: linear-gradient(180deg, var(--blue-soft), #ffffff 38%);
}

.module-card--notes,
.module-card--items {
  background: linear-gradient(180deg, var(--amber-soft), #ffffff 38%);
}

.module-card--places,
.module-card--system {
  background: linear-gradient(180deg, var(--red-soft), #ffffff 38%);
}

.section--screens {
  background: var(--surface);
}

.screen-feature,
.screen-grid figure,
.detail-strip figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(35, 32, 27, 0.07);
  overflow: hidden;
}

.screen-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  align-items: stretch;
  margin-bottom: 18px;
}

.screen-feature img,
.screen-grid img,
.detail-strip img {
  width: 100%;
  background: #f3f0ea;
}

.preview-thumb {
  cursor: zoom-in;
  transition: filter 160ms ease, transform 160ms ease;
}

.preview-thumb:hover {
  filter: brightness(0.96);
}

.preview-thumb:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}

.screen-feature img {
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  object-position: left top;
}

.screen-feature figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  background: #f7f3ec;
}

.screen-feature strong {
  font-size: 1.55rem;
  line-height: 1.15;
}

.screen-feature span {
  color: var(--muted);
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.screen-grid img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: left top;
}

.screen-grid figcaption,
.detail-strip figcaption {
  padding: 12px 14px;
  color: #38342f;
  font-weight: 800;
}

.detail-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.detail-strip img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: left top;
}

.section--relations {
  background: #25231f;
  color: #fbf8f1;
}

.section--relations .eyebrow {
  color: #b8dfc7;
}

.relations {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 12px;
  margin: 8px 0 24px;
}

.relation-node {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-align: center;
  font-weight: 800;
}

.relation-copy {
  max-width: 1040px;
  color: #e7e0d5;
  font-size: 1.1rem;
}

.section--tech {
  background: var(--surface-strong);
}

.download-hero {
  min-height: calc(72vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.34fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(44px, 8vw, 96px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(246, 244, 239, 0.94), rgba(246, 244, 239, 0.82)),
    url("grafika/old/01ekran.png") center / cover no-repeat;
}

.download-hero__content {
  max-width: 860px;
}

.download-hero__logo {
  display: grid;
  place-items: center;
}

.download-hero__logo img {
  width: min(230px, 48vw);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.download-section {
  background: var(--surface);
}

.download-info {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1fr);
  gap: 18px;
}

.download-card {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(35, 32, 27, 0.07);
}

.download-card h2 {
  margin-bottom: 18px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.download-card--form {
  background: linear-gradient(180deg, var(--green-soft), #ffffff 34%);
}

.download-form {
  display: grid;
  gap: 16px;
}

.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-field {
  display: grid;
  gap: 7px;
  color: #332f2a;
  font-weight: 800;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.form-field textarea {
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(47, 111, 82, 0.18);
}

.form-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: #38342f;
  font-weight: 700;
}

.form-check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--green);
}

.primary-action {
  min-height: 46px;
  justify-self: start;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #255c43;
  outline: none;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.form-status {
  margin: 0;
  padding: 11px 12px;
  border-radius: 6px;
  font-weight: 800;
}

.form-status--ok {
  border: 1px solid rgba(47, 111, 82, 0.24);
  background: var(--green-soft);
  color: #244f3c;
}

.form-status--error {
  border: 1px solid rgba(163, 63, 52, 0.24);
  background: var(--red-soft);
  color: #6c2d26;
}

.tech-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tech-list p {
  margin: 0;
  color: var(--muted);
}

.footer {
  padding: 24px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.preview-open {
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background: rgba(28, 26, 23, 0.88);
}

.preview-modal[hidden] {
  display: none;
}

.preview-modal__frame {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 96vw;
  max-height: 94vh;
}

.preview-modal__image {
  width: auto;
  max-width: 96vw;
  max-height: 82vh;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.preview-modal__caption {
  max-width: min(980px, 92vw);
  margin: 0;
  color: #fff9ef;
  text-align: center;
  font-weight: 700;
}

.preview-modal__close {
  justify-self: end;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  background: #ffffff;
  color: #1f1d1a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.preview-modal__close:hover,
.preview-modal__close:focus-visible {
  background: var(--surface-strong);
  outline: none;
}

@media (max-width: 1120px) {
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screen-grid,
  .detail-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .relations {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero__media img {
    max-height: 430px;
  }

  .purpose-grid,
  .tech-list,
  .download-info {
    grid-template-columns: 1fr;
  }

  .download-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .screen-feature {
    grid-template-columns: 1fr;
  }

  .screen-feature img {
    min-height: 280px;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 620px) {
  .nav a {
    padding: 7px 9px;
    font-size: 0.88rem;
  }

  .module-grid,
  .screen-grid,
  .detail-strip,
  .relations {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: auto;
  }
}
