/* SP-LOOK — design system landingów Celnik/Importuj.ai w wizerunku SmartPrawnika (Paleta A)
   Źródło wzorca: smartprawnik.pl homepage/styles.css (2026-07-21). Bez Tailwinda. */
:root {
  --bg: #F4F0E8;
  --bg-2: #FBF8F1;
  --bg-3: #EFE9DC;
  --bg-ink: #0D1F3C;
  --ink: #0D1F3C;
  --ink-2: #3A4A68;
  --ink-3: #4D5872;
  --ink-muted: #5C5040;
  --line: #D8CFBE;
  --line-2: #C4B89E;
  --accent: #B88746;
  --accent-dark: #8A5F2E;
  --accent-light: #E8D0A8;
  --success: #2F6F4E;
  --warning: #B55C2E;
  --danger: #A53B3B;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
html, body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { max-width: 100%; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.mono { font-family: 'JetBrains Mono', monospace; }
.serif { font-family: 'Fraunces', Georgia, serif; }
.serif-it { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 400; }
.caslon { font-family: 'Libre Caslon Text', Georgia, serif; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 99px; background: var(--accent); flex: none; }

.btn { padding: 13px 22px; font-size: 14px; font-weight: 500; border-radius: 2px; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; font-family: inherit; cursor: pointer; border: none; position: relative; overflow: hidden; }
.btn-primary { background: var(--ink); color: var(--bg-2); }
.btn-primary:hover { background: #001640; transform: translateY(-1px); }
.btn-accent { background: var(--accent-dark); color: #fff; }
.btn-accent:hover { background: #6E4A22; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg-2); }
.btn-ghost-light { background: transparent; color: var(--bg-2); border: 1px solid rgba(251,248,241,.3); }
.btn-ghost-light:hover { background: var(--bg-2); color: var(--ink); }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
.btn:active { transform: translateY(0) scale(.98); transition: transform .08s; }
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120px 120px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.18), transparent 70%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.btn:hover::before { opacity: 1; }
.btn-ghost::before { background: radial-gradient(120px 120px at var(--mx, 50%) var(--my, 50%), rgba(13,31,60,.12), transparent 70%); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; border-radius: 2px; }
.badge-accent { background: rgba(138,95,46,.16); color: #5E3F1C; }
.badge-success { background: rgba(47,111,78,.1); color: var(--success); }

.cite { color: var(--accent-dark); border-bottom: 1px dashed var(--accent); font-weight: 500; }

.section { padding: 112px 0; border-top: 1px solid var(--line); }
.section-dark { background: var(--bg-ink); color: var(--bg-2); border-color: transparent; }
.section-paper { background: var(--bg-2); }
.section-dark h2.sec-title { color: var(--bg-2); }
.section-dark .lead { color: rgba(251,248,241,.7); }
.section-dark .eyebrow { color: var(--accent-light); }

.hd-kicker { margin-bottom: 20px; display: inline-flex; }
h1.display { font-size: clamp(44px, 5.6vw, 80px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.02; font-family: 'Geist', sans-serif; }
h2.sec-title { font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 20px; font-family: 'Fraunces', Georgia, serif; }
h3.card-title { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; font-family: 'Fraunces', Georgia, serif; }
.lead { font-size: 19px; color: var(--ink-2); line-height: 1.5; max-width: 620px; }

.sp-gradient-text { background-image: linear-gradient(100deg, var(--accent-dark), var(--accent-light), var(--accent-dark)); background-size: 200%; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: spShimmer 6s linear infinite; }
@keyframes spShimmer { 100% { background-position: 200% center; } }
.sp-kinetic { animation: spKinetic 1.05s cubic-bezier(.22,.61,.36,1) both; }
@keyframes spKinetic { 0% { opacity: 0; transform: translateY(18px); filter: blur(12px); letter-spacing: .015em; } 100% { opacity: 1; transform: none; filter: blur(0); letter-spacing: normal; } }

.divider-row { display: flex; align-items: center; gap: 16px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.divider-row .line { flex: 1; height: 1px; background: var(--line); }

/* Karty (SP .fc) — lift + miedziana krawędź */
.fc {
  position: relative; background: var(--bg-2); border: 1px solid var(--line); padding: 28px 26px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .25s;
  will-change: transform;
}
.fc::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.fc:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -18px rgba(13,31,60,.22); border-color: var(--line-2); }
.fc:hover::after { transform: scaleY(1); }
.fc-num { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.14em; color: var(--accent-dark); margin-bottom: 16px; display: block; }
.fc-desc { font-family: 'Libre Caslon Text', Georgia, serif; font-size: 14px; line-height: 1.6; color: var(--ink-3); margin-top: 10px; }
.fc-icon { width: 36px; height: 36px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 2px; display: flex; align-items: center; justify-content: center; color: var(--accent-dark); margin-bottom: 14px; transition: all .2s; }
.fc:hover .fc-icon { background: var(--ink); border-color: var(--ink); color: var(--accent-light); }

/* Reveal on scroll (SP A06) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"].is-visible { transition-delay: .08s; }
.reveal[data-delay="2"].is-visible { transition-delay: .16s; }
.reveal[data-delay="3"].is-visible { transition-delay: .24s; }
.reveal[data-delay="4"].is-visible { transition-delay: .32s; }

/* NAV */
.sp-nav { position: sticky; top: 0; z-index: 100; background: rgba(244,240,232,0); border-bottom: 1px solid transparent; transition: all .2s ease; }
.sp-nav.is-scrolled { background: rgba(244,240,232,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.sp-nav .inner { padding: 18px 40px; display: flex; align-items: center; justify-content: space-between; max-width: 1320px; margin: 0 auto; }
.sp-brand { display: flex; align-items: center; gap: 10px; }
.sp-brand .name { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.sp-brand .by { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); display: block; margin-top: 2px; }
.sp-nav .links { display: flex; gap: 4px; align-items: center; }
a.nav-link { position: relative; padding: 10px 14px; font-size: 14px; color: var(--ink-2); }
a.nav-link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
a.nav-link:hover::after { transform: scaleX(1); }
a.nav-link:hover { color: var(--ink); }
.sp-nav .cta-row { display: flex; gap: 10px; align-items: center; }

/* HERO stacked paper + okno demo */
/* min-width:0 — bez tego nowrap w .demo-input/.url rozpycha kolumny fr ponad viewport na mobile */
.hero-grid > *, .demo-2col > * { min-width: 0; }
.paper-stack { position: relative; }
.paper-stack .layer-1 { position: absolute; inset: 20px -20px -20px 20px; background: var(--bg-3); border: 1px solid var(--line); transform: rotate(1.2deg); z-index: 0; }
.paper-stack .layer-2 { position: absolute; inset: 10px -8px -10px 8px; background: var(--bg-2); border: 1px solid var(--line); transform: rotate(-0.4deg); z-index: 1; }
.demo-window { position: relative; z-index: 2; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 40px 80px -20px rgba(13,31,60,.18); }
.demo-chrome { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: var(--bg-3); }
.demo-chrome .dots { display: flex; gap: 5px; }
.demo-chrome .dots span { width: 9px; height: 9px; border-radius: 99px; background: var(--line-2); }
.demo-chrome .url { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--ink-muted); padding: 3px 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 2px; flex: 1; margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.demo-input { padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink); font-family: 'JetBrains Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blink { color: var(--accent-dark); animation: blink 1s infinite; }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* Kroki + wiersze wyniku w oknie demo (pętla jak dReveal, tempo SP) */
.dstep, .drow { opacity: .18; animation: dReveal 7s ease infinite; animation-delay: var(--d); }
.dstep { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.dstep .dnum { width: 22px; height: 22px; border-radius: 99px; background: var(--ink); color: var(--accent-light); display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; flex: none; }
.dstep .dnum.ok { background: var(--success); color: #fff; }
.drow { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.drow:last-child { border-bottom: none; }
.drow .k { color: var(--ink-3); }
.drow .v { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.drow .v.ok { color: var(--success); }
.drow.total { border-top: 1px solid var(--line-2); border-bottom: none; margin-top: 4px; padding-top: 10px; }
.drow.total .k { color: var(--ink); font-weight: 600; }
.drow.total .v { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 500; color: var(--ink); }
@keyframes dReveal { 0%,3% { opacity: .15; transform: translateY(5px); } 12%,84% { opacity: 1; transform: none; } 97%,100% { opacity: .15; } }
.result-box { padding: 14px 16px; background: var(--bg); border-left: 2px solid var(--accent); }

/* Tabela-dokument (sekcja Przykład) */
.doc-card { background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 24px 60px -30px rgba(13,31,60,.25); }
.doc-head { padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--bg-3); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.doc-title { font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.doc-body { padding: 22px; }
.doc-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.doc-row:last-of-type { border-bottom: none; }
.doc-row .k { color: var(--ink-3); font-family: 'Libre Caslon Text', Georgia, serif; }
.doc-row .v { font-weight: 500; font-variant-numeric: tabular-nums; }
.doc-row .v.ok { color: var(--success); }
.doc-row.total { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 14px; }
.doc-row.total .k { color: var(--ink); font-weight: 600; font-family: 'Geist', sans-serif; }
.doc-row.total .v { font-family: 'Fraunces', Georgia, serif; font-size: 20px; }
.doc-note { font-size: 12px; color: var(--ink-muted); line-height: 1.55; margin-top: 16px; }

/* FAQ */
details.faq { background: var(--bg-2); border: 1px solid var(--line); padding: 0; transition: border-color .2s; }
details.faq + details.faq { margin-top: 10px; }
details.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: 'Fraunces', Georgia, serif; font-size: 16.5px; font-weight: 500; letter-spacing: -0.01em; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; font-family: 'JetBrains Mono', monospace; color: var(--accent-dark); font-size: 16px; transition: transform .25s; flex: none; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq[open] { border-color: var(--line-2); }
details.faq .a { padding: 0 22px 20px; font-family: 'Libre Caslon Text', Georgia, serif; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); max-width: 640px; }

/* Pasek "checków" pod CTA hero */
.check-row { display: flex; gap: 28px; font-size: 13px; color: var(--ink-muted); flex-wrap: wrap; }
.check-row .c { display: flex; align-items: center; gap: 6px; }

/* Footer */
.sp-footer { border-top: 1px solid var(--line); background: var(--bg); }
.sp-footer .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding: 56px 0 40px; }
.sp-footer .legal { font-size: 12px; color: var(--ink-muted); line-height: 1.6; max-width: 520px; }
.sp-footer .bottom { border-top: 1px solid var(--line); padding: 18px 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .dstep, .drow { opacity: 1; animation: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .wrap { padding: 0 28px; }
  .section { padding: 88px 0; }
  h1.display { font-size: clamp(40px, 7vw, 64px); }
  h2.sec-title { font-size: clamp(28px, 5vw, 40px); }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr !important; gap: 56px !important; min-height: 0 !important; }
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 880px) {
  .sp-nav .links { display: none; }
  .sp-nav .cta-row a:not(.btn) { display: none; }
  .sp-nav .inner { padding: 14px 20px; }
}
@media (max-width: 768px) {
  html { scroll-padding-top: 64px; }
  .wrap { padding: 0 18px; }
  .section { padding: 56px 0; }
  h1.display { font-size: clamp(32px, 9vw, 44px); line-height: 1.05; }
  h2.sec-title { font-size: clamp(24px, 6vw, 32px); line-height: 1.1; }
  .lead { font-size: 16px; line-height: 1.55; }
  .btn { padding: 14px 22px; font-size: 14.5px; min-height: 46px; }
  .check-row { gap: 14px; }
}
@media (max-width: 640px) {
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr !important; }
  .demo-2col { grid-template-columns: 1fr !important; }
  .eyebrow, .badge, .mono, .demo-label { font-size: 12px !important; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 14px; }
  .section { padding: 44px 0; }
  h1.display { font-size: clamp(26px, 8vw, 34px); }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* === v2 (2026-07-22): kotwice, burger mobile, etykieta demo, graf procesu === */
section[id] { scroll-margin-top: 88px; }

.nav-link--mobile { display: none; }
@media (max-width: 880px) { .nav-link--mobile { display: block; } }
.nav-burger { display: none; flex-direction: column; justify-content: center; gap: 4px; padding: 10px; background: none; border: 0; cursor: pointer; min-width: 44px; min-height: 44px; }
.nav-burger span { width: 20px; height: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 880px) {
  .nav-burger { display: flex; }
  .sp-nav { background: rgba(244,240,232,.96); }
  .sp-nav .links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; gap: 2px; box-shadow: 0 18px 30px -18px rgba(13,31,60,.25); }
  .sp-nav .links.is-open { display: flex; }
  .sp-nav .links a.nav-link { padding: 13px 10px; font-size: 15px; border-bottom: 1px solid var(--line); }
  .sp-nav .links a.nav-link:last-of-type { border-bottom: none; }
}

.demo-tag { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: 2px; background: var(--bg-2); flex: none; }

.sp-footer .links-row { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; font-size: 12.5px; }
.sp-footer .links-row a { color: var(--ink-3); border-bottom: 1px dotted var(--line-2); }
.sp-footer .links-row a:hover { color: var(--accent-dark); }

/* Graf procesu (port SP ANIM-02, motyw jasny) */
.fd-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: flex-start; }
.fd-stage { background: var(--bg-2); border: 1px solid var(--line); padding: 8px; position: relative; box-shadow: 0 24px 48px -16px rgba(13,31,60,.08); }
.fd-stage .fd-gridbg { position: absolute; inset: 8px; pointer-events: none; opacity: .25; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; }
.fd-stage svg { width: 100%; display: block; position: relative; z-index: 1; }
.fd-node-group { transition: opacity .3s, transform .4s ease; cursor: pointer; }
.fd-edge { transition: stroke .3s, opacity .3s; }
.fd-detail { position: sticky; top: 96px; }
.fd-detail-inner { animation: fdFadein .3s ease; padding: 8px 4px; }
@keyframes fdFadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fd-kicker { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 14px; }
.fd-title { font-family: 'Fraunces', Georgia, serif; font-size: 28px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.18; margin-bottom: 16px; color: var(--ink); }
.fd-desc { font-family: 'Libre Caslon Text', Georgia, serif; font-size: 14.5px; color: var(--ink-2); line-height: 1.62; margin-bottom: 22px; }
.fd-bullets { list-style: none; border-top: 1px solid var(--line); padding: 0; margin: 0; }
.fd-bullets li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink-2); }
.fd-bullets .num { font-family: 'JetBrains Mono', monospace; color: var(--accent-dark); font-size: 10.5px; font-weight: 500; min-width: 20px; }
.fd-hint { margin-top: 24px; padding: 13px 16px; background: var(--bg-3); border: 1px solid var(--line); font-size: 12px; color: var(--ink-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: .02em; }
.fd-hint b { color: var(--accent-dark); font-weight: 500; }
@media (max-width: 980px) { .fd-grid { grid-template-columns: 1fr; } .fd-detail { position: static; } }

/* === DARK MODE (2026-07-22): flip palety na zmiennych — dziala na kazdej stronie z sp-look === */
html.dark {
  --bg: #0C111D;
  --bg-2: #111827;
  --bg-3: #0F1523;
  --ink: #E8E4D9;
  --ink-2: #B8B3A6;
  --ink-3: #A9A290;
  --ink-muted: #7D8598;
  --line: #232C40;
  --line-2: #33405C;
  --accent: #C5A253;
  --accent-dark: #C5A253;
  --accent-light: #E0C98A;
}
html.dark .sp-nav.is-scrolled { background: rgba(12,17,29,.9); }
html.dark .btn-primary { color: #0C111D; }
html.dark .btn-primary:hover { background: var(--accent-light); }
html.dark .badge-accent { color: var(--accent-light); background: rgba(197,162,83,.14); }
html.dark .fc:hover { box-shadow: 0 18px 36px -18px rgba(0,0,0,.6); }
html.dark .demo-window { box-shadow: 0 40px 80px -20px rgba(0,0,0,.55); }
html.dark .dstep .dnum { color: #0C111D; }
