/*
Theme Name: Vertum Finanse
Theme URI: https://vertumfinanse.pl
Author: LYK
Description: Dedykowany motyw jednostronicowy dla biura rachunkowego Vertum Finanse. Układ zablokowany w kodzie, treści edytowalne przez pola ACF. Wymaga wtyczki Advanced Custom Fields (wersja darmowa wystarczy).
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vertum
*/

/* Układ: wąska kolumna treści na ciepłej kości słoniowej, przecinana pełnoekranowymi
   blokami granatu; złoto wyłącznie jako włos linii, etykieta i przycisk. */
:root {
  color-scheme: light;

  --ink:        #0E1C33;
  --ink-deep:   #091425;
  --ink-soft:   #1B2E4E;
  --paper:      #F7F4EE;
  --paper-pure: #FFFDF9;
  --gold:       #9C7C3F;
  --gold-lift:  #D8BC80;
  --muted:      #5B6679;
  --line:       #DFD8CA;

  --display: "Spectral", "Times New Roman", Georgia, serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 62ch;
  --wide: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper-pure);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.on-dark .eyebrow { color: var(--gold-lift); }

/* ---------- pasek górny ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, .93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Pasek dostaje własną, szerszą miarę niż kolumna treści — sygnet, menu, telefon
   i przycisk mieszczą się wtedy w jednej linii na typowych monitorach. */
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  flex-wrap: wrap;
  padding-block: 14px;
  max-width: var(--wide);
}

