/* Drewnomaniak global styles. Colour tokens are mirrored in theme/Theme.kt. Breakpoint md = 768px. */
:root {
  --bg: #171513;
  --bg-2: #201d1a;
  --ink: #ede6db;
  --muted: #b9ae9f;
  --gold: #e6c068;
  --line: #3a342e;
  --on-gold: #171513;
  --gold-a35: rgba(230, 192, 104, .35);
  --ok: #9ccf7f;
  --no: #d9a27a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --gutter: 18px;
  --header-h: 76px;
  --radius: 14px;
}
@media (min-width: 768px) { :root { --gutter: 40px; --header-h: 88px; } }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.dm-container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }

.dm-skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--gold); color: var(--on-gold); padding: 10px 16px; border-radius: 10px;
  font-weight: 800; text-decoration: none;
}
.dm-skip:focus { top: 12px; }

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

/* ---------- Typography ---------- */
.dm-kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; font-weight: 600; }
.dm-h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 5.4vw, 76px); line-height: 1.02; margin: 0 0 14px; text-wrap: balance; }
.dm-h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; margin: 0 0 8px; text-wrap: balance; }
.dm-h2 em { color: var(--gold); font-style: italic; }
.dm-h3 { font-family: var(--sans); font-weight: 800; font-size: 16px; line-height: 1.35; margin: 0 0 4px; }
.dm-lead { font-size: clamp(15px, .4vw + 13px, 18px); line-height: 1.6; color: var(--muted); margin: 0 0 16px; max-width: 46ch; }
.dm-sub { color: var(--muted); font-size: 15px; margin: 0 0 20px; max-width: 60ch; }

/* ---------- Buttons ---------- */
.dm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 18px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: 800; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .25s var(--ease-out), background-color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.dm-btn svg { width: 18px; height: 18px; flex: none; }
.dm-btn--gold { background: var(--gold); color: var(--on-gold); }
.dm-btn--gold:hover { background: #ecca7d; }
.dm-btn--outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.dm-btn--outline:hover { background: rgba(230, 192, 104, .08); }
.dm-btn--quiet { border-color: var(--line); color: var(--ink); background: transparent; font-weight: 600; }
.dm-btn--quiet:hover { border-color: var(--gold); }
.dm-btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .dm-btn { transition: none; } .dm-btn:hover { transform: none; } }

/* ---------- Pills ---------- */
.dm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.dm-tags li { font-size: 13px; border: 1px solid var(--gold-a35); padding: 5px 11px; border-radius: 999px; }

.dm-pills { display: flex; gap: 8px; margin: 0 0 18px; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: none; }
.dm-pills::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .dm-pills { flex-wrap: wrap; overflow: visible; } }
.dm-pill {
  display: inline-block; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--line); color: var(--muted);
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  transition: border-color .2s, color .2s;
}
.dm-pill:hover { border-color: var(--gold); color: var(--ink); }
.dm-pill.is-active { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }

