/* =============================================================
   SimplySecurity.pl — arkusz stylów v2
   Paleta: jasne tło + szarości + granat #14315C jako kolor marki.
   Niebieski z logo (#4A9DDC) używany WYŁĄCZNIE w samym logo.
   ============================================================= */

:root {
  --bg:        #F6F7F9;
  --panel:     #FFFFFF;
  --ink:       #1B2430;
  --ink-soft:  #545E6C;
  --ink-faint: #8992A0;
  --line:      #E2E5EA;

  --navy:      #14315C;
  --navy-dark: #0C2140;
  --navy-tint: #E9EDF4;

  --accent:    #C8502E;   /* rdzawy akcent do statystyk/ostrzeżeń — celowo stonowany, nie logo-blue */
  --accent-tint: #FBEAE3;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(20,49,92,.05), 0 12px 32px -16px rgba(20,49,92,.22);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; border-radius: var(--radius); }
a { color: var(--navy); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1.18;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Nagłówek / nawigacja ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,247,249,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 104px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand__logo { height: 58px; width: auto; border-radius: 0; }
.brand__logo--footer { height: 40px; }

.site-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; flex-wrap: wrap; }

/* ---------- Pasek "Porada dnia" ---------- */
.tip-bar {
  background: var(--accent-tint); border-bottom: 1px solid rgba(200,80,46,.18);
  overflow: hidden; max-height: 200px; transition: max-height .3s ease, padding .3s ease, opacity .3s ease;
}
.tip-bar.is-hidden { max-height: 0; opacity: 0; border-bottom-width: 0; }
.tip-bar__inner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 24px; position: relative;
}
.tip-bar__badge {
  flex-shrink: 0; font-weight: 700; font-size: .82rem; color: var(--accent);
  white-space: nowrap;
}
.tip-bar__category {
  flex-shrink: 0; font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--navy); background: #fff; border: 1px solid rgba(20,49,92,.15);
  border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.tip-bar__text { flex: 1; min-width: 200px; margin: 0; font-size: .88rem; color: var(--ink); }
.tip-bar__close {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  font-size: .95rem; color: var(--ink-faint); padding: 4px 6px; line-height: 1;
  border-radius: 6px;
}
.tip-bar__close:hover { color: var(--accent); background: rgba(200,80,46,.1); }
@media (max-width: 640px) {
  .tip-bar__inner { padding: 10px 16px; }
  .tip-bar__category { display: none; }
  .tip-bar__text { font-size: .82rem; }
}
.site-nav a {
  display: block; padding: 9px 13px; border-radius: 999px;
  text-decoration: none; color: var(--ink-soft); font-size: .93rem; font-weight: 500;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--navy-tint); color: var(--navy-dark); }
