/* NRM Consulting — landing page
   Brand tokens documented in brand.md.
   No external assets; system font stack only. */

:root {
  --bg: #0c0d0e;
  --fg: #ededec;
  --fg-dim: #c8c8c4;
  --accent: #b5e853;
  --muted: #7d8492;
  --line: #1f2126;

  --max: 880px;
  --pad: clamp(20px, 4vw, 56px);

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-width: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

body {
  /* Guard against horizontal overflow from full-width sections + the fixed dot-rail. */
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.mono { font-family: var(--font-mono); font-size: 0.82em; letter-spacing: 0.02em; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* Skip-to-content: first focusable element, hidden until it receives focus. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--bg);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  border-radius: 2px;
  transition: transform 140ms ease;
}
.skip-link:focus { transform: translateY(0); color: var(--bg); outline: none; }

/* Off-screen but exposed to assistive tech (keeps accessible names; never display:none). */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ----- Fixed UI ----- */
.brand-mark {
  position: fixed;
  top: var(--pad);
  left: var(--pad);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* #fff is intentional: with mix-blend-mode:difference the mark inverts against
     whatever scrolls beneath it, staying legible over any section. */
  mix-blend-mode: difference;
  color: #fff;
}
.brand-mark__dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}
.brand-mark__sub { color: var(--muted); margin-left: 4px; font-weight: 400; }

/* ----- Language toggle (fixed top-right) ----- */
.lang-toggle {
  position: fixed;
  top: var(--pad);
  right: var(--pad);
  z-index: 11;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.lang-toggle button {
  border: 0;
  background: none;
  padding: 4px 2px;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  transition: color 120ms ease;
}
.lang-toggle button:hover { color: var(--fg); }
.lang-toggle button.is-active { color: var(--accent); font-weight: 700; }
.lang-toggle__sep { color: var(--line); user-select: none; }

.dots {
  position: fixed;
  top: 50%;
  right: var(--pad);
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0; /* 24px hit boxes sit adjacent; the 8px dots land ~16px apart, ~matching the old rail */
}
/* 24×24 transparent hit target (WCAG 2.5.8); the visible 8px dot is the ::before.
   Circular button so the :focus-visible ring hugs the dot rather than boxing it. */
.dots button {
  width: 24px; height: 24px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dots button::before {
  content: "";
  width: 8px; height: 8px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.dots button:hover::before { border-color: var(--fg); }
.dots button.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.25);
}
/* Below ~980px the centered 880px column runs to the gutter and the rail overlaps
   body text; the 8px dots are also too small to tap. Hide it — scroll is the interaction. */
@media (max-width: 980px) { .dots { display: none; } }

/* ----- Section frame -----
   Funnel layout: the hero and contact are full-viewport anchors; the middle
   sections flow to their content height, separated by hairline dividers. */
#scroller { display: block; }

.section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--pad) * 2) var(--pad);
  position: relative;
}
.section--full {
  min-height: 100vh;
  min-height: 100svh; /* mobile URL-bar safe */
}
.section--divider { border-top: 1px solid var(--line); }

.section__inner {
  width: 100%;
  max-width: var(--max);
}

/* ----- Hero ----- */
.section--hero { padding-top: calc(var(--pad) * 3.5); }
.eyebrow {
  color: var(--muted);
  margin-bottom: clamp(28px, 6vh, 56px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}
.hero__title {
  font-size: clamp(44px, 9vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 clamp(24px, 4vh, 40px);
}
.hero__sub {
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.4;
  max-width: 600px;
  color: var(--fg-dim);
  margin: 0 0 clamp(24px, 3.5vh, 36px);
}
/* Above-the-fold CTA. Deliberately NOT accent-coloured text: the hero's one accent
   moment is "Konkrety." in the title, so the CTA earns attention with the phosphor
   underline instead and only shifts to accent on hover/focus. */
.hero__cta {
  display: block;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.4vw, 17px);
  letter-spacing: 0.02em;
  color: var(--fg);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  margin: 0 0 clamp(40px, 9vh, 80px);
  transition: color 160ms ease;
}
.hero__cta:hover, .hero__cta:focus-visible { color: var(--accent); }
.scroll-hint { color: var(--muted); display: inline-block; }
.scroll-hint .mono { display: inline-block; animation: drift 2.2s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(6px); } }

