:root {
  --bg: #0a0c11;
  --surface: #12151d;
  --surface-2: #181c26;
  --line: #252a37;
  --text: #eef1f7;
  --muted: #99a1b3;
  --accent: #6c5cff;
  --accent-2: #22d3a6;
  --danger: #ff6b6b;
  --radius: 14px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

/* Panel koszyka i modal maja wlasne display, wiec samo [hidden] ich nie ukryje. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }

a { color: inherit; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--accent);
  padding: 0.6rem 1rem;
  border-radius: 8px;
}

/* Naglowek */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 12, 17, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand strong { color: var(--accent-2); font-weight: 600; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), #a855f7);
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cart-button:hover { border-color: var(--accent); background: var(--surface-2); }
.cart-count {
  min-width: 22px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

/* Hero */
.hero {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(60rem 26rem at 15% -10%, rgba(108, 92, 255, 0.22), transparent 60%),
    radial-gradient(45rem 22rem at 95% 0%, rgba(34, 211, 166, 0.13), transparent 60%);
}
.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
}
.lede {
  max-width: 58ch;
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--muted);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.badges li {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--muted);
}

/* Pasek wstrzymanej sprzedazy */
.notice {
  width: min(100% - 2.5rem, var(--wrap));
  margin: 1.5rem auto 0;
  padding: 0.9rem 1.15rem;
  border: 1px solid rgba(255, 180, 84, 0.42);
  border-radius: 10px;
  background: rgba(255, 180, 84, 0.1);
  color: #ffcf8b;
  font-size: 0.93rem;
}

/* Sekcje */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { margin: 0.6rem 0 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.1rem;
}
.state { grid-column: 1 / -1; color: var(--muted); margin: 0; }
.state.error { color: var(--danger); }

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #3b3f52; transform: translateY(-2px); }
.card h3 { font-size: 1.15rem; }
.card .period {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.card .tagline { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }
.card .price {
  margin-top: 0.75rem;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.primary-button {
  padding: 0.75rem 1.2rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}
.primary-button:hover:not(:disabled) { filter: brightness(1.12); }
.primary-button:disabled { opacity: 0.45; cursor: not-allowed; }
.card .primary-button { margin-top: 0.5rem; }

/* Kroki */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 0.9rem;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.9rem;
}
.steps h3 { font-size: 1.05rem; }
.steps p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.92rem; }

/* Stopka */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* Koszyk */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 6, 10, 0.65);
  backdrop-filter: blur(2px);
}
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--line);
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 { font-size: 1.15rem; }
.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.icon-button:hover { border-color: var(--accent); }

.cart-body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }

.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.line-name { font-weight: 500; }
.line-unit { color: var(--muted); font-size: 0.85rem; }
.line-sum { font-weight: 600; white-space: nowrap; }
.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.15rem;
}
.qty button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.qty button:hover:not(:disabled) { background: var(--accent); }
.qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.qty span { min-width: 1.5ch; text-align: center; font-variant-numeric: tabular-nums; }

.cart-foot {
  padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.total-row strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }

.field { display: block; margin-bottom: 1rem; }
.field span { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.form-error {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.09);
  color: var(--danger);
  font-size: 0.88rem;
}
.cart-foot .primary-button { width: 100%; }
.fineprint { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.76rem; line-height: 1.5; }

/* Modal wyniku */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(4, 6, 10, 0.75);
}
.modal-card {
  width: min(520px, 100%);
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.modal-card h2 { margin-bottom: 1rem; font-size: 1.3rem; }
.modal-card p { color: var(--muted); }
.modal-card .primary-button { width: 100%; margin-top: 1.5rem; }
.code-list { margin: 1rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.code-list li {
  padding: 0.7rem 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