/* ---------- Header / nav ---------- */
.dm-header { position: absolute; top: 0; left: 0; right: 0; z-index: 20; }
.dm-nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.dm-nav__logo { display: flex; align-items: center; }
.dm-logo-word { display: block; height: 34px; width: auto; }
@media (min-width: 768px) { .dm-logo-word { height: 44px; } }
.dm-nav__links { display: none; align-items: center; gap: 28px; }
.dm-nav__link { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); }
.dm-nav__link:hover, .dm-nav__link--current { color: var(--gold); }
.dm-nav__links .dm-btn { min-height: 40px; padding: 9px 14px; font-size: 14px; }
/* "Drewno" dropdown (desktop nav) */
.dm-nav__dd { position: relative; }
.dm-nav__dd-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font-family: inherit; line-height: inherit; cursor: pointer; }
.dm-nav__dd-btn::after { content: ""; width: 6px; height: 6px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.dm-nav__dd-btn[aria-expanded="true"]::after { margin-top: 3px; transform: rotate(-135deg); }
.dm-nav__dd-list { position: absolute; top: 100%; left: -14px; z-index: 20; min-width: 250px; margin: 0; padding: 14px 0 0; list-style: none; }
.dm-nav__dd-list li { background: #121110; border-inline: 1px solid var(--line); }
.dm-nav__dd-list li:first-child { padding-top: 8px; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.dm-nav__dd-list li:last-child { padding-bottom: 8px; border-bottom: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.dm-nav__dd-link { display: block; margin-inline: 8px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink); }
.dm-nav__dd-link:hover, .dm-nav__dd-link:focus-visible, .dm-nav__dd-link.dm-nav__link--current { background: var(--bg-2); color: var(--gold); }
@media (hover: hover) and (pointer: fine) { .dm-nav__dd:hover .dm-nav__dd-list { display: block; } }
.dm-nav__menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-right: -12px; padding: 0;
  background: none; border: 0; cursor: pointer;
}
.dm-nav__burger, .dm-nav__burger::before, .dm-nav__burger::after {
  display: block; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; position: relative;
}
.dm-nav__burger::before, .dm-nav__burger::after { content: ""; position: absolute; left: 0; }
.dm-nav__burger::before { top: -8px; }
.dm-nav__burger::after { top: 8px; }
@media (min-width: 768px) {
  .dm-nav__links { display: flex; }
  .dm-nav__menu-btn { display: none; }
}

main { display: block; padding-top: var(--header-h); }

/* ---------- Mobile menu ---------- */
.dm-menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--bg); display: flex; flex-direction: column;
  padding: 0 var(--gutter) 32px; overflow-y: auto;
}
.dm-menu__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); flex: none; }
.dm-menu__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-right: -12px; padding: 0;
  background: none; border: 0; color: var(--gold); cursor: pointer;
}
.dm-menu__close svg { width: 26px; height: 26px; }
.dm-menu__links { display: flex; flex-direction: column; gap: 4px; margin: 24px 0 32px; }
.dm-menu__link { font-family: var(--serif); font-size: 40px; font-weight: 500; line-height: 1.3; text-decoration: none; color: var(--ink); }
.dm-menu__link:hover, .dm-menu__link.dm-nav__link--current { color: var(--gold); }
.dm-menu__actions { display: grid; gap: 10px; margin-top: auto; }
@media (min-width: 768px) { .dm-menu { display: none; } }

/* ---------- Hero ---------- */
.dm-hero {
  position: relative; margin-top: calc(-1 * var(--header-h));
  min-height: 560px; height: min(88svh, 820px);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; background: var(--bg-2);
}
.dm-hero__media, .dm-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.dm-hero__media img { object-fit: cover; object-position: center 55%; filter: brightness(.6) saturate(.9); }
.dm-hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 21, 19, .55), rgba(23, 21, 19, 0) 30%, rgba(23, 21, 19, .55) 62%, rgba(23, 21, 19, .97));
}
.dm-hero__content { position: relative; padding-bottom: 28px; }
.dm-hero__brand {
  --pad: 12px; position: relative; display: block; flex: none; width: 148px; margin: 0 0 10px -12px; padding: var(--pad);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(20, 18, 16, .82) 55%, rgba(20, 18, 16, 0));
}
.dm-hero__logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .55)); }
/* Gold glint passing once over the logo (masked by the logo itself); started by the motion block below. */
.dm-hero__brand::after {
  content: ""; position: absolute; inset: var(--pad); pointer-events: none; opacity: 0; mix-blend-mode: screen;
  -webkit-mask: url(/logo-mark-300.webp) center / contain no-repeat; mask: url(/logo-mark-300.webp) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 244, 214, .95) 50%, transparent 65%) 0 0 / 300% 100% no-repeat;
}
.dm-hero__actions { display: flex; gap: 8px; }
.dm-hero__actions .dm-btn--gold { flex: 1; }
.dm-hero__area-wide { display: none; }
@media (min-width: 768px) {
  .dm-hero { height: min(86vh, 860px); min-height: 600px; }
  .dm-hero__media img { object-position: center 15%; } /* wide crop: keep the carport roof edge in view */
  .dm-hero__shade { background: linear-gradient(90deg, rgba(23, 21, 19, .9), rgba(23, 21, 19, .45) 55%, rgba(23, 21, 19, .1)), linear-gradient(180deg, rgba(23, 21, 19, .55), rgba(23, 21, 19, 0) 25%, rgba(23, 21, 19, 0) 75%, rgba(23, 21, 19, .9)); }
  .dm-hero__content { padding-bottom: 64px; max-width: 1200px; display: flex; align-items: center; justify-content: space-between; gap: 48px; }
  .dm-hero__brand { --pad: 30px; order: 2; width: clamp(240px, 27vw, 340px); margin: 0 2vw 0 0; }
  .dm-hero__brand::after { -webkit-mask-image: url(/logo-mark-560.webp); mask-image: url(/logo-mark-560.webp); }
  .dm-hero__text { max-width: 560px; }
  .dm-hero__area-wide { display: inline; }
  .dm-hero .dm-tags { display: none; }
  .dm-hero__actions .dm-btn--gold { flex: none; }
}

