/* =========================================================
   Korepetycje – Jakub
   Mobile-first: style bazowe = telefon, media queries = większe ekrany
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6fb;
  --surface: #ffffff;
  --text: #16172b;
  --muted: #5b5e78;
  --border: #e3e5f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef0ff;
  --accent: #0ea5a4;
  --ok: #15803d;
  --error: #b91c1c;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(22, 23, 43, .04), 0 8px 24px rgba(22, 23, 43, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1020;
    --bg-alt: #15172b;
    --surface: #1b1d34;
    --text: #eceefb;
    --muted: #a3a6c2;
    --border: #2a2d4a;
    --primary: #8b85ff;
    --primary-hover: #a5a0ff;
    --primary-soft: #23244a;
    --accent: #2dd4bf;
    --ok: #4ade80;
    --error: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 8vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 22px;
  font: inherit; font-weight: 600; text-decoration: none;
  color: #fff; background: var(--primary);
  border: 2px solid var(--primary); border-radius: 999px;
  cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary); }
.btn-block { display: flex; width: 100%; }
.btn-small { min-height: 40px; padding: 8px 18px; }
@media (prefers-color-scheme: dark) {
  .btn:not(.btn-ghost) { color: #0f1020; }
}

/* ---------- Nagłówek strony ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.logo-sub { font-weight: 500; color: var(--muted); }
.logo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800;
}

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: absolute; top: 64px; left: 0; right: 0;
  display: none; flex-direction: column; gap: 4px; padding: 12px 20px 20px;
  background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.nav.is-open { display: flex; }
.nav a:not(.btn) { padding: 12px 4px; color: var(--text); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--border); }
.nav .btn { margin-top: 12px; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 48px;
  background:
    radial-gradient(600px 300px at 90% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(600px 300px at 0% 20%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%);
}
.eyebrow { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-bottom: .8em; }
.accent { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38em; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 36px; }

.hero-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-facts li {
  display: flex; flex-direction: column; padding: 14px 12px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.hero-facts strong { font-size: 1.1rem; }
.hero-facts span { font-size: .8rem; color: var(--muted); line-height: 1.3; }

/* ---------- Sekcje ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); max-width: 40em; margin-bottom: 28px; }

.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* O mnie */
.about { display: grid; gap: 24px; }
.about-avatar {
  width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center;
  font-size: 2.5rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
}

/* Karty */
.cards { display: grid; gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px;
  border-radius: 14px; background: var(--primary-soft); color: var(--primary);
}
.levels { margin: 0; }
.levels dt { font-weight: 700; margin-top: 14px; color: var(--primary); font-size: .9rem; }
.levels dt:first-child { margin-top: 0; }
.levels dd { margin: 2px 0 0; color: var(--muted); }

/* Cennik */
.price-card {
  max-width: 440px; margin: 0 auto; padding: 32px 24px; text-align: left;
  background: var(--surface); border: 2px solid var(--primary); border-radius: 22px; box-shadow: var(--shadow);
}
.price-name { font-weight: 600; color: var(--muted); margin-bottom: .3em; }
.price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.price-amount { font-size: 3rem; font-weight: 800; letter-spacing: -.02em; }
.price-unit { color: var(--muted); font-weight: 500; }
.price-card .btn { margin-top: 12px; }
.promo {
  margin: -4px 0 20px; padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px dashed var(--accent);
}
.promo[hidden] { display: none; }
.promo-title { margin: 0 0 2px; font-weight: 700; }
.promo-text { margin: 0; font-size: .95rem; color: var(--muted); }

/* Kroki */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; }
.steps li {
  counter-increment: step; position: relative; padding: 20px 20px 20px 72px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.steps li::before {
  content: counter(step); position: absolute; left: 20px; top: 20px;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700;
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); }
.note { padding: 16px 20px; border-radius: 12px; background: var(--primary-soft); }
@media (prefers-color-scheme: dark) {
  .steps li::before { color: #0f1020; }
}

/* Kontakt */
.contact { display: grid; gap: 32px; }
.contact-buttons { display: grid; gap: 12px; }
.contact-buttons .btn { word-break: break-all; }

.form {
  display: grid; gap: 16px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: 16px; }
.field label { font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; /* 16px = brak auto-zoomu na iOS */
  color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}
.field .is-invalid { border-color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { margin: 0; font-size: .85rem; color: var(--muted); }
.form-status { margin: 0; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--error); }

/* Stopka */
.site-footer { padding: 28px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-inner p { margin: 4px 0; }
.site-footer a { color: inherit; }

/* =========================================================
   Większe ekrany
   ========================================================= */
@media (min-width: 560px) {
  .hero-cta { flex-direction: row; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .contact-buttons .btn { word-break: normal; }
}

@media (min-width: 768px) {
  .container { padding: 0 32px; }
  .section { padding: 88px 0; }
  .hero { padding: 96px 0 80px; }
  .cards-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: auto 1fr; gap: 40px; align-items: start; }
  .about-avatar { width: 140px; height: 140px; font-size: 3.5rem; border-radius: 36px; }
  .hero-facts { max-width: 560px; }
  .footer-inner { display: flex; justify-content: space-between; gap: 16px; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 24px;
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  .nav a:not(.btn) { padding: 6px 0; border: 0; font-size: .95rem; color: var(--muted); }
  .nav a:not(.btn):hover { color: var(--text); }
  .nav .btn { margin-top: 0; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 72px 20px 24px; }
  .contact { grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
}
