/* ===== PORACHUNKI Biuro Rachunkowe ===== */

:root {
  --cream: #faf9f4;
  --stone: #e9e7de;
  --ink: #2a2925;
  --ink-soft: #5d5b53;
  --maroon: #7c2e2e;
  --maroon-dark: #632424;
  --cobalt: #3b54b4;
  --gold: #c49a6c;
  --line: #e2e0d6;
  --radius: 10px;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-body: "Lato", system-ui, sans-serif;
  --font-mark: "Jost", system-ui, sans-serif;
  --font-accent: "Playfair Display", Georgia, serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
}

.container.narrow { width: min(800px, 100% - 2.5rem); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.8rem; }
h3 { font-size: 1.18rem; }

p { color: var(--ink-soft); }

a { color: inherit; }

.eyebrow {
  font-family: var(--font-mark);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--maroon);
  margin-bottom: 0.9rem;
}

.accent-text { color: var(--maroon); }

.tagline {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--cobalt);
  margin-bottom: 0.5rem;
}

.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-alt { background: #f3f2ea; border-block: 1px solid var(--line); }
.section-lead { max-width: 560px; margin-bottom: 2.8rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-lg { padding: 0.95rem 2rem; font-size: 1rem; }

.btn-accent {
  background: var(--maroon);
  color: var(--cream);
}
.btn-accent:hover { background: var(--maroon-dark); }

.btn-ghost {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--maroon); color: var(--maroon); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-tile {
  background: var(--maroon);
  color: var(--gold);
  font-family: var(--font-mark);
  font-weight: 500;
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1.75;
  padding: 0.55rem 0.9rem 0.55rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.site-nav a:not(.btn):hover { color: var(--maroon); }

.nav-cta { padding: 0.55rem 1.3rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 780px;
}

.hero h1 { margin: 0.2rem 0 1.4rem; }

.hero .lead {
  font-size: 1.12rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

/* ===== Cards (usługi) ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

/* Karty odwracane (hover / tap) */
.flip-card {
  perspective: 1200px;
  cursor: pointer;
  outline: none;
}

.flip-inner {
  position: relative;
  height: 215px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
}

.flip-card:hover .flip-inner,
.flip-card:focus-visible .flip-inner,
.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flip-front {
  background: var(--stone);
  align-items: flex-start;
}

.flip-front h3 { margin: 0; }

.flip-hint {
  position: absolute;
  right: 1.1rem;
  bottom: 0.85rem;
  font-size: 1.15rem;
  color: var(--gold);
  line-height: 1;
}

.flip-back {
  transform: rotateY(180deg);
  background: var(--maroon);
}

.cards-grid .flip-card:nth-child(even) .flip-back,
.steps .flip-card:nth-child(2) .flip-back {
  background: var(--cobalt);
}

.flip-back p {
  color: #f2ecdf;
  font-size: 0.97rem;
  line-height: 1.65;
}

@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: none; }
}

.card-icon {
  width: 42px;
  height: 42px;
  color: var(--maroon);
  margin-bottom: 1rem;
}

.card-icon svg { width: 30px; height: 30px; }

/* ===== O nas ===== */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split p + p { margin-top: 1rem; }

.checklist {
  list-style: none;
  margin-top: 1.6rem;
  display: grid;
  gap: 0.75rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.checklist li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M4 12.5l5 5L20 6.5"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M4 12.5l5 5L20 6.5"/></svg>') center / contain no-repeat;
  background-color: var(--maroon);
}

.quote-card {
  background: var(--cobalt);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
}

.quote-card .quote-mark {
  width: 32px;
  height: 32px;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.quote-card p {
  font-family: var(--font-accent);
  font-style: italic;
  color: #f2ecdf;
  font-size: 1.15rem;
  line-height: 1.65;
}

.quote-card footer {
  margin-top: 1.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ===== Kroki ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.4rem;
}

.step-num {
  display: block;
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 2rem;
  font-weight: 600;
  color: var(--cobalt);
  margin-bottom: 0.6rem;
}

.steps .flip-inner { height: 190px; }

.cta-band {
  margin-top: 3rem;
  background: var(--maroon);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 2.4rem 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-band h3 {
  color: var(--cream);
  font-size: 1.45rem;
  margin-bottom: 0.3rem;
}
.cta-band p { color: #e8d9c8; }

.cta-band .btn-accent {
  background: var(--gold);
  color: var(--maroon-dark);
}
.cta-band .btn-accent:hover { background: #d2ab80; }

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-of-type { border-top: 1px solid var(--line); margin-top: 1.5rem; }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.2rem 0.2rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--cobalt);
  transition: transform 0.2s ease;
  flex: none;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p { padding: 0 0.2rem 1.3rem; font-size: 0.96rem; max-width: 640px; }

/* ===== Kontakt ===== */
.contact-list {
  list-style: none;
  display: grid;
  gap: 1.2rem;
  margin: 1.6rem 0 2.2rem;
}

.contact-label {
  display: block;
  font-family: var(--font-mark);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 0.1rem;
}

.contact-value {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

a.contact-value:hover { color: var(--maroon); }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 380px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  filter: saturate(0.7);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--maroon);
  color: #e8d9c8;
  padding: 2.4rem 0 1.5rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(250, 249, 244, 0.18);
}

.footer-inner strong {
  color: var(--cream);
  font-family: var(--font-mark);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 0.92rem;
}

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }

.footer-links a {
  color: var(--gold);
  text-decoration: none;
}

.footer-links a:hover { color: var(--cream); }

.footer-note {
  padding-top: 1.3rem;
  font-size: 0.78rem;
  color: rgba(232, 217, 200, 0.65);
}

/* ===== Blog ===== */
.article { padding: clamp(3rem, 6vw, 5rem) 0; }

.article .container,
.post-list-wrap { width: min(760px, 100% - 2.5rem); margin-inline: auto; }

.article h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: 1.2rem; }

.article h2 { font-size: 1.4rem; margin: 2.4rem 0 0.8rem; }

.article p { margin-bottom: 1rem; }

.article ul {
  margin: 0 0 1.2rem 1.3rem;
  color: var(--ink-soft);
}

.article ul li { margin-bottom: 0.35rem; }

.article-meta {
  display: block;
  font-family: var(--font-mark);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--maroon);
  margin-bottom: 1rem;
}

.article-cta {
  margin-top: 2.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.post-list { display: grid; gap: 1.2rem; margin-top: 2rem; }

.post-card {
  background: #f3f2ea;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
}

.post-card h2 { font-size: 1.25rem; margin-bottom: 0.4rem; }

.post-card h2 a { text-decoration: none; color: var(--ink); }

.post-card h2 a:hover { color: var(--maroon); }

.post-card p { font-size: 0.95rem; }

/* ===== Responsywność ===== */
@media (max-width: 960px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 0.5rem 1.25rem 1.25rem;
  }

  .site-nav.open { display: flex; }

  .site-nav a:not(.btn) {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta { margin-top: 1rem; }

  .cards-grid { grid-template-columns: 1fr; }

  .cta-band { flex-direction: column; align-items: flex-start; }
}
