:root {
  --background: #03001e;
  --surface: #0e0b33;
  --text: #ffffff;
  --muted: #b9b7d1;
  --primary: #ffb81c;      /* przyciski "Zadzwoń" */
  --primaryText: #03001e;
  --secondary: #ffffff;    /* przycisk "Nasze realizacje" */
  --line: #3a3770;         /* linia drogi, ramki */
  --radius: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

/* Lekki krój nagłówków jak w logo */
h1 { margin: 0 0 .75rem; font-size: 1.7rem; font-weight: 300; line-height: 1.25; letter-spacing: .01em; }

.description p { margin: 0 0 .85em; color: var(--muted); max-width: 60ch; }
.description p:last-child { margin-bottom: 0; }

/* ---------- Strona główna: telefon = jedna kolumna ---------- */
.home {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  max-width: 34rem;
  margin: 0 auto;
  padding: 2.25rem 1.5rem calc(2.25rem + env(safe-area-inset-bottom));
}

.logo { display: block; width: 100%; max-width: 19rem; height: auto; margin: 0 auto; }

/* przerywana linia jezdni pod logiem: ciężarówka stoi na drodze */
.road {
  height: 0;
  margin: -.9rem 0 0;
  border: 0;
  border-top: 2px dashed var(--line);
}

.intro { text-align: center; }
.intro .description p { margin-left: auto; margin-right: auto; }

.actions { display: flex; flex-direction: column; gap: .85rem; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 3.6rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  background: var(--primary);
  color: var(--primaryText);
  font: inherit;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, filter .15s ease, background-color .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn:focus-visible, .back:focus-visible, .lb-btn:focus-visible, .thumb:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* przycisk drugorzędny: cienka biała linia jak kontur w logo */
.btn-outline {
  background: transparent;
  border-color: var(--secondary);
  color: var(--secondary);
  font-weight: 400;
}
.btn-outline:hover { background: rgba(255,255,255,.08); filter: none; }
.btn svg { width: 1.3rem; height: 1.3rem; flex: none; }

/* ---------- Komputer: dwie kolumny ---------- */
@media (min-width: 52rem) {
  .home {
    max-width: 64rem;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    grid-template-areas: "logo actions" "road actions" "intro actions";
    align-content: center;
    align-items: center;
    column-gap: 5rem;
    row-gap: 1.5rem;
  }
  .logo { grid-area: logo; margin: 0; max-width: 24rem; align-self: end; }
  .road { grid-area: road; width: 100%; margin: 0; }
  .intro { grid-area: intro; text-align: left; align-self: start; }
  .intro .description p { margin-left: 0; }
  .actions { grid-area: actions; }
  h1 { font-size: 2.1rem; }
}

/* ---------- Galeria ---------- */
.gallery-page { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.gallery-head { margin-bottom: 1.5rem; }
.back {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .4rem .2rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.back::before { content: "‹ "; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
}
@media (min-width: 40rem) { .grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }
@media (min-width: 64rem) { .grid { grid-template-columns: repeat(4, 1fr); } }

.thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.thumb:hover img { transform: scale(1.04); }

/* Podgląd zdjęcia */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(3, 0, 30, .96);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(3, 0, 30, .96); }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-btn {
  position: absolute;
  width: 3rem; height: 3rem;
  border: 1px solid var(--secondary); border-radius: 50%;
  background: rgba(3,0,30,.6);
  color: #fff; font-size: 2rem; line-height: 1;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-close { top: .75rem; right: .75rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }

.msg { max-width: 36rem; margin: 2rem auto; padding: 1rem 1.25rem; background: var(--surface); border-radius: 14px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
