/* Strona „Wersja demo” (avenit.pl/demo/, /en/demo/): formularz prośby o dostęp.
   Marka Avenit: papier / słód / kurkuma, Manrope (z site.css). Tylko jasny motyw, bez pasków-akcentów.
   Tokeny z site.css z wartościami zapasowymi — strona wygląda tak samo, gdy site.css się zmieni.
   Bez JS: ekran sukcesu i błędy pokazuje :target (serwer przekierowuje na /demo/#sent | #err-…). */

.demo {
  --d-papier: var(--papier, #F6F4EE); --d-papier-2: var(--papier-2, #ECE8DE); --d-slod: var(--slod, #2A2312);
  --d-kurkuma: var(--kurkuma, #FFBE0B); --d-kurkuma-j: var(--kurkuma-j, #FFF1C2); --d-musztarda: var(--musztarda, #8A6606);
  --d-tekst: var(--tekst, #3F3B33); --d-pomoc: var(--pomoc, #6B6557); --d-linia: rgba(42, 35, 18, .14); --d-biel: #FFFFFF;
  --d-blad: #A3341F; --d-blad-tlo: #FBEDE8; --d-ease: cubic-bezier(.16, 1, .3, 1);
  padding: clamp(32px, 6vw, 80px) 0 clamp(56px, 8vw, 112px);
  color: var(--d-tekst);
}
.demo-in {
  width: min(1180px, calc(100% - 2 * var(--gutter, 16px)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-areas: "head card" "details card";
  grid-template-rows: auto 1fr;
  gap: 0 clamp(32px, 5vw, 80px);
  align-items: start;
}
.demo-head { grid-area: head; }
.demo-details { grid-area: details; }
.demo-card { grid-area: card; position: sticky; top: calc(var(--nav-h, 76px) + 16px); }
.demo-card, .demo-state, .demo-alert { scroll-margin-top: calc(var(--nav-h, 76px) + 24px); }

.demo-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--d-musztarda); margin-bottom: 18px; }
.demo h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; color: var(--d-slod); margin: 0 0 22px; text-wrap: balance; }
.demo h1 .l { display: block; font-weight: 300; }
.demo h1 .pt { color: var(--d-kurkuma); }
.demo-lead { font-size: clamp(18px, 1.5vw, 20.5px); line-height: 1.6; max-width: 32em; margin: 0 0 36px; }

/* Co dostajesz */
.demo-points { list-style: none; margin: 0 0 36px; padding: 0; display: grid; gap: 18px; }
.demo-points li { display: grid; grid-template-columns: 36px 1fr; gap: 2px 14px; align-items: start; }
.demo-points .ic { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--d-kurkuma-j); display: grid; place-items: center; color: var(--d-slod); }
.demo-points .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.demo-points strong { color: var(--d-slod); font-size: 17px; font-weight: 700; line-height: 1.4; padding-top: 6px; }
.demo-points span { font-size: 15.5px; line-height: 1.55; color: var(--d-tekst); }

/* Trzy konta */
.demo-accounts-title { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--d-musztarda); margin: 0 0 12px; }
.demo-accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.demo-accounts li { display: grid; grid-template-columns: 40px 1fr; gap: 0 14px; align-items: center; padding: 14px 18px; border-radius: 18px; background: var(--d-biel); box-shadow: 0 1px 2px rgba(42, 35, 18, .06); }
.demo-accounts .av { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--d-slod); background: var(--d-papier-2); }
.demo-accounts li:first-child .av { background: var(--d-kurkuma); }
.demo-accounts strong { color: var(--d-slod); font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.demo-accounts span { font-size: 14.5px; line-height: 1.45; color: var(--d-pomoc); }
.demo-note { margin: 18px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--d-pomoc); max-width: 34em; }

