/* blog.lotka24.pl. Dark only, like the other microsites; tokens follow statystyka/oferta. */
:root {
  --bg: #0A0F16;
  --bg-hi: #14233A;
  --text: #F0F5FA;
  --dim: rgba(240, 245, 250, 0.72);
  --faint: #93a4b6;
  --sheet: #111923;
  --sheet-2: #172230;
  --line: rgba(118, 205, 255, 0.18);
  --blue: #76CDFF;
  --red: #E24B4A;
  --red-deep: #A32D2D;
  --gold: #FAC775;
  --photo-h: 300px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(120% 60vh at 50% 0, var(--bg-hi) 0, var(--bg) 100%) no-repeat, var(--bg);
  color: var(--text);
  font: 400 16px/1.5 "Barlow", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1, h2 { font-family: "Bebas Neue", "Barlow", sans-serif; font-weight: 400; letter-spacing: .01em; margin: 0; }
h3, p, ol, ul, figure { margin: 0; }
a { color: inherit; }
main { overflow-x: hidden; }

/* Header photo on the list (hero.jpg): darkened for legible text, fades into the background. */
.home::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: -1;
  height: var(--photo-h);
  background: linear-gradient(180deg, rgba(4, 7, 12, .5) 0, rgba(4, 7, 12, .72) 100%), url(hero.jpg) 70% 60% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent);
  mask-image: linear-gradient(180deg, #000 50%, transparent);
  pointer-events: none;
}
.ai-credit { position: absolute; top: calc(var(--photo-h) * .3); right: 2px; z-index: 1; writing-mode: vertical-rl; transform: rotate(180deg); font: 500 10px/1 "Barlow", system-ui, sans-serif; letter-spacing: .04em; color: rgba(255, 255, 255, .6); text-shadow: 0 1px 4px rgba(0, 0, 0, .8); cursor: default; }

/* ---- Top bar ---- */
.top { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.brand { display: flex; align-items: center; text-decoration: none; font: 400 22px "Bebas Neue", sans-serif; letter-spacing: .03em; min-height: 44px; }
.brand img { width: 34px; height: 34px; object-fit: contain; margin-right: 8px; }
.brand b, .foot b { font-weight: 400; color: var(--blue); }
.brand em { font: 500 13px "Barlow", sans-serif; font-style: normal; letter-spacing: 0; color: var(--dim); margin-left: 4px; }

/* ---- List ---- */
.hero { max-width: 1120px; margin: 0 auto; padding: 18px 16px 26px; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.hero h1 { font-size: clamp(44px, 12vw, 84px); line-height: .95; }
.hero h1 span { color: var(--blue); }
.lead { font-size: clamp(16px, 2vw, 20px); color: var(--dim); margin-top: 8px; max-width: 34em; }

.posts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 14px 36px rgba(0, 0, 0, .35); transition: transform .2s ease, border-color .2s ease; }
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card:active { transform: scale(.99); }
.card-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--sheet-2); }
.no-cover { display: flex; align-items: center; justify-content: center; background: radial-gradient(closest-side, rgba(77, 168, 224, .25), transparent), var(--sheet-2); }
.no-cover img { opacity: .8; }
.card-text { padding: 12px 16px 16px; }
.card h2 { font-size: 26px; line-height: 1.02; margin-top: 4px; }
.card-lead { color: var(--dim); margin-top: 8px; }
.meta { display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--faint); }
.badge { font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--blue); border-radius: 6px; padding: 2px 8px; margin-right: 10px; }
.featured h2 { font-size: clamp(30px, 7vw, 44px); }
.empty { max-width: 1120px; margin: 0 auto; padding: 32px 16px; color: var(--dim); font-size: 18px; }

/* ---- Post ---- */
.article { max-width: 720px; margin: 0 auto; padding: 4px 16px 8px; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--blue); text-decoration: none; }
.cover { position: relative; margin: 4px -16px 16px; }
.cover-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--sheet-2); }
.cover .no-cover { aspect-ratio: 1200 / 630; }
.cover-credit { position: absolute; right: 8px; bottom: 6px; font: 500 10px/1 "Barlow", system-ui, sans-serif; letter-spacing: .04em; color: rgba(255, 255, 255, .7); text-shadow: 0 1px 4px rgba(0, 0, 0, .9); cursor: default; }
.article h1 { font-size: clamp(38px, 10vw, 60px); line-height: .98; margin-top: 6px; }
.body { margin-top: 20px; font-size: 18px; line-height: 1.6; }
.body > * + * { margin-top: 14px; }
.article .meta { display: block; }
.body h2 { font-size: 30px; margin-top: 28px; color: var(--blue); }
.body h3 { font-size: 19px; margin-top: 22px; }
.body h2 + p, .body h3 + p { margin-top: 6px; }
.body ul, .body ol { padding-left: 22px; }
.body li + li { margin-top: 6px; }
.body a, .sources a { color: var(--blue); text-underline-offset: 3px; }
.body blockquote { border-left: 3px solid var(--gold); padding: 4px 0 4px 14px; color: var(--dim); font-style: italic; }
.body strong { color: #fff; }
.sources { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 22px; }
.sources ol { margin-top: 6px; padding-left: 22px; color: var(--dim); font-size: 15px; }
.sources li + li { margin-top: 4px; }
.sources a { word-break: break-word; }
.byline { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; color: var(--faint); font-weight: 600; font-size: 14px; }
.share { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--sheet-2); color: var(--text); font: 600 15px "Barlow", system-ui, sans-serif; cursor: pointer; }
.share:active { transform: scale(.98); }
.more { max-width: 1120px; margin: 32px auto 0; }
.more h2 { font-size: 28px; padding: 0 16px 10px; }

/* ---- Join + footer ---- */
.contact { padding: 44px 16px 64px; text-align: center; }
.contact h2 { font-size: clamp(32px, 8vw, 48px); margin-bottom: 6px; }
.contact p { color: var(--dim); }
.btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 16px; min-height: 52px; padding: 0 32px; background: var(--red); color: #fff; border-radius: 10px; font-weight: 700; font-size: 17px; text-decoration: none; }
.btn:active { transform: scale(.98); background: var(--red-deep); }
.login { display: flex; align-items: center; min-height: 44px; width: fit-content; margin: 8px auto 0; padding: 0 4px; font-weight: 600; color: var(--blue); text-underline-offset: 3px; }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; max-width: 1120px; margin: 0 auto; padding: 14px 16px 22px; font-size: 14px; color: var(--dim); border-top: 1px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 16px; }
.foot span { font: 400 18px "Bebas Neue", sans-serif; letter-spacing: .03em; }

@media (min-width: 700px) {
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .featured { grid-column: 1 / -1; }
  .featured a { display: grid; grid-template-columns: 3fr 2fr; }
  .featured .card-img { height: 100%; }
  .featured .card-text { display: flex; flex-direction: column; justify-content: center; padding: 24px; }
  .cover { margin: 8px 0 20px; border-radius: 16px; overflow: hidden; }
}
@media (min-width: 900px) {
  :root { --photo-h: 520px; }
  .home::before { background-position: center 60%; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
  .hero { padding: 64px 16px 48px; }
  .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .more .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card:hover { transform: translateY(-3px); border-color: rgba(118, 205, 255, .4); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
