/* ---------- Reset & basics ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --bg: #F3EEE6;
  --bg-alt: #EBE1D0;
  --brown: #6B3F26;
  --brown-dark: #4A2E1C;
  --brown-deep: #241811;
  --ink: #221913;
  --cream: #FAF6EE;
  --gold: #C6A15B;
  --gold-soft: #D9BC85;
  --border: rgba(34, 25, 19, 0.14);
  --border-on-dark: rgba(250, 246, 238, 0.2);

  --font-display: "Noto Sans Condensed", sans-serif;
  --font-sans: "Archivo", sans-serif;

  --container: 1280px;
  --container-narrow: 760px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; color: var(--brown-dark); letter-spacing: 0.01em; }

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

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

.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }
.section-on-dark { background: var(--brown-deep); color: var(--cream); }
.section-on-dark h2 { color: var(--cream); }
.section-on-dark .eyebrow { color: var(--gold); }
.section-on-dark .lead { color: rgba(250, 246, 238, 0.82); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 30px;
  max-width: 760px;
  text-transform: uppercase;
}

.lead { font-size: 17px; line-height: 1.85; max-width: 640px; color: var(--ink); }
.lead-center { max-width: 620px; margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 36px;
  border-radius: 0;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  background: transparent;
  color: var(--gold);
}
.btn:hover { background: var(--gold); color: var(--brown-deep); }
.btn-solid { background: var(--gold); color: var(--brown-deep); }
.btn-solid:hover { background: var(--gold-soft); }
.btn-solid:disabled { opacity: 0.6; cursor: default; }

.section-cta { margin-top: 44px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 26px 0;
  background: linear-gradient(180deg, rgba(20, 13, 8, 0.55) 0%, rgba(20, 13, 8, 0) 100%);
  transition: background 0.3s ease, padding 0.3s ease;
}
.site-header.is-scrolled {
  background: var(--brown-deep);
  padding: 16px 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream);
  transition: opacity 0.2s ease, color 0.2s ease;
  opacity: 0.85;
}
.main-nav a:hover { opacity: 1; color: var(--gold); }

.logo-link { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; color: var(--cream); }
.logo-main { font-family: "Source Serif 4", serif; font-style: italic; font-size: 22px; }
.logo-sub { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; margin-top: 5px; color: var(--gold); }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 600;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 1.5px; background: var(--cream); }

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

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--brown-deep);
}

.hero-img-wrap { position: absolute; inset: 0; overflow: hidden; }
.hero-img {
  position: absolute;
  inset: -6%;
  width: 112%; height: 112%;
  object-fit: cover;
  transform: scale(1.16);
  animation: heroPullBack 26s ease-out forwards;
}
@keyframes heroPullBack {
  0% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 13, 8, 0.38) 0%, rgba(20, 13, 8, 0.05) 30%, rgba(20, 13, 8, 0.55) 100%);
}

.scroll-cue { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 2; }
.scroll-cue span { display: block; width: 1px; height: 46px; background: rgba(250, 246, 238, 0.55); position: relative; }
.scroll-cue span::after {
  content: "";
  position: absolute;
  bottom: 0; left: 50%;
  width: 5px; height: 5px;
  background: var(--gold);
  transform: translateX(-50%);
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { bottom: 100%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { bottom: 0; opacity: 0; }
}

/* ---------- Realizacje — sequential large works ---------- */

.works-list { display: flex; flex-direction: column; }

.work-row {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  cursor: pointer;
}

.work-row img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s ease; }
.work-row:hover img { transform: scale(1.035); }

.work-row-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 13, 8, 0.55) 0%, rgba(20, 13, 8, 0) 40%);
  display: flex;
  align-items: flex-end;
  padding: 44px;
}

.work-row-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.work-row-index {
  position: absolute;
  top: 36px; left: 44px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgba(250, 246, 238, 0.8);
}

/* ---------- Subpage (individual work) ---------- */

