/* Swiat Krypto - formularze OKX */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&family=JetBrains+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #0a0814;
  --bg-card: #14111f;
  --bg-sunken: #0d0b16;
  --bg-input: #1b1728;

  --border: #29233d;
  --border-soft: #1f1b2e;
  --border-focus: #8b6ff0;

  --lavender: #b57cff;
  --lavender-dim: #9a72e0;
  --gold: #e8c47a;

  --text: #f0edf8;
  --text-dim: #b4adcb;      /* podniesiony kontrast - 7.5:1 */
  --text-faint: #8f88a8;    /* podniesiony kontrast - 5.2:1 */

  --error: #ff7b89;
  --success: #74dda6;

  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  padding: 48px 20px 100px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 900px 460px at 50% -140px, rgba(181, 124, 255, 0.13), transparent 70%),
    radial-gradient(ellipse 700px 340px at 100% 100%, rgba(232, 196, 122, 0.05), transparent 70%);
  background-attachment: fixed;
}

.wrap { max-width: 760px; margin: 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- naglowek strony ---------- */

.brand {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lavender);
  margin-bottom: 16px;
}

h1 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 38px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.lead { color: var(--text-dim); font-size: 16.5px; line-height: 1.6; margin-bottom: 32px; }
.lead strong { color: var(--text); font-weight: 600; }

/* ---------- boks informacyjny ---------- */

.notice {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(232, 196, 122, 0.07), rgba(232, 196, 122, 0.02));
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin-bottom: 32px;
  font-size: 14.5px;
  color: var(--text-dim);
}
.notice.warn {
  border-left-color: var(--error);
  background: linear-gradient(90deg, rgba(255, 123, 137, 0.07), rgba(255, 123, 137, 0.02));
}
.notice > strong:first-child {
  display: block; margin-bottom: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em;
}
.notice strong { color: var(--text); font-weight: 600; }
.notice ul { margin: 10px 0 0; padding-left: 20px; }
.notice li { margin-bottom: 8px; }
.notice li:last-child { margin-bottom: 0; }

/* ---------- sekcje formularza: kazda to osobna karta ---------- */

form { display: block; }

fieldset {
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.28);
}

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.step-num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(181, 124, 255, 0.14);
  border: 1px solid rgba(181, 124, 255, 0.35);
  color: var(--lavender);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 500;
  margin-top: 1px;
}

.step-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.3;
}
.step-sub {
  font-size: 13.5px;
  color: var(--text-faint);
  margin-top: 3px;
  line-height: 1.5;
}

/* ---------- pola ---------- */

.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.005em;
}
label .req { color: var(--lavender); margin-left: 3px; font-weight: 600; }

.hint {
  display: block;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 7px;
  line-height: 1.55;
}
.hint strong { color: var(--text-dim); font-weight: 600; }