/* ----- Headings, copy ----- */
.h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 clamp(16px, 2.5vh, 24px);
}
.h2 .mono { font-size: 0.4em; vertical-align: middle; margin-right: 14px; }
.lede {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  margin: 0 0 clamp(28px, 5vh, 44px);
  max-width: 56ch;
}

/* ----- Services grid ----- */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}
.grid--services {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}
.card {
  border: 1px solid var(--line);
  padding: clamp(20px, 2.5vw, 28px);
  background: linear-gradient(180deg, rgba(255,255,255,0.012), transparent);
  transition: border-color 160ms ease, transform 160ms ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__title { font-size: 18px; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.01em; }
.card__body { font-size: 15px; color: var(--fg-dim); margin: 0 0 16px; }
.card__tag { display: block; }

/* ----- Stats row (under the services grid) ----- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin-top: clamp(40px, 6vh, 56px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.stat__num {
  font-size: clamp(36px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat__label { margin-top: 8px; font-size: 13px; }

/* ----- Principles ----- */
.principles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
}
.principles li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(17px, 1.6vw, 20px);
}
.principles li:last-child { border-bottom: 0; }
.principles strong { font-weight: 700; }

/* ----- Steps (funnel) ----- */
.steps { list-style: none; padding: 0; margin: 0; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: clamp(16px, 2vw, 24px);
  align-items: baseline;
  padding: clamp(20px, 3vh, 28px) 0;
  border-top: 1px solid var(--line);
}
.step__num { font-size: 14px; }
.step__title { font-size: clamp(18px, 2vw, 21px); font-weight: 700; margin-bottom: 8px; }
.step__body { font-size: 16px; line-height: 1.55; }

/* ----- Facts / realizacje ----- */
.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.facts li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; font-size: 15px; }
.facts li .mono { align-self: center; }
.facts--cases { gap: clamp(16px, 2.5vh, 22px); }
.facts--cases li { grid-template-columns: 150px 1fr; gap: 24px; font-size: 16px; align-items: baseline; }
.facts--cases li .mono { align-self: baseline; }

/* ----- FAQ ----- */
.faq__item { padding: clamp(20px, 3vh, 28px) 0; border-top: 1px solid var(--line); }
.faq__q { font-size: clamp(17px, 1.6vw, 18px); font-weight: 600; margin: 0 0 8px; }
.faq__a { font-size: 16px; line-height: 1.55; margin: 0; }

/* ----- Contact ----- */
.contact { text-align: left; }
.contact__lede {
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--fg-dim);
  margin: 0 0 clamp(24px, 4vh, 40px);
  max-width: 50ch;
}
.contact__email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 6px;
  /* Primary CTA — the one action on the page. Accent underline by default draws the
     eye; the global a:hover shifts the text to accent on hover/focus. */
  border-bottom: 2px solid var(--accent);
  transition: color 160ms ease;
  margin-bottom: clamp(32px, 6vh, 56px);
  word-break: break-all;
}
.contact__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 32px;
  margin: 0 0 clamp(40px, 8vh, 80px);
  padding: 0;
}
.contact__meta > div { display: grid; gap: 4px; }
.contact__meta dt { margin: 0; text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; }
.contact__meta dd { margin: 0; font-size: 16px; }
.contact__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  margin: 0 0 clamp(28px, 6vh, 56px);
}
.contact__links a { color: var(--fg-dim); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.contact__links a:hover, .contact__links a:focus-visible { color: var(--accent); border-color: var(--accent); }

.contact__totop {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  appearance: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 160ms ease;
}
.contact__totop:hover, .contact__totop:focus-visible { color: var(--accent); }

/* ----- Narrow screens ----- */
@media (max-width: 480px) {
  .facts--cases li { grid-template-columns: 1fr; gap: 4px; }
}

/* ----- No-JS fallback ----- */
.noscript-fallback {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--pad) * 4) var(--pad) var(--pad);
}
.noscript-fallback .mono { color: var(--muted); display: block; letter-spacing: 0.12em; text-transform: uppercase; }
.noscript-fallback h1 {
  font-size: clamp(32px, 6vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 14px 0 20px;
}
.noscript-fallback p { color: var(--fg-dim); max-width: 60ch; margin: 0 0 14px; }
.noscript-fallback a { color: var(--accent); border-bottom: 1px solid var(--accent); }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint .mono { animation: none; }
  .card { transition: none; }
}