.work-hero { position: relative; height: 82vh; min-height: 480px; overflow: hidden; }
.work-hero img { width: 100%; height: 100%; object-fit: cover; }
.work-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 13, 8, 0.3) 0%, rgba(20, 13, 8, 0.1) 30%, rgba(20, 13, 8, 0.6) 100%);
  display: flex;
  align-items: flex-end;
  padding: 0 0 56px;
}
.work-hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 60px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.work-back {
  position: absolute;
  top: 110px; left: 40px;
  z-index: 3;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  padding: 9px 18px;
  border: 1px solid var(--border-on-dark);
  background: rgba(20, 13, 8, 0.35);
}
.work-back:hover { background: rgba(20, 13, 8, 0.6); }

.work-intro { padding: 90px 0 40px; }
.work-intro .section-title { max-width: none; }
.work-intro .lead { max-width: 760px; }

.work-split { padding: 40px 0 90px; }
.work-split .split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.work-split-media { overflow: hidden; aspect-ratio: 4 / 5; }
.work-split-media img { width: 100%; height: 100%; object-fit: cover; }
.work-split-label { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--brown); margin: 0 0 14px; }

.work-gallery { padding: 0 0 120px; }
.work-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.work-gallery-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; cursor: pointer; }

/* ---------- Manifesto / Makers ---------- */

.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { overflow: hidden; aspect-ratio: 4 / 5; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Contact form ---------- */

.contact-form { margin-top: 40px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form-field { margin-bottom: 22px; }
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.section:not(.section-on-dark) .form-field label { color: var(--brown); }

.form-field input, .form-field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border-on-dark);
  padding: 10px 2px;
  transition: border-color 0.2s ease;
  resize: vertical;
}
.section:not(.section-on-dark) .form-field input,
.section:not(.section-on-dark) .form-field textarea { border-bottom-color: var(--border); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-bottom-color: var(--gold); }

.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(250, 246, 238, 0.4); }
.section:not(.section-on-dark) .form-field input::placeholder,
.section:not(.section-on-dark) .form-field textarea::placeholder { color: rgba(34, 25, 19, 0.35); }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { margin-top: 20px; font-size: 14px; min-height: 20px; }
.form-status.is-success { color: var(--gold); }
.form-status.is-error { color: #C97355; }

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

.site-footer { background: var(--brown-deep); color: var(--cream); padding: 60px 0 36px; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.footer-logo-main { font-family: "Source Serif 4", serif; font-style: italic; font-size: 24px; }
.footer-logo-sub { font-family: var(--font-display); font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); }
.footer-contact a { border-bottom: 1px solid rgba(250, 246, 238, 0.4); padding-bottom: 2px; }
.footer-contact a:hover { border-bottom-color: var(--gold); }
.footer-copy { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.05em; color: rgba(250, 246, 238, 0.55); margin: 0; }

/* ---------- Lightbox (used on work subpages for gallery) ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 13, 8, 0.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox-img { max-width: 88vw; max-height: 84vh; object-fit: contain; }
.lightbox-close, .lightbox-nav {
  position: absolute; background: none; border: none; color: var(--cream);
  cursor: pointer; font-size: 32px; line-height: 1; padding: 10px; opacity: 0.8;
  transition: opacity 0.2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { opacity: 1; }
.lightbox-close { top: 20px; right: 24px; font-size: 36px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); font-size: 48px; }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); font-size: 48px; }
.lightbox-counter { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(250, 246, 238, 0.7); font-family: var(--font-display); font-size: 13px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .work-intro { padding: 70px 0 30px; }
  .work-split { padding: 30px 0 60px; }
  .work-gallery { padding: 0 0 80px; }
  .split-layout, .work-split .split-layout { grid-template-columns: 1fr; gap: 36px; }
  .split-media, .work-split-media { max-width: 420px; margin: 0 auto; }

  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--brown-deep);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { font-size: 15px; opacity: 1; }
  .nav-toggle { display: flex; }

  .work-row-overlay { padding: 26px; }
  .work-row-index { top: 20px; left: 26px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .work-gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container, .container-narrow { padding: 0 22px; }
  .header-inner { padding: 0 22px; }
  .lightbox-prev { left: 4px; font-size: 34px; }
  .lightbox-next { right: 4px; font-size: 34px; }
  .work-back { top: 90px; left: 18px; }
}
