/* ===================================================================
   SPARTAN MATHEMATICA
   spartan-mathematica.html (body.page-spartan) — strona programu z formularzem zgłoszenia;
   spartan-kwalifikacja.html (body.page-rezerwacja) — strona zgłoszenia kandydata (.sp-*).
   Formularz i karty statusu korzystają z klas rz-* z rezerwacja.css.
   Akcent programu: czerwień (--red) obok złota strony — oszczędnie.
   =================================================================== */

/* Hero */
.page-spartan .sp-hero { padding: 3rem 6rem 4.5rem; position: relative; overflow: hidden; }
.sp-hero-formulas { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sp-hero-formulas span {
  position: absolute; font-family: 'Libre Baskerville', serif; font-style: italic; color: rgba(var(--gold-rgb), .08);
  font-size: 3rem; opacity: 0; animation: settleIn 1.4s ease forwards;
}
.sp-hero-formulas span:nth-child(1) { left: 78%; top: 10%; animation-delay: .1s; }
.sp-hero-formulas span:nth-child(2) { left: 88%; top: 48%; font-size: 4rem; animation-delay: .25s; }
.sp-hero-formulas span:nth-child(3) { left: 70%; top: 72%; font-size: 2.4rem; animation-delay: .4s; }
.sp-hero-formulas span:nth-child(4) { left: 62%; top: 28%; font-size: 2.2rem; animation-delay: .55s; }
.sp-hero > :not(.sp-hero-formulas) { position: relative; z-index: 1; }
.sp-eyebrow {
  font-family: 'DM Mono', monospace; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1.3rem; display: flex; align-items: center; gap: .75rem;
}
.sp-eyebrow::before { content: ''; display: block; width: 2.5rem; height: 1px; background: var(--red); }
.sp-title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.04; font-weight: 700; color: var(--chalk); margin-bottom: 1.3rem; max-width: 16ch; }
.sp-title em { font-style: italic; color: var(--gold); }
.sp-sub { font-size: 1.12rem; line-height: 1.7; color: var(--chalk2); max-width: 60ch; margin-bottom: 1.8rem; }
.sp-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.page-spartan .sp-badges .badge { font-size: .85rem; }
.sp-badge-red { border-color: rgba(224, 90, 90, .45); color: var(--red); background: rgba(224, 90, 90, .07); }
.sp-cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Wspólne dla sekcji programu — rozmiary w rem, niezależne od wysokości okna */
.page-spartan .section-intro { font-size: 1.08rem; line-height: 1.65; }

/* Dla kogo */
.sp-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; max-width: 72rem; }
.sp-fit-card { background: var(--bg3); border: 1px solid var(--border); border-radius: .9rem; padding: 1.8rem 2rem; }
.sp-fit-card h3 { font-size: 1.15rem; color: var(--chalk); margin-bottom: 1rem; }
.sp-fit-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.sp-fit-card li { position: relative; padding-left: 1.7rem; color: var(--chalk2); line-height: 1.55; }
.sp-fit-card li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.sp-fit-yes li::before { content: '✓'; color: var(--teal); }
.sp-fit-no li::before { content: '×'; color: var(--red); font-size: 1.15rem; line-height: 1.3; }
.sp-fit-no p { margin-top: 1.2rem; color: var(--chalk2); line-height: 1.55; }
.sp-fit-no a, .sp-fit-yes a { color: var(--gold); }

/* Program */
.sp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.sp-card { background: var(--bg3); border: 1px solid var(--border); border-radius: .85rem; padding: 1.7rem 1.7rem 1.6rem; }
.sp-card-sym { display: block; font-family: 'Libre Baskerville', serif; font-size: 1.8rem; line-height: 1; color: var(--gold); margin-bottom: .9rem; }
.sp-card h3 { font-size: 1.1rem; color: var(--chalk); margin-bottom: .5rem; }
.sp-card p { font-size: .96rem; color: var(--chalk2); line-height: 1.65; }

/* Zasady */
.sp-rules { list-style: none; counter-reset: rule; padding: 0; margin: 0; display: grid; gap: .9rem; max-width: 72ch; }
.sp-rules li {
  counter-increment: rule; position: relative; padding: 1.15rem 1.4rem 1.15rem 4.2rem; background: var(--bg3);
  border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: .6rem; color: var(--chalk2); line-height: 1.6;
}
.sp-rules li::before {
  content: counter(rule, upper-roman); position: absolute; left: 1.3rem; top: 1.05rem;
  font-family: 'Libre Baskerville', serif; font-size: 1.25rem; color: var(--red);
}
.sp-rules strong { color: var(--chalk); }

/* Kwalifikacja */
.sp-flow { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.sp-flow::before {
  content: ''; position: absolute; top: 1.6rem; left: 6%; right: 6%; height: 1px;
  background: repeating-linear-gradient(90deg, var(--border) 0 8px, transparent 8px 14px);
}
.sp-flow-step { position: relative; text-align: center; padding: 0 .8rem; }
.sp-flow-num {
  width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); margin: 0 auto 1.1rem;
  display: flex; align-items: center; justify-content: center; font-family: 'Libre Baskerville', serif; font-size: 1.3rem; color: var(--gold);
}
.sp-flow-step:nth-child(3) .sp-flow-num { border-color: var(--red); color: var(--red); }
.sp-flow-step:last-child .sp-flow-num { border-color: var(--teal); color: var(--teal); }
.sp-flow-step h3 { font-size: 1.05rem; color: var(--chalk); margin-bottom: .45rem; }
.sp-flow-step p { font-size: .92rem; color: var(--chalk2); line-height: 1.6; }

