:root {
  --navy: #0d1b2a;
  --navy-mid: #1a2e45;
  --navy-light: #243d57;
  --orange: #f47c20;
  --orange-light: #f9a55a;
  --orange-dim: rgba(244,124,32,0.12);
  --white: #f8f5f0;
  --white-dim: rgba(248,245,240,0.08);
  --white-mid: rgba(248,245,240,0.55);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Sora', sans-serif;
  --serif: 'Lora', serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Grid noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(244,124,32,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,124,32,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 64px;
  background: rgba(13,27,42,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(244,124,32,0.2);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--orange);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--navy); font-weight: 700;
}

.nav-right { display: flex; align-items: center; gap: 1.25rem; }

.home-link {
  font-size: 13px;
  color: var(--white-mid);
  text-decoration: none;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.home-link:hover { color: var(--orange); }
.home-link svg { width: 14px; height: 14px; }

.lang-switcher {
  display: flex;
  background: var(--white-dim);
  border: 1px solid rgba(244,124,32,0.25);
  border-radius: 6px;
  overflow: hidden;
}
.lang-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  border: none;
  background: transparent;
  color: var(--white-mid);
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn.active {
  background: var(--orange);
  color: var(--navy);
}
.lang-btn:not(.active):hover { color: var(--white); }

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem) clamp(3rem, 8vw, 6rem);
  max-width: 1200px;
  margin: 0 auto;
}

.hero-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 10px;
}
.hero-label::before {
  content: '';
  display: inline-block;
  width: 32px; height: 2px;
  background: var(--orange);
}

.hero h1 {
  font-family: var(--sans);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero h1 .accent { color: var(--orange); }

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--white-mid);
  max-width: 640px;
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 3rem;
}

.hero-tags {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid rgba(244,124,32,0.35);
  color: var(--orange-light);
  background: var(--orange-dim);
}

/* divider */
.divider {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  position: relative; z-index: 1;
}
.divider hr {
  border: none;
  border-top: 1px solid rgba(244,124,32,0.15);
}

/* ── SECTIONS ── */
section {
  position: relative; z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 20px; height: 2px;
  background: var(--orange);
}

section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 2.5rem;
}
section h2 .accent { color: var(--orange); }

/* ── TECH GRID ── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5px;
  background: rgba(244,124,32,0.12);
  border: 1.5px solid rgba(244,124,32,0.12);
  border-radius: 12px;
  overflow: hidden;
}

.tech-card {
  background: var(--navy-mid);
  padding: 2rem 1.75rem;
  transition: background 0.25s;
}
.tech-card:hover { background: var(--navy-light); }

.tech-card-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1rem;
}
.tech-icon {
  width: 42px; height: 42px;
  border-radius: 8px;
  background: var(--orange-dim);
  border: 1px solid rgba(244,124,32,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.tech-card h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tech-card .tech-version {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--orange);
  margin-top: 2px;
}
.tech-card p {
  font-size: 14px;
  color: var(--white-mid);
  line-height: 1.7;
}

/* ── FLOW ── */
.flow-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(244,124,32,0.15);
  border-radius: 12px;
  overflow: hidden;
}
.flow-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0;
  border-bottom: 1px solid rgba(244,124,32,0.1);
  transition: background 0.2s;
}
.flow-item:last-child { border-bottom: none; }
.flow-item:hover { background: var(--white-dim); }

.flow-num {
  background: var(--orange-dim);
  border-right: 1px solid rgba(244,124,32,0.15);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  padding: 1.5rem 0;
}
.flow-body {
  padding: 1.5rem 1.75rem;
}
.flow-body strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--white);
}
.flow-body span {
  font-size: 14px;
  color: var(--white-mid);
}

/* ── SOLUTIONS ── */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}
.solution-card {
  background: var(--navy-mid);
  border: 1px solid rgba(244,124,32,0.15);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s;
}
.solution-card:hover {
  border-color: rgba(244,124,32,0.45);
  transform: translateY(-2px);
}
.solution-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 10px;
}
.solution-card h3 .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.solution-card p {
  font-size: 14px;
  color: var(--white-mid);
  line-height: 1.7;
}
.solution-card .code-snippet {
  margin-top: 1rem;
  background: rgba(13,27,42,0.7);
  border: 1px solid rgba(244,124,32,0.15);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--orange-light);
  line-height: 1.6;
}

/* ── ARCHITECTURE ── */
.arch-diagram {
  background: var(--navy-mid);
  border: 1px solid rgba(244,124,32,0.2);
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}
.arch-layer {
  width: 100%;
  max-width: 700px;
  background: var(--orange-dim);
  border: 1px solid rgba(244,124,32,0.3);
  border-radius: 8px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.arch-layer-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--orange);
  text-transform: uppercase;
  flex-shrink: 0;
}
.arch-layer-items {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.arch-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(248,245,240,0.07);
  color: var(--white);
  border: 1px solid rgba(248,245,240,0.12);
}
.arch-arrow {
  font-family: var(--mono);
  font-size: 18px;
  color: rgba(244,124,32,0.45);
  margin: 6px 0;
  line-height: 1;
}

/* ── STATUS FOOTER ── */
.page-footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(244,124,32,0.15);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--white-mid);
}
.footer-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: #4ade80;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── LANG TOGGLE ── */
[data-en] { display: none; }
body.en [data-pl] { display: none; }
body.en [data-en] { display: revert; }

@media (max-width: 640px) {
  .arch-diagram { padding: 1.25rem; }
  .flow-item { grid-template-columns: 44px 1fr; }
  .page-footer { flex-direction: column; align-items: flex-start; }
  .hero h1 { letter-spacing: -0.03em; }
}
