/* ============================================================
   SAFENETICS — kuznia/0.7.0 (wariant: tarcza)
   System wizualny: Mist + Hydra Teal
   ------------------------------------------------------------
   Czytasz CSS? Dobrze. Dioda przy statusie nadaje Morse'em.
   Krótko nadaje. Bo i nazwa węzła krótka.
   ============================================================ */

:root {
  --mist: #F4F7FA;
  --cloud: #FFFFFF;
  --ink: #0E1620;
  --slate: #5B6B7C;
  --teal: #01696F;
  --teal-deep: #0C4E54;
  --teal-glow: rgba(1, 105, 111, 0.16);
  --border: #D3DDE7;

  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem;
  --space-16: 4rem; --space-24: 6rem;

  --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-full: 9999px;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --vault-key: dwa znaki. inicjały tarczy. dioda je nadaje. */
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--mist);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
p { text-wrap: pretty; max-width: 60ch; }
h1 { text-wrap: balance; line-height: 1.05; }

::selection { background: rgba(1,105,111,0.22); color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: var(--radius-md); }

/* --- tło: siatka blueprint --- */
.topo-bg {
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(1,105,111,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1,105,111,0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 30%, black 25%, transparent 78%);
}

/* --- layout --- */
.shell {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  max-width: 880px;
  margin-inline: auto;
  padding: var(--space-8) var(--space-6);
}

.brand { color: var(--teal); }
.logo { width: clamp(180px, 24vw, 230px); height: auto; }
.logo-word {
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  fill: var(--ink);
}
.logo-check { color: var(--teal); }

.hero {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  gap: var(--space-6);
  padding-block: var(--space-16) var(--space-12);
}

.status-line {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: var(--teal);
}
.mono { font-family: var(--font-mono); }

.led {
  width: 9px; height: 9px; border-radius: var(--radius-full);
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal-glow), 0 0 18px var(--teal-glow);
  transition: opacity 60ms linear;
}
.led.off { opacity: 0.15; box-shadow: none; }

.cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

h1 {
  font-family: var(--font-body);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lede { color: var(--slate); }

/* niewidzialny — dopóki ktoś nie zaznaczy akapitu */
.ghost {
  display: block;
  margin-top: var(--space-2);
  color: transparent;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  user-select: text;
}
.ghost::selection { background: var(--teal); color: var(--cloud); }

/* --- karta postępu --- */
.forge-card {
  background: var(--cloud);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(14,22,32,0.07);
  padding: var(--space-6);
  max-width: 560px;
  display: flex; flex-direction: column; gap: var(--space-4);
}

.forge-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--text-xs);
  color: var(--slate);
  letter-spacing: 0.06em;
}
.forge-head span:last-child { color: var(--teal); font-weight: 500; }

.bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--mist);
  border: 1px solid var(--border);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.forge-list {
  list-style: none;
  display: flex; flex-direction: column; gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--slate);
}
.forge-list .ok { color: var(--teal); }
.forge-list .run { color: var(--slate); animation: spinfade 1.4s linear infinite; display: inline-block; }
@keyframes spinfade { 50% { opacity: 0.35; } }

/* --- kontakt --- */
.contact { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }

.btn {
  display: inline-flex; align-items: center;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6);
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition);
}
.btn-primary { background: var(--teal); color: var(--cloud); }
.btn-primary:hover { background: var(--teal-deep); box-shadow: 0 6px 20px var(--teal-glow); }
.btn-ghost { color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* --- stopka --- */
.foot { padding-block: var(--space-6); border-top: 1px solid var(--border); }
.foot p { font-size: var(--text-xs); color: var(--slate); max-width: none; }
.foot-hex { opacity: 0.55; margin-left: var(--space-2); cursor: help; }
.foot-hex:hover { color: var(--teal); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 480px) {
  .shell { padding-inline: var(--space-4); }
}
