/* ==========================================================================
   Ciesielko-Stolarka — statyczna wersja strony
   Odświeżony, minimalistyczny design w duchu materiału drewna i ciesielki.
   Wsparcie dla trybu ciemnego przez [data-theme="dark"] na <html>.
   ========================================================================== */

:root {
  --color-bg: #faf7f2;
  --color-surface: #ffffff;
  --color-text: #221c15;
  --color-text-muted: #5b5044;
  --color-primary: #7a4a2b;
  --color-primary-dark: #5c3620;
  --color-accent: #c98a3e;
  --color-border: #e7ddd1;
  --color-hero-overlay-1: rgba(43, 30, 18, 0.82);
  --color-hero-overlay-2: rgba(43, 30, 18, 0.55);
  --shadow-soft: 0 10px 30px -12px rgba(43, 36, 29, 0.18);
  --radius: 10px;
  --max-width: 1140px;
  --nav-height: 72px;
}

:root[data-theme="dark"] {
  --color-bg: #17130f;
  --color-surface: #221c16;
  --color-text: #f3ece0;
  --color-text-muted: #c3b6a3;
  --color-primary: #e0a86a;
  --color-primary-dark: #f3ece0;
  --color-accent: #e0a86a;
  --color-border: #3a3126;
  --color-hero-overlay-1: rgba(10, 8, 5, 0.88);
  --color-hero-overlay-2: rgba(10, 8, 5, 0.65);
  --shadow-soft: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nawigacja ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.navbar {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 600;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  border-color: var(--color-accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-primary-dark);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-primary-dark);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 320px;
  }

  .nav-links li {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  margin: 0;
  min-height: 64vh;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-hero-overlay-1), var(--color-hero-overlay-2));
  z-index: -1;
}

.hero-content {
  max-width: 660px;
  padding: 100px 24px;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  line-height: 1.25;
  margin: 0 0 24px;
}

.hero-content h1 em {
  color: var(--color-accent);
  font-style: normal;
}

.hero-content p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #f1e8dc;
  margin: 0 0 36px;
}

.btn {
  display: inline-block;
  padding: 15px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #2b1e12;
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  margin-left: 14px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* ---------- Sekcje ogólne ---------- */

section {
  margin: 56px 0;
  padding: 72px 0;
}

.site-header + section:not(.hero),
.hero + section {
  margin-top: 76px;
}

@media (max-width: 720px) {
  section {
    margin: 32px 0;
    padding: 48px 0;
  }

  .site-header + section:not(.hero),
  .hero + section {
    margin-top: 56px;
  }
}

.section-title {
  font-size: 2rem;
  line-height: 1.3;
  color: var(--color-primary-dark);
  margin: 0 0 14px;
}

.section-lead {
  color: var(--color-text-muted);
  max-width: 700px;
  font-size: 1.05rem;
  margin: 0 0 48px;
}

/* ---------- O nas ---------- */

.about p {
  max-width: 760px;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ---------- Wyróżniki ---------- */

.features {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.features .section-title {
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 32px;
}

@media (max-width: 720px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.feature-card .icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  color: var(--color-accent);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: var(--color-primary-dark);
}

.feature-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ---------- CTA ---------- */

.cta {
  text-align: center;
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: var(--radius);
  margin: 0 24px;
  padding: 64px 32px;
}

:root[data-theme="dark"] .cta {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.cta h2 {
  margin: 0 0 16px;
  line-height: 1.3;
}

.cta p {
  color: #e6d9c8;
  margin: 0 0 32px;
}

:root[data-theme="dark"] .cta p {
  color: var(--color-text-muted);
}

/* ---------- Galeria ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
  width: 22px;
  height: 22px;
}

/* ---------- Kontakt ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.map-embed {
  margin: 32px 0 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.map-embed iframe {
  display: block;
}

@media (max-width: 720px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .contact-card {
    padding: 16px 10px;
  }

  .contact-card .icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
  }

  .contact-card h3 {
    font-size: 0.75rem;
  }

  .contact-card p {
    font-size: 0.85rem;
  }
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.contact-card .icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 16px;
  color: var(--color-accent);
}

.contact-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.contact-card p {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.placeholder {
  color: var(--color-accent);
  font-style: italic;
  font-weight: 600;
}

/* ---------- Polityka prywatności ---------- */

.legal p {
  line-height: 1.8;
}

.legal h2 {
  color: var(--color-primary-dark);
  margin-top: 48px;
}

.legal h2:first-child {
  margin-top: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  background: var(--color-primary-dark);
  color: #e6d9c8;
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

:root[data-theme="dark"] .site-footer {
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

.site-footer a {
  color: #fff;
  text-decoration: underline;
}

:root[data-theme="dark"] .site-footer a {
  color: var(--color-text);
}
