/* ============================================================
   base.css — reset, typografia bazowa, pomocniki układu, przyciski
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Faktura papieru: ledwie widoczne poziome prążki, jak papier czerpany.
   To tło całej strony, nie dekoracja pojedynczej sekcji. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
      to bottom,
      rgba(120, 104, 74, 0.035) 0px,
      rgba(120, 104, 74, 0.035) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      to right,
      rgba(120, 104, 74, 0.022) 0px,
      rgba(120, 104, 74, 0.022) 1px,
      transparent 1px,
      transparent 7px
    );
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-variation-settings: var(--display-soft);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-snug);
  color: var(--ink-700);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
}
h2 {
  font-size: var(--fs-h2);
}
h3 {
  font-size: var(--fs-h3);
}
h4 {
  font-size: var(--fs-h4);
}

p {
  margin: 0 0 var(--sp-4);
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent-deep);
  text-decoration-color: var(--clay-500);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-out),
    text-decoration-color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--moss-500);
  text-decoration-color: var(--moss-400);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--moss-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--moss-200);
  color: var(--ink-900);
}

/* ---------- układ ---------- */

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

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
}

.section--tight {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

/* pełna szerokość, treść nadal w kontenerze */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -200px;
  z-index: 200;
  background: var(--ink-700);
  color: var(--paper-100);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--sp-4);
  color: var(--paper-100);
}

/* ---------- element sygnaturowy: .leaf-rule ----------
   Liść wyjęty wprost ze znaku marki, posadzony na cienkiej beżowej
   kresce. Wraca w każdym nagłówku sekcji i między wierszami cennika. */

.leaf-rule {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: 0 0 var(--sp-4);
}

.leaf-rule__glyph {
  flex: none;
  height: 19px;
  width: auto;
  color: var(--moss-500);
  align-self: center;
}

.leaf-rule__glyph svg {
  height: 100%;
  width: auto;
  display: block;
  fill: currentColor;
}

.leaf-rule__line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule);
  min-width: 28px;
}

.leaf-rule--short .leaf-rule__line {
  flex: 0 0 58px;
}

.on-dark .leaf-rule__glyph {
  color: var(--moss-200);
}
.on-dark .leaf-rule__line {
  background: rgba(236, 230, 216, 0.3);
}

/* ---------- nagłówki sekcji ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--clay-600);
  margin: 0;
  line-height: 1.4;
}

.on-dark .eyebrow {
  color: var(--moss-200);
}

.section-head {
  max-width: 44ch;
  margin-bottom: var(--sp-7);
}

.section-head__lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: var(--sp-4);
  max-width: 54ch;
}

.on-dark {
  color: var(--text-on-dark);
}
.on-dark h2,
.on-dark h3,
.on-dark h4 {
  color: var(--paper-100);
}
.on-dark .section-head__lead {
  color: var(--text-on-dark-muted);
}

/* ---------- przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.95em 1.7em;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink-600);
  color: var(--paper-100);
  border-color: var(--ink-600);
}

.btn-primary:hover {
  background: var(--moss-500);
  border-color: var(--moss-500);
  color: var(--paper-050);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  border-color: var(--clay-500);
}

.btn-ghost:hover {
  background: var(--paper-100);
  border-color: var(--ink-600);
  color: var(--ink-700);
}

.on-dark .btn-ghost,
.btn-ghost--light {
  color: var(--paper-100);
  border-color: rgba(236, 230, 216, 0.45);
}

.on-dark .btn-ghost:hover,
.btn-ghost--light:hover {
  background: rgba(236, 230, 216, 0.12);
  border-color: var(--paper-100);
  color: var(--paper-050);
}

.btn-light {
  background: var(--paper-100);
  color: var(--ink-800);
  border-color: var(--paper-100);
}

.btn-light:hover {
  background: #fff;
  color: var(--ink-900);
  border-color: #fff;
}

/* ---------- animacja wejścia ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-soft),
    transform var(--dur-slow) var(--ease-soft);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