/* Karta formularza */
.demo-card { background: var(--d-biel); border-radius: 28px; padding: clamp(24px, 3.2vw, 40px); box-shadow: 0 1px 2px rgba(42, 35, 18, .06), 0 28px 60px -36px rgba(42, 35, 18, .38); }
.demo-card h2 { font-size: clamp(23px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -.02em; font-weight: 800; color: var(--d-slod); margin: 0 0 6px; }
.demo-card .sub { font-size: 15px; color: var(--d-pomoc); margin: 0 0 22px; line-height: 1.5; }

.demo-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
/* Pola w parze (telefon + wielkość): etykieta w dwóch liniach nie rozjeżdża pól. */
.f:not(.full) { justify-content: flex-end; }
.f label, .f .lbl { font-size: 14.5px; font-weight: 700; color: var(--d-slod); line-height: 1.3; }
.f label b { color: var(--d-musztarda); font-weight: 800; }
.f label .opt { font-weight: 500; color: var(--d-pomoc); }
.f input, .f select {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--d-linia);
  background: #FBFAF6; color: var(--d-slod); font: 500 16px/1.2 "Manrope", system-ui, sans-serif;
  transition: border-color .15s, box-shadow .15s, background-color .15s; -webkit-appearance: none; appearance: none;
}
.f select {
  padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A2312' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.f input::placeholder { color: #A39C8C; }
.f input:hover, .f select:hover { border-color: rgba(42, 35, 18, .28); }
.f input:focus, .f select:focus { outline: none; border-color: var(--d-slod); background: var(--d-biel); box-shadow: 0 0 0 4px rgba(255, 190, 11, .35); }
.f input[aria-invalid="true"], .f select[aria-invalid="true"] { border-color: var(--d-blad); background: var(--d-blad-tlo); }
.f .hint { font-size: 13px; color: var(--d-pomoc); line-height: 1.45; }
.f-err { display: none; font-size: 13.5px; font-weight: 600; color: var(--d-blad); line-height: 1.45; }
.f-err.is-on { display: block; }

.consent { grid-column: 1 / -1; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 14.5px; line-height: 1.55; color: var(--d-tekst); cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--d-slod); cursor: pointer; }
.consent a { color: var(--d-slod); font-weight: 700; text-decoration: underline; text-decoration-color: var(--d-kurkuma); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.consent-err { grid-column: 1 / -1; margin-top: -8px; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.demo-submit {
  grid-column: 1 / -1; height: 56px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--d-kurkuma); color: var(--d-slod); font: 800 17px/1 "Manrope", system-ui, sans-serif; letter-spacing: -.01em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .3s var(--d-ease), background-color .2s;
}
.demo-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.demo-submit:hover { background: #FFC82E; transform: translateY(-2px); }
.demo-submit:focus-visible { outline: 2px solid var(--d-slod); outline-offset: 3px; }
.demo-submit[disabled] { cursor: progress; opacity: .7; transform: none; }
.demo-fine { grid-column: 1 / -1; margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--d-pomoc); text-align: center; }

/* Komunikaty (bez JS: :target; z JS: .is-on) */
.demo-alert { display: none; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px; background: var(--d-blad-tlo); color: var(--d-blad); font-size: 15px; font-weight: 600; line-height: 1.5; }
.demo-alert:target, .demo-alert.is-on { display: block; }
.demo-alert a { color: inherit; }

/* Ekran po wysłaniu */
.demo-state { display: none; text-align: left; }
.demo-state:target, .demo-state.is-on { display: block; }
.demo-state:target ~ .demo-alert, .demo-state:target ~ .demo-form, .demo-state:target ~ .demo-form-head,
.demo-card.is-done .demo-form, .demo-card.is-done .demo-form-head, .demo-card.is-done .demo-alert { display: none; }
.demo-state .mark { width: 56px; height: 56px; border-radius: 50%; background: var(--d-kurkuma); display: grid; place-items: center; color: var(--d-slod); margin-bottom: 22px; }
.demo-state .mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.demo-state h2 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 12px; }
.demo-state h2:focus { outline: none; }
.demo-state p { font-size: 16.5px; line-height: 1.6; margin: 0 0 14px; }
.demo-state p strong { color: var(--d-slod); overflow-wrap: anywhere; }
.demo-state .spam { font-size: 14.5px; color: var(--d-pomoc); padding: 14px 16px; border-radius: 14px; background: var(--d-papier); margin: 6px 0 24px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-demo {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 16.5px;
  padding: 15px 28px; border-radius: 999px; color: var(--d-slod); background: var(--d-kurkuma); transition: transform .3s var(--d-ease), background-color .2s;
}
.btn-demo svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-demo:hover { background: #FFC82E; transform: translateY(-2px); }
.btn-demo.ghost { background: var(--d-papier); }
.btn-demo.ghost:hover { background: var(--d-papier-2); }

@media (max-width: 960px) {
  .demo-in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "card" "details"; grid-template-rows: auto; }
  .demo-card { position: static; margin: 0 0 48px; }
  .demo-lead { margin-bottom: 28px; }
}
@media (max-width: 520px) {
  .demo-form { grid-template-columns: minmax(0, 1fr); }
  .demo-card { border-radius: 24px; padding: 24px 18px; }
  .demo-accounts li { padding: 12px 14px; }
  .demo-actions .btn-demo { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .demo * { transition-duration: .01ms !important; } }
.demo-note a { color: var(--d-slod); font-weight: 700; text-decoration: underline; text-decoration-color: var(--d-kurkuma); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.demo-state .spam a { color: var(--d-slod); font-weight: 600; }
