/* cedr.biz — Brutalist Mono / Heartwood
   Paleta: heartwood #B8341E + red-deep #6C1B0E + red-bright #E84A2B + cream #F0E6D5 + ink #0A0503
   Typo: JetBrains Mono (display/UI) + Inter Tight (oversize headings/body sans) */

:root {
  --red: #B8341E;
  --red-deep: #6C1B0E;
  --red-bright: #E84A2B;        /* tylko border / background, NIE tekst na red */
  --accent: #FFD4BB;             /* tekst akcent na red background (kontrast 4.5+ dla regular text) */
  --red-soft: #D1502E;
  --cream: #F0E6D5;
  --ink: #0A0503;
  --mono-line: rgba(240, 230, 213, .3);
  --mono-line-soft: rgba(240, 230, 213, .15);

  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Inter Tight', system-ui, -apple-system, sans-serif;

  --fs-mono: 14px;
  --fs-mono-sm: 12px;
  --fs-mono-xs: 11px;
  --fs-body: 18px;
  --fs-lede: 22px;
  --fs-h2: clamp(36px, 5vw, 64px);
  --fs-h3: 26px;
  --fs-display: clamp(64px, 11vw, 168px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--red);
  color: var(--cream);
  font-family: var(--mono);
  font-size: var(--fs-mono);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* === NAWIGACJA === */
.nav {
  padding: 28px 40px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  border-bottom: 1px dashed var(--mono-line);
  font-family: var(--mono);
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.brand::before { content: '['; opacity: .5; }
.brand::after { content: ']'; opacity: .5; }

.nav-meta {
  font-size: var(--fs-mono-xs);
  color: var(--cream);
  text-align: center;
}
.nav-meta::before { content: '> '; color: var(--accent); }

.nav-links {
  display: flex;
  gap: 20px;
  font-size: var(--fs-mono-sm);
}

.nav-links a {
  color: var(--cream);
  transition: color .15s;
}
.nav-links a::before { content: '['; opacity: .4; padding-right: 1px; }
.nav-links a::after { content: ']'; opacity: .4; padding-left: 1px; }
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a[aria-current="page"]::before,
.nav-links a[aria-current="page"]::after { opacity: 1; color: var(--accent); }

.tel { color: var(--cream) !important; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* === HERO (home) === */
.hero {
  padding: 96px 40px 96px;
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
}

.hero::after {
  content: '/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--mono-line);
  overflow: hidden;
  white-space: nowrap;
  padding: 0 40px;
  letter-spacing: -0.04em;
}

.hero-prompt {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  color: var(--cream);
  margin-bottom: 24px;
}
.hero-prompt::before { content: '$ '; color: var(--accent); }

.hero-display {
  font-family: var(--sans);
  font-weight: 800;
  font-size: var(--fs-display);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--cream);
  margin-bottom: 32px;
}
.hero-display .accent { color: var(--accent); }
.hero-display .underscore { color: var(--accent); font-weight: 400; }

.hero-meta-box {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  border: 1px solid var(--mono-line);
  padding: 20px 24px;
  max-width: 480px;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, .12);
}

.hero-meta-box .line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  gap: 16px;
}
.hero-meta-box .line .k::before { content: '> '; color: var(--accent); }
.hero-meta-box .v { font-weight: 500; }

.hero-right .label {
  font-family: var(--mono);
  font-size: var(--fs-mono-xs);
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.hero-right .label::before { content: '// '; color: var(--accent); }

.hero-slogan {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
}
.hero-slogan em { color: var(--accent); font-style: normal; }

.hero-body {
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.45;
  opacity: .92;
  margin-bottom: 24px;
}
.hero-body em { color: var(--accent); font-style: normal; }

/* === SEKCJA "Czytaj dalej" / TILES === */
.section-tiles {
  padding: 80px 40px;
  border-top: 1px dashed var(--mono-line);
  border-bottom: 1px dashed var(--mono-line);
}

.section-heading {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 40px;
}
.section-heading::before { content: '// '; color: var(--accent); }

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tile {
  border: 1px solid var(--mono-line);
  padding: 28px 24px 32px;
  background: rgba(0, 0, 0, .08);
  transition: background .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  color: var(--cream);
}

.tile:hover {
  background: var(--red-deep);
  border-color: var(--accent);
}

.tile-id {
  font-family: var(--mono);
  font-size: var(--fs-mono-xs);
  color: var(--cream);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: auto;
}
.tile-id::before { content: '['; padding-right: 1px; }
.tile-id::after { content: ']'; padding-left: 1px; }

.tile-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 28px 0 16px;
}
.tile-name .accent { color: var(--accent); }

.tile-desc {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  opacity: .85;
}

.tile-arrow {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
}
.tile-arrow::before { content: '--> '; color: var(--accent); }

/* === SPEC TREE (home) === */
.section-spec {
  padding: 96px 40px;
}

