/* ============================================================
   Wariant: MAPA SAN ANDREAS
   Przyklejona, przechylona mapa stanu; przewijanie przelatuje
   kamera miedzy miastami. Rozdzialy tekstu plyna obok mapy.
   ============================================================ */

.m-journey { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.m-map { grid-column: 2; grid-row: 1; position: sticky; top: 0; height: 100dvh; overflow: hidden; }
.m-chapters { grid-column: 1; grid-row: 1; position: relative; z-index: 2; }

/* ---------- scena mapy ---------- */
.m-map__stage { position: absolute; inset: 0; perspective: 1400px; perspective-origin: 50% 30%; }
.m-map__plane { position: absolute; left: 0; top: 0; width: 1000px; height: 1000px; transform-origin: 0 0; will-change: transform; }
.m-map__svg { width: 1000px; height: 1000px; max-width: none; overflow: visible; }
.m-map::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 70% 60% at 55% 50%, transparent 40%, var(--bg) 100%); }
.m-map::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 120px; z-index: 1; pointer-events: none; background: linear-gradient(90deg, var(--bg), transparent); }

.m-land { fill: #221c18; stroke: #54473c; stroke-width: 2.5; }
.m-desert { fill: #2b2219; }
.m-river { fill: none; stroke: var(--bg); stroke-width: 9; stroke-linecap: round; }
.m-chiliad { fill: #2a231e; stroke: #3b322b; stroke-width: 1.5; }
.m-chiliad--lo { fill: #1f1a16; }
.m-roads path { fill: none; stroke: #4a3e34; stroke-width: 3; stroke-linecap: round; }
.m-roads .m-bridge { stroke: #6b5a4c; stroke-width: 4; }
.m-streets path { fill: none; stroke: #342b25; stroke-width: 1; }
.m-streets .m-block { fill: rgba(255, 236, 222, 0.035); stroke: none; transition: fill 900ms var(--ease-out); }
.m-streets .is-active .m-block { fill: rgba(255, 122, 34, 0.10); }
.m-streets g path { transition: stroke 900ms var(--ease-out); }
.m-streets g.is-active path { stroke: rgba(255, 122, 34, 0.5); }
.m-route { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 2 9; }
.m-label { font-family: var(--font-display); font-weight: 800; font-size: 26px; text-transform: uppercase; fill: #8a7c71; letter-spacing: 0.06em; text-anchor: middle; paint-order: stroke; stroke: #0f0d0c; stroke-width: 4px; transition: fill 700ms var(--ease-out); }
.m-label--sm { font-size: 15px; font-weight: 700; fill: #4d433c; }
.m-label.is-active { fill: var(--text); }
.m-pins .m-pin { transform-box: fill-box; transform-origin: center bottom; }
.m-pin rect { fill: var(--bg-raised); stroke: var(--accent); stroke-width: 1.5; }
.m-pin text { font-family: var(--font-display); font-weight: 700; font-size: 12px; fill: var(--text); text-anchor: middle; }
.m-pin path { fill: var(--accent); }
.m-you__dot { fill: var(--accent); stroke: #fff; stroke-width: 2.5; }
.m-you__pulse { fill: none; stroke: var(--accent); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: m-pulse 1.8s ease-out infinite; }
@keyframes m-pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(3); opacity: 0; } }

.m-map__hud { position: absolute; z-index: 2; right: var(--gutter); bottom: 28px; display: grid; justify-items: end; gap: 2px; pointer-events: none; }
.m-map__place { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); text-transform: uppercase; color: var(--text); line-height: 1; font-style: italic; }
.m-map__coords { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }

/* ---------- rozdzialy ---------- */
.m-ch { min-height: 100dvh; display: flex; align-items: center; padding: calc(var(--nav-h) + 24px) var(--gutter) 48px max(var(--gutter), (100vw - var(--wrap)) / 2); }
.m-ch__card { display: grid; gap: 20px; max-width: 520px; }
.m-ch__card > p { color: var(--text-dim); font-size: 1.08rem; }
.m-ch__card strong { color: var(--text); }
.m-ch__where { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent) !important; }
.m-ch__where svg { width: 18px; height: 18px; }
.m-hero__title { display: grid; gap: 16px; }
.m-hero__pre { font-weight: 600; font-size: 1rem; color: var(--text-dim); }
.m-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.m-ch__shots { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.m-ch__shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); transition: transform var(--t-slow); }
.m-ch__shots li:hover img { transform: translateY(-4px) rotate(-1deg); }
.m-ch__list { list-style: none; display: grid; gap: 10px; }
.m-ch__list li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: rgba(26, 22, 20, 0.7); border: 1px solid var(--line); transition: border-color var(--t), transform var(--t); }
.m-ch__list li:hover { border-color: var(--accent-line); transform: translateX(4px); }
.m-ch__list svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.m-snippet { margin: 0; padding: 18px 20px; background: #0c0a09; border: 1px solid var(--line-strong); border-radius: 12px; font-size: 0.86rem; line-height: 1.7; overflow-x: auto; color: #e8e1da; }
.m-live { display: flex; align-items: center; gap: 10px; color: var(--text-dim); }
.m-live b { color: var(--text); font-family: var(--font-display); font-size: 1.3rem; }

/* ---------- ponizej mapy ---------- */
.m-vs { border-top: 1px solid var(--line); }
.m-vs__lede { margin: 18px 0 clamp(40px, 6vw, 72px); }
.m-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(36px, 5vw, 64px); counter-reset: s; }
.m-steps li { display: grid; align-content: start; gap: 10px; padding-top: 20px; border-top: 2px solid var(--line-strong); transition: border-color var(--t-slow); }
.m-steps li:hover { border-color: var(--accent); }
.m-steps__n { font-family: var(--font-display); font-weight: 800; font-size: 4.5rem; line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.m-steps p { color: var(--text-dim); }
.m-start__req { margin-top: 40px; color: var(--text-faint); }
.m-servers { border-top: 1px solid var(--line); }
.m-servers__inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.m-servers__side { display: grid; gap: 24px; justify-items: start; }
@media (max-width: 860px) { .m-servers__inner { grid-template-columns: 1fr; } }
.m-faq__grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.m-final { position: relative; min-height: 80vh; display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.m-final__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.m-final::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(15, 13, 12, 0.92) 20%, rgba(15, 13, 12, 0.2) 80%), linear-gradient(180deg, var(--bg), transparent 30%); }
.m-final__inner { display: grid; justify-items: start; gap: 32px; padding-block: 120px; }

/* ---------- telefon: mapa u gory, karty wjezdzaja na nia ---------- */
@media (max-width: 900px) {
  .m-journey { display: block; }
  .m-map { position: sticky; top: 0; height: 62svh; z-index: 0; }
  .m-map::after { display: none; }
  .m-map::before { background: linear-gradient(180deg, transparent 60%, var(--bg) 100%); }
  .m-map__hud { bottom: auto; top: calc(var(--nav-h) + 10px); }
  .m-chapters { margin-top: -18svh; }
  .m-ch { min-height: 88svh; align-items: flex-end; padding: 0 var(--gutter) 28px; }
  .m-ch--hero { min-height: auto; padding-top: 0; }
  .m-ch__card { background: rgba(15, 13, 12, 0.92); border: 1px solid var(--line-strong); border-radius: var(--r-panel); padding: 22px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: none; }
  .m-ch--hero .m-ch__card { background: var(--bg); border: 0; padding: 22px 0 0; backdrop-filter: none; }
  .m-steps { grid-template-columns: 1fr; }
  .m-faq__grid { grid-template-columns: 1fr; }
}

/* licznik w ostatnim rozdziale: jedna linia bazowa, cyfry bez rozstrzelenia */
.m-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 1.05rem; }
.m-live > span { display: inline-flex; align-items: center; gap: 7px; }
.m-live b { display: inline-flex; font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--text); }
.m-live__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-ghost); }

