/* ==========================================================================
   technolutions.pl — Base styles, reset, typography, layout primitives
   ========================================================================== */

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

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

body {
  font-family: var(--font-text);
  font-size: var(--fs-body-m);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--bg-page);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

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

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--c-brand-500);
  outline-offset: 2px;
}

/* ---------- Headings / typography ---------- */
h1,
.h1 {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  font-weight: var(--fw-black);
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

h2,
.h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

h3,
.h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  font-weight: var(--fw-bold);
  color: var(--text-strong);
}

h4,
.h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  font-weight: var(--fw-semibold);
  color: var(--text-strong);
}

p {
  font-size: var(--fs-body-m);
  line-height: var(--lh-relaxed);
}

.body-l {
  font-size: var(--fs-body-l);
  line-height: var(--lh-relaxed);
}
.body-m {
  font-size: var(--fs-body-m);
}
.body-s {
  font-size: var(--fs-body-s);
}

.overline {
  font-size: var(--fs-overline);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-brand-500);
}

.text-strong {
  color: var(--text-strong);
}
.text-muted {
  color: var(--text-muted);
}
.text-brand {
  color: var(--c-brand-500);
}
.text-purple {
  color: var(--c-purple-600);
}
.text-white {
  color: var(--c-white);
}

/* ---------- Layout primitives ---------- */
.section {
  padding-block: var(--sp-section-pad);
}

.section--tight {
  padding-block: var(--sp-section-pad);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--c-white-80);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--c-white);
}

.section--muted {
  background: var(--bg-muted);
}

.section--brand {
  background: var(--c-brand-500);
  color: var(--c-white);
}
.section--brand h1,
.section--brand h2,
.section--brand h3,
.section--brand h4 {
  color: var(--c-white);
}

.container {
  width: 100%;
  max-width: calc(var(--layout-container) + 2 * var(--sp-section-pad));
  margin-inline: auto;
  padding-inline: var(--sp-section-pad);
}

@media (max-width: 1024px) {
  .section {
    width: 100vw;
    max-width: 100vw;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: var(--sp-container-pad);
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-div-gap);
}

.text-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--sp-textwrap-gap);
  max-width: var(--sp-textwrap-max);
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-columns-gap);
  align-items: center;
}

.action {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-action-gap);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-div-gap);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-div-gap);
}

@media (max-width: 1024px) {
  .columns,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--sp-div-gap);
  }
}

/* ---------- Helpers ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

.mt-8 { margin-top: var(--sp-8); }
.mt-16 { margin-top: var(--sp-16); }
.mt-24 { margin-top: var(--sp-24); }
.mt-32 { margin-top: var(--sp-32); }
.mt-40 { margin-top: var(--sp-40); }

.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms ease, transform 600ms ease;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Auto-reveal on page load (no IntersectionObserver needed) */
.reveal-auto {
  opacity: 0;
  transform: translateY(24px);
  animation: revealIn 600ms ease 0.8s forwards;
}
@keyframes revealIn {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}
