:root {
  --bg: #FCF9F5;
  --bg-alt: #f7f5f0;
  --text: #201f1c;
  --text-dim: #6b6b62;
  --border: #e2e0d6;
  --accent: #7c8768;      /* zielen szalwiowa przyciemniona - do tekstu/linkow (kontrast na bieli) */
  --accent-bg: #a8b28d;   /* jasniejsza zielen - tlo kart typu hero/stopka, nie tekst */
  --accent-soft: #eef1e8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

/* ---- header / nav ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  z-index: 10;
}
.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--accent); }

/* ---- hero ---- */
.hero {
  padding: 90px clamp(20px, 5vw, 64px) 70px;
  max-width: 900px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 18px;
  line-height: 1.15;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0 0 30px;
}
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform .15s ease, background .15s ease;
}
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: var(--accent-bg); color: var(--text); }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---- generic section ---- */
.section {
  padding: 60px clamp(20px, 5vw, 64px);
  max-width: 1100px;
  margin: 0 auto;
}
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 34px;
}
.project-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 22px;
}
.project-card h3 { margin: 0 0 14px; font-size: 19px; }
.project-card dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 14px;
  margin: 0;
}
.project-card dt {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  font-weight: 700;
}
.project-card dd { margin: 0; }
.project-card .links { margin-top: 16px; display: flex; gap: 14px; }
.project-card .links a { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.project-card .links a:hover { text-decoration: underline; }

/* ---- pojedyncza strona projektu (projekty/*.html) ---- */
.project-page { max-width: 760px; margin: 0 auto; padding: 48px clamp(20px, 5vw, 64px) 70px; }
.project-page .back-link { display: inline-block; margin-bottom: 20px; font: 600 14px/1.3 'Segoe UI', Arial, sans-serif; color: var(--accent); text-decoration: none; }
.project-page .back-link:hover { text-decoration: underline; }
.project-page .project-tags { margin: 0 0 10px; font: 700 12px/1.4 'Segoe UI', Arial, sans-serif; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.project-page h1 { font: 400 30px/1.35 'Segoe UI', Arial, sans-serif; margin: 0 0 24px; color: var(--text); }
.project-page dl { margin: 0 0 34px; font-size: 15px; line-height: 1.7; }
.project-page dt { font-weight: 700; margin-top: 18px; }
.project-page dt:first-child { margin-top: 0; }
.project-page dd { margin: 4px 0 0; }
.project-page .note { font-size: 13px; color: var(--text-dim); margin: -20px 0 30px; }
.project-page .project-body { border-top: 1px solid var(--border); padding-top: 6px; }
.project-page .project-body h2 { font: 700 20px/1.4 'Segoe UI', Arial, sans-serif; margin: 38px 0 14px; color: var(--text); }
.project-page .project-body h3 { font: 700 17px/1.4 'Segoe UI', Arial, sans-serif; margin: 26px 0 10px; color: var(--text); }
.project-page .project-body h4 { font: 700 15px/1.4 'Segoe UI', Arial, sans-serif; margin: 18px 0 6px; color: var(--text); }
.project-page .project-body p { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: var(--text); }
.project-page .project-body ul, .project-page .project-body ol { margin: 0 0 16px; padding-left: 22px; font-size: 15px; line-height: 1.7; }
.project-page .project-body li { margin-bottom: 4px; }
.project-page .project-body strong { font-weight: 700; }
/* Szeroka strona projektu (np. z osadzonym dashboardem): uklad jak na starej stronie -
   okladka po lewej (1/3), dane projektu po prawej (2/3), tresc w kolumnie ok. 1030 px, osadzenie na pelna szerokosc */
.project-page--wide { max-width: 1680px; }
.project-page--wide .back-link { display: block; max-width: 1400px; margin-left: auto; margin-right: auto; }
.project-page--wide:not(.project-case-study) .project-body > *:not(.trophy-embed-wrapper):not(.project-figure):not(.tool-cards) { max-width: 1030px; margin-left: auto; margin-right: auto; }
.project-page--wide .project-body { border-top: 0; padding-top: 0; }
.project-page .project-figure { margin: 28px 0; }
.project-page .project-figure img { display: block; width: 100%; height: auto; border-radius: 16px; }
.project-page--wide .project-figure { max-width: 1200px; margin-left: auto; margin-right: auto; }
.trophy-embed-wrapper { width: 100%; max-width: 1600px; margin: 34px auto; overflow: hidden; border-radius: 18px; background: #06111f; }
#trophy-frame { display: block; width: 100%; min-height: 1200px; border: 0; }
@media(max-width: 760px) { .project-page h1 { font-size: 24px; } }

/* ---- "Droga do Trofeum": bogatszy uklad hero (makieta + kafelki + karty) ---- */
.project-hero-wrap { max-width: 1400px; margin: 0 auto 6px; }
.project-page--wide .project-hero-wrap .project-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.project-page--wide .project-hero-wrap .project-tags li { font: 700 11px/1.4 'Segoe UI', Arial, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); border: 1px solid var(--border); border-radius: 20px; padding: 5px 13px; background: var(--bg-alt); }
.project-page--wide .project-hero-wrap h1 { max-width: none; margin: 0 0 18px; font-size: 34px; }
.project-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding-bottom: 34px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.project-hero__intro { font-size: 15.5px; line-height: 1.75; color: var(--text); margin: 0 0 18px; max-width: 48ch; }
.project-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
@media(max-width: 900px) { .project-hero { grid-template-columns: 1fr; } }

.tool-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 0 44px; }
.tool-card { border: 1px solid var(--border); border-radius: 16px; padding: 20px 18px; background: #fff; }
.tool-card__icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 10px; }
.tool-card h3 { font: 700 15px/1.3 'Segoe UI', Arial, sans-serif; margin: 0 0 8px; }
.tool-card p, .tool-card a { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin: 0; }
.tool-card a { color: var(--accent); text-decoration: none; font-weight: 600; }
.tool-card a:hover { text-decoration: none; }
@media(max-width: 900px) { .tool-cards { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 520px) { .tool-cards { grid-template-columns: 1fr; } }




@media(max-width: 760px) { .project-hero-wrap h1 { font-size: 26px; } }

/* ---- widget czatu Warkana (osadzony na stronie projektu) ---- */
#warkan-chat { margin: 0 0 34px; padding: 18px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px; }
#warkan-log { height: 260px; overflow-y: auto; margin-bottom: 12px; padding-right: 4px; display: flex; flex-direction: column; gap: 8px; }
.warkan-msg { font-size: 14px; line-height: 1.6; padding: 8px 12px; border-radius: 10px; max-width: 90%; }
.warkan-msg b { font-weight: 700; }
.warkan-bot { background: #fff; border: 1px solid var(--border); align-self: flex-start; }
.warkan-user { background: var(--accent); color: #fff; align-self: flex-end; }
.warkan-links { background: transparent; border: 1px dashed var(--border); align-self: flex-start; font-size: 13px; }
.warkan-links a { color: var(--accent); }
.warkan-input-row { display: flex; gap: 8px; }
.warkan-input-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font: 15px/1.4 Lato, Arial, sans-serif; background: #fff; color: var(--text); }
.warkan-input-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.warkan-input-row button { padding: 10px 18px; border: 0; border-radius: 8px; background: var(--text); color: #fff; font: 600 14px/1.2 'Segoe UI', Arial, sans-serif; cursor: pointer; }
.warkan-input-row button:hover { background: var(--accent); }
.warkan-input-row button:disabled { opacity: .6; cursor: default; }

/* ---- cards ---- */

/* ---- certificates list ---- */
.cert-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* ---- blog ---- */

article.post {
  padding: 60px clamp(20px, 5vw, 64px) 90px;
  max-width: 720px;
  margin: 0 auto;
}
article.post .date { color: var(--text-dim); font-size: 14px; margin-bottom: 10px; }
article.post h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 24px; }
article.post p { font-size: 17px; }
article.post img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 12px; margin: 28px 0; }
article.post figure { margin: 28px 0; }
article.post figcaption { font-size: 13px; color: var(--text-dim); margin-top: 8px; text-align: center; }
.signature-wrap { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 48px 0 0; padding-top: 24px; border-top: 1px solid var(--border); }
.signature-text { margin: 0; font: italic 16px/1.4 'Merriweather', Georgia, serif; color: var(--text-dim); }
.signature-img { margin: 0; }
.signature-img img { display: inline-block; width: auto; max-height: 60px; margin: 0; border-radius: 0; }

/* ---- coffee cta ---- */

/* ---- footer ---- */
.site-footer {
  background: var(--accent-bg);
  padding: 20px clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  color: #24291c;
  font-size: 13px;
}

/* ---- prawdziwy naglowek (logo + nazwisko + nawigacja) ---- */
.header-top {
  text-align: center;
  padding: 34px clamp(20px, 5vw, 64px) 18px;
}
.logo-wolf { width: 100px; height: auto; margin-bottom: 10px; }
.site-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.site-tagline {
  font-family: "Courier New", monospace;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin: 6px 0 0;
}
.main-nav-real {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.nav-left { display: flex; gap: 26px; flex-wrap: wrap; }
.nav-left a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.nav-left a:hover, .nav-left a.active { border-bottom-color: var(--accent-bg); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-right .blog-link {
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}
.nav-right .icon-link img,
.nav-right .icon-link svg { width: 20px; height: 20px; display: block; }
.nav-right .icon-link { color: var(--text); line-height: 0; }
.nav-right .icon-link:hover { opacity: .7; }

/* ---- ramka hero (odtworzona z realnej strony) ---- */
.hero-frame {
  border: 1px solid var(--border);
  border-radius: 18px;
  margin: 30px clamp(20px, 5vw, 64px) 50px;
  padding: clamp(20px, 4vw, 44px);
}
.hero-top {
  display: flex;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 30px;
}
.hero-card {
  flex: 1;
  background: var(--accent-bg);
  border-radius: 16px;
  padding: 34px clamp(18px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #24291c;
}
.hero-card p { margin: 0 0 16px; text-align: center; font-size: 15px; line-height: 1.6; }
.hero-card p:last-child { margin-bottom: 0; }
.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.badge-img { width: 90px; height: 90px; flex: none; }
.hero-badge-row p { margin: 0; font-size: 14px; }
.hero-frame .cta-row { justify-content: center; }

@media (max-width: 760px) {
  .main-nav-real { flex-direction: column; align-items: flex-start; }
  .hero-top { flex-direction: column; }
}

/* ---- banner zgody na cookies (cookie-consent.js) ---- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(20px, 5vw, 48px); background: #20241f; color: #f2f0e8; box-shadow: 0 -6px 20px rgba(0,0,0,.18); }
.cookie-banner__text { margin: 0; flex: 1 1 420px; font-size: 13.5px; line-height: 1.6; color: #dcdad0; }
.cookie-banner__text a { color: #cfd8bb; }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; flex: 0 0 auto; }
.cookie-banner .btn-outline { border-color: #565b4c; color: #f2f0e8; }
.cookie-banner .btn-outline:hover { background: #2b3128; border-color: #7c8768; color: #fff; }
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .btn { flex: 1; }
}

/* ---- osadzony wykres Tableau przed zgoda na cookies (polityka-cookies.html) ---- */
.tableau-consent-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; background: var(--bg-alt); border-radius: 12px; box-sizing: border-box; }
.tableau-consent-placeholder p { margin: 0; max-width: 46ch; font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.tableau-consent-placeholder a { color: var(--accent); font-size: 13px; }
/* Filmy YouTube ladowane dopiero po zgodzie (cookie-consent.js) - zaslepka zajmuje miejsce filmu 16:9. */
.video-consent { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.video-consent > iframe { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.video-consent--spaced { margin: 24px 0; }
.dogs-award__video .video-consent { height: 100%; }
/* hidden musi wygrac z display:flex zaslepki i display:block ramek (tez z !important w project-case-study.css),
   inaczej po wczytaniu wykresu/filmu zaslepka zostaje na wierzchu i go zaslania. */
.tableau-consent-placeholder[hidden] { display: none !important; }
[data-tableau-wrap] iframe[hidden], [data-youtube-wrap] iframe[hidden] { display: none !important; }
