/*
Theme Name: Pracownia Klucz
Theme URI: https://pracowniaklucz.waw.pl
Author: Pracownia Klucz
Description: Ciepły, rzemieślniczy motyw dla Pracowni Klucz — dekoracje z drewna i gliny.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: pracownia-klucz
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: #FDF8F3;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-family: 'Nunito', sans-serif;
  color: #3D2B1F;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ===== CSS VARIABLES ===== */
:root {
  --cream: #FDF8F3;
  --cream-dark: #F5EDE4;
  --warm-white: #FEFCF9;
  --clay: #b35c37;
  --clay-light: #D4956F;
  --clay-dark: #A85A3A;
  --wood: #8B6914;
  --wood-dark: #5C4A2A;
  --wood-light: #B8976A;
  --bark: #3D2B1F;
  --sand: #E8DDD0;
  --sand-light: #F0E8DD;
  --text: #3D2B1F;
  --text-muted: #7A6B5D;
  --text-light: #A69888;
  --heading-font: 'Caveat', cursive;
  --body-font: 'Nunito', sans-serif;
  --card-radius: 16px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block; padding: 14px 32px; background: var(--clay); color: var(--cream);
  font-family: var(--body-font); font-size: 15px; font-weight: 600;
  border: none; border-radius: 10px; cursor: pointer;
  transition: all 0.3s ease; letter-spacing: 0.5px;
}
.btn-primary:hover { filter: brightness(0.88); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.btn-secondary {
  display: inline-block; padding: 14px 32px; background: transparent; color: var(--cream);
  font-family: var(--body-font); font-size: 15px; font-weight: 600;
  border: 1.5px solid rgba(253,248,243,0.5); border-radius: 10px; cursor: pointer;
  transition: all 0.3s ease;
}
.btn-secondary:hover { background: rgba(253,248,243,0.1); border-color: var(--cream); }

.btn-secondary-light {
  display: inline-block; padding: 14px 32px; background: transparent; color: var(--cream);
  font-family: var(--body-font); font-size: 15px; font-weight: 600;
  border: 1.5px solid rgba(253,248,243,0.5); border-radius: 10px; cursor: pointer;
  transition: all 0.3s ease;
}
.btn-secondary-light:hover { background: var(--clay); border-color: var(--clay); }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: var(--heading-font); font-weight: 700; }
p { font-family: var(--body-font); }

/* ===== NAV ===== */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  background: rgba(61,43,31,0.5);
  transition: all 0.4s ease;
}
.site-nav.scrolled {
  padding: 12px 0;
  background: #FDF8F3;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  border-bottom: 1px solid var(--sand);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.nav-logo img { width: 44px; height: 44px; border-radius: 50%; }
.nav-logo span {
  font-family: var(--heading-font); font-size: 24px; color: var(--cream); font-weight: 700;
  transition: color 0.4s;
}
.site-nav.scrolled .nav-logo span { color: var(--bark); }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: var(--body-font); font-size: 15px; font-weight: 500;
  color: rgba(253,248,243,0.75); line-height: 20px;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
  transition: all 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--cream); border-bottom-color: var(--cream); font-weight: 700; }
.site-nav.scrolled .nav-links a { color: var(--text-muted); }
.site-nav.scrolled .nav-links a:hover,
.site-nav.scrolled .nav-links a.active { color: var(--clay); border-bottom-color: var(--clay); }
.nav-phone {
  font-family: var(--body-font); font-size: 15px; color: var(--cream);
  font-weight: 600; line-height: 20px; transition: color 0.4s;
}
.site-nav.scrolled .nav-phone { color: var(--clay); }

/* Mobile nav */
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-burger span {
  display: block; width: 24px; height: 2px; background: var(--cream);
  margin-bottom: 6px; transition: all 0.3s;
}
.nav-burger span:last-child { margin-bottom: 0; }
.site-nav.scrolled .nav-burger span { background: var(--bark); }

.mobile-menu {
  display: none; background: var(--cream); padding: 16px 32px;
  flex-direction: column; gap: 16px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--body-font); font-size: 18px; color: var(--text); font-weight: 500;
}
.mobile-menu a.active { color: var(--clay); font-weight: 700; }

@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .nav-burger { display: block !important; }
}

