/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== TOKENS ===== */
:root {
  --red:    #C8102E;
  --black:  #0D0D0D;
  --white:  #FFFFFF;
  --grey:   #F5F5F5;
  --border: 2px solid var(--black);
  --shadow: 4px 4px 0 var(--black);
  --mono:   'Space Mono', 'Courier New', monospace;
  --sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--black);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== SCROLL PROGRESS ===== */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--red);
  z-index: 999;
  transition: width 0.1s linear;
}

/* ===== LAYOUT ===== */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
  border-bottom: var(--border);
  background: var(--white);
}

section.accent {
  background: var(--grey);
}

/* ===== NAV ===== */
nav {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: var(--border);
  z-index: 100;
  transition: transform 0.25s ease;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

/* ===== LOGO ===== */
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--black);
  text-decoration: none;
}

/* ===== LABEL ===== */
.label {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.5rem;
}

/* ===== HEADINGS ===== */
h1 {
  font-family: var(--mono);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 2.5rem;
}

h1 em {
  font-style: normal;
  color: var(--red);
}

h2 {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
}

/* ===== BODY TEXT ===== */
.body-text {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  max-width: 540px;
}

.muted {
  color: #555;
  margin-top: 1.25rem;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--red);
  margin-top: 0.75rem;
}

/* ===== BUTTON ===== */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  background: var(--red);
  padding: 0.75rem 1.5rem;
  border: var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn--big { padding: 1.1rem 2.2rem; font-size: 0.95rem; }

.btn:hover  { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--black); }
.btn:active { transform: translate(2px,2px);  box-shadow: 2px 2px 0 var(--black); }

