/*
Theme Name: Koch Zakład Pogrzebowy
Theme URI: https://example.com/
Author: OpenAI
Description: Lekki, jednostronicowy motyw dla Zakładu Pogrzebowego Koch w Głogówku.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: koch-zaklad-pogrzebowy
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --page: #faf9f6;
  --surface: #ffffff;
  --sand: #f2eee7;
  --sand-deep: #e8e0d4;
  --ink: #2f3133;
  --muted: #66615b;
  --accent: #b39a6a;
  --accent-dark: #927b50;
  --line: rgba(47, 49, 51, 0.13);
  --shadow: 0 24px 70px rgba(74, 61, 43, 0.09);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --radius: 4px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open, body.dialog-open { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }

button, a { -webkit-tap-highlight-color: transparent; }

.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 246, 0.93);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.brand-copy { display: grid; line-height: 1.05; }

.brand-copy strong {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.brand-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; gap: 30px; }

.site-nav a:not(.button) {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.site-nav a:not(.button)::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 1px;
  background: var(--accent);
  content: '';
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-nav a:not(.button):hover::after,
.site-nav a:not(.button):focus-visible::after { transform: scaleX(1); transform-origin: left; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 12px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-dark { color: var(--surface); background: var(--ink); }
.button-dark:hover { background: #474a4c; }

.button-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.button-outline:hover { border-color: var(--accent); background: var(--surface); }

.button-light { color: var(--ink); background: var(--surface); }
.button-light:hover { background: #fdfcf9; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 18px;
  height: 1px;
  margin: 4px auto;
  background: currentColor;
  content: '';
  transition: transform 180ms ease;
}

.hero { padding: 76px 0 94px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  align-items: center;
  gap: clamp(44px, 7vw, 106px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 21px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 32px;
  height: 1px;
  background: var(--accent);
  content: '';
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 0.98;
}

h1 { max-width: 620px; margin-bottom: 25px; font-size: clamp(43px, 5.2vw, 70px); letter-spacing: -0.025em; }
.hero-title-primary { white-space: nowrap; }
h2 { margin-bottom: 20px; font-size: clamp(42px, 5vw, 66px); letter-spacing: -0.02em; }
h3 { margin-bottom: 10px; font-size: 28px; }

.hero-quote {
  max-width: 460px;
  margin: 0 0 2px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(22px, 2.1vw, 30px);
  font-style: italic;
  line-height: 1.16;
}

.hero-quote-reference {
  margin: 0 0 21px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
}

.hero-lede {
  max-width: 485px;
  margin-bottom: 31px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { position: relative; padding: 0 0 26px 26px; }

.hero-visual::before {
  position: absolute;
  top: 32px;
  right: -9%;
  bottom: 0;
  left: 0;
  border: 1px solid var(--accent);
  content: '';
  opacity: 0.58;
}

.hero-visual::after {
  position: absolute;
  top: -27px;
  right: -27px;
  width: 74px;
  height: 74px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  content: '';
  opacity: 0.55;
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: min(63vw, 610px);
  min-height: 460px;
  object-fit: cover;
  object-position: center;
}

.image-note {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 0;
  padding: 8px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scroll-note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 64px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.scroll-note::after { width: 50px; height: 1px; background: var(--accent); content: ''; }

.section { padding: 116px 0; }
.section-sand { background: var(--sand); }

.section-heading { max-width: 720px; margin-bottom: 54px; }
.section-heading p { max-width: 610px; margin-bottom: 0; color: var(--muted); font-size: 17px; }
.section-heading .eyebrow { margin-bottom: 17px; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(48px, 9vw, 130px);
}

.about-visual { position: relative; max-width: 480px; padding: 0 0 0 22px; }
.about-visual img { position: relative; z-index: 1; width: 100%; height: 520px; object-fit: cover; }

.about-content p { color: var(--muted); }
.about-content p:last-of-type { margin-bottom: 0; }

.about-fact {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.about-fact strong { color: var(--accent-dark); font-family: var(--serif); font-size: 46px; font-weight: 600; line-height: 1; }
.about-fact span { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

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

.service-card {
  min-height: 237px;
  padding: 28px 27px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 180ms ease, transform 180ms ease;
}

.service-card:nth-child(4), .service-card:nth-child(5) { grid-column: span 1; }
.service-card:hover { border-color: rgba(179, 154, 106, 0.75); transform: translateY(-4px); }
.service-card-trigger { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.service-card-trigger::after { display: block; margin-top: 18px; color: var(--accent-dark); content: 'Zobacz zdjęcia  ↗'; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

.service-icon { display: grid; width: 40px; height: 40px; margin-bottom: 22px; place-items: center; border: 1px solid var(--accent); color: var(--accent-dark); }
.service-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; }
.service-card h3 { font-size: 26px; }
.service-card p { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.cta { padding: 83px 0; background: var(--sand-deep); }

.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.cta h2 { max-width: 590px; margin-bottom: 13px; font-size: clamp(40px, 5vw, 61px); }
.cta p { max-width: 560px; margin-bottom: 0; color: var(--muted); }
.cta-action { display: flex; flex-shrink: 0; align-items: center; gap: 16px; }
.cta-phone { color: var(--ink); font-family: var(--serif); font-size: 28px; white-space: nowrap; }

.contact-grid { display: grid; grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr); gap: clamp(42px, 8vw, 110px); }
.contact-details h2 { margin-bottom: 26px; }
.contact-name { margin-bottom: 25px; color: var(--muted); }
.contact-list { display: grid; gap: 17px; margin: 0; }
.contact-item { display: grid; grid-template-columns: 23px 1fr; gap: 12px; align-items: start; }
.contact-item svg { width: 18px; height: 18px; margin-top: 4px; fill: none; stroke: var(--accent-dark); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.contact-item dt { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.contact-item dd { margin: 3px 0 0; }
.contact-item dd a { font-weight: 600; }
.contact-item dd a { overflow-wrap: anywhere; }
.contact-item dd a:hover { color: var(--accent-dark); }

.map-frame { min-height: 390px; border: 1px solid var(--line); background: var(--sand); overflow: hidden; }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 390px; border: 0; filter: grayscale(0.2) sepia(0.08); }

.photo-dialog { width: min(860px, calc(100% - 36px)); max-width: 860px; max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); padding: 0; border: 1px solid var(--accent); color: var(--ink); background: var(--surface); box-shadow: 0 30px 90px rgba(47, 49, 51, 0.25); overflow: auto; }
.photo-dialog::backdrop { background: rgba(47, 49, 51, 0.55); backdrop-filter: blur(3px); }
.dialog-inner { padding: 29px; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.dialog-header .eyebrow { margin-bottom: 11px; }
.dialog-header h2 { margin-bottom: 0; font-size: clamp(34px, 5vw, 51px); }
.dialog-close { display: grid; width: 38px; height: 38px; flex-shrink: 0; place-items: center; border: 1px solid var(--line); color: var(--ink); background: transparent; font-size: 25px; line-height: 1; cursor: pointer; }
.dialog-close:hover { border-color: var(--accent); color: var(--accent-dark); }
.dialog-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.dialog-gallery figure { min-width: 0; margin: 0; }
.dialog-gallery img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); margin: 0 auto; object-fit: contain; }
.dialog-gallery figcaption { padding-top: 9px; color: var(--muted); font-size: 12px; }

.site-footer { padding: 28px 0; border-top: 1px solid var(--line); background: var(--page); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-inner a:hover { color: var(--ink); }

.mobile-call { display: none; }

:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 4px; }

@media (max-width: 960px) {
  .site-nav { gap: 18px; }
  .hero-grid { grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr); gap: 42px; }
  h1 { font-size: clamp(42px, 6.2vw, 64px); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(4), .service-card:nth-child(5) { grid-column: auto; }
  .cta-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 36px), var(--container)); }
  .header-inner { min-height: 74px; }
  .brand-mark { width: 38px; height: 38px; font-size: 21px; }
  .brand-copy strong { font-size: 22px; }
  .brand-copy span { font-size: 8px; }
  .menu-toggle { display: block; }
  .site-nav { position: fixed; top: 74px; right: 0; bottom: 0; left: 0; display: grid; align-content: start; gap: 0; padding: 24px 18px; background: var(--page); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity 180ms ease, transform 180ms ease; }
  .site-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-nav a:not(.button) { padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .site-nav a:not(.button)::after { display: none; }
  .site-nav .button { margin-top: 22px; }
  .hero { padding: 53px 0 68px; }
  .hero-grid { display: flex; flex-direction: column; gap: 48px; }
  .hero-copy { width: 100%; }
  h1 { max-width: 500px; font-size: clamp(43px, 12.8vw, 64px); }
  .hero-lede { font-size: 16px; }
  .scroll-note { margin-top: 42px; }
  .hero-visual { width: calc(100% - 12px); margin-left: auto; padding-left: 16px; }
  .hero-visual img { height: 90vw; min-height: 350px; max-height: 520px; }
  .hero-visual::before { right: -8px; top: 20px; }
  .hero-visual::after { top: -18px; right: -16px; width: 52px; height: 52px; }
  .image-note { right: 12px; }
  .section { padding: 80px 0; }
  .section-heading { margin-bottom: 38px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 45px; }
  .about-visual { width: calc(100% - 8px); max-width: 480px; padding-left: 16px; }
  .about-visual img { height: 110vw; max-height: 490px; }
  .about-content { order: -1; }
  .services-grid { grid-template-columns: 1fr; gap: 12px; }
  .service-card { min-height: 0; padding: 24px; }
  .cta { padding: 65px 0; }
  .cta-action { align-items: flex-start; flex-direction: column; gap: 20px; }
  .contact-grid { gap: 34px; }
  .map-frame, .map-frame iframe { min-height: 310px; }
  .dialog-inner { padding: 21px; }
  .dialog-gallery { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 7px; }
  .mobile-call { position: fixed; right: 14px; bottom: 14px; left: 14px; z-index: 19; display: flex; min-height: 52px; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--accent-dark); color: var(--surface); background: var(--ink); box-shadow: 0 10px 24px rgba(47, 49, 51, 0.18); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
  .mobile-call svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
