/* PROFECTUM — profectum.pl */

:root {
  --bg: #0c0f14;
  --bg-raise: #12161d;
  --line: #232a35;
  --text: #e8e6df;
  --text-dim: #98a0ac;
  --accent: #f5a623;
  --accent-dim: rgba(245, 166, 35, 0.12);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Archivo", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
}

/* soften the grid with a radial fade */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, transparent 0%, var(--bg) 75%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.logo { display: block; }
.logo img { height: 40px; width: auto; display: block; }

.lang {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.lang a, .lang span { color: var(--text-dim); padding: 4px 8px; }
.lang span { color: var(--accent); border: 1px solid var(--line); border-radius: 2px; }
.lang a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */

.hero { padding: 110px 0 90px; }

.kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}
.kicker::before { content: "// "; color: var(--text-dim); }

h1 {
  font-weight: 800;
  font-size: clamp(38px, 6.5vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 15ch;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  margin-top: 32px;
  max-width: 58ch;
  font-size: 19px;
  color: var(--text-dim);
}

.hero-tags {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-tags li {
  list-style: none;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--bg-raise);
  padding: 7px 14px;
  border-radius: 2px;
}

/* staggered load-in */
.hero > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }

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

@media (prefers-reduced-motion: reduce) {
  .hero > * { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */

section { padding: 72px 0; border-top: 1px solid var(--line); }

h2 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 48px;
}
h2::before { content: "["; color: var(--accent); margin-right: 6px; }
h2::after { content: "]"; color: var(--accent); margin-left: 6px; }

/* ---------- services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service {
  background: var(--bg);
  padding: 36px 32px;
  position: relative;
  transition: background 0.25s ease;
}
.service:hover { background: var(--bg-raise); }

.service .idx {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}

.service h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.service p {
  font-size: 15.5px;
  color: var(--text-dim);
}

.service ul {
  margin-top: 16px;
  list-style: none;
}
.service li {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
  margin-top: 7px;
}
.service li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- resilience intro + note ---------- */

.section-intro {
  max-width: 62ch;
  color: var(--text-dim);
  margin: -24px 0 44px;
}
.section-intro strong { color: var(--text); font-weight: 700; }

.note-strip {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--bg-raise);
  padding: 22px 26px;
  font-size: 15px;
  color: var(--text-dim);
}
.note-strip strong { color: var(--text); }

/* ---------- process steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.steps li {
  counter-increment: step;
  background: var(--bg);
  padding: 26px 22px;
  transition: background 0.25s ease;
}
.steps li:hover { background: var(--bg-raise); }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}

.steps h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.steps p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ---------- contact ---------- */

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

.contact .email {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: clamp(18px, 3.4vw, 28px);
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}
.contact .email:hover { color: var(--accent); text-decoration: none; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
footer .addr { line-height: 1.9; }

@media (max-width: 640px) {
  .hero { padding: 72px 0 64px; }
  section { padding: 56px 0; }
}