/* ---------- Sections ---------- */
.dm-section { padding-block: clamp(40px, 6vw, 96px); }
.dm-section--alt { background: var(--bg-2); }

/* Latest work grid */
.dm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dm-grid__item { position: relative; margin: 0; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.dm-grid__item:first-child { grid-column: span 2; aspect-ratio: 3 / 2; }
/* Photos below the first screen skip rendering until they come near the viewport, so their lazy images are not
   fetched during page load. The tiles keep their size from aspect-ratio, so nothing shifts. */
.dm-grid__item:nth-child(n+6) { content-visibility: auto; contain-intrinsic-size: auto 200px; }
.dm-grid__item figure { margin: 0; height: 100%; }
.dm-grid__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.dm-grid__link { display: block; height: 100%; border-radius: inherit; cursor: zoom-in; }
.dm-grid__link:focus-visible { outline-offset: -3px; }
.dm-grid__link:hover img { transform: scale(1.03); }
@media (prefers-reduced-motion: reduce) { .dm-grid__item img { transition: none; } .dm-grid__link:hover img { transform: none; } }
.dm-grid__caption {
  pointer-events: none;
  position: absolute; left: 8px; bottom: 8px; right: 8px; width: fit-content;
  font-size: 12px; line-height: 1.3; background: rgba(23, 21, 19, .82); padding: 5px 10px; border-radius: 999px;
}
@media (min-width: 768px) {
  .dm-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .dm-grid__item { aspect-ratio: 4 / 3; }
  /* The big photo fills two rows sized by the others; absolute so a portrait photo cannot stretch the rows. */
  .dm-grid__item:first-child { grid-row: span 2; aspect-ratio: auto; min-height: 320px; }
  .dm-grid__item:first-child img { position: absolute; inset: 0; }
}
.dm-more { display: flex; width: 100%; margin-top: 16px; color: var(--gold); }
@media (min-width: 768px) { .dm-more { width: auto; } }

/* Gallery pages */
.dm-section--page { padding-top: clamp(16px, 3vw, 40px); }
.dm-h1--page { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.06; }
.dm-lead--wide { max-width: 62ch; margin-bottom: 24px; }
.dm-kicker__link { text-decoration: none; }
.dm-kicker__link:hover { text-decoration: underline; }
.dm-cta { margin-top: clamp(32px, 4vw, 56px); padding: 24px var(--gutter); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
@media (min-width: 768px) { .dm-cta { padding: 32px 40px; } }
.dm-other { margin-top: 32px; }
.dm-other .dm-h3 { margin-bottom: 12px; }

/* Lightbox */
.dm-no-scroll { overflow: hidden; }
.dm-lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14, 12, 11, .96); touch-action: pan-y;
  animation: dm-fade .2s var(--ease-out);
}
@keyframes dm-fade { from { opacity: 0; } to { opacity: 1; } }
.dm-lightbox__stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 100%; padding: 64px 12px 16px; box-sizing: border-box;
}
.dm-lightbox__img {
  max-width: 100%; max-height: calc(100% - 36px); width: auto; height: auto;
  object-fit: contain; border-radius: 8px; user-select: none; -webkit-user-drag: none;
}
.dm-lightbox__meta { display: flex; gap: 14px; align-items: baseline; margin: 0; min-height: 22px; font-size: 14px; color: var(--muted); text-align: center; }
.dm-lightbox__caption { color: var(--ink); }
.dm-lightbox__count { font-variant-numeric: tabular-nums; }
.dm-lightbox__btn {
  position: absolute; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; border-radius: 999px;
  background: rgba(32, 29, 26, .85); border: 1px solid var(--line); color: var(--gold); cursor: pointer;
}
.dm-lightbox__btn:hover { border-color: var(--gold); }
.dm-lightbox__btn svg { width: 24px; height: 24px; }
.dm-lightbox__close { top: 10px; right: 10px; }
.dm-lightbox__prev, .dm-lightbox__next { bottom: 10px; }
.dm-lightbox__prev { left: 10px; }
.dm-lightbox__next { right: 10px; }
@media (max-width: 767.98px) {
  .dm-lightbox__stage { padding-bottom: 68px; }
}
@media (min-width: 768px) {
  .dm-lightbox__stage { padding: 56px 88px 20px; }
  .dm-lightbox__prev, .dm-lightbox__next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .dm-lightbox__prev { left: 20px; }
  .dm-lightbox__next { right: 20px; }
  .dm-lightbox__close { top: 16px; right: 20px; }
}
@media (prefers-reduced-motion: reduce) { .dm-lightbox { animation: none; } }

