/* ══════════════════════════════════════════════════════
   CREATE2B — main.css
   Shared design system for all pages
   Ref: CREATE2B_constants.md §5
══════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────── */
:root {
  --ink:         #131416;
  --paper:       #FAFAF8;
  --white:       #FFFFFF;
  --footer-bg:   #0D0F10;
  --stone-100:   #E8E6E1;
  --stone-200:   #D0CEC7;
  --stone-300:   #C5C2BB;
  --stone-400:   #767672;
  --stone-500:   #777777;
  --stone-600:   #555555;
  --img-mid:     #DAD8D1;
  --section-alt: #F4F2EE;

  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max-w:  1200px;
  --nav-h:  80px;
  --pad-h:  40px;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { font: inherit; cursor: pointer; }

/* ── Utilities ─────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-h);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-400);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--stone-300);
  flex-shrink: 0;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 30px;
  border: none;
  transition: opacity .2s;
  white-space: nowrap;
}
.btn-dark  { background: var(--ink);   color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink);   }
.btn-dark:hover  { background: #2d3035; }
.btn-light:hover { background: var(--stone-100); }

.link-arrow {
  font-family: var(--f-body);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity .2s;
  white-space: nowrap;
  display: inline-block;
}
.link-arrow:hover { opacity: .55; }

.link-arrow--light {
  color: var(--stone-300);
}
.link-arrow--light:hover {
  color: var(--paper);
  opacity: 1;
}

/* ── NAV ───────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(250, 250, 248, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stone-100);
  transition: box-shadow .3s;
}
.nav--scrolled { box-shadow: 0 2px 28px rgba(0,0,0,.07); }

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}
/* Push lang + CTA to the right, close together */
.nav__links { margin-right: auto; }
.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nav__logo img {
  height: 56px;
  width: auto;
  display: block;
}
.nav__links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav__links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--stone-600);
  transition: color .2s;
  position: relative;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width .25s ease;
}
.nav__links a:hover,
.nav__links a.active { color: var(--ink); }
.nav__links a.active::after,
.nav__links a:hover::after { width: 100%; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .25s, opacity .25s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav__drawer {
  display: block;
  position: fixed;
  top: var(--nav-h);
  inset-inline: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--stone-100);
  padding: 20px var(--pad-h) 28px;
  z-index: 999;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.nav__drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: opacity .22s ease, transform .22s ease, visibility 0s linear 0s;
}
.nav__drawer a {
  display: block;
  padding: 14px 0;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--stone-600);
  border-bottom: 1px solid var(--stone-100);
  transition: color .2s;
}
.nav__drawer a:hover { color: var(--ink); }
.nav__drawer a:last-child {
  border-bottom: none;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 500;
}

/* ── PAGE HERO  (inner pages) ──────────────────────── */
.page-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 72px;
  border-bottom: 1px solid var(--stone-100);
}
.page-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 36px;
  transition: color .2s;
}
.page-hero__back:hover { color: var(--ink); }

.page-hero__kicker { margin-bottom: 14px; }

.page-hero__h1 {
  font-family: var(--f-display);
  font-size: 54px;
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -.01em;
  margin-bottom: 24px;
}
.page-hero__h1 em { font-style: italic; }

.page-hero__sub {
  font-size: 15px;
  line-height: 1.8;
  color: var(--stone-500);
  max-width: 620px;
}

.page-hero__meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--stone-100);
}
.page-hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.page-hero__meta-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-400);
}
.page-hero__meta-value {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
}

/* ── GALLERY  (project pages) ──────────────────────── */
.gallery {
  padding: 88px 0;
  background: var(--white);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}
.gallery__grid--single {
  grid-template-columns: 1fr;
  max-width: 800px;
}
.gallery__item {
  overflow: hidden;
  background: var(--img-mid);
  aspect-ratio: 4 / 3;
}
.gallery__item--tall  { aspect-ratio: 3 / 4; }
.gallery__item--wide  { grid-column: span 2; aspect-ratio: 16 / 7; }
.gallery__item--square { aspect-ratio: 1 / 1; }
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s ease;
}
.gallery__item:hover img { transform: scale(1.04); }