/* ===== HERO ===== */
.hero {
  position: relative; height: 100vh; min-height: 600px;
  overflow: hidden; display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: opacity 1.5s ease; opacity: 0;
}
.hero-bg.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(61,43,31,0.7) 0%, rgba(61,43,31,0.3) 100%);
}
.hero-content {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 0 32px; width: 100%;
}
.hero-title {
  font-family: var(--heading-font); font-size: clamp(48px, 8vw, 88px);
  color: var(--cream); line-height: 1.1; margin-bottom: 24;
}
.hero-title span { color: var(--clay-light); }
.hero-subtitle {
  font-family: var(--body-font); font-size: clamp(16px, 2vw, 20px);
  color: var(--sand-light); line-height: 1.8; max-width: 480px; margin-bottom: 36px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== SECTIONS ===== */
.section { padding: 100px 32px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-narrow { max-width: 1100px; margin: 0 auto; }
.bg-cream { background: var(--cream); }
.bg-warm { background: var(--warm-white); }
.bg-cream-dark { background: var(--cream-dark); }

/* Section headings */
.section-heading { text-align: center; margin-bottom: 48px; }
.section-heading h2 {
  font-family: var(--heading-font); font-size: clamp(36px, 5vw, 56px);
  color: var(--bark); margin-bottom: 12px;
}
.section-heading.light h2 { color: var(--cream); }
.section-heading p {
  font-family: var(--body-font); font-size: 17px; color: var(--text-muted);
  max-width: 560px; margin: 0 auto; line-height: 1.7;
}
.section-heading .divider {
  width: 60px; height: 3px; background: var(--clay);
  margin: 20px auto 0; border-radius: 2px;
}

/* ===== CATEGORY CARDS ===== */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px;
}
.category-card {
  background: var(--warm-white); border-radius: var(--card-radius); padding: 48px 32px;
  text-align: center; border: 1px solid var(--sand); cursor: pointer; transition: all 0.4s ease;
}
.category-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(61,43,31,0.1); }
.category-card h3 {
  font-family: var(--heading-font); font-size: 28px; color: var(--bark); margin: 20px 0 12px;
}
.category-card p { font-size: 15px; color: var(--text-muted); line-height: 1.7; }

/* ===== GALLERY — HOVER ZOOM ===== */
.gallery-grid-zoom {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.gallery-grid-zoom .gallery-item {
  overflow: hidden; cursor: pointer; position: relative; aspect-ratio: 1;
}
.gallery-grid-zoom .gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25,0.1,0.25,1), filter 0.4s ease;
}
.gallery-grid-zoom .gallery-item:hover img { transform: scale(1.08); }
.gallery-grid-zoom .gallery-item .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(61,43,31,0.6) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.4s ease;
  display: flex; align-items: flex-end; padding: 20px;
}
.gallery-grid-zoom .gallery-item:hover .overlay { opacity: 1; }
.gallery-grid-zoom .gallery-item .overlay span {
  color: var(--cream); font-family: var(--heading-font); font-size: 22px;
}

/* ===== GALLERY — CARDS (projects) ===== */
.gallery-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}
.gallery-cards .gallery-item {
  border-radius: var(--card-radius); overflow: hidden; cursor: pointer;
  box-shadow: 0 4px 20px rgba(61,43,31,0.08); border: 1px solid var(--sand);
  background: #fff; transition: all 0.4s ease;
}
.gallery-cards .gallery-item:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(61,43,31,0.12); }
.gallery-cards .gallery-item img {
  width: 100%; height: 280px; object-fit: cover; transition: transform 0.6s ease;
}
.gallery-cards .gallery-item:hover img { transform: scale(1.04); }

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 60px; align-items: center;
}
.about-image { position: relative; }
.about-image img {
  width: 100%; border-radius: var(--card-radius);
  box-shadow: 0 20px 60px rgba(61,43,31,0.15);
}
.about-badge {
  position: absolute; top: -16px; right: -16px; width: 80px; height: 80px;
  border-radius: 50%; background: var(--clay);
  display: flex; align-items: center; justify-content: center;
}
.about-badge span {
  font-family: var(--heading-font); font-size: 14px; color: var(--cream);
  text-align: center; line-height: 1.2;
}
.about-label {
  font-family: var(--body-font); font-size: 13px; text-transform: uppercase;
  letter-spacing: 3px; color: var(--clay); font-weight: 600;
}
.about-text h2 {
  font-family: var(--heading-font); font-size: clamp(32px, 4vw, 48px);
  color: var(--bark); margin: 12px 0 20px; line-height: 1.2;
}
.about-text p {
  font-size: 16px; color: var(--text-muted); line-height: 1.8; margin-bottom: 28px;
}

