:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --surface: #fffdfa;
  --surface-strong: #ffffff;
  --text: #13212d;
  --muted: #5d6b78;
  --accent: #1f7a6b;
  --accent-strong: #12574f;
  --accent-soft: rgba(31, 122, 107, 0.12);
  --border: rgba(19, 33, 45, 0.12);
  --shadow: 0 20px 60px rgba(19, 33, 45, 0.08);
  --hero-offset: clamp(-700px, -38vw, -220px);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #07131b;
  --surface: #101d28;
  --surface-strong: #152532;
  --text: #f2f6f8;
  --muted: #9ab0bf;
  --accent: #63d6c9;
  --accent-strong: #9ceee4;
  --accent-soft: rgba(99, 214, 201, 0.16);
  --border: rgba(242, 246, 248, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.25s ease, color 0.25s ease;
}
a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-toggle {
  display: none;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.hero {
  padding: 0 0 3rem;
}

.hero-banner-section {
  width: 100%;
}

.hero-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.hero-banner img {
  display: block;
  width: 100%;
  aspect-ratio: 2.13 / 1;
  height: auto;
  min-height: 420px;
  object-fit: cover;
  object-position: center center;
  background: var(--surface-strong);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 19, 27, 0.4) 0%, rgba(7, 19, 27, 0.1) 70%, transparent 100%);
}

.hero-copy {
  max-width: min(520px, 100%);
  background: rgba(7, 19, 27, 0.72);
  color: #ffffff;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  margin-top: 0;
  margin-left: var(--hero-offset);
  /* Zmiana tej zmiennej przesuwa blok w lewo lub prawo względem środka bannera. */
}

.hero-copy .eyebrow {
  color: #8ee8dc;
}

.hero-copy .hero-text,
.hero-copy .hero-highlights li {
  color: #f3fbfb;
}

.hero-copy .hero-highlights li {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-project-link {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(7, 19, 27, 0.62);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-project-link:hover,
.hero-project-link:focus-visible {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.18;
  margin: 0 0 0.8rem;
}

h1 {
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
}

h2 {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
}

h3 {
  font-size: 1.1rem;
}

.hero-text,
.section-heading p,
.about-grid p,
.service-card p,
.project-card p,
.contact-card p,
.detail-intro p,
.detail-section p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.4rem 0 1.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow);
}

.button.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-highlights li {
  padding: 0.5rem 0.75rem;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.92rem;
}

.section {
  padding: 4rem 0;
}

.section-accent {
  background: linear-gradient(140deg, var(--accent-soft), transparent 65%);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.about-grid,
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.steps-grid,
.services-grid,
.portfolio-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card,
.service-card,
.project-card,
.contact-card,
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.3rem;
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.step-card span {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.service-card h3 {
  margin-bottom: 0.7rem;
}

.project-card {
  overflow: hidden;
  padding: 0;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.gallery-thumbnail {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 0.9rem;
}

.gallery-thumbnail img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-thumbnail:hover img,
.gallery-thumbnail:focus-visible img {
  transform: scale(1.04);
}

.gallery-thumbnail:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.gallery-lightbox {
  width: min(1100px, calc(100% - 2rem));
  max-width: none;
  padding: 1.25rem 4.5rem;
  border: 0;
  border-radius: 1.2rem;
  background: var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow);
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.gallery-lightbox figure {
  margin: 0;
}

.gallery-lightbox figure img {
  max-height: min(76vh, 780px);
  margin: 0 auto;
  object-fit: contain;
}

.lightbox-close,
.lightbox-navigation {
  position: absolute;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.lightbox-close {
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-navigation {
  top: 50%;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.8rem;
  transform: translateY(-50%);
}

.lightbox-previous {
  left: 0.75rem;
}

.lightbox-next {
  right: 0.75rem;
}

.lightbox-close:hover,
.lightbox-navigation:hover,
.lightbox-close:focus-visible,
.lightbox-navigation:focus-visible {
  background: var(--accent);
}

.project-card__body {
  padding: 1.2rem 1.3rem 1.4rem;
}

.project-card a {
  display: inline-flex;
  margin-top: 0.8rem;
  color: var(--accent);
  font-weight: 700;
}

.audience-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.audience-list li {
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-card {
  max-width: 760px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0 2rem;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.page-shell {
  padding: 3rem 0 4rem;
}

.detail-hero {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
  margin-bottom: 2rem;
}

.detail-hero img {
  border-radius: 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.detail-meta {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.detail-meta li {
  list-style: none;
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.detail-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.detail-card > .detail-card {
  margin-top: 1.2rem;
}

iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

.detail-list {
  padding-left: 1.1rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.2rem;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  .detail-hero,
  .about-grid,
  .audience-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid,
  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy {
    margin-left: clamp(-340px, -28vw, -120px);
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 1.5rem, 1120px);
  }

  .nav-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 0.8rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  .site-nav {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    gap: 0.25rem;
    padding-top: 0.7rem;
  }

  .site-nav[hidden] {
    display: none;
  }

  .site-nav a {
    padding: 0.65rem 0.25rem;
    font-size: 1rem;
  }

  .theme-toggle {
    width: 100%;
    margin-top: 0.35rem;
  }

  .hero-banner {
    display: flex;
    flex-direction: column;
  }

  .hero-overlay {
    position: static;
    display: block;
    order: 2;
    padding: 0;
    background: #07131b;
  }

  .hero-banner img {
    order: 1;
    min-height: 0;
    height: 250px;
    aspect-ratio: auto;
    object-position: 63% center;
  }

  .hero-copy {
    max-width: none;
    padding: 1.4rem 1rem;
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .hero-project-link {
    display: none;
  }

  .hero-actions {
    display: grid;
    gap: 0.75rem;
  }

  .hero-actions .button {
    width: 100%;
  }

  .section {
    padding: 3rem 0;
  }

  .step-card,
  .service-card,
  .contact-card,
  .detail-card {
    padding: 1.15rem;
    border-radius: 1rem;
  }

  .project-card {
    padding: 0;
  }

  .project-card img,
  .gallery-thumbnail img {
    height: 200px;
  }

  .page-shell {
    padding: 1.5rem 0 3rem;
  }

  .detail-hero {
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .detail-hero img {
    width: 100%;
  }

  .detail-card > .detail-card {
    margin-top: 1rem;
  }

  .detail-grid iframe {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .detail-card > iframe {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .gallery-lightbox {
    padding: 1rem 3.5rem;
  }

  .lightbox-navigation {
    width: 2.5rem;
    height: 2.5rem;
  }

  .steps-grid,
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-bar {
    flex-direction: column;
    gap: 0.25rem;
  }
}