/* Cennik */
.sp-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 56rem; }
.sp-price { position: relative; background: var(--bg3); border: 1px solid var(--border); border-radius: 1rem; padding: 2.2rem 2rem 2rem; text-align: center; }
.sp-price-best { border-color: rgba(var(--gold-rgb), .55); }
.sp-price-tag {
  position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); padding: .3rem .85rem; border-radius: 2rem;
  background: var(--gold); color: var(--bg); font-family: 'DM Mono', monospace; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.sp-price-name { font-family: 'DM Mono', monospace; font-size: .85rem; letter-spacing: .15em; text-transform: uppercase; color: var(--chalk2); }
.sp-price-amount { font-family: 'Libre Baskerville', serif; font-size: 2.8rem; line-height: 1.1; color: var(--gold); margin: .6rem 0 .4rem; }
.sp-price-per { font-size: .9rem; color: var(--chalk2); }
.sp-price-per s { opacity: .75; }
.sp-price-desc { margin-top: 1rem; color: var(--chalk); font-size: .98rem; line-height: 1.6; }
.sp-price-note { max-width: 56rem; margin-top: 1.5rem; text-align: center; color: var(--chalk2); font-size: .95rem; line-height: 1.6; }

/* Zgłoszenie */
.sp-form { max-width: 46rem; }
.sp-form .rz-services { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.sp-closed { max-width: 46rem; }

/* FAQ */
.page-spartan .faq-list { max-width: 74ch; }
.page-spartan .faq-item { border-bottom: 1px solid var(--border); padding: 1.2rem 0; }
.page-spartan .faq-item summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 1.08rem; color: var(--chalk); font-weight: 500;
}
.page-spartan .faq-item summary::-webkit-details-marker { display: none; }
.page-spartan .faq-item summary::after { content: '+'; font-family: 'DM Mono', monospace; font-size: 1.3rem; color: var(--gold); transition: transform .2s; margin-left: 1rem; flex-shrink: 0; }
.page-spartan .faq-item[open] summary::after { transform: rotate(45deg); }
.page-spartan .faq-item p { font-size: .98rem; color: var(--chalk2); margin-top: .8rem; line-height: 1.75; max-width: 64ch; }
.page-spartan .faq-item a { color: var(--gold); }

@media (max-width: 1024px) {
  .page-spartan .sp-hero { padding: 2.5rem 1.5rem 3rem; }
  .sp-hero-formulas { display: none; }
  .sp-fit, .sp-prices { grid-template-columns: 1fr; }
  .sp-grid { grid-template-columns: 1fr 1fr; }
  .sp-flow { grid-template-columns: 1fr; gap: 1.8rem; }
  .sp-flow::before { display: none; }
  .page-spartan .contact-strip, .page-spartan footer { padding: 2rem 1.5rem; }
}
@media (max-width: 640px) {
  .sp-grid { grid-template-columns: 1fr; }
  .sp-fit-card, .sp-price { padding: 1.5rem 1.3rem; }
  .sp-rules li { padding: 1rem 1.1rem 1rem 3.4rem; }
  .sp-rules li::before { left: 1rem; }
}

/* ---------- Strona zgłoszenia kandydata (spartan-kwalifikacja.html) ---------- */
.sp-status { max-width: 44rem; }
.sp-status .rz-note { margin-bottom: 1.3rem; white-space: pre-line; }
.sp-status-section { margin-top: 1.4rem; padding-top: 1.3rem; border-top: 1px solid var(--border); }
.sp-status-section h3 { font-size: 1.05rem; color: var(--chalk); margin-bottom: .8rem; }
.sp-files { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.sp-files li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .55rem .8rem;
  border-radius: .45rem; background: var(--bg3); border: 1px solid var(--border); font-size: .92rem;
}
.sp-file-name { color: var(--chalk); overflow-wrap: anywhere; }
.sp-file-meta { color: var(--chalk2); font-family: 'DM Mono', monospace; font-size: .78rem; white-space: nowrap; }
.sp-file-remove { background: none; border: 0; padding: 0 .2rem; font: inherit; font-size: 1.1rem; line-height: 1; color: var(--chalk2); cursor: pointer; }
.sp-file-remove:hover { color: var(--red); }
.sp-upload { display: flex; flex-direction: column; gap: .9rem; }
.sp-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.6rem 1rem;
  border: 2px dashed rgba(var(--gold-rgb), .45); border-radius: .8rem; background: var(--glow); text-align: center; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.sp-drop:hover, .sp-drop.is-over { border-color: var(--gold); background: rgba(var(--gold-rgb), .1); }
.sp-drop:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.sp-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sp-drop-title { font-weight: 600; color: var(--chalk); }
.sp-drop-hint { font-size: .85rem; color: var(--chalk2); }
.sp-progress { height: .5rem; border-radius: 1rem; background: var(--bg3); overflow: hidden; }
.sp-progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.sp-upload .rz-submit:disabled { cursor: not-allowed; }
.sp-ok { padding: .8rem 1rem; border-radius: .5rem; border: 1px solid rgba(var(--teal-rgb), .45); background: rgba(var(--teal-rgb), .1); color: var(--chalk); margin-bottom: 1.2rem; }