/* ===== HERO ===== */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  background-color: var(--white);
  background-image:
    linear-gradient(to right, rgba(200,16,46,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200,16,46,.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero .wrap { padding-top: 3rem; padding-bottom: 3rem; position: relative; z-index: 1; }

#heroCanvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

/* ===== LOCAL PACK MOCK ===== */
.local-pack {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  min-width: 260px;
  max-width: 300px;
}

.pack-searchbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1.5px solid #ddd;
  border-radius: 24px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 1rem;
  background: var(--white);
}

.pack-search-g {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pack-query {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--black);
  flex: 1;
}

.pack-search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pack-result {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid #eee;
}

.pack-result--first {
  border-top: none;
  padding-top: 0;
}

.pack-pos {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.pack-result--first .pack-pos {
  background: var(--red);
  color: var(--white);
  font-size: 0.7rem;
}

.pack-name {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}

.pack-result--first .pack-name { color: var(--red); }

.pack-meta {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.2rem;
}

.pack-stars { color: #F9AB00; }
.pack-stars--dim { color: #ccc; }

.pack-reviews { color: var(--red); font-weight: 700; }


/* ===== HOW IT WORKS ===== */
.how-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.how-text-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.how-text-col h2 { margin-bottom: 0.25rem; }

.how-text {
  font-size: 1rem;
  line-height: 1.75;
  color: #444;
  margin: 0;
}

.how-text em {
  font-style: normal;
  color: var(--red);
  font-weight: 700;
}

.how-stat {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.4rem;
  background: var(--grey);
  margin-top: 0.5rem;
}

.how-stat-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--red);
  line-height: 1;
  flex-shrink: 0;
}

.how-stat-label {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--black);
}

.how-stat-label strong {
  font-weight: 700;
}

/* SERP mockup */
.how-serp {
  border: var(--border);
  box-shadow: var(--shadow);
  background: var(--white);
  overflow: hidden;
  font-family: var(--sans);
}

.serp-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.serp-g { width: 16px; height: 16px; flex-shrink: 0; }

.serp-query {
  font-size: 0.82rem;
  color: #202124;
  flex: 1;
}

.serp-search-icon { width: 15px; height: 15px; flex-shrink: 0; }

/* listing rows */
.serp-listing {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #ebebeb;
}

.serp-listing:last-child { border-bottom: none; }

.serp-listing--1 { background: rgba(200,16,46,0.05); }
.serp-listing--2 { background: rgba(200,16,46,0.02); }
.serp-listing--4,
.serp-listing--5 { opacity: 0.45; }

/* map pin */
.serp-pin {
  flex-shrink: 0;
  width: 20px;
  margin-top: 2px;
}

.serp-pin svg { width: 20px; height: 25px; display: block; }

/* card body */
.serp-card-body { flex: 1; min-width: 0; }

.serp-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a73e8;
  line-height: 1.3;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.serp-name--1 { color: #C8102E; }
.serp-name--2 { color: rgba(200,16,46,0.7); }
.serp-name--3 { color: rgba(200,16,46,0.45); }
.serp-name--grey { color: #80868b; }

.serp-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.1rem;
}

.serp-score {
  font-size: 0.72rem;
  font-weight: 600;
  color: #202124;
}

.serp-score--1 { color: #C8102E; }
.serp-score--grey { color: #80868b; }

.serp-stars {
  font-size: 0.65rem;
  color: #F9AB00;
  letter-spacing: 0.02em;
}

.serp-stars--1 { color: #F9AB00; }
.serp-stars--2 { color: #f0b429; }
.serp-stars--3 { color: #d4a017; }
.serp-stars--grey { color: #ccc; }

.serp-count {
  font-size: 0.68rem;
  color: #70757a;
}

.serp-sub {
  font-size: 0.68rem;
  color: #70757a;
  margin-bottom: 0.1rem;
}

.serp-sub--grey { color: #aaa; }

.serp-open {
  font-size: 0.68rem;
  color: #137333;
}

.serp-open--1 { color: #137333; }

/* click share badge */
.serp-pct {
  margin-left: auto;
  flex-shrink: 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  align-self: center;
  padding-left: 0.5rem;
}

.serp-pct span {
  font-size: 0.6rem;
  font-weight: 400;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.serp-pct--1 { color: var(--red); }
.serp-pct--2 { color: rgba(200,16,46,0.6); }
.serp-pct--3 { color: rgba(200,16,46,0.4); }

/* separator between top-3 and rest */
.serp-separator {
  padding: 0.35rem 0.85rem;
  background: #f0f0f0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
}

/* ===== CASE STUDY ===== */
.case-block {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.gmaps-card {
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
  min-width: 280px;
  max-width: 360px;
}

.gmaps-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gmaps-g {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 2px;
}

.gmaps-name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--black);
}

.gmaps-cat {
  font-size: 0.82rem;
  color: #666;
  margin-top: 0.2rem;
}

.gmaps-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gmaps-score {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--black);
}

.gmaps-stars {
  color: #F9AB00;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.gmaps-count {
  font-size: 0.82rem;
  color: #666;
}

.case-stat {
  display: flex;
  flex-direction: column;
  border: var(--border);
  box-shadow: 4px 4px 0 var(--red);
  padding: 1.25rem 1.5rem;
  background: var(--white);
  flex-shrink: 0;
}

.case-stat-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2rem;
  color: var(--red);
  line-height: 1;
}

.case-stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-top: 0.4rem;
}

/* ===== CASE STATS ===== */
.case-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  background: var(--white);
  min-width: 130px;
}

.stat-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--red);
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin-top: 0.4rem;
}

/* ===== PRICE ===== */
.price {
  font-style: normal;
  color: var(--red);
  display: block;
  margin-top: 0.25rem;
}

/* ===== CONTACT TOGGLE ===== */
.contact-toggle {
  display: flex;
  gap: 0.5rem;
}

.toggle-btn {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border: var(--border);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--black);
  transition: transform 0.08s, box-shadow 0.08s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.toggle-btn--active {
  background: var(--red);
  color: var(--white);
  box-shadow: 3px 3px 0 var(--black);
}

.toggle-btn:not(.toggle-btn--active):hover {
  transform: translate(-1px,-1px);
  box-shadow: 4px 4px 0 var(--black);
}

/* ===== FORM ===== */
.form {
  margin-top: 2.5rem;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form input {
  width: 100%;
  padding: 1rem;
  border: var(--border);
  box-shadow: var(--shadow);
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: transform 0.08s, box-shadow 0.08s;
  appearance: none;
}

.form input::placeholder { color: #999; }

.form input:focus {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 var(--red);
}

.form .btn { align-self: flex-start; margin-top: 0.5rem; }

.btn--sent {
  background: var(--black) !important;
  transform: none !important;
  box-shadow: var(--shadow) !important;
  cursor: default !important;
}

/* ===== CASE STUDY ===== */
.cs-hero { background: var(--white); }

.cs-intro {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.cs-intro-text { max-width: 380px; }

/* before metrics */
.before-grid {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.before-metric {
  display: flex;
  flex-direction: column;
  border: var(--border);
  box-shadow: 4px 4px 0 #ccc;
  padding: 1.25rem 1.5rem;
  background: var(--grey);
  min-width: 130px;
}

.before-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.8rem;
  color: #555;
  line-height: 1;
}

.before-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin-top: 0.4rem;
}

/* bar chart */
.chart-wrap { margin-top: 2rem; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  height: 180px;
  border-left: var(--border);
  border-bottom: var(--border);
  padding-left: 0.5rem;
  padding-bottom: 0;
}

.bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
  height: 100%;
}

.bar {
  width: 100%;
  background: #ccc;
  border: 1.5px solid #999;
}

.bar--after {
  background: var(--red);
  border-color: var(--black);
}

.bar--transition {
  background: repeating-linear-gradient(
    45deg,
    var(--red), var(--red) 3px,
    #ddd 3px, #ddd 7px
  );
  border-color: var(--black);
}

.bar-val {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
}

.bar-month {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: #666;
  text-transform: uppercase;
  padding-bottom: 4px;
}

.chart-divider {
  width: 2px;
  height: 100%;
  background: var(--red);
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.chart-divider-label {
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  white-space: nowrap;
  position: absolute;
  top: 0;
  left: 6px;
}

.chart-note {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: #888;
  margin-top: 1rem;
  line-height: 1.5;
}

/* results grid */
.results-grid {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.result-card {
  display: flex;
  flex-direction: column;
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  background: var(--white);
  min-width: 160px;
  flex: 1;
}

.result-card--pos { box-shadow: 4px 4px 0 var(--red); }

.result-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--red);
  line-height: 1;
}

.result-metric {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.result-detail {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #666;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* action list */
.action-list {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.action-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-top: var(--border);
}

.action-item:last-child { border-bottom: var(--border); }

.action-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--red);
  flex-shrink: 0;
  padding-top: 2px;
  min-width: 2rem;
}

.action-body strong {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
}

.action-body p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.65;
  max-width: 520px;
}

.action-body em {
  font-style: normal;
  color: var(--red);
  font-weight: 700;
}

/* ===== FOOTER ===== */
footer {
  background: var(--black);
  color: var(--white);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer .logo { color: var(--white); }

footer p {
  font-family: var(--mono);
  font-size: 0.7rem;
  opacity: .4;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {

  /* layout */
  .wrap    { padding: 0 1.25rem; }
  section  { padding: 3rem 0; }

  /* nav */
  .nav-inner .btn {
    font-size: 0.72rem;
    padding: 0.6rem 1rem;
    box-shadow: 3px 3px 0 var(--black);
  }

  /* hero */
  .hero { min-height: unset; }
  .hero .wrap { padding-top: 3rem; padding-bottom: 3rem; }

  /* typography */
  h1 { font-size: 2.2rem; margin-bottom: 2rem; }
  h2 { font-size: 1.4rem; }
  .label { font-size: 0.85rem; }
  .how-text { font-size: 1.1rem; }

  /* hero — wyrównanie do lewej */
  .hero-text {
    text-align: left;
    align-items: flex-start;
  }
  .hero h1 { text-align: left; }
  .hero .btn--big {
    display: inline-block;
    width: auto;
    text-align: left;
    margin-left: 0;
  }

  /* form */
  .form        { max-width: 100%; }
  .row-2       { grid-template-columns: 1fr; }

  /* prevent iOS font zoom on inputs */
  .form input  { font-size: 16px; }

  /* reduce shadow to prevent overflow */
  .form input  { box-shadow: 3px 3px 0 var(--black); }
  .form input:focus { transform: none; box-shadow: 4px 4px 0 var(--red); }

  /* submit button full width */
  .form .btn {
    align-self: stretch;
    text-align: center;
    width: 100%;
  }

  /* footer */
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }

  /* case study */
  .before-grid   { gap: 1rem; }
  .before-metric { min-width: calc(50% - 0.5rem); }
  .results-grid  { gap: 1rem; }
  .result-card   { min-width: calc(50% - 0.5rem); flex: none; width: calc(50% - 0.5rem); }
  .result-num    { font-size: 1.8rem; }
  .chart         { gap: 0.3rem; }
  .bar-val       { font-size: 0.55rem; }
  .bar-month     { font-size: 0.52rem; }
  .chart-divider-label { font-size: 0.48rem; }
  .action-item   { gap: 1rem; }
  .cs-intro      { gap: 1.5rem; }
  .cs-intro-text { max-width: 100%; }

  /* hero — ukryj mock na telefonie */
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .local-pack { display: none !important; }
  .case-badge { display: none !important; }

  /* how it works */
  .how-layout { grid-template-columns: 1fr; gap: 2.5rem; }
}
