/* ==========================================================================
   cty. — blog fotograficzny dla początkujących
   Kierunek: dokumentacja techniczna / arkusz specyfikacji fotograficznej
   ========================================================================== */

:root{
  --paper:      #F7F5F0;
  --paper-dim:  #EFEBE1;
  --ink:        #1B2027;
  --steel:      #5B6472;
  --steel-soft: #8993A1;
  --amber:      #D97706;
  --amber-dim:  #FFF1DC;
  --teal:       #0F6E6E;
  --hairline:   #DAD5C9;
  --hairline-2: #E4E0D5;

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --max-w: 1160px;
  --radius: 3px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }

a{ color: var(--teal); text-decoration-color: rgba(15,110,110,0.35); text-underline-offset: 3px; }
a:hover{ text-decoration-color: currentColor; }

:focus-visible{
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

h1, h2, h3, h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p{ margin: 0 0 1.2em; }

.mono{ font-family: var(--font-mono); }

.wrap{
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- eyebrow / tag labels ---------- */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}
.eyebrow::before{
  content: "";
  width: 16px;
  height: 1px;
  background: var(--amber);
  display: inline-block;
}

/* ---------- topbar ---------- */
.topbar{
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.topbar-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--steel);
  padding: 8px 0;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar-inner a{ color: var(--steel); }
.topbar-inner a:hover{ color: var(--ink); }
.topbar-sep{ opacity: 0.4; margin: 0 10px; }

/* ---------- header / nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247,245,240,0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.site-header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo{
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo .dot{ color: var(--amber); }
.logo .pl{ color: var(--steel-soft); font-weight: 400; }

.nav{
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
}
.nav a:hover{ color: var(--teal); }
.nav a.active{ color: var(--amber); }
.nav a.active::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--amber);
}
.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  width: 38px; height: 38px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 760px){
  .nav-toggle{ display: inline-flex; align-items: center; justify-content: center; }
  .nav{
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
    display: none;
  }
  .nav.open{ display: flex; }
}

/* ---------- buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary{
  background: var(--amber);
  color: #1B1200;
  border-color: var(--amber);
}
.btn-primary:hover{ background: #C36C05; text-decoration:none; }
.btn-ghost{
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-ghost:hover{ border-color: var(--ink); text-decoration:none; }

/* ---------- hero ---------- */
.hero{
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--hairline);
}
.hero-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; gap: 40px; }
}
.hero h1{
  font-size: clamp(32px, 4.6vw, 50px);
  margin: 14px 0 20px;
}
.hero h1 em{
  font-style: normal;
  color: var(--amber);
}
.hero-lede{
  font-size: 18px;
  color: var(--steel);
  max-width: 46ch;
  margin-bottom: 28px;
}
.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* exposure-triangle schematic */
.schematic{
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #FCFBF8;
  padding: 20px;
}
.schematic-label{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--steel-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.schematic svg{ width: 100%; height: auto; }
.schem-line{ stroke: var(--steel-soft); stroke-width: 1; }
.schem-dash{ stroke: var(--hairline); stroke-width: 1; stroke-dasharray: 3 4; }
.schem-node{ fill: var(--paper); stroke: var(--amber); stroke-width: 1.6; }
.schem-node.teal{ stroke: var(--teal); }
.schem-text{ font-family: var(--font-mono); font-size: 11px; fill: var(--ink); }
.schem-text.dim{ fill: var(--steel); font-size: 9.5px; }

/* ---------- section headings ---------- */
.section{ padding: 64px 0; }
.section-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 18px;
}
.section-head h2{ font-size: 28px; margin: 6px 0 0; }
.section-head .eyebrow{ margin-bottom: 4px; }
.section-head .more{ font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }

/* ---------- post index cards (doc-index style) ---------- */
.post-index{
  border-top: 1px solid var(--hairline);
}
.post-row{
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  color: inherit;
}
.post-row:hover .post-title{ color: var(--teal); }
.post-slug{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--steel-soft);
  padding-top: 4px;
  word-break: break-word;
}
.post-title{
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  transition: color 0.15s ease;
}
.post-desc{
  color: var(--steel);
  font-size: 15px;
  max-width: 62ch;
  margin: 0;
}
.post-meta{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--steel-soft);
  text-align: right;
  white-space: nowrap;
  padding-top: 4px;
}
@media (max-width: 700px){
  .post-row{ grid-template-columns: 1fr; gap: 6px; }
  .post-meta{ text-align: left; }
}