.spec-tree {
  max-width: 1200px;
  margin: 0 auto;
}

.spec-tree .row {
  display: grid;
  grid-template-columns: 60px 220px 1fr;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px dashed var(--mono-line);
  gap: 16px;
}

.spec-tree .branch { color: var(--accent); font-size: 14px; }
.spec-tree .key { font-size: 13px; opacity: .65; }
.spec-tree .val {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.spec-tree .val .unit {
  font-family: var(--mono);
  font-size: 13px;
  opacity: .55;
  font-weight: 400;
  margin-left: 8px;
}
.spec-tree .val .accent { color: var(--accent); }

/* === ARTICLE (podstrony treści) === */
.article {
  max-width: 980px;
  margin: 0 auto;
  padding: 80px 40px 96px;
}

.article-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  align-items: baseline;
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px dashed var(--mono-line);
}

.chapter-num {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  opacity: .65;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chapter-num::before { content: '['; opacity: .5; }
.chapter-num::after { content: ']'; opacity: .5; }

.article-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--cream);
  margin: 0 0 12px;
}
.article-title .accent { color: var(--accent); }
.article-title em { color: var(--accent); font-style: normal; }

.article-meta {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  opacity: .65;
  letter-spacing: 0.04em;
}
.article-meta::before { content: '// '; color: var(--accent); }

.article p {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  margin: 0 0 1.2em;
  max-width: 70ch;
  color: var(--cream);
}

.article p.lede {
  font-family: var(--sans);
  font-size: var(--fs-lede);
  line-height: 1.5;
  font-weight: 400;
  margin: 0 0 48px;
  border-left: 2px solid var(--red-bright);
  padding-left: 24px;
  color: var(--cream);
}

.article h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--cream);
  margin: 72px 0 24px;
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.article h2 .h2-num {
  font-family: var(--mono);
  font-weight: 400;
  font-size: var(--fs-mono-sm);
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
  opacity: .9;
}

.article h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--cream);
  margin: 32px 0 12px;
}

.article ul,
.article ol {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  margin: 0 0 1.4em;
  padding-left: 0;
  list-style: none;
  max-width: 70ch;
}

.article ul li,
.article ol li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 0.6em;
}

.article ul li::before {
  content: '— ';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

.article ol {
  counter-reset: list;
}
.article ol li::before {
  counter-increment: list;
  content: '[' counter(list, decimal-leading-zero) ']';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
}

.article strong {
  color: var(--cream);
  font-weight: 700;
}
.article em { color: var(--accent); font-style: normal; font-weight: 500; }

.article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(232, 74, 43, .5);
  text-underline-offset: 2px;
  transition: color .15s;
}
.article a:hover { color: var(--cream); }

/* === FIGURE === */
.figure {
  margin: 56px -40px;
  border: 1px solid var(--mono-line);
  padding: 16px;
  background: rgba(0, 0, 0, .12);
}

.figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--mono-line);
}

.figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  opacity: .7;
}

.figure figcaption .place {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-mono-xs);
}

/* === PULL-QUOTE === */
.pull-quote {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin: 56px 0;
  padding: 32px;
  border: 1px solid var(--red-bright);
  background: rgba(0, 0, 0, .14);
  position: relative;
}

.pull-quote::before {
  content: '// pull-quote';
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-mono-xs);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: .9;
}

.pull-quote em { color: var(--accent); font-style: normal; }

/* === SPEC table (w artykule) === */
.article .spec {
  margin: 32px 0 48px;
  border: 1px solid var(--mono-line);
  background: rgba(0, 0, 0, .12);
  font-family: var(--mono);
}

.article .spec-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
  padding: 14px 20px;
  border-bottom: 1px dashed var(--mono-line);
  align-items: baseline;
}
.article .spec-row:last-child { border-bottom: none; }

.article .spec-key {
  font-size: var(--fs-mono-sm);
  opacity: .65;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.article .spec-key::before { content: '> '; color: var(--accent); }

.article .spec-val {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.article .spec-val strong { color: var(--accent); font-weight: 700; }

/* === FURTHER === */
.further {
  margin: 80px 0 0;
  padding-top: 32px;
  border-top: 1px dashed var(--mono-line);
}

.further-head {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 24px;
}
.further-head::before { content: '// '; color: var(--accent); }

.further-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.further-list li { margin: 0; padding: 0; }
.further-list li::before { content: none; }

.further-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--mono-line);
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 500;
  background: rgba(0, 0, 0, .08);
  transition: background .15s, border .15s;
}
.further-list a:hover {
  background: var(--red-deep);
  border-color: var(--accent);
  color: var(--cream);
}

.further-list .further-num {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  color: var(--accent);
  opacity: .85;
  white-space: nowrap;
}

/* === CTA === */
.section-cta {
  padding: 96px 40px;
  background: var(--red-deep);
  border-top: 1px dashed var(--mono-line);
}