.site-nav a.is-active { background: var(--navy); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; font-weight: 600;
  font-size: .98rem; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; font-family: var(--font-body);
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-dark); }
.btn--ghost { background: transparent; color: var(--navy-dark); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: #A3441D; }
.btn--accent-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--accent-outline:hover { background: var(--accent-tint); }

main a:not(.btn):hover { color: var(--accent); }

.section--tint { background: var(--navy-tint); }

.section__head { position: relative; padding-top: 24px; }
.section__head::before {
  content: ""; position: absolute; top: 0; left: 0; width: 46px; height: 4px;
  border-radius: 2px; background: var(--accent);
}

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
input, textarea, select {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
input:focus, textarea:focus { border-color: var(--navy); }
.field { margin-bottom: 18px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 56px; border-bottom: 1px solid var(--line);
  background-color: #FFFFFF;
  background-image: url('/assets/img/hero-pattern.svg?v=2');
  background-repeat: no-repeat;
  background-position: top right -80px;
  background-size: 640px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: -80px;
  width: 640px; height: 640px;
  background-image: url('/assets/img/hero-pattern.svg?v=2');
  background-repeat: no-repeat;
  background-position: top left;
  background-size: 640px;
  transform: scaleX(-1);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero__layout { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.hero__content { flex: 1; min-width: 0; }

/* ---------- Widżet pogodowy ---------- */
.weather-widget {
  flex-shrink: 0;
  width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow);
  font-size: .85rem;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.weather-widget.is-ready { opacity: 1; transform: translateY(0); pointer-events: auto; }
.weather-widget__top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.weather-widget__icon { font-size: 1.8rem; line-height: 1; }
.weather-widget__temp { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy-dark); }
.weather-widget__place { font-size: .72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-mono); }
.weather-widget__pressure { font-size: .76rem; color: var(--ink-faint); margin-bottom: 6px; font-family: var(--font-mono); }
.weather-widget__quip { color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 900px) {
  .hero__layout { flex-direction: column; }
  .weather-widget { width: 100%; order: -1; margin-bottom: 20px; }
}
.hero__eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; color: var(--accent); font-weight: 500;
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.section--panel { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--navy { background: var(--navy); color: #E7ECF5; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #C7D1E3; }
.section__head { max-width: 68ch; margin-bottom: 36px; }

/* ---------- Stat blocks ---------- */
.stat-block { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line); }
.stat-block:first-of-type { border-top: none; }
.stat-block__figure img { box-shadow: var(--shadow); }
.stat-block h3 { margin-bottom: .6em; }
.stat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.stat-list li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: baseline; }
.stat-num { font-family: var(--font-mono); font-weight: 500; font-size: 1.55rem; color: var(--accent); white-space: nowrap; border-bottom: 2px solid var(--accent-tint); }
.stat-list p { margin: 0; color: var(--ink-soft); }
.stat-list strong { color: var(--ink); }

/* ---------- Pillars / Dlaczego My cards ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.pillar__label { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--navy); display: block; margin-bottom: 10px; }

.reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.reason-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; gap: 16px; align-items: flex-start;
}
.reason-card__icon {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px;
  background: var(--navy-tint); display: flex; align-items: center; justify-content: center;
}
.reason-card__icon img { width: 32px; height: 32px; object-fit: contain; border-radius: 0; }
.reason-card h3 { margin-bottom: .35em; font-size: 1.08rem; }
.reason-card p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Offer / service cards ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.offer-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card-icon { width: 44px; height: 44px; margin-bottom: 16px; }

.service-list { display: grid; gap: 20px; }
.service-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; border-left: 4px solid var(--navy); display: flex; gap: 18px; align-items: flex-start;
}
.service-card__icon { width: 40px; height: 40px; flex-shrink: 0; margin-top: 2px; }
.service-card h3 { margin-bottom: .3em; }
.service-card p { margin: 0; color: var(--ink-soft); }

/* ---------- Content blocks ---------- */
.content-block { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.content-block + .content-block { margin-top: 56px; }
.content-block--reverse .content-block__figure { order: 2; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 5px; background: var(--navy-tint); border: 1px solid var(--navy); }
.check-list li::after { content: "✓"; position: absolute; left: 3px; top: 2px; color: var(--navy); font-weight: 700; font-size: .85rem; }
.check-list strong { color: var(--navy-dark); }

/* ---------- Mission / quote block ---------- */
.mission {
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 48px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  box-shadow: var(--shadow);
}
.mission h2 { color: var(--navy-dark); }
.mission__eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--accent); margin-bottom: 10px; }
.mission p { color: var(--ink-soft); }
.mission img { width: 100%; height: auto; object-fit: contain; border-radius: 14px; }

/* ---------- Team ---------- */
.team-grid { display: grid; gap: 32px; }
.team-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
}
.team-card__photo { border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; }
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.team-card__role { font-family: var(--font-mono); font-size: .82rem; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; display: block; }
.team-card p { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.contact-card dl { margin: 0; }
.contact-card dt { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-top: 20px; }
.contact-card dt:first-child { margin-top: 0; }
.contact-card dd { margin: 4px 0 0; font-size: 1.05rem; }

.qr-card {
  margin-top: 20px;
  text-align: center;
}
.qr-card__label { font-weight: 600; color: var(--navy-dark); margin: 0 0 14px; }
.qr-card__code { width: 160px; height: 160px; margin: 0 auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 20px; font-size: .95rem; }
.alert--success { background: var(--navy-tint); color: var(--navy-dark); }
.alert--error { background: var(--accent-tint); color: var(--accent); }

/* ---------- Blog ---------- */
.post-list { display: grid; gap: 24px; }
.post-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.post-card__figure img { aspect-ratio: 16/9; object-fit: cover; }
.post-card__meta { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); margin-bottom: 8px; }
.post-card h2 { font-size: 1.32rem; margin-bottom: .4em; }
.post-card h2 a { color: var(--navy-dark); text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }
.post-card__tags a { font-size: .8rem; color: var(--navy); text-decoration: none; margin-right: 10px; }

