/* ============================================================
   SHEETPOST V2 — components
   Icon system: inline SVG, 24px grid, 1.6px stroke, currentColor.
   Buttons: one radius family, hover = 1px lift + border brighten.
   ============================================================ */

.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: var(--fs-small);
  /* Figtree's space is 0.21em, which at 600 weight and button size closes up
     hard enough that "Wypróbuj bezpłatnie" reads as one word */
  word-spacing: 0.09em;
  border-radius: var(--r-in);
  padding: 14px 22px;
  border: 1px solid transparent;
  transition: transform var(--d1) var(--e-out), border-color var(--d1) var(--e-out),
              background var(--d1) var(--e-out), color var(--d1) var(--e-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.985); }
.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.42;
  filter: saturate(0.35);
  transform: none;
}
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { transform: none; border-color: var(--line-hi); }
/* Fading the whole button dropped the primary action's label to 2.3:1 against
   its own washed-out fill, and "Mapuj kolumny" is the demo's only way forward,
   so the disabled state was the state a first-time visitor read first. Fade
   the surface, keep the label. */
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
  opacity: 1;
  filter: none;
  background: var(--bg-3);
  color: var(--fg);
  border-color: var(--line-hi);
}
.btn-primary:disabled::after, .btn-primary[aria-disabled="true"]::after { content: none; }
.btn-primary:disabled::after { content: none; }

.btn-primary {
  background: var(--acc); color: var(--acc-ink);
  position: relative; overflow: hidden;
}
.btn-primary::after {           /* conic ring sweep on hover (Vercel trick) */
  content: ""; position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.75) 82%, transparent 94%);
  opacity: 0; transition: opacity var(--d2) ease;
  animation: sweep 2.6s linear infinite;
  animation-play-state: paused;
}
.btn-primary:hover::after { opacity: 1; animation-play-state: running; }
.btn-primary > * { position: relative; z-index: 1; }
@keyframes sweep { to { transform: rotate(360deg); } }

.btn-ghost {
  border-color: var(--line-hi); color: var(--fg-hi);
  background: transparent;
}
.btn-ghost:hover { border-color: rgba(206,244,220,.4); transform: translateY(-1px); }

.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  display: flex; align-items: center; gap: 20px;
  padding: 0 clamp(16px, 3vw, 32px);
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  /* The background is deliberately NOT transitioned. The paper theme swaps
     custom properties, which change instantly; animating the background over
     350ms left paper-coloured text on an ink-coloured bar for a third of a
     second, at a contrast of 1.2:1. Colour and surface flip together or not
     at all. */
  transition: transform var(--d2) var(--e-out), border-color var(--d2) ease, height var(--d2) ease;
}
.nav.scrolled {
  background: rgba(8, 11, 9, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-color: var(--line);
  height: var(--nav-h-scrolled);
}
/* The header rides into the document world.
   No backdrop-filter here on purpose: the bridge sheet is transformed, which
   makes it a backdrop root, so a translucent header would sample the dark
   page canvas behind it and render as a grey band. Solid paper is correct
   for a document header anyway. */
.nav--paper.scrolled {
  background: var(--p-bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: rgba(20, 33, 26, 0.14);
}
.nav--paper .brand-mark {
  background:
    linear-gradient(var(--p-panel), var(--p-panel)) padding-box,
    linear-gradient(180deg, rgba(20, 33, 26, .34), rgba(20, 33, 26, .1)) border-box;
}
.nav--paper .nav-links a:hover { background: rgba(20, 33, 26, .07); }
.nav--paper .btn-primary { background: var(--p-acc); color: #F2F5EC; }
.nav--paper .btn-primary::after { content: none; }
/* Nothing in the header may transition `color`. The palette swaps in one
   frame when the page crosses into the document world; a lagging text colour
   leaves the bar illegible for the length of the transition. */
.nav a, .nav button, .nav .btn {
  transition-property: background-color, background, border-color, transform, opacity;
}
/* The CTA is the one solid surface in the bar that carries its own label, so
   the bar's rule applies to it too: fill and text flip in the same frame.
   Transitioning the fill while the colour snapped left the paper world's near
   white label on the ink world's mint at 1.8:1 for the length of the fade,
   on every scroll past the guarantee fold. Hover feedback lives on ::after
   and transform, so nothing is lost by dropping the fill from the list. */
.nav .btn-primary {
  transition-property: border-color, transform, opacity;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.scrolled { background: rgba(8, 11, 9, 0.97); }
}
.nav.hide { transform: translateY(-110%); }
/* above the full screen menu, so its own toggle stays reachable */
.nav.menu-open { z-index: calc(var(--z-menu) + 1); }
.nav.menu-open.hide { transform: none; }
.burger[aria-expanded="true"] { border-color: var(--acc); color: var(--acc); }
.burger[aria-expanded="true"] .ico { transform: rotate(90deg); }
.burger .ico { transition: transform var(--d2) var(--e-out); }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 0;
  font-family: var(--font-d); font-weight: 800; font-size: 1.15rem;
  color: var(--fg-hi); letter-spacing: -0.02em;
}
.brand:hover { color: var(--fg-hi); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    linear-gradient(180deg, rgba(206,244,220,.35), rgba(206,244,220,.08)) border-box;
  border: 1px solid transparent;
  position: relative;
}
.brand-mark::before {
  content: ""; position: absolute; inset: 5px;
  background:
    linear-gradient(var(--acc), var(--acc)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--acc), var(--acc)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--acc), var(--acc)) 0 0 / 2px 100% no-repeat,
    linear-gradient(var(--acc), var(--acc)) 45% 0 / 2px 100% no-repeat;
  opacity: 0.9;
}
.brand-tld { color: var(--fg-lo); font-weight: 500; }

