@font-face {
  font-family: 'Cabinet Grotesk';
  src: url('/fonts/CabinetGrotesk-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Zodiak';
  src: url('/fonts/Zodiak-Italic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Clash Display';
  src: url('/fonts/ClashDisplay-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bone: #F5EFE3;
  --carbon: #0B0A09;
  --oxblood: #5E1221;
  --acid-lime: #CEFF00;
  --gray-mute: #6B6B6B;
  --gray-line: rgba(11, 10, 9, 0.15);
  --easing: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bone);
  color: var(--carbon);
  font-family: 'Cabinet Grotesk', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(94, 18, 33, 0.18), transparent 45%),
    radial-gradient(circle at 88% 100%, rgba(206, 255, 0, 0.16), transparent 45%),
    radial-gradient(circle at 70% 18%, rgba(11, 10, 9, 0.06), transparent 55%);
  background-attachment: fixed;
}

button { font: inherit; cursor: pointer; }

.page { max-width: 640px; margin: 0 auto; padding: 32px 16px 64px; min-height: 100vh; }

.topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 32px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--carbon); }
.brand-logo { display: block; height: 40px; width: auto; max-width: 280px; }
.brand-sub {
  font-family: 'Zodiak', serif; font-style: italic; font-weight: 300;
  font-size: 14px; color: var(--gray-mute);
}

.card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  padding: 32px;
  margin-bottom: 32px;
  border: 1px solid rgba(11, 10, 9, 0.08);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 12px 40px -12px rgba(11, 10, 9, 0.18);
}
.card-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800; font-size: 32px; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 8px;
}
.card-sub { margin: 0 0 32px; color: var(--gray-mute); }

.section { border: 0; padding: 0 0 24px; margin: 0 0 24px; border-bottom: 1px solid rgba(11, 10, 9, 0.08); }
.section:last-of-type { border-bottom: 0; padding-bottom: 0; margin-bottom: 24px; }
.section-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  margin: 0 0 16px; padding: 0; color: var(--carbon);
}

.field { display: block; margin-bottom: 16px; }
.field-row { display: flex; gap: 12px; }
.field-half { flex: 1; }
.field .label {
  display: block; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px; color: var(--carbon);
}
.field input, .field textarea {
  width: 100%; font: inherit;
  padding: 10px 12px;
  border: 1px solid rgba(11, 10, 9, 0.18);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--carbon);
  border-radius: 4px;
  transition: border-color 200ms var(--easing), box-shadow 200ms var(--easing), background 200ms var(--easing);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--oxblood);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(94, 18, 33, 0.12);
}
.field .hint { display: block; font-size: 12px; color: var(--gray-mute); margin-top: 4px; }

.toggle-group { display: flex; gap: 0; margin-bottom: 16px; }
.toggle-option { flex: 1; position: relative; }
.toggle-option input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-option span {
  display: block; padding: 12px 16px; text-align: center;
  border: 1px solid rgba(11, 10, 9, 0.18);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-weight: 500; cursor: pointer;
  transition: background 200ms var(--easing), color 200ms var(--easing), border-color 200ms var(--easing);
}
.toggle-option:first-child span { border-right: 0; border-radius: 4px 0 0 4px; }
.toggle-option:last-child span { border-radius: 0 4px 4px 0; }
.toggle-option input:checked + span { background: var(--carbon); color: var(--bone); border-color: var(--carbon); }

/* Payment method grid (BLIK / Card / Apple Pay / Google Pay) */
.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.method-option { position: relative; cursor: pointer; }
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-option .method-label,
.method-option .method-hint { display: block; text-align: left; }
.method-option > span:not(.method-hint):not(.method-label),
.method-option {
  padding: 0;
}
.method-option .method-label {
  font-weight: 800; font-size: 14px; letter-spacing: 0.02em;
}
.method-option .method-hint {
  font-size: 11px; color: var(--gray-mute); text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: 2px;
}
.method-option {
  padding: 14px 16px;
  border: 1px solid rgba(11, 10, 9, 0.18);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 4px;
  transition: background 200ms var(--easing), border-color 200ms var(--easing), box-shadow 200ms var(--easing);
}
.method-option:hover { background: rgba(255, 255, 255, 0.7); }
.method-option:has(input:checked) {
  border-color: var(--oxblood);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(94, 18, 33, 0.18);
}
.method-option:has(input:checked) .method-label { color: var(--oxblood); }