.cta-box {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--mono-line);
  padding: 48px;
  background: rgba(0, 0, 0, .18);
}

.cta-prompt {
  font-family: var(--mono);
  font-size: var(--fs-mono-xs);
  opacity: .65;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.cta-prompt::before { content: '$ '; color: var(--accent); }

.cta-box h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 32px;
  color: var(--cream);
}
.cta-box h2 .accent { color: var(--accent); }
.cta-box h2 em { color: var(--accent); font-style: normal; }

.cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--red-bright);
  color: var(--cream);
  transition: background .15s, color .15s;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.btn::before { content: '>'; color: var(--accent); }
.btn:hover { background: var(--red-bright); color: var(--ink); }
.btn:hover::before { color: var(--ink); }
.btn-primary { background: var(--red-bright); color: var(--ink); }
.btn-primary::before { color: var(--ink); }

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 48px 0;
}

.contact-card {
  border: 1px solid var(--mono-line);
  padding: 32px;
  background: rgba(0, 0, 0, .12);
}

.contact-card h3 {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  font-weight: 500;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
}
.contact-card h3::before { content: '> '; color: var(--accent); }

.contact-value {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin: 0 0 12px;
  text-decoration: none;
  line-height: 1.1;
}
.contact-value:hover { color: var(--accent); }

.contact-note {
  font-family: var(--sans);
  font-size: 15px;
  opacity: .8;
  line-height: 1.5;
}

/* === FOOTER === */
.foot {
  padding: 40px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: var(--fs-mono-xs);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid var(--red-bright);
}

.foot .item::before { content: '// '; color: var(--accent); }

.foot-inner {
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
  border-bottom: 1px dashed var(--mono-line);
  padding-bottom: 32px;
}

.foot-brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.025em;
  color: var(--cream);
  margin: 0 0 8px;
  opacity: 1;
}

.foot-tagline {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  opacity: .75;
  max-width: 36ch;
  margin: 0 0 16px;
}

.foot-tel {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.foot h3 {
  font-family: var(--mono);
  font-size: var(--fs-mono-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
  color: var(--cream);
}
.foot h3::before { content: '// '; color: var(--accent); }

.foot a {
  display: block;
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cream);
  text-decoration: none;
  transition: color .15s;
}
.foot a:hover { color: var(--accent); }

.foot-bottom {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--fs-mono-xs);
}

/* === ANIMACJA wjazdu === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-display,
.hero-meta-box,
.hero-slogan,
.hero-body,
.tile,
.spec-tree .row,
.article-header,
.article > * {
  animation: fadeUp 600ms cubic-bezier(.2,.7,.2,1) both;
}
.hero-display { animation-delay: 60ms; }
.hero-meta-box { animation-delay: 140ms; }
.hero-slogan { animation-delay: 100ms; }
.hero-body { animation-delay: 180ms; }
.tile:nth-child(1) { animation-delay: 60ms; }
.tile:nth-child(2) { animation-delay: 120ms; }
.tile:nth-child(3) { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding: 56px 32px 80px; }
  .nav, .section-tiles, .section-spec, .article, .section-cta, .foot { padding-left: 32px; padding-right: 32px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .figure { margin-left: -32px; margin-right: -32px; }
}

@media (max-width: 760px) {
  :root {
    --fs-display: clamp(56px, 14vw, 96px);
    --fs-h2: clamp(28px, 8vw, 44px);
    --fs-body: 17px;
    --fs-lede: 19px;
  }
  .nav { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
  .nav-meta, .nav-links { text-align: left; justify-content: flex-start; }
  .nav-links { flex-wrap: wrap; gap: 12px 14px; }
  .hero { padding: 40px 20px 64px; gap: 40px; }
  .hero::after { padding: 0 20px; }
  .hero-display { word-break: break-word; }
  .hero-meta-box { padding: 16px 18px; }
  .section-tiles, .section-spec, .section-cta, .foot { padding: 56px 20px; }
  .article { padding: 48px 20px 64px; }
  .article-header { grid-template-columns: 1fr; gap: 12px; }
  .article h2 { flex-direction: column; gap: 6px; }
  .tiles { grid-template-columns: 1fr; }
  .spec-tree .row { grid-template-columns: 30px 1fr; gap: 8px; }
  .spec-tree .key { grid-column: 2; }
  .spec-tree .val { grid-column: 2; font-size: 24px; }
  .article .spec-row { grid-template-columns: 1fr; gap: 6px; }
  .cta-box { padding: 28px 20px; }
  .figure { margin: 36px -20px; padding: 10px; }
  .figure figcaption { flex-direction: column; gap: 4px; }
  .contact-grid { grid-template-columns: 1fr; }
  .further-list { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr; gap: 24px; }
  .foot-bottom { flex-direction: column; gap: 6px; }
}