/* ---------- spec block (parameter sheet) ---------- */
.spec-block{
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  background: #FCFBF8;
  padding: 18px 22px;
  margin: 28px 0;
}
.spec-title{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}
.spec-row{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--hairline-2);
}
.spec-row:last-child{ border-bottom: none; }
.spec-key{ color: var(--steel); }
.spec-value{ color: var(--ink); font-weight: 600; text-align: right; }

/* callout / note */
.callout{
  background: var(--amber-dim);
  border: 1px solid #F1D6A6;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 15px;
}
.callout .eyebrow{ color: #8A5000; margin-bottom: 6px; }
.callout .eyebrow::before{ background: #8A5000; }

/* ---------- article layout ---------- */
.article-shell{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 48px 0 80px;
  align-items: start;
}
@media (max-width: 900px){
  .article-shell{ grid-template-columns: 1fr; }
}
.toc{
  position: sticky;
  top: 96px;
}
.toc-title{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-soft);
  margin-bottom: 12px;
}
.toc ol{
  list-style: none;
  margin: 0; padding: 0;
  border-left: 1px solid var(--hairline);
}
.toc li{ margin: 0; }
.toc a{
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--steel);
  text-decoration: none;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  margin-left: -1px;
}
.toc a:hover{ color: var(--ink); }
.toc a.active{
  color: var(--amber);
  border-left-color: var(--amber);
}
@media (max-width: 900px){
  .toc{ position: static; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }
}

.article{ max-width: 72ch; }
.article-meta{
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--steel-soft);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.article h1{ font-size: clamp(28px, 4vw, 40px); margin-bottom: 18px; }
.article-lede{
  font-size: 18px;
  color: var(--steel);
  margin-bottom: 32px;
}
.article h2{
  font-size: 23px;
  margin-top: 2.4em;
  padding-top: 0.2em;
}
.article h2 .num{
  font-family: var(--font-mono);
  color: var(--amber);
  margin-right: 10px;
  font-size: 0.75em;
}
.article h3{ font-size: 18px; margin-top: 1.6em; }
.article ul, .article ol{ padding-left: 1.3em; margin-bottom: 1.2em; }
.article li{ margin-bottom: 0.5em; }
.article strong{ color: var(--ink); }

.step-list{ counter-reset: step; list-style: none; padding-left: 0; }
.step-list > li{
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 22px;
}
.step-list > li::before{
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: -1px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  width: 30px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: #FCFBF8;
}
.step-list h3{ margin: 0 0 6px; font-size: 16.5px; }
.step-list p{ margin: 0; color: var(--steel); font-size: 15px; }

hr.rule{
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 3em 0;
}

.article-nav{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 13px;
}
.article-nav a{ text-decoration: none; }
.article-nav .dir{ display:block; color: var(--steel-soft); font-size: 11px; margin-bottom: 4px; }

/* ---------- about / values strip ---------- */
.strip{
  background: var(--ink);
  color: var(--paper);
}
.strip .section-head{ border-color: rgba(255,255,255,0.15); }
.strip .eyebrow{ color: var(--steel-soft); }
.strip .eyebrow::before{ background: var(--amber); }
.strip h2{ color: var(--paper); }
.value-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 760px){ .value-grid{ grid-template-columns: 1fr; } }
.value-card .k{
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 12px;
  margin-bottom: 10px;
  display: block;
}
.value-card h3{ color: var(--paper); font-size: 18px; margin-bottom: 8px; }
.value-card p{ color: #B9BEC6; font-size: 14.5px; margin: 0; }

/* ---------- footer ---------- */
.site-footer{
  border-top: 1px solid var(--hairline);
  padding: 48px 0 28px;
}
.footer-grid{
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 760px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-title{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-soft);
  margin-bottom: 14px;
}
.footer-grid address{ font-style: normal; color: var(--steel); font-size: 14.5px; line-height: 1.8; }
.footer-grid ul{ list-style: none; margin: 0; padding: 0; }
.footer-grid li{ margin-bottom: 10px; }
.footer-grid a{ color: var(--steel); text-decoration: none; font-size: 14.5px; }
.footer-grid a:hover{ color: var(--teal); }
.footer-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--steel-soft);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- back to top ---------- */
#backtotop{
  position: fixed;
  right: 22px; bottom: 22px;
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  font-size: 16px;
}
#backtotop.show{ opacity: 1; pointer-events: auto; transform: translateY(0); }