@media (min-width: 540px) {
  .method-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Cloudflare Turnstile widget */
.cf-turnstile-wrap {
  margin: 0 0 16px;
  display: flex; justify-content: center;
}

/* Checkbox rows (terms + waiver) */
.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 12px 0; cursor: pointer; font-size: 14px;
  line-height: 1.45;
}
.checkbox-row input {
  accent-color: var(--oxblood);
  margin-top: 3px;
  flex-shrink: 0;
}
.checkbox-row a { color: var(--oxblood); text-decoration: underline; }
.checkbox-row.optional > span::after {
  content: ' (opcjonalne dla firm)';
  font-size: 12px;
  color: var(--gray-mute);
}

.consent-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--oxblood);
  font-style: italic;
}

.conditional { transition: opacity 200ms var(--easing); }
.conditional.hidden { display: none; }

.cta {
  display: block; width: 100%;
  padding: 16px 24px;
  background: var(--oxblood);
  color: var(--bone);
  border: 1px solid rgba(94, 18, 33, 0.4);
  border-radius: 8px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 24px -8px rgba(94, 18, 33, 0.5);
  transition: background 200ms var(--easing), transform 100ms var(--easing), box-shadow 200ms var(--easing), opacity 200ms var(--easing);
}
.cta:hover:not(:disabled) { background: #3a0b14; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 32px -8px rgba(94, 18, 33, 0.6); }
.cta:active:not(:disabled) { transform: translateY(1px); }
.cta:disabled {
  background: var(--gray-mute);
  border-color: var(--gray-mute);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.65;
}

.error {
  margin: 12px 0; padding: 10px 12px;
  border-left: 2px solid var(--oxblood); color: var(--oxblood);
  font-size: 14px; display: none;
}
.error.visible { display: block; }

.footer {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--gray-mute);
  flex-wrap: wrap; gap: 16px;
}
.footer .version { font-family: 'Clash Display', sans-serif; font-weight: 500; letter-spacing: 0.05em; }

body.embed .footer { display: none; }
body.embed .page { padding-top: 16px; }
body.embed .topbar { margin-bottom: 16px; }
body.embed .brand-logo { height: 32px; }
body.embed .brand-sub { font-size: 12px; }
body.embed .cookie-banner { display: none; }

/* Cookie consent banner (essential only, dismissable) */
.cookie-banner {
  position: fixed;
  bottom: 16px; left: 16px; right: 16px;
  max-width: 720px; margin: 0 auto;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(11, 10, 9, 0.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px -12px rgba(11, 10, 9, 0.25);
  display: flex; align-items: center; gap: 16px;
  z-index: 9999;
  animation: cookieSlideUp 300ms var(--easing);
}
@keyframes cookieSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cookie-text {
  flex: 1; margin: 0;
  font-size: 13px; line-height: 1.45; color: var(--carbon);
}
.cookie-actions {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.cookie-link {
  font-size: 12px; color: var(--oxblood); text-decoration: underline;
}
.cookie-btn {
  padding: 8px 16px;
  background: var(--carbon); color: var(--bone);
  border: 0; border-radius: 8px;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 200ms var(--easing);
}
.cookie-btn:hover { background: #2a2826; }

body.cookie-banner-visible { padding-bottom: 96px; }

@media (max-width: 540px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .cookie-actions { justify-content: space-between; }
}

@media (max-width: 480px) {
  .page { padding: 16px 12px 32px; }
  .card { padding: 24px 16px; }
  .card-title { font-size: 24px; }
  .field-row { flex-direction: column; gap: 0; }
}
