/* ═══════════════════════════════════════════════════
   SCIERAMY.pl — Global Stylesheet
   ═══════════════════════════════════════════════════ */

:root {
  --blue:        #1a6ed8;
  --blue-dark:   #1558b0;
  --blue-light:  #eff6ff;
  --blue-mid:    #dbeafe;

  --text:        #0f172a;
  --text-2:      #334155;
  --text-3:      #64748b;
  --text-4:      #94a3b8;

  --bg:          #ffffff;
  --bg-subtle:   #f8fafc;
  --border:      #e2e8f0;
  --border-light:#f1f5f9;

  --radius:      8px;
  --radius-lg:   12px;

  --font-head:   'Poppins', system-ui, sans-serif;
  --font-body:   system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max-w:       1100px;
  --max-w-text:  720px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Type ── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.0625rem, 2.5vw, 1.25rem); }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; color: var(--text-2); }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--text-2); }
li { margin-bottom: 0.375rem; }
li:last-child { margin-bottom: 0; }
strong { color: var(--text); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo img {
  height: 30px;
  width: auto;
  mix-blend-mode: multiply;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav a {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-3);
  padding: 6px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: color 150ms ease-out, background 150ms ease-out;
}
.site-nav a:hover { color: var(--blue); background: var(--blue-light); text-decoration: none; }
.site-nav a.active { color: var(--blue); background: var(--blue-light); }

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ── */
.hero {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
}
.eyebrow {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.hero h1 { margin-bottom: 16px; }
.lead {
  font-size: 1.0625rem;
  color: var(--text-3);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Section ── */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--border-light); }
.section-head { margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 6px; }
.section-head h2 { margin-bottom: 8px; }
.section-head p { color: var(--text-3); max-width: 520px; margin: 0; }

/* ── Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg);
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out, transform 150ms ease-out;
  text-decoration: none;
  display: block;
  color: inherit;
}
.card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 20px rgba(26,110,216,0.08);
  text-decoration: none;
}
.card:active { transform: scale(0.985); }
.card-icon {
  width: 40px;
  height: 40px;
  background: var(--blue-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card-icon svg { width: 20px; height: 20px; color: var(--blue); }
.card h3 { font-size: 0.9375rem; margin-bottom: 6px; }
.card p { font-size: 0.85rem; color: var(--text-3); margin: 0; line-height: 1.5; }

/* ── Article layout ── */
.breadcrumb {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.breadcrumb ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.breadcrumb li { font-size: 0.8125rem; color: var(--text-3); display: flex; align-items: center; gap: 4px; margin-bottom: 0; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--blue); text-decoration: none; }
.breadcrumb .sep { color: var(--text-4); font-size: 0.75rem; }

.article-header { padding: 36px 0 32px; border-bottom: 1px solid var(--border); }
.article-header .eyebrow { margin-bottom: 8px; }
.article-header h1 { margin-bottom: 12px; }
.article-header .lead { font-size: 1rem; margin: 0; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
  padding: 48px 0 80px;
}

.article-body h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 40px;
  border-top: 1px solid var(--border-light);
  font-size: 1.375rem;
}
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-body h3 { margin-top: 28px; margin-bottom: 10px; font-size: 1.0625rem; color: var(--text-2); }
.article-body ul, .article-body ol { margin-bottom: 1.25rem; }
.article-body li { margin-bottom: 0.5rem; }

.article-sidebar {
  position: sticky;
  top: 80px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: var(--font-head);
  margin-bottom: 12px;
}
.toc { list-style: none; padding: 0; margin: 0; }
.toc li { border-top: 1px solid var(--border); }
.toc li:first-child { border-top: none; }
.toc a {
  display: block;
  padding: 9px 0;
  font-size: 0.85rem;
  color: var(--text-3);
  text-decoration: none;
  line-height: 1.4;
  transition: color 120ms ease-out;
}
.toc a:hover { color: var(--blue); }

/* ── Table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 24px 0;
  overflow-x: auto;
  display: block;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}
.data-table tr:hover td { background: var(--bg-subtle); }

/* ── Callout ── */
.callout {
  background: var(--blue-light);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 28px 0;
}
.callout p { color: var(--text-2); margin: 0; font-size: 0.9375rem; }

/* ── Article list ── */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-item {
  background: var(--bg);
  padding: 18px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  text-decoration: none;
  transition: background 120ms ease-out;
  color: inherit;
}
.list-item:hover { background: var(--bg-subtle); text-decoration: none; }
.list-item:active { transform: scale(0.999); }
.list-num {
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--blue);
  min-width: 24px;
  padding-top: 3px;
}
.list-content h3 { font-size: 0.9375rem; margin-bottom: 4px; }
.list-content p { font-size: 0.85rem; color: var(--text-3); margin: 0; }
.list-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ── Tag / Badge ── */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-head);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue);
}
.tag-orange { background: #fff7ed; color: #c2410c; }

/* ── CTA strip ── */
.cta-strip {
  background: var(--blue);
  color: white;
  padding: 48px 0;
  text-align: center;
}
.cta-strip h2 { color: white; margin-bottom: 8px; font-size: 1.5rem; }
.cta-strip .lead { color: rgba(255,255,255,0.8); max-width: 420px; margin: 0 auto 24px; }
.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease-out, box-shadow 150ms ease-out;
  cursor: pointer;
}
.btn:active { transform: scale(0.97); }
.btn-white { background: white; color: var(--blue); }
.btn-white:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); text-decoration: none; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.contact-block h3 { margin-bottom: 12px; font-size: 1rem; }
.contact-block p, .contact-block a { font-size: 0.9375rem; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-subtle);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand img { height: 26px; mix-blend-mode: multiply; margin-bottom: 10px; }
.footer-brand p { font-size: 0.8125rem; color: var(--text-3); max-width: 220px; margin: 0; }
.footer-nav h5 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: var(--font-head);
  margin-bottom: 12px;
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { font-size: 0.875rem; color: var(--text-2); text-decoration: none; transition: color 120ms; }
.footer-nav a:hover { color: var(--blue); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}
.footer-bottom a { color: var(--text-3); }
.footer-bottom a:hover { color: var(--blue); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { height: auto; padding: 12px 20px; flex-wrap: wrap; gap: 10px; }
  .hero { padding: 40px 0 36px; }
  .section { padding: 48px 0; }
  .container { padding: 0 20px; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { padding: 36px 0 56px; gap: 32px; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .site-nav a { padding: 5px 10px; font-size: 0.8125rem; }
  .article-header { padding: 24px 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
