/* ----------------------------------------------------------------
   aioperatingsystem.pl - system wizualny w DNA lukxban.com
   Ink + paper + zloty akcent, Inter Tight light z ujemnym trackingiem,
   metaliczny gradient na duzych naglowkach, Space Grotesk w etykietach.
----------------------------------------------------------------- */
:root {
  --ink: #0f0f0f;
  --ink-soft: #161618;
  --paper: #f4f5f6;
  --gold: #d4af6a;
  --line: rgb(244 245 246 / 12%);
  --line-strong: rgb(244 245 246 / 18%);
  --muted: rgb(244 245 246 / 62%);
  --dim: rgb(244 245 246 / 42%);
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;
  --label: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --wrap: 1180px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  background: var(--ink);
  background-image: radial-gradient(circle at 1px 1px, rgb(255 255 255 / 3.5%) 1px, transparent 0);
  background-size: 28px 28px;
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgb(212 175 106 / 28%); color: #fff; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

.wrap { width: min(100%, var(--wrap)); margin-inline: auto; padding-inline: 1.5rem; }

/* METAL */
.metallic {
  background: linear-gradient(180deg, #ffffff 0%, #d6d9dd 42%, #f6f7f8 58%, #aeb2b8 84%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgb(255 255 255 / 6%), 0 2px 18px rgb(255 255 255 / 5%), 0 16px 34px rgb(0 0 0 / 80%);
}

/* LABELS */
.eyebrow, .index, .micro {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
}
.eyebrow, .index { color: var(--gold); }
.micro { color: var(--dim); }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(15 15 15 / 82%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1.5rem; }
.wordmark { font-family: var(--display); font-size: 1.15rem; font-weight: 400; letter-spacing: -0.03em; white-space: nowrap; }
.wordmark span { color: var(--gold); }
.site-nav { display: flex; gap: 1.6rem; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { font-family: var(--label); font-size: 0.82rem; color: var(--muted); white-space: nowrap; transition: color 160ms ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--paper); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.8rem 1.25rem;
  border: 1px solid var(--gold); border-radius: 8px;
  background: var(--gold); color: var(--ink);
  font-family: var(--label); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
}
.btn:hover { background: transparent; color: var(--gold); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* HERO */
.hero {
  position: relative;
  min-height: calc(100svh - 4rem);
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: clamp(5rem, 10vw, 9rem); padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  overflow: clip;
}
.hero::before {
  content: ""; position: absolute; width: 48rem; height: 48rem; top: -22rem; right: -16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(212 175 106 / 16%), transparent 66%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  align-items: end; gap: clamp(3rem, 7vw, 7rem);
}
.hero .eyebrow { margin-bottom: 1.6rem; }
.title {
  font-family: var(--display);
  font-size: clamp(5.5rem, 17vw, 12rem);
  font-weight: 300; letter-spacing: -0.075em; line-height: 0.8;
  margin-left: -0.06em; padding-bottom: 0.08em;
}
.headline {
  max-width: 46rem; margin-top: 2.4rem;
  color: rgb(244 245 246 / 76%);
  font-family: var(--display); font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 300; line-height: 1.18; letter-spacing: -0.025em;
}
.brief { border-top: 2px solid var(--gold); padding-top: 1.5rem; }
.brief p { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.brief .btn { margin-top: 2rem; }

/* STAT BAR */
.statbar {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(4rem, 9vw, 8rem);
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.statbar div { min-height: 6.5rem; display: flex; flex-direction: column; justify-content: center; padding: 1.25rem 1.5rem; border-right: 1px solid var(--line-strong); }
.statbar div:last-child { border-right: 0; }
.statbar strong { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400; letter-spacing: -0.02em; }
.statbar span { margin-top: 0.25rem; color: var(--dim); font-size: 0.86rem; }

/* SECTIONS */
.section { padding-block: clamp(5rem, 10vw, 9rem); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 3rem; align-items: start; margin-bottom: 4rem; }
.section-head .index { padding-top: 0.6rem; }
.section-head h2 {
  max-width: 48rem;
  font-family: var(--display); font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 300; line-height: 1; letter-spacing: -0.045em;
}
.section-head h2 em { font-style: normal; color: var(--gold); }
.section-head p { margin-top: 1.4rem; max-width: 40rem; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.section-head p a, .note a, .faq a, .tile p a { color: var(--gold); border-bottom: 1px solid rgb(212 175 106 / 40%); }

/* TILES */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.tiles.two { grid-template-columns: repeat(2, 1fr); }
.tile { position: relative; min-height: 16rem; padding: 1.75rem; background: rgb(244 245 246 / 2%); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); display: flex; flex-direction: column; }
.tiles .tile:nth-child(3n) { border-right: 0; }
.tiles.two .tile:nth-child(3n) { border-right: 1px solid var(--line-strong); }
.tiles.two .tile:nth-child(2n) { border-right: 0; }
.tile-last-row { border-bottom: 0 !important; }
.tile > span { color: var(--gold); font-family: var(--label); font-size: 0.8rem; }
.tile h3 { margin-top: auto; padding-top: 4rem; font-family: var(--display); font-size: 1.55rem; font-weight: 400; letter-spacing: -0.025em; line-height: 1.15; }
.tile p { margin-top: 0.85rem; color: rgb(244 245 246 / 58%); line-height: 1.6; font-size: 0.97rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.tags span { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); border: 1px solid var(--line-strong); border-radius: 100px; padding: 0.2rem 0.65rem; }

/* LAYERS */
.layers { border-top: 1px solid var(--line-strong); }
.layer { display: grid; grid-template-columns: 6rem minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 2rem; align-items: baseline; padding: 2rem 0; border-bottom: 1px solid var(--line-strong); transition: background 200ms ease; }
.layer:hover { background: rgb(244 245 246 / 2%); }
.layer .num { font-family: var(--label); font-size: 0.8rem; color: var(--gold); letter-spacing: 0.1em; padding-left: 0.25rem; }
.layer h3 { text-shadow: none; font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1.05; }
.layer p { color: var(--muted); line-height: 1.65; }
.note { margin-top: 2rem; color: var(--dim); font-size: 0.92rem; max-width: 46rem; }

/* QUOTE */
.quote {
  padding: clamp(2rem, 5vw, 4rem);
  border-left: 4px solid var(--gold);
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-size: clamp(1.75rem, 4vw, 3.2rem);
  font-weight: 400; line-height: 1.1; letter-spacing: -0.035em;
  border-radius: 0 8px 8px 0;
}
.quote cite { display: block; margin-top: 1.5rem; font-family: var(--label); font-style: normal; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgb(15 15 15 / 55%); }

/* TERMINAL */
.terminal { border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--ink-soft); }
.terminal-bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgb(244 245 246 / 14%); }
.terminal-bar b { margin-left: 0.5rem; font-family: var(--mono); font-size: 0.75rem; font-weight: 400; color: var(--dim); }
.terminal-body { padding: 1.5rem; font-family: var(--mono); font-size: 0.82rem; line-height: 2; color: var(--muted); overflow-x: auto; }
.terminal-body .p { color: var(--gold); }
.terminal-body .c { color: var(--paper); }
.terminal-body .d { color: var(--dim); }
.terminal-body .g { color: var(--gold); }

/* FAQ */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.6rem 0; font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 400; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--label); color: var(--gold); font-size: 1.3rem; transition: transform 200ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.6rem; max-width: 46rem; color: var(--muted); line-height: 1.7; }

/* FINAL */
.final { padding-block: clamp(6rem, 12vw, 10rem); text-align: left; }
.final h2 { font-family: var(--display); font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 300; letter-spacing: -0.06em; line-height: 0.95; }
.final p { margin-top: 1.6rem; max-width: 38rem; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.final small { display: block; margin-top: 1.5rem; color: var(--dim); font-size: 0.85rem; }
.final small a { color: var(--gold); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); padding: 4rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-grid p { margin-top: 1rem; color: var(--dim); font-size: 0.86rem; line-height: 1.6; max-width: 18rem; }
.footer-grid h4 { font-family: var(--label); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-grid li a { font-size: 0.86rem; color: var(--muted); transition: color 160ms ease; }
.footer-grid li a:hover { color: var(--paper); }
.footer-grid li a.mono { font-family: var(--mono); font-size: 0.8rem; }
.footer-bottom { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--dim); font-size: 0.78rem; }
.footer-bottom a { color: var(--dim); }
.footer-bottom a:hover { color: var(--muted); }

/* KNOWLEDGE BASE (artykuly) */
.kb { padding-block: clamp(4.5rem, 9vw, 7rem) clamp(4rem, 8vw, 6rem); }
.kb-inner { max-width: 46rem; margin-inline: auto; }
.crumbs { font-family: var(--label); font-size: 0.78rem; color: var(--dim); margin-bottom: 2.5rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.kb-title { text-shadow: 0 1px 0 rgb(255 255 255 / 6%) !important; margin-top: 1.25rem; font-family: var(--display); font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 300; letter-spacing: -0.05em; line-height: 1.02; padding-bottom: 0.08em; }
.kb-lead { margin-top: 1.5rem; color: rgb(244 245 246 / 78%); font-size: 1.1rem; line-height: 1.7; }
article { margin-top: 3rem; }
article h2 { margin: 3.25rem 0 1rem; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.15; color: var(--paper); }
article h2:first-child { margin-top: 0; }
article p { color: rgb(244 245 246 / 76%); font-size: 1.02rem; line-height: 1.75; margin-bottom: 1.1rem; }
article strong { color: var(--paper); font-weight: 600; }
article ul, article ol { margin: 0 0 1.25rem 1.2rem; }
article li { color: rgb(244 245 246 / 76%); line-height: 1.7; margin-bottom: 0.6rem; padding-left: 0.3rem; }
article li::marker { color: rgb(212 175 106 / 70%); }
article a { color: var(--gold); border-bottom: 1px solid rgb(212 175 106 / 40%); transition: border-color 160ms ease; }
article a:hover { border-color: var(--gold); }
article code { font-family: var(--mono); font-size: 0.88em; color: var(--gold); background: rgb(255 255 255 / 4%); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.4em; }
.def { margin: 0 0 1.5rem; padding: 1.25rem 1.5rem; border-left: 2px solid var(--gold); background: rgb(244 245 246 / 3%); border-radius: 0 8px 8px 0; color: var(--paper) !important; font-size: 1.1rem !important; }
.kb-faq { margin-top: 0.5rem; border-top: 1px solid var(--line-strong); }
.kb-faq .q { margin: 0; padding-top: 1.4rem; font-family: var(--display); font-size: 1.15rem; color: var(--paper); font-weight: 400; letter-spacing: -0.015em; }
.kb-faq .a { margin: 0.4rem 0 0; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line-strong); }
.kb-related { margin-top: 4rem; padding: 1.75rem; border: 1px solid var(--line-strong); border-radius: 8px; background: rgb(244 245 246 / 2%); }
.kb-related .label { font-family: var(--label); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; }
.kb-related ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.kb-related a { color: var(--paper); }
.kb-related a::before { content: "\2192\00a0\00a0"; color: var(--gold); }
.kb-related a:hover { color: var(--gold); }

/* HUB (baza wiedzy) */
.hub-grid { margin-top: 3.5rem; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.hub-cell { display: flex; flex-direction: column; min-height: 12rem; padding: 1.75rem; background: rgb(244 245 246 / 2%); border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); transition: background 200ms ease; }
.hub-cell:nth-child(2n) { border-right: 0; }
.hub-cell:hover { background: rgb(244 245 246 / 5%); }
.hub-cell h3 { margin-top: auto; font-family: var(--display); font-size: 1.45rem; font-weight: 400; letter-spacing: -0.025em; }
.hub-cell p { margin-top: 0.6rem; color: rgb(244 245 246 / 58%); font-size: 0.95rem; line-height: 1.6; }
.hub-cell .micro { color: var(--gold); }

/* REVEAL */
.r { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.r.v { opacity: 1; transform: none; }
.no-js .r { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .r { opacity: 1; transform: none; transition: none; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid, .section-head { grid-template-columns: 1fr; gap: 2rem; }
  .section-head { margin-bottom: 3rem; }
  .tiles, .tiles.two { grid-template-columns: 1fr; }
  .tile, .tiles .tile:nth-child(3n), .tiles.two .tile:nth-child(2n) { border-right: 0; }
  .tile { min-height: 0; }
  .tile h3 { padding-top: 2.5rem; }
  .tile-last-row { border-bottom: 1px solid var(--line-strong) !important; }
  .tiles .tile:last-child { border-bottom: 0 !important; }
  .layer { grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.6rem 1rem; }
  .layer p { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .site-nav { gap: 1.1rem; }
  .site-nav a.hide-sm { display: none; }
  .statbar { grid-template-columns: 1fr; }
  .statbar div { border-right: 0; border-bottom: 1px solid var(--line-strong); min-height: 0; }
  .statbar div:last-child { border-bottom: 0; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-cell { border-right: 0; min-height: 0; }
  .hub-cell h3 { margin-top: 1.5rem; }
  .actions .btn { width: 100%; }
  .title { font-size: clamp(5rem, 28vw, 7rem); }
}