/* ── STATS BAR ─────────────────────────────────────── */
.stats {
  background: var(--white);
  border-top: 1px solid var(--stone-100);
  border-bottom: 1px solid var(--stone-100);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats__cell {
  padding: 40px 0;
  text-align: center;
  border-right: 1px solid var(--stone-100);
}
.stats__cell:last-child { border-right: none; }
.stats__num {
  display: block;
  font-family: var(--f-display);
  font-size: 44px;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 6px;
}
.stats__lbl {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-400);
}

/* ── CTA DARK ──────────────────────────────────────── */
.cta-dark {
  padding: 120px var(--pad-h);
  background: var(--footer-bg);
  text-align: center;
}
.cta-dark .eyebrow {
  justify-content: center;
  color: var(--stone-500);
  margin-bottom: 16px;
}
.cta-dark .eyebrow::before { background: var(--stone-600); }
.cta-dark__h2 {
  font-family: var(--f-display);
  font-size: 48px;
  font-weight: 300;
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: 20px;
}
.cta-dark__h2 em { font-style: italic; }
.cta-dark__body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--stone-300);
  max-width: 480px;
  margin: 0 auto 44px;
}
.cta-dark__actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* ── FOOTER ────────────────────────────────────────── */
.footer {
  background: var(--footer-bg);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 32px var(--pad-h);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__logo img {
  height: 40px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .80;
  transition: opacity .2s;
}
.footer__logo img:hover { opacity: 1; }
.footer__copy {
  font-size: 12px;
  color: var(--stone-500);
}
.footer__links {
  display: flex;
  gap: 20px;
}
.footer__links a {
  font-size: 12px;
  color: var(--stone-500);
  letter-spacing: 0.04em;
  transition: color .2s;
}
.footer__links a:hover { color: var(--paper); }

/* ── LANGUAGE SWITCHER ─────────────────────────────── */
.lang-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: 1px solid var(--stone-200);
  padding: 6px 11px;
  font-family: var(--f-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: var(--stone-500);
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
}
.lang-btn:hover { border-color: var(--ink); color: var(--ink); }
.lang-btn .lang-en,
.lang-btn .lang-pl { transition: color .15s; }
.lang-btn .lang-en.active,
.lang-btn .lang-pl.active { color: var(--ink); font-weight: 500; }
.lang-btn .lang-sep { color: var(--stone-300); }

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1080px) {
  :root { --pad-h: 32px; }
  .page-hero__h1 { font-size: 44px; }
  .cta-dark__h2  { font-size: 40px; }
}

@media (max-width: 768px) {
  :root { --pad-h: 20px; }

  /* Nav */
  .nav__links, .nav__cta-wrap { display: none; }
  .nav__burger { display: flex; }
  .lang-btn { margin-left: auto; }

  /* Page hero */
  .page-hero { padding-top: calc(var(--nav-h) + 44px); padding-bottom: 48px; }
  .page-hero__h1 { font-size: 32px; }
  .page-hero__meta { gap: 24px; }

  /* Gallery */
  .gallery { padding: 48px 0; }
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery__item--wide  { grid-column: span 1; aspect-ratio: 4 / 3; }

  /* Stats */
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__cell:nth-child(2) { border-right: none; }
  .stats__cell:nth-child(3) { border-top: 1px solid var(--stone-100); }
  .stats__cell:nth-child(4) { border-top: 1px solid var(--stone-100); border-right: none; }

  /* CTA dark */
  .cta-dark { padding: 80px var(--pad-h); }
  .cta-dark__h2 { font-size: 30px; }

  /* Footer */
  .footer__inner { flex-direction: column; text-align: center; gap: 10px; }
  .footer__links { justify-content: center; }
}
