/* AS AI, as-ai.pl: podstrony (Realizacje, polityka, regulamin, 404, case studies).
   Te same tokeny, fonty i przyciski co strona główna (assets/site.css). */
:root {
  --ink: #081315;
  --ink-2: #0C1B1E;
  --ink-3: #12262A;
  --ink-a: rgba(8, 19, 21, .82);
  --line: #1D3337;
  --line-2: #2A484C;
  --bone: #EEE6D8;
  --dim: #9DB0AE;
  --faint: #66807F;
  --amber: #FF9A4D;
  --amber-hi: #FFB884;
  --amber-ink: #241003;
  --teal: #52DACB;

  --font-display: "Archivo", "Archivo Variable", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Archivo Variable", "Helvetica Neue", Arial, sans-serif;
  --font-time: "JetBrains Mono", "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --fs-sm: .9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1.4vw, 1.375rem);
  --fs-xl: clamp(1.5rem, 2.4vw, 2.125rem);
  --fs-2xl: clamp(2.125rem, 4.4vw, 4rem);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4.2vw, 64px);
  --top-h: 68px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden]:not([hidden=until-found i]) { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); scroll-padding-top: calc(var(--top-h) + env(safe-area-inset-top, 0px) + 16px); }
body {
  margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
  background: radial-gradient(70% 55% at 85% 0%, rgba(82, 218, 203, .07), transparent 70%), radial-gradient(50% 40% at 0% 30%, rgba(255, 154, 77, .05), transparent 70%), var(--ink);
  background-attachment: fixed;
  color: var(--bone); font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; overflow-x: clip;
}
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--amber); color: var(--amber-ink); }

/* PL/EN: elementy z data-l pokazujemy według <html lang> */
html[lang="pl"] [data-l="en"], html:not([lang="pl"]) [data-l="pl"] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--bone); color: var(--ink); padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 16px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: calc(var(--top-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: flex; align-items: center; gap: 16px;
  background: var(--ink-a); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone); font-family: var(--font-display); font-weight: 850; font-stretch: 125%; font-size: 1.125rem; letter-spacing: .01em; white-space: nowrap; }
.brand-mark { position: relative; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(238, 230, 216, .35); }
.brand-mark::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--bone); animation: spin 2.4s linear infinite; }
.brand-mark i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
@keyframes spin { to { transform: rotate(360deg); } }
.back { color: var(--dim); text-decoration: none; font-size: .875rem; font-weight: 550; padding: 10px 6px; white-space: nowrap; transition: color .25s; }
.back:hover { color: var(--bone); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink-a); }
.lang button { border: 0; background: transparent; color: var(--dim); font-weight: 650; font-size: .75rem; letter-spacing: .04em; padding: 8px 10px; border-radius: 999px; cursor: pointer; line-height: 1; transition: background-color .3s, color .3s; }
.lang button[aria-pressed="true"] { background: var(--bone); color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); font-stretch: 106%; line-height: 1;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s;
}
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-hi); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--bone); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .875rem; }

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(40px, 8vh, 96px) var(--gutter) clamp(56px, 9vh, 104px); }
.eyebrow { font-family: var(--font-time); font-size: .82rem; color: var(--amber); letter-spacing: .02em; }
.page-head { display: grid; gap: 18px; max-width: 62ch; margin-bottom: clamp(36px, 6vh, 64px); }
.page-head h1 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; font-stretch: 116%; line-height: 1; letter-spacing: -.02em; }
.lead { color: var(--dim); font-size: var(--fs-lg); line-height: 1.45; }

/* ---------- demo cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; padding: clamp(20px, 2.6vw, 28px); border-radius: 22px; background: var(--ink-2); border: 1px solid var(--line); transition: border-color .3s; }
.card:hover { border-color: var(--line-2); }
.card-k { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-family: var(--font-time); font-size: .78rem; color: var(--faint); }
.card-k b { font-weight: 500; color: var(--teal); }
.card-k > span::before { content: "· "; margin-right: 2px; }
.card h2 { font-family: var(--font-display); font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 760; font-stretch: 110%; line-height: 1.1; letter-spacing: -.01em; }
.card p { color: var(--dim); font-size: var(--fs-sm); }
.card .btn { justify-self: start; margin-top: 6px; }
.card .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- case studies & CTA ---------- */
.block { margin-top: clamp(48px, 8vh, 88px); padding-top: clamp(32px, 5vh, 48px); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; align-items: end; }
.block h2 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 760; font-stretch: 110%; line-height: 1.1; letter-spacing: -.01em; }
.block p { color: var(--dim); max-width: 58ch; margin-top: 10px; }
.block-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.soon { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-time); font-size: .78rem; color: var(--warn, #FFC86B); }
.soon i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- legal pages ---------- */
.prose { max-width: 70ch; display: grid; gap: 16px; }
.prose h2 { margin-top: 24px; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 760; font-stretch: 110%; line-height: 1.1; }
.prose p, .prose li { color: var(--dim); }
.prose strong { color: var(--bone); font-weight: 600; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.prose a { color: var(--bone); text-underline-offset: 3px; }
.prose a:hover { color: var(--amber); }
.prose code { font-family: var(--font-time); font-size: .85em; color: var(--bone); background: var(--ink-3); padding: 1px 6px; border-radius: 6px; }
.note { padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--bone); }

/* ---------- 404 ---------- */
.nf { display: grid; gap: 22px; justify-items: start; max-width: 60ch; }
.nf-code { font-family: var(--font-display); font-weight: 850; font-stretch: 125%; font-size: clamp(5rem, 22vw, 14rem); line-height: .85; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 2px var(--line-2); }
.nf-code b { color: var(--amber); -webkit-text-stroke: 0; font-weight: inherit; }
.nf h1 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 780; font-stretch: 112%; line-height: 1.1; }
.nf p { color: var(--dim); }

/* ---------- footer ---------- */
.foot { width: 100%; max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--dim); font-size: .88rem; }
.foot-brand { font-family: var(--font-display); font-weight: 850; font-stretch: 125%; color: var(--bone); }
.foot-legal { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: .8rem; line-height: 1.5; }
.foot-legal > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.foot a { text-decoration: none; color: var(--dim); }
.foot a:hover, .foot-btn:hover { color: var(--amber); }
.foot-btn { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: var(--dim); cursor: pointer; }

@media (max-width: 760px) {
  :root { --top-h: 60px; }
  .block { grid-template-columns: minmax(0, 1fr); }
  .top-cta { display: none; }
}
@media (max-width: 420px) {
  .lang button { padding: 8px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