.nav-links { display: flex; gap: 2px; margin-inline: auto; min-width: 0; }
.nav-links a {
  color: var(--fg); font-size: 0.9rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--r-pill);
  white-space: nowrap;
  transition: background var(--d1) ease;
}
.nav-links a:hover { color: var(--fg-hi); background: rgba(206,244,220,.06); }

/* margin-left:auto keeps the right cluster on the right once .nav-links
   (and its auto margins) are hidden at the burger breakpoint */
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

/* language switcher */
.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); }
.langs button {
  font-family: var(--font-m); font-size: var(--fs-mini); font-weight: 600;
  color: var(--fg-lo); padding: 4px 8px; border-radius: var(--r-pill);
  /* No `color` here. This shorthand sits later in the file than the header's
     transition-property rule and at equal specificity, so listing colour
     would quietly re-enable the very fade that rule exists to prevent. */
  transition: background var(--d1) ease;
}
.langs button:hover { color: var(--fg-hi); }
.langs button[aria-pressed="true"] { background: var(--acc-dim); color: var(--acc); }
/* The mint accent carries the ink world, but at 11px mono on its own 12% tint
   over paper it lands at 3.9:1. The document world gets the deeper ink. */
.nav--paper .langs button[aria-pressed="true"] { color: var(--acc-bright); }

/* reading progress: a hairline that fills as the document is read */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: var(--z-progress);
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--acc), var(--acc-bright));
  pointer-events: none;
}
html.no-js .scroll-progress { display: none; }

/* burger + mobile menu */
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line-hi); border-radius: var(--r-in); place-items: center; }
.burger .ico { width: 20px; height: 20px; }
.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: rgba(8, 11, 9, 0.98);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: none; flex-direction: column; gap: 8px;
  padding: calc(var(--nav-h) + 28px) 24px max(32px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu.open { display: flex; }
/* Direct children only. The CTA in .menu-foot is an <a> too, and this rule
   outranks .btn-primary, so an unscoped `.menu a` repainted the button's label
   in the link colour: near white on mint at 1.8:1, at 1.8rem, with a link
   underline through it. That is the primary CTA on a phone. */
.menu > a {
  font-family: var(--font-d); font-size: 1.8rem; font-weight: 700;
  word-spacing: 0.04em;
  color: var(--fg-hi); padding: 10px 0; border-bottom: 1px solid var(--line);
}
.menu .menu-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }

/* ---------- chips / kickers ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-m); font-size: var(--fs-micro);
  color: var(--fg-lo);
  border: 1px solid var(--line-hi); border-radius: var(--r-pill);
  padding: 7px 14px;
}
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--acc); flex: none;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.kicker {
  font-family: var(--font-m); font-size: var(--fs-micro); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--acc);
  margin-bottom: 18px;
}

.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--fg); max-width: 62ch; }
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 760px; }
.sec-head .lede { margin-top: 18px; }

/* ---------- status stamps ---------- */
.stamp {
  display: inline-block;
  font-family: var(--font-d); font-weight: 800; letter-spacing: 0.06em;
  color: var(--seal);
  border: 3px double var(--seal);
  border-radius: 6px;
  padding: 6px 14px;
  transform: rotate(-7deg) scale(1);
  opacity: 0;
  position: relative;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='2'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.82' intercept='0.18'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23r)'/%3E%3C/svg%3E");
  -webkit-mask-size: 120px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='2'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.82' intercept='0.18'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23r)'/%3E%3C/svg%3E");
  mask-size: 120px;
}
.stamp.hit { animation: stamp-hit var(--d1) var(--e-spring) forwards; }
@keyframes stamp-hit {
  0% { opacity: 0; transform: rotate(-7deg) scale(1.7); }
  100% { opacity: 1; transform: rotate(-7deg) scale(1); }
}
.stamp.ok { color: var(--p-acc); border-color: var(--p-acc); }
.paper-world .stamp { color: var(--p-seal); border-color: var(--p-seal); }