.mark { display: flex; flex-direction: column; gap: 1px; margin-right: auto; text-decoration: none; flex: 0 0 auto; }
.mark b {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(19px, 2.6vw, 23px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.mark span {
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 2px;
}

.nav { display: flex; gap: clamp(11px, 1.5vw, 21px); flex-wrap: wrap; font-size: 13px; min-width: 0; flex: 0 1 auto; }
.nav a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav a:hover, .nav a:focus-visible { color: var(--ink); }

.topline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 0 0 auto; }
.phone {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--ink-deep);
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 11px 22px;
  border: 0;
  border-radius: 1px;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease;
}
.btn:hover { background: #8A6C34; }
.btn-ghost {
  background: transparent;
  color: var(--gold-lift);
  border: 1px solid rgba(216, 188, 128, .55);
}
.btn-ghost:hover { background: rgba(216, 188, 128, .14); }

:is(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- blok granatowy ---------- */
.dark {
  background: var(--ink);
  color: var(--paper-pure);
  position: relative;
  overflow: hidden;
}
.dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(216,188,128,.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(216,188,128,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(130% 90% at 78% 8%, #000 10%, transparent 72%);
  mask-image: radial-gradient(130% 90% at 78% 8%, #000 10%, transparent 72%);
}
.dark > * { position: relative; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(56px, 10vw, 104px) clamp(48px, 8vw, 86px); }
.hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 300;
  max-width: 17ch;
  margin-top: 20px;
}
.hero h1 em { font-style: normal; color: var(--gold-lift); }
.hero .lede {
  max-width: 54ch;
  margin-top: 24px;
  font-size: clamp(16px, 1.6vw, 18px);
  color: rgba(253, 251, 247, .8);
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin: clamp(44px, 7vw, 72px) 0 0;
  background: rgba(216, 188, 128, .22);
  border: 1px solid rgba(216, 188, 128, .22);
}
.facts div { background: var(--ink); padding: 20px 22px; min-width: 0; }
.facts dt {
  font-family: var(--display);
  font-size: clamp(22px, 3vw, 28px);
  color: var(--gold-lift);
  font-variant-numeric: tabular-nums;
}
.facts dd { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: rgba(253, 251, 247, .72); }

/* ---------- sekcje ---------- */
.section { padding-block: clamp(56px, 9vw, 96px); }
.head { max-width: var(--measure); }
.head h2 { font-size: clamp(26px, 4vw, 40px); margin-top: 14px; }
.head p { margin-top: 18px; color: var(--muted); max-width: 56ch; }
.on-dark .head p { color: rgba(253, 251, 247, .72); }

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.service {
  padding: 28px 28px 32px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.service .idx {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.service h3 { font-size: 21px; margin-top: 10px; }
.service p { margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---------- sloty / zdjęcia ---------- */
.ph {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: linear-gradient(140deg, var(--ink-soft), var(--ink-deep));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(216,188,128,.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(216,188,128,.07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.ph span {
  position: relative;
  color: var(--gold-lift);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  padding: 14px;
  line-height: 1.7;
}
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-portrait { aspect-ratio: 3 / 4; }

/* Pas jest pełnoekranowy, więc na szerokim monitorze proporcja 21:9 urosłaby
   do kilkuset pikseli wysokości i zlała się z granatową sekcją pod spodem.
   Sufit wysokości tnie kadr zamiast go rozciągać. */
.band .ph {
  aspect-ratio: 21 / 9;
  width: 100%;
  max-height: min(42vh, 440px);
  border-bottom: 1px solid rgba(216, 188, 128, .2);
}

/* ---------- cfo ---------- */
.cfo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.cfo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.cfo-list li { padding-left: 22px; position: relative; font-size: 15.5px; color: rgba(253, 251, 247, .82); }
.cfo-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 10px; height: 1px;
  background: var(--gold-lift);
}
.cfo-list b { display: block; color: var(--paper-pure); font-weight: 500; font-size: 16.5px; margin-bottom: 3px; }

/* ---------- jak pracujemy ---------- */
.steps { display: grid; margin-top: clamp(32px, 5vw, 52px); }
.step {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 32px);
  padding-block: 26px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step .n {
  font-family: var(--display);
  font-size: 30px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.step h3 { font-size: 19px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 58ch; }

/* ---------- o biurze ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 64px);
  align-items: start;
}
.prose p { margin-top: 18px; max-width: var(--measure); color: var(--muted); }
.prose p:first-child { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 500; }

.note {
  border: 1px dashed rgba(156, 124, 63, .58);
  background: rgba(156, 124, 63, .06);
  padding: 20px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13.5px;
}
.note b { display: block; color: var(--gold); font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }

.figure { border: 1px solid var(--line); background: var(--paper-pure); padding: 14px; margin: 0; }
.figure figcaption { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ---------- baza wiedzy ---------- */
/* Stała liczba kolumn, nie auto-fit: przy jednym albo dwóch wpisach kafelek
   ma zostać kafelkiem, a nie rozciągnąć się na całą szerokość sekcji. */
.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 34px);
  margin-top: clamp(34px, 5vw, 52px);
}
@media (max-width: 880px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .posts { grid-template-columns: minmax(0, 1fr); } }
.post { display: grid; gap: 13px; align-content: start; min-width: 0; }
.post h3 { font-size: 19px; }
.post h3 a { text-decoration: none; }
.post h3 a:hover { color: var(--gold); }
.post p { color: var(--muted); font-size: 14.5px; }
.post .more { font-size: 12.5px; letter-spacing: 0.04em; color: var(--gold); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; justify-self: start; }
.post .cat { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---------- rekomendacje (widget zewnętrzny) ----------
   Wtyczka z opiniami wstrzykuje własny HTML i własne style. Nie nadpisujemy ich
   na siłę — ustawiamy tylko ramy: szerokość, odstęp i neutralne tło, żeby widget
   nie rozpychał strony i nie wywoływał poziomego przewijania. */
.reviews {
  margin-top: clamp(32px, 5vw, 48px);
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}
.reviews :is(img, iframe) { max-width: 100%; }
.reviews > * { max-width: 100%; }

/* ---------- faq ---------- */
.faq { margin-top: clamp(32px, 5vw, 48px); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 36px 20px 0;
  font-size: 17px;
  font-family: var(--display);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 18px;
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--muted); font-size: 15px; max-width: 62ch; }

/* ---------- kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 64px);
  align-items: start;
}
form.vf-form { display: grid; gap: 16px; margin-top: 30px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.vf-form label { display: grid; gap: 7px; font-size: 12.5px; letter-spacing: 0.04em; color: rgba(253, 251, 247, .76); min-width: 0; }
.vf-form :is(input, textarea, select) {
  font: inherit;
  font-size: 15px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(216,188,128,.3);
  border-radius: 1px;
  color: var(--paper-pure);
  padding: 11px 13px;
  width: 100%;
  min-width: 0;
}
.vf-form textarea { resize: vertical; min-height: 110px; }
.vf-form ::placeholder { color: rgba(247,244,238,.38); }
.consent { grid-template-columns: 20px 1fr; display: grid; gap: 11px; align-items: start; font-size: 12.5px; line-height: 1.55; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); }
.form-note { font-size: 12.5px; color: rgba(253, 251, 247, .62); }
.form-status { font-size: 14px; color: var(--gold-lift); }

.details { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 20px; }
.details div { display: grid; gap: 4px; }
.details dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-lift); }
.details dd { margin: 0; font-size: 16px; }
.details a { text-decoration: none; border-bottom: 1px solid rgba(216,188,128,.4); }

/* ---------- blog: lista i wpis ---------- */
.page-head { padding-block: clamp(48px, 7vw, 76px) 0; }
.page-head h1 { font-size: clamp(30px, 5vw, 46px); margin-top: 14px; }
.page-head p { margin-top: 16px; color: var(--muted); max-width: 56ch; }

.entry { max-width: 70ch; margin-inline: auto; }
.entry .meta { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.entry h1 { font-size: clamp(28px, 4.4vw, 44px); margin-top: 12px; }
.entry .lead-img { margin-top: 32px; }
.entry-content { margin-top: 32px; }
.entry-content > * { margin-top: 20px; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { font-size: 26px; margin-top: 38px; }
.entry-content h3 { font-size: 20px; margin-top: 30px; }
.entry-content p, .entry-content li { color: var(--muted); }
.entry-content :is(ul, ol) { padding-left: 22px; }
.entry-content blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 20px;
  font-family: var(--display);
  font-size: 19px;
  color: var(--ink);
}
.entry-content a { color: var(--gold); }
.entry-content img { display: block; }

.pagination { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 44px; }
.pagination .page-numbers {
  padding: 8px 14px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.pagination .page-numbers.current { background: var(--ink); color: var(--paper-pure); border-color: var(--ink); }

.back-link { display: inline-block; margin-top: 44px; font-size: 13px; color: var(--gold); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- stopka ---------- */
.site-footer { background: var(--ink-deep); color: rgba(253, 251, 247, .64); padding-block: 44px; font-size: 13px; }
.foot-grid { display: flex; gap: 28px; flex-wrap: wrap; justify-content: space-between; align-items: end; }
.site-footer .mark b { color: var(--paper-pure); }
.site-footer .mark span { color: rgba(247,244,238,.5); }
.reg { font-variant-numeric: tabular-nums; line-height: 1.8; }

/* Powyżej 1040 px wszystko stoi w jednej linii i nic się nie zawija. */
@media (min-width: 1041px) {
  .topbar .wrap { flex-wrap: nowrap; }
  .nav { flex-wrap: nowrap; white-space: nowrap; }
}

/* Poniżej tej szerokości telefon ustępuje miejsca — zostaje przycisk wyceny,
   a na telefonie numer i tak jest w sekcji kontaktu i w stopce. */
@media (max-width: 1040px) {
  .topbar .phone { display: none; }
}

@media (max-width: 760px) {
  .cfo-grid, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .service { padding-right: 0; }
}

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