/* ===== CTA ===== */
.cta-section {
  padding: 100px 32px; text-align: center;
  background-image: linear-gradient(rgba(61,43,31,0.75), rgba(61,43,31,0.75)), url('');
  background-size: cover; background-position: center; background-attachment: fixed;
}
.cta-section h2 {
  font-family: var(--heading-font); font-size: clamp(32px, 5vw, 52px);
  color: var(--cream); margin-bottom: 16px;
}
.cta-section p {
  font-family: var(--body-font); font-size: 17px; color: var(--sand-light);
  max-width: 500px; margin: 0 auto 36px;
}

/* ===== FOOTER ===== */
.site-footer { background: var(--bark); color: var(--sand-light); padding: 60px 32px 32px; }
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px;
}
.footer-brand { font-family: var(--heading-font); font-size: 28px; color: var(--clay-light); margin-bottom: 12px; }
.footer-desc { font-size: 14px; line-height: 1.7; color: var(--wood-light); max-width: 320px; }
.footer-heading {
  font-family: var(--body-font); font-size: 13px; text-transform: uppercase;
  letter-spacing: 2px; color: var(--clay-light); margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 15px; color: var(--sand-light); transition: color 0.3s; }
.footer-links a:hover { color: var(--clay-light); }
.footer-contact { font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  max-width: 1200px; margin: 40px auto 0; border-top: 1px solid var(--wood-dark);
  padding-top: 20px; text-align: center; font-size: 13px; color: var(--text-light);
}

/* ===== CONTACT FORM ===== */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 60px;
}
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.contact-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-light); margin-bottom: 4px;
}
.contact-value { font-size: 16px; color: var(--bark); }

.contact-form-card {
  background: #fff; border-radius: 20px; padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 8px 40px rgba(61,43,31,0.08); border: 1px solid var(--sand);
}
.contact-form-card h3 {
  font-family: var(--heading-font); font-size: 28px; color: var(--bark); margin-bottom: 24px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: block;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 14px 18px; border: 1.5px solid var(--sand);
  border-radius: 10px; background: var(--warm-white); font-family: var(--body-font);
  font-size: 15px; color: var(--bark); outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clay); box-shadow: 0 0 0 3px rgba(179,92,55,0.12);
}
.form-group textarea { resize: vertical; }

/* ===== PAGE HERO (subpages) ===== */
.page-hero {
  padding-top: 140px; padding-bottom: 60px; text-align: center;
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
}
.page-hero .label {
  font-family: var(--body-font); font-size: 13px; text-transform: uppercase;
  letter-spacing: 3px; color: var(--clay);
}
.page-hero h1 {
  font-family: var(--heading-font); font-size: clamp(40px, 6vw, 64px);
  color: var(--bark); margin: 12px 0 20px;
}
.page-hero p {
  font-family: var(--body-font); font-size: 18px; color: var(--text-muted);
  max-width: 600px; margin: 0 auto; line-height: 1.8;
}

/* ===== VALUES ===== */
.values-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px;
}
.value-card {
  text-align: center; padding: 40px 24px; background: var(--warm-white);
  border-radius: var(--card-radius); border: 1px solid var(--sand);
}
.value-card h3 { font-family: var(--heading-font); font-size: 28px; color: var(--clay); margin-bottom: 12px; }
.value-card p { font-size: 15px; color: var(--text-muted); line-height: 1.7; }

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal-right.visible { opacity: 1; transform: none; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.9);
  display: none; align-items: center; justify-content: center; padding: 32px; cursor: zoom-out;
  animation: fadeIn 0.3s ease;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 24px; right: 24px; background: none; border: none;
  color: #fff; font-size: 32px; cursor: pointer;
}

/* ===== MAP ===== */
.map-container { border-radius: 16px; overflow: hidden; height: 220px; border: 1px solid var(--sand); }
.map-container iframe { width: 100%; height: 100%; border: none; }

/* ===== KEYFRAMES ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream-dark); }
::-webkit-scrollbar-thumb { background: var(--clay-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--clay); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .section { padding: 60px 20px; }
  .gallery-grid-zoom { grid-template-columns: repeat(2, 1fr); }
  .about-badge { display: none; }
  .hero-title { font-size: clamp(36px, 10vw, 56px); }
}
@media (max-width: 480px) {
  .gallery-grid-zoom { grid-template-columns: 1fr; }
  .gallery-cards { grid-template-columns: 1fr; }
}
