/* Halty OS — web. Barvy a písmo podle specifikace loga (Identita / Specifikace loga Halty OS). */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 112%;
  font-display: swap;
}

:root {
  --navy: #0b1020;
  --navy-raised: #141d36;
  --navy-deep: #080c18;
  --line-dark: #26314f;
  --line-dark-strong: #3a4766;
  --blue: #2563eb;
  --blue-text: #4d85ff;
  --blue-text-hover: #7fa6ff;
  --white: #ffffff;
  --mist: #f3f5f9;
  --text-light: #c3ccda;
  --steel: #94a3b8;
  --text-body: #3a4458;
  --core-sub: #dce6fd;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 9vw, 128px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue-text);
}

a:hover {
  color: var(--blue-text-hover);
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  border-radius: 2px;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1,
h2 {
  margin: 0;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(32px, 3.6vw, 52px);
}

p {
  margin: 0;
}

/* Tlačítka */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 2px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: #1d4ed8;
  color: var(--white);
}

.btn-outline {
  border: 1px solid var(--line-dark-strong);
  color: var(--white);
}

.btn-outline:hover {
  border-color: var(--steel);
  color: var(--white);
}

.btn-small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 16px;
}

/* Hlavička a úvod */

.top {
  background: var(--navy);
  color: var(--white);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  padding: 26px 0;
}

.nav-logo img {
  height: 28px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 16px;
}

.nav-links a:not(.btn) {
  color: var(--text-light);
  text-decoration: none;
}

.nav-links a:not(.btn):hover {
  color: var(--white);
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
  padding: clamp(48px, 8vw, 112px) 0 clamp(64px, 9vw, 128px);
}

.hero-text {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero h1 {
  font-size: clamp(40px, 4.1vw, 62px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 34ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--text-light);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Mřížka „jádro“ — stejné proporce jako symbol: modul 9, spára 1,5 */

.core {
  flex: 1 1 400px;
  max-width: 520px;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.core-grid {
  display: grid;
  grid-template-columns: 9fr 1.5fr 9fr 1.5fr 9fr;
  grid-template-rows: 9fr 1.5fr 9fr 1.5fr 9fr;
  aspect-ratio: 1 / 1;
  width: 100%;
}

.piece {
  background: var(--navy-raised);
  display: grid;
}

.piece-top {
  grid-column: 1 / 4;
  grid-row: 1 / 2;
  grid-template-columns: 9fr 1.5fr 9fr;
}

.piece-left {
  grid-column: 1 / 2;
  grid-row: 2 / 6;
  grid-template-rows: 1.5fr 9fr 1.5fr 9fr;
}

.piece-right {
  grid-column: 5 / 6;
  grid-row: 3 / 5;
  grid-template-rows: 9fr 1.5fr;
}

.piece-bottom {
  grid-column: 3 / 6;
  grid-row: 5 / 6;
  grid-template-columns: 9fr 1.5fr 9fr;
}

.piece-left .cell:first-child {
  grid-row: 2;
}

.piece-left .cell:last-child {
  grid-row: 4;
}

.seam-v {
  width: 1px;
  justify-self: center;
  background: var(--line-dark);
}

.seam-h {
  grid-row: 3;
  height: 1px;
  align-self: center;
  margin: 0 clamp(12px, 1.6vw, 20px);
  background: var(--line-dark);
}

.cell,
.core-cell {
  padding: clamp(12px, 1.6vw, 20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.cell strong {
  font-size: clamp(14px, 1.3vw, 17px);
  font-weight: 600;
  line-height: 1.2;
}

.cell span {
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.3;
  color: var(--steel);
}

.core-cell {
  grid-column: 3 / 4;
  grid-row: 3 / 4;
  background: var(--blue);
}

.core-cell .label {
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 600;
  line-height: 1.2;
}

.core-cell .num {
  display: block;
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(15px, 2vw, 26px);
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.core-cell .sub {
  display: block;
  margin-top: 4px;
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.3;
  color: var(--core-sub);
}

.core figcaption {
  max-width: 42ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--steel);
}

/* Jediný orchestrovaný moment: mřížka se při načtení poskládá, jádro se rozsvítí. */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes light {
  from {
    background: var(--navy-raised);
  }
  to {
    background: var(--blue);
  }
}

.piece,
.core-cell {
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.piece-left {
  animation-delay: 0.12s;
}

.piece-right {
  animation-delay: 0.24s;
}

.piece-bottom {
  animation-delay: 0.36s;
}

.core-cell {
  animation:
    rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s both,
    light 0.6s ease-out 0.9s both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .piece,
  .core-cell {
    animation: none;
  }
}

/* Postup */

.steps {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.section-head p {
  max-width: 46ch;
  color: var(--text-body);
}

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px 5px;
}

.step-list li {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-list li::before {
  content: "";
  height: 8px;
  background: var(--navy);
}

.step-list li.is-core::before {
  background: var(--blue);
}

.step-list strong {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.step-list span {
  padding-right: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
}

/* Pro koho */

.audience {
  background: var(--mist);
}

.audience .wrap {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(32px, 6vw, 96px);
}

.audience h2 {
  flex: 1 1 380px;
  max-width: 13ch;
}

.audience-text {
  flex: 1 1 400px;
  max-width: 46ch;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--text-body);
}

/* Kontakt */

.contact {
  background: var(--navy);
  color: var(--white);
}

.contact .wrap {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.contact-text {
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-text p {
  max-width: 50ch;
  color: var(--text-light);
}

/* Patička */

.footer {
  background: var(--navy-deep);
  color: var(--steel);
  font-size: 15px;
}

.footer .wrap {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer img {
  height: 24px;
  width: auto;
}

.footer a {
  color: var(--text-light);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

/* Telefon */

@media (max-width: 640px) {
  .nav-links a:not(.btn) {
    display: none;
  }

  .nav-logo img {
    height: 22px;
  }

  .btn-small {
    padding: 0 12px;
    font-size: 15px;
  }

  .footer-legal {
    text-align: left;
  }
}

/* Chybová stránka */

.notfound {
  min-height: 100vh;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
}

.notfound > .wrap {
  width: 100%;
}

.notfound main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding-bottom: 96px;
}

.notfound h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.notfound p {
  max-width: 40ch;
  color: var(--text-light);
}