input[type=text], input[type=email], input[type=datetime-local], select, textarea {
  width: 100%;
  min-height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 13px 15px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #3a3254; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background: #1e1a2e;
  box-shadow: 0 0 0 4px rgba(139, 111, 240, 0.16);
}
input::placeholder, textarea::placeholder { color: #6f6889; }
textarea { resize: vertical; min-height: 132px; line-height: 1.65; padding-top: 14px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23b4adcb' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
  cursor: pointer;
}

input[type=file] {
  width: 100%;
  background: var(--bg-sunken);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  color: var(--text-dim);
  padding: 14px;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s;
}
input[type=file]:hover { border-color: var(--lavender-dim); }
input[type=file]::file-selector-button {
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 14px; margin-right: 14px;
  font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
}

/* ---------- kafelki wyboru ---------- */

.choices { display: grid; gap: 10px; }
.choices.cols2 { grid-template-columns: 1fr 1fr; }

.choice {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  min-height: 52px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--lavender-dim); background: #131022; }
.choice input {
  margin-top: 2px; flex-shrink: 0;
  width: 18px; height: 18px;
  accent-color: var(--lavender);
  cursor: pointer;
}
.choice span { font-size: 14.5px; color: var(--text); line-height: 1.45; }
.choice small {
  display: block; color: var(--text-faint);
  font-size: 12.5px; margin-top: 3px; line-height: 1.45;
}
.choice:has(input:checked) {
  border-color: var(--lavender);
  background: rgba(181, 124, 255, 0.10);
  box-shadow: 0 0 0 1px rgba(181, 124, 255, 0.3);
}
.choice:focus-within { box-shadow: 0 0 0 4px rgba(139, 111, 240, 0.16); }

/* ---------- zgody ---------- */

.consent {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 16px 18px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
  transition: border-color .15s, background .15s;
}
.consent:hover { border-color: #3a3254; }
.consent:has(input:checked) { border-color: rgba(116, 221, 166, 0.4); background: rgba(116, 221, 166, 0.05); }
.consent:focus-within { box-shadow: 0 0 0 4px rgba(139, 111, 240, 0.16); }
.consent input {
  margin-top: 2px; flex-shrink: 0;
  width: 19px; height: 19px;
  accent-color: var(--lavender);
  cursor: pointer;
}
.consent label {
  font-size: 13.5px; font-weight: 400;
  color: var(--text-dim); line-height: 1.6;
  margin: 0; cursor: pointer;
}
.consent label strong { color: var(--text); font-weight: 600; }

/* ---------- rozwijane dokumenty ---------- */

details {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  margin-top: 14px;
  background: var(--bg-sunken);
  overflow: hidden;
}
summary {
  cursor: pointer;
  padding: 15px 18px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  transition: color .15s, background .15s;
}
summary:hover { color: var(--text); background: rgba(255,255,255,0.02); }
summary::-webkit-details-marker { display: none; }
summary::before {
  content: '';
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--lavender);
  border-bottom: 1.5px solid var(--lavender);
  transform: rotate(-45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
}
details[open] summary::before { transform: rotate(45deg); }
details[open] summary { border-bottom: 1px solid var(--border-soft); color: var(--text); }
.details-body {
  padding: 20px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  max-height: 420px;
  overflow-y: auto;
}
.details-body p { margin-bottom: 12px; }
.details-body p:last-child { margin-bottom: 0; }
.details-body strong { color: var(--text); font-weight: 600; }
.details-body ol, .details-body ul { margin: 10px 0 12px; padding-left: 20px; }
.details-body li { margin-bottom: 6px; }

/* ---------- przycisk ---------- */

button[type=submit] {
  width: 100%;
  background: linear-gradient(180deg, #bd8bff, #8d5ce0);
  color: #150a22;
  border: 0;
  border-radius: var(--r-md);
  padding: 17px;
  margin-top: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(141, 92, 224, 0.3);
  transition: filter .15s, transform .06s, box-shadow .15s;
}
button[type=submit]:hover { filter: brightness(1.07); box-shadow: 0 8px 26px rgba(141, 92, 224, 0.42); }
button[type=submit]:active { transform: translateY(1px); }
button[type=submit]:disabled { opacity: .45; cursor: not-allowed; filter: none; box-shadow: none; }

/* ---------- komunikaty ---------- */

.msg {
  padding: 15px 18px; border-radius: var(--r-sm);
  margin-bottom: 20px; font-size: 14.5px; display: none;
}
.msg.err { background: rgba(255, 123, 137, .11); border: 1px solid rgba(255, 123, 137, .38); color: var(--error); }
.msg.ok  { background: rgba(116, 221, 166, .11); border: 1px solid rgba(116, 221, 166, .38); color: var(--success); }
.msg.show { display: block; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- stopka ---------- */

footer {
  margin-top: 36px; padding-top: 26px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px; color: var(--text-faint); line-height: 1.75;
}
footer a { color: var(--lavender-dim); }

/* ---------- strona startowa ---------- */

.cards { display: grid; gap: 16px; }
.card {
  display: block; text-decoration: none; color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card:hover {
  border-color: var(--lavender);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.4);
}
.card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 23px; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 10px;
}
.card p { color: var(--text-dim); font-size: 14.5px; margin-bottom: 18px; }
.card .go {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--lavender);
}

/* ---------- podziekowanie ---------- */

.thanks { text-align: center; padding: 48px 0 8px; }
.thanks .tick {
  width: 62px; height: 62px; margin: 0 auto 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(116, 221, 166, 0.12);
  border: 1px solid rgba(116, 221, 166, 0.4);
  font-size: 28px; color: var(--success);
}
.ref {
  font-family: 'JetBrains Mono', monospace;
  font-size: 21px; color: var(--gold);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 15px 26px;
  display: inline-block; margin: 20px 0 8px;
  letter-spacing: .08em;
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  body { padding: 32px 16px 72px; }
  h1 { font-size: 28px; }
  .lead { font-size: 15.5px; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .row .field { margin-bottom: 22px; }
  .choices.cols2 { grid-template-columns: 1fr; }
  fieldset { padding: 22px 20px; border-radius: 14px; }
  .card { padding: 24px 22px; }
  .card h2 { font-size: 20px; }
  .step-title { font-size: 16.5px; }
  .notice { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