/* How I work */
.dm-steps { display: grid; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.dm-step { display: flex; gap: 14px; align-items: flex-start; }
.dm-step__num { font-family: var(--serif); font-variant-numeric: lining-nums; color: var(--gold); font-size: 32px; font-weight: 600; line-height: 1; min-width: 26px; }
.dm-step__text { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
@media (min-width: 768px) { .dm-steps { grid-template-columns: repeat(4, 1fr); gap: 28px; } .dm-step { flex-direction: column; gap: 10px; } }
.dm-price {
  margin: 28px 0 0; border-left: 3px solid var(--gold); padding: 6px 0 6px 14px;
  font-size: clamp(16px, .4vw + 14px, 19px); line-height: 1.55; max-width: 62ch;
}

/* Services */
.dm-services { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.dm-service { padding: 16px 0; border-bottom: 1px solid var(--line); }
.dm-service p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (min-width: 768px) {
  .dm-services { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
}

/* Firewood: photo card with a stock badge driven by the Drive folder name */
.dm-firewood { display: grid; grid-template-columns: 1fr; background: var(--bg-2); border-radius: 20px; overflow: hidden; }
.dm-firewood__media { position: relative; min-height: 300px; background: #111; }
.dm-firewood__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(32, 29, 26, 0) 55%, var(--bg-2)); }
.dm-firewood__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-firewood--no .dm-firewood__photo { filter: grayscale(.6) brightness(.75); }
.dm-firewood__text { padding: 8px 20px 28px; min-width: 0; }
.dm-firewood__features { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.dm-firewood__features li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.dm-firewood__features li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 2px; background: var(--gold); transform: rotate(45deg); }
.dm-firewood__note { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.dm-firewood__actions { display: grid; gap: 10px; }
@media (min-width: 768px) {
  .dm-firewood { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .dm-firewood__media { height: 100%; min-height: 520px; }
  .dm-firewood__media::after { background: linear-gradient(90deg, rgba(32, 29, 26, 0) 60%, var(--bg-2)); }
  .dm-firewood__text { padding: 48px 48px 48px 24px; }
  .dm-firewood__actions { display: flex; flex-wrap: wrap; }
}

.dm-stock { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 18px; padding: 8px 16px 8px 12px; border-radius: 999px; border: 1px solid; font-size: 14px; font-weight: 700; line-height: 1.2; }
.dm-stock__dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: currentColor; }
.dm-stock--ok { color: var(--ok); background: rgba(156, 207, 127, .12); border-color: rgba(156, 207, 127, .35); }
.dm-stock--ok .dm-stock__dot { animation: dm-stock-pulse 2s infinite; }
.dm-stock--no { color: var(--no); background: rgba(217, 162, 122, .10); border-color: rgba(217, 162, 122, .35); }
@keyframes dm-stock-pulse {
  0% { box-shadow: 0 0 0 0 rgba(156, 207, 127, .6); }
  70% { box-shadow: 0 0 0 9px rgba(156, 207, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(156, 207, 127, 0); }
}
@media (prefers-reduced-motion: reduce) { .dm-stock--ok .dm-stock__dot { animation: none; } }

/* Construction timber: the home section mirrors the firewood one (photo on the right from md), no stock status */
.dm-section--tight-top { padding-top: 0; }
@media (min-width: 768px) {
  .dm-firewood--rev { grid-template-columns: 1fr 1.05fr; }
  .dm-firewood--rev .dm-firewood__media { order: 2; }
  .dm-firewood--rev .dm-firewood__media::after { left: -2px; background: linear-gradient(270deg, rgba(32, 29, 26, 0) 60%, var(--bg-2)); }
  .dm-firewood--rev .dm-firewood__text { padding: 48px 24px 48px 48px; }
}
.dm-order { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 18px; padding: 8px 16px 8px 12px; border-radius: 999px; border: 1px solid rgba(230, 192, 104, .35); background: rgba(230, 192, 104, .10); color: var(--gold); font-size: 14px; font-weight: 700; line-height: 1.2; }
.dm-order__dot { width: 9px; height: 9px; flex: none; border-radius: 2px; background: currentColor; transform: rotate(45deg); }

/* Firewood page /drewno-kominkowe/ */
.dm-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.dm-crumbs li + li::before { content: "/"; margin-right: 6px; }
.dm-crumbs a { color: var(--muted); }
.dm-crumbs a:hover { color: var(--gold); }
.dm-fwpage { display: grid; gap: 24px; align-items: center; }
.dm-fwpage__pic { position: relative; order: -1; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #111; }
.dm-h1 em { color: var(--gold); font-style: italic; font-weight: 500; }
.dm-buy { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.dm-buy__step { padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.dm-buy__num { display: block; margin: 0 0 10px; font-family: var(--serif); font-variant-numeric: lining-nums; font-size: 34px; font-weight: 600; line-height: 1; color: var(--gold); }
.dm-buy .dm-h3 { margin-bottom: 6px; }
.dm-faq { display: grid; gap: 10px; max-width: 820px; margin-top: 24px; }
.dm-faq__item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.dm-faq__q { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; cursor: pointer; font-weight: 700; list-style: none; }
.dm-faq__q::-webkit-details-marker { display: none; }
.dm-faq__q::after { content: "+"; flex: none; color: var(--gold); font-size: 22px; font-weight: 500; line-height: 1; }
.dm-faq__item[open] .dm-faq__q::after { content: "-"; }
.dm-faq__q:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--radius); }
.dm-faq__a { margin: -4px 20px 16px; color: var(--muted); }
.dm-fwpage__cta { margin-top: clamp(40px, 5vw, 64px); padding: 40px 20px; text-align: center; border: 1px solid rgba(230, 192, 104, .35); border-radius: 20px; }
.dm-fwpage__cta .dm-sub { margin-inline: auto; }
@media (min-width: 768px) {
  .dm-fwpage { grid-template-columns: 1fr 1fr; gap: 40px; }
  .dm-fwpage__pic { order: 0; aspect-ratio: 1 / 1; }
  .dm-buy { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .dm-buy__step { padding: 24px; }
  .dm-fwpage__cta { padding: 56px 24px; }
}

/* Area */
.dm-area { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.dm-area li { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; }
.dm-area li svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.dm-area__note { margin: 16px 0 0; color: var(--muted); font-size: 14.5px; }
@media (min-width: 768px) { .dm-area { grid-template-columns: repeat(2, minmax(0, 360px)); } }

/* Contact */
.dm-contact__actions { display: grid; gap: 10px; margin-top: 8px; }
@media (min-width: 768px) { .dm-contact__actions { display: flex; flex-wrap: wrap; } }

/* ---------- Footer ---------- */
.dm-footer { border-top: 1px solid var(--line); padding: 36px 0 40px; color: var(--muted); font-size: 14px; }
.dm-footer__inner { display: grid; gap: 18px; }
.dm-footer__logo { justify-self: start; }
.dm-footer__mark { display: block; width: 112px; height: auto; }
.dm-footer__end { display: grid; gap: 18px; }
.dm-footer p { margin: 0; }
.dm-footer__brand { color: var(--ink); font-weight: 800; }
.dm-footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.dm-footer__links a { color: var(--ink); text-decoration: none; }
.dm-footer__links a:hover { color: var(--gold); }
@media (max-width: 767.98px) { .dm-footer { padding-bottom: 104px; } }
@media (min-width: 768px) {
  .dm-footer { padding: 32px 0; }
  .dm-footer__inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; }
  .dm-footer__mark { width: 120px; }
  .dm-footer__end { justify-items: end; gap: 14px; }
}

/* ---------- Sticky call (phones only) ---------- */
.dm-sticky-call {
  position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 30;
  display: flex; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  animation: dm-rise .3s var(--ease-out);
}
.dm-sticky-call[hidden] { display: none; }
@media (min-width: 768px) { .dm-sticky-call { display: none; } }
@keyframes dm-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Entrance animation ----------
   Only elements below the fold get .is-pending, added by scripts after load (never in the exported HTML). */
.dm-reveal { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.dm-reveal.is-pending { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  .dm-reveal { transition: none; }
  .dm-reveal.is-pending { opacity: 1; transform: none; }
  .dm-sticky-call { animation: none; }
}

/* Privacy page */
.dm-legal { max-width: 760px; }
.dm-legal__h { font-size: 18px; margin: 32px 0 8px; }
.dm-legal__p { line-height: 1.7; margin: 0 0 12px; max-width: 68ch; }

/* ---------- CODEVIBE badge (bottom of the footer) ---------- */
.dm-credit { margin-top: 6px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: center; }
@media (min-width: 768px) { .dm-credit { margin: 0; padding: 0; border: 0; justify-content: flex-end; } }
.dm-credit__link {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px;
  padding: 10px 16px 10px 20px; border-radius: 28px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--muted); font-size: 13px; line-height: 1.35; text-align: center; text-decoration: none;
  transition: border-color .35s var(--ease-out), transform .35s var(--ease-out), color .35s var(--ease-out);
}
.dm-credit__brand { display: inline-flex; align-items: center; gap: 10px; }
.dm-credit .cv-logo { height: 17px; width: auto; display: block; overflow: visible; }
.dm-credit .cv-l { transform-box: fill-box; transform-origin: 50% 100%; }
.dm-credit .cv-base { fill: var(--ink); }
.dm-credit .cv-base .cv-l {
  fill-opacity: .7; stroke: var(--gold); stroke-width: 5; stroke-opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 0;
  transition: fill-opacity .4s var(--ease-out);
}
.dm-credit .cv-gold { fill: var(--gold); }
.dm-credit__arrow { width: 16px; height: 16px; flex: none; color: var(--gold); transition: transform .35s var(--ease-out); }
.dm-credit__link:hover, .dm-credit__link:focus-visible { border-color: var(--gold-a35); color: var(--gold); transform: translateY(-1px); }
.dm-credit__link:hover .cv-base .cv-l, .dm-credit__link:focus-visible .cv-base .cv-l { fill-opacity: 1; }
.dm-credit__link:hover .dm-credit__arrow, .dm-credit__link:focus-visible .dm-credit__arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: no-preference) {
  .dm-credit.is-armed .cv-base .cv-l { fill-opacity: 0; }
  .dm-credit.is-armed .dm-credit__arrow { opacity: 0; transform: translateX(-6px); }
  .dm-credit.is-play .cv-base .cv-l {
    animation: dmCreditDraw 1.1s cubic-bezier(.45, .05, .35, 1) calc(var(--n) * 110ms) both,
               dmCreditFill .7s var(--ease-out) calc(var(--n) * 110ms + .9s) both;
  }
  .dm-credit.is-play .dm-credit__arrow { animation: dmCreditArrow .5s var(--ease-out) 1.9s both; }
  .dm-credit.is-hover .cv-sweep { animation: dmCreditSweep 1.4s cubic-bezier(.45, .05, .35, 1) both; }
  .dm-credit.is-hover .cv-w { animation: dmCreditWave .7s cubic-bezier(.3, .7, .3, 1) calc(var(--i) * 70ms) both; }
}
@keyframes dmCreditDraw { from { stroke-dashoffset: 1; stroke-opacity: 1; fill-opacity: 0; } to { stroke-dashoffset: 0; stroke-opacity: 1; fill-opacity: 0; } }
@keyframes dmCreditFill { from { fill-opacity: 0; stroke-opacity: 1; } to { fill-opacity: .7; stroke-opacity: 0; } }
@keyframes dmCreditArrow { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes dmCreditSweep { from { transform: translateX(0); } to { transform: translateX(1160px); } }
@keyframes dmCreditWave { 0%, 100% { transform: none; } 40% { transform: translateY(-14%) rotate(-3deg); } 70% { transform: translateY(4%); } }

/* ---------- Motion ----------
   Pure CSS: hero entrance, logo glint, gallery hover frame, phone icon ring.
   Scripts (components/Motion.kt, HowIWork, CategoryPills) add the hidden or starting states: .is-pending on titles
   and gallery tiles below the fold, .has-timeline on the steps, .has-glider on the pills. The exported HTML never
   carries them, and with reduced motion nothing below runs. */
@media (prefers-reduced-motion: no-preference) {
  /* 1. Hero entrance (one time, on load). Text starts nearly, not fully, transparent so it still counts as painted. */
  .dm-hero__media img { animation: dmHeroZoom 1.8s cubic-bezier(.2, .7, .2, 1) both; }
  .dm-hero__text > * { animation: dmRise .8s var(--ease-out) both; }
  .dm-hero__text > :nth-child(1) { animation-delay: .15s; }
  .dm-hero__text > :nth-child(2) { animation-delay: .25s; }
  .dm-hero__text > :nth-child(3) { animation-delay: .4s; }
  .dm-hero__text > :nth-child(4) { animation-delay: .5s; }
  .dm-hero__text > :nth-child(5) { animation-delay: .6s; }
  .dm-hero__brand { animation: dmLogoIn 1.1s var(--ease-out) .35s both; }
  /* 2. Logo glint */
  .dm-hero__brand::after { animation: dmGlint 1.6s cubic-bezier(.45, .05, .35, 1) 1.3s both; }
  /* 3. Hand-drawn underline under the gold word of section titles */
  .dm-h2.is-pending em::after { clip-path: inset(0 100% 0 0); }
  /* 4. Gallery tiles one by one, gold frame on hover */
  .dm-grid__item { transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
  .dm-grid__item.is-pending { opacity: 0; transform: translateY(18px) scale(.98); }
  .dm-grid__caption { transition: transform .35s var(--ease-out), background-color .35s; }
  .dm-grid__link:hover .dm-grid__caption { transform: translateY(-4px); background: rgba(23, 21, 19, .92); }
  /* 7. The phone icon rings once when the sticky call button appears */
  .dm-sticky-call__btn svg { animation: dmRing .9s ease-in-out .45s both; transform-origin: 50% 60%; }
}
@keyframes dmHeroZoom { from { transform: scale(1.08); } to { transform: none; } }
@keyframes dmRise { from { opacity: .001; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes dmLogoIn { from { opacity: .001; transform: scale(.9) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes dmGlint { 0% { opacity: 1; background-position: 100% 0; } 90% { opacity: 1; } 100% { opacity: 0; background-position: 0 0; } }
@keyframes dmRing { 0%, 100% { transform: none; } 10%, 30%, 50% { transform: rotate(-16deg); } 20%, 40%, 60% { transform: rotate(16deg); } 70% { transform: rotate(-6deg); } 80% { transform: none; } }

/* 3. Underline (drawn by default; .is-pending above hides it until the title scrolls into view) */
.dm-h2 em { position: relative; display: inline-block; }
.dm-h2 em::after {
  content: ""; position: absolute; left: -2%; right: -4%; bottom: -.06em; height: .2em; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C 50 3, 110 12, 170 6 S 250 3, 297 7' fill='none' stroke='%23e6c068' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  clip-path: inset(0 0 0 0); transition: clip-path 1s cubic-bezier(.45, .05, .35, 1) .25s;
}
/* 4. Gold frame on gallery hover */
.dm-grid__item::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(230, 192, 104, 0); transition: box-shadow .35s;
}
.dm-grid__item:hover::after { box-shadow: inset 0 0 0 2px rgba(230, 192, 104, .85); }

/* 5. Timeline in "Jak pracuję" (lines exist only with .has-timeline, set by scripts) */
.dm-timeline { position: relative; }
.dm-timeline__line { position: absolute; display: none; pointer-events: none; background: var(--gold); }
.dm-timeline__line--track { background: var(--line); }
.has-timeline .dm-timeline__line { display: block; }
.has-timeline .dm-step__num { position: relative; z-index: 1; background: var(--bg-2); opacity: .35; transition: opacity .4s, text-shadow .4s; }
.has-timeline .dm-step.is-lit .dm-step__num { opacity: 1; text-shadow: 0 0 18px rgba(230, 192, 104, .45); }
@media (max-width: 767.98px) { .has-timeline .dm-step__num { padding: 4px 0; text-align: center; } }
@media (min-width: 768px) { .has-timeline .dm-step__num { padding-right: 12px; } }

/* 6. Sliding gold background of the active category pill (.has-glider set by scripts) */
.dm-pills { position: relative; }
.dm-pills__glider { display: none; }
.has-glider .dm-pills__glider {
  display: block; position: absolute; z-index: 0; border-radius: 999px; background: var(--gold); pointer-events: none;
  transition: left .45s cubic-bezier(.3, .9, .3, 1), width .45s cubic-bezier(.3, .9, .3, 1), top .45s cubic-bezier(.3, .9, .3, 1);
}
.has-glider li { position: relative; z-index: 1; }
.has-glider .dm-pill.is-active { background: transparent; border-color: transparent; transition: color .3s; }
@media (prefers-reduced-motion: reduce) { .dm-h2 em::after, .has-glider .dm-pills__glider { transition: none; } }