/* ---------- SKRYPTY: tytul jak misja w San Andreas ---------- */
.mission {
  font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(3rem, 7vw, 5.6rem); line-height: 0.92; letter-spacing: 0.005em;
  color: #f2b544; -webkit-text-stroke: 2px #140c02; paint-order: stroke fill;
  text-shadow: 3px 4px 0 rgba(0, 0, 0, 0.55);
}
.m-lua { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%); }
.m-lua__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.m-lua__copy { display: grid; gap: 22px; justify-items: start; }
@media (max-width: 900px) { .m-lua__grid { grid-template-columns: 1fr; } }

/* hero: dluzszy h1 z fraza kluczowa, szersza karta */
.m-ch--hero { position: relative; }
.m-ch--hero .m-ch__card { max-width: 760px; }
.m-ch--hero .m-ch__card > .lede { max-width: 600px; }
.m-hero__title .h-xl { font-size: clamp(2.4rem, 4.3vw, 4.2rem); line-height: 0.95; }
.m-hero__title .accent { white-space: nowrap; }
.m-hero__pre { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }

/* wskaznik przewijania na dole pierwszego ekranu */
.m-scroll {
  position: absolute; left: max(var(--gutter), (100vw - var(--wrap)) / 2); bottom: 28px;
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
  color: var(--text-dim); font-size: 0.9rem; font-weight: 600; transition: color var(--t);
}
.m-scroll__btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(15, 13, 12, 0.7); transition: border-color var(--t), background-color var(--t); }
.m-scroll__btn svg { width: 18px; height: 18px; animation: m-bob 1.8s var(--ease-io) infinite; }
.m-scroll:hover { color: var(--text); }
.m-scroll:hover .m-scroll__btn { border-color: var(--accent); background: var(--accent); color: #140c02; }
@keyframes m-bob { 0%, 100% { translate: 0 -3px; } 50% { translate: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .m-scroll__btn svg { animation: none; } }
@media (max-height: 700px) and (min-width: 901px) { .m-scroll { display: none; } }
@media (max-width: 900px) {
  .m-scroll { position: static; margin-top: 22px; }
  .m-ch--hero { flex-direction: column; align-items: stretch; }
}
.m-scroll { animation: m-in 0.8s var(--ease-out) 1.1s backwards; }
@keyframes m-in { from { opacity: 0; translate: 0 12px; } }
@media (max-width: 900px) { .m-map__coords { display: none; } }

/* licznik: liczba i etykieta nie rozdzielaja sie */
.m-live > span { white-space: nowrap; }
@media (max-width: 560px) { .m-live > .m-live__sep { display: none; } .m-live { gap: 8px 16px; } }
.m-live .flip__d { width: 0.52em; }

/* telefon i tablet: mapa na caly ekran pod kartami, karta na dole, miasto widac nad nia */
@media (max-width: 900px) {
  .m-map { height: 100svh; }
  .m-map::before { background: linear-gradient(180deg, transparent 45%, rgba(15, 13, 12, 0.85) 100%); }
  .m-chapters { margin-top: -100svh; }
  .m-ch { min-height: 100svh; align-items: flex-end; padding: 0 var(--gutter) 24px; }
  .m-ch__card { max-width: 620px; }
  .m-ch--hero { min-height: 100svh; justify-content: flex-end; padding-top: 28svh; }
  .m-ch--hero { align-items: stretch; }
  .m-ch--hero .m-scroll { margin-top: 16px; align-self: flex-start; }
  .m-ch--hero .m-ch__card { background: linear-gradient(180deg, rgba(15, 13, 12, 0) 0, var(--bg) 90px); padding: 90px 0 0; margin-top: -90px; }
}