.tag-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.tag-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy-tint); color: var(--navy-dark);
  font-family: var(--font-mono); font-size: .74rem; font-weight: 500;
  padding: 5px 12px; border-radius: 999px; letter-spacing: .02em;
}
.tag-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.post-single__meta { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-faint); margin-bottom: 8px; }
.post-single .lede { margin-bottom: 24px; }
.post-single h2 { margin-top: 1.6em; }
.post-single blockquote {
  margin: 1.4em 0; padding: 16px 20px; border-left: 4px solid var(--accent);
  background: var(--accent-tint); border-radius: 0 10px 10px 0; font-size: .98rem; color: var(--ink);
}
.post-single ol, .post-single ul { padding-left: 1.3em; }
.post-single li { margin-bottom: .5em; }
.post-single__cta {
  margin-top: 40px; padding: 28px; background: var(--navy); color: #fff; border-radius: var(--radius);
}
.post-single__cta p { color: #D3DBEA; margin-bottom: 16px; }
.back-link { display: inline-block; margin-top: 8px; text-decoration: none; }
.todo-box {
  border: 2px dashed var(--accent); background: var(--accent-tint); border-radius: var(--radius);
  padding: 20px 22px; margin: 24px 0; font-size: .95rem; color: var(--accent);
}
.todo-box strong { display: block; margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-nav a { margin-left: 18px; color: var(--ink-soft); text-decoration: none; font-size: .92rem; }
.footer-nav a:first-child { margin-left: 0; }
.footer-nav a:hover { color: var(--navy-dark); }
.site-footer__copy { width: 100%; color: var(--ink-faint); font-size: .85rem; margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 300; background: var(--navy-dark); color: #fff; transform: translateY(110%); transition: transform .35s ease; }
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner__inner { max-width: 1160px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.cookie-banner p { margin: 0; max-width: 62ch; color: #E9EFEC; font-size: .92rem; }
.cookie-banner .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cookie-banner__actions { display: flex; gap: 10px; flex-shrink: 0; }

@media (max-width: 640px) {
  .cookie-banner__inner { flex-direction: column; align-items: stretch; padding: 14px 16px; gap: 10px; }
  .cookie-banner p { font-size: .82rem; line-height: 1.4; max-width: none; }
  .cookie-banner__actions { width: 100%; gap: 8px; }
  .cookie-banner__actions .btn { flex: 1; padding: 9px 10px; font-size: .82rem; justify-content: center; white-space: nowrap; }
}


/* ---------- Mikrointerakcje: unoszenie kart na hover ---------- */
.offer-card, .service-card, .reason-card, .team-card, .post-card, .pillar,
.contact-card, .stat-block__figure {
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
}
.offer-card:hover, .service-card:hover, .reason-card:hover, .team-card:hover,
.post-card:hover, .pillar:hover, .contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

/* ---------- Animacja wjazdu przy scrollowaniu ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Lekkie, narastające opóźnienie dla elementów w siatce, żeby nie wjeżdżały jednocześnie */
.reveal-group > *:nth-child(2) { transition-delay: .08s; }
.reveal-group > *:nth-child(3) { transition-delay: .16s; }
.reveal-group > *:nth-child(4) { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .offer-card, .service-card, .reason-card, .team-card, .post-card, .pillar, .contact-card {
    transition: none;
  }
}
/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stat-block, .content-block, .contact-grid, .offer-grid, .reason-grid, .mission { grid-template-columns: 1fr; }
  .content-block--reverse .content-block__figure { order: 0; }
  .pillars { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 1fr; }
  .team-card { grid-template-columns: 1fr; }
  .team-card__photo { max-width: 220px; }
  .mission { padding: 32px; border-radius: 18px; }
}
@media (max-width: 720px) {
  .site-nav {
    position: absolute; top: 104px; left: 0; right: 0;
    background: var(--panel); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.is-open { max-height: 480px; }
  .site-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .site-nav a { padding: 12px 10px; }
  .nav-toggle { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cookie-banner { transition: none; }
}