/* ---------- marquee ---------- */
.marquee-wrap {
  border-block: 1px solid var(--line);
  padding-block: 26px;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee { display: flex; gap: 18px; width: max-content; will-change: transform; align-items: center; }
.marquee span {
  font-family: var(--font-m); font-size: 0.82rem; font-weight: 600;
  color: var(--fg-lo); white-space: nowrap; letter-spacing: 0.04em;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 9px 16px;
  background: var(--bg-1);
}
.marquee span b { color: var(--fg-hi); font-weight: 700; }

/* ---------- countdown tickers ---------- */
.tickers { display: flex; flex-wrap: wrap; gap: 12px; }
.ticker {
  flex: 1 1 260px;
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--bg-1);
  padding: 16px 18px;
}
.ticker-label { font-family: var(--font-m); font-size: var(--fs-mini); color: var(--fg-lo); letter-spacing: 0.02em; }
.ticker-clock { font-family: var(--font-m); font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; color: var(--fg-hi); font-variant-numeric: tabular-nums; }
.ticker-clock b { color: var(--acc); font-weight: 700; }
.ticker-clock .tk-u { font-size: 0.62em; color: var(--fg-lo); margin-left: 2px; margin-right: 8px; }
.ticker-clock.past { color: var(--acc); }
.ticker {
  transition: border-color var(--d2) ease, background var(--d2) ease, transform var(--d2) var(--e-out);
}
/* A ticker is a readout, not a control. Lifting it on hover promised a click
   that does not exist; the border still responds so the surface feels alive. */
.ticker:hover { border-color: var(--line-hi); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: var(--fs-small); font-weight: 600; color: var(--fg-hi); }
.input, select.input, textarea.input {
  background: var(--bg-1);
  border: 1px solid var(--ctl-line);
  border-radius: var(--r-in);
  padding: 12px 14px;
  color: var(--fg-hi);
  transition: border-color var(--d1) ease, background var(--d1) ease;
  width: 100%;
}
.input::placeholder { color: var(--fg-faint); }
/* keep the global focus ring; only the redundant default outline goes */
.input:focus { border-color: var(--acc); background: var(--bg-2); }
.input:focus:not(:focus-visible) { outline: none; }
.input[aria-invalid="true"] { border-color: var(--seal); background: rgba(200, 69, 47, 0.08); }
.input:disabled { opacity: 0.5; cursor: not-allowed; }
.hint { font-size: var(--fs-mini); color: var(--fg-lo); }
.hint.err { color: var(--seal-bright); }

.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: var(--fg-lo); }
.checkline input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--acc); flex: none; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- accordion (details) ---------- */
/* the answers keep a reading measure but start on the page's rail, so the
   section does not appear to slide sideways */
.faq-wrap .sec-head, .faq-wrap .faq-item { max-width: 820px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--bg-1);
  overflow: hidden;
}
.faq-item + .faq-item { margin-top: 12px; }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px;
  font-family: var(--font-d); font-weight: 700; font-size: 1.02rem; color: var(--fg-hi);
  letter-spacing: -0.01em;
  transition: background var(--d1) ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-2); }
.faq-item summary .ico { transition: transform var(--d2) var(--e-out); color: var(--acc); }
.faq-item[open] summary .ico { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 22px; color: var(--fg); font-size: 0.95rem; max-width: 68ch; }
.faq-item .faq-body p + p { margin-top: 10px; }

/* ---------- dialog chrome (used by the demo gate) ---------- */
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: var(--r-in); color: var(--fg-lo);
  border: 1px solid transparent;
  transition: color var(--d1) ease, border-color var(--d1) ease;
}
.modal-close:hover { color: var(--fg-hi); border-color: var(--line-hi); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-0); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .foot-h { font-family: var(--font-m); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-lo); margin-bottom: 14px; font-weight: 600; }
.footer-mail { display: inline-flex; align-items: center; min-height: 26px; padding: 5px 0; }
.footer-links { display: flex; flex-direction: column; gap: 2px; }
.footer-links a {
  color: var(--fg-lo); font-size: 0.9rem;
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 4px 0;
  width: fit-content;
}
.footer-links a:hover { color: var(--fg-hi); }
.footer-tag { font-family: var(--font-m); color: var(--fg-lo); font-size: 0.85rem; margin-top: 12px; }
.footer-fine { color: var(--fg-faint); font-size: var(--fs-mini); line-height: 1.7; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

/* responsive components (ordered widest -> narrowest so the last match wins) */
/* the burger arrives while the links still fit: German is the long case */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .burger { display: grid; }
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .langs { display: none; }       /* langs live inside the mobile menu instead */
  .menu .langs { display: flex; }
  .menu .langs button { padding: 11px 16px; font-size: var(--fs-mini); }
  .menu > a { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .nav-right > .btn { display: none; } /* CTA lives in the menu + hero on small phones */
  .nav { gap: 10px; padding-inline: 14px; }
  .brand { font-size: 1.05rem; }
}
