/* ============================================================
   SASSA BUREGREN – style.css
   ============================================================ */

:root {
  --bg:        #F7F4EF;
  --bg-light:  #EEEAE2;
  --text:      #1A1918;
  --soft:      #5A5650;
  --accent:    #6B5240;
  --white:     #FFFFFF;
  --nav-h:     60px;
  --max:       1200px;
  --serif:     "Playfair Display", Georgia, serif;
  --sans:      "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }
ul    { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }
figure { margin: 0; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h2  { font-size: clamp(1.75rem, 3vw, 2.4rem); margin-bottom: 1.1rem; }
h3  { font-size: 1.2rem; margin-bottom: 0.5rem; }
p   { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.soft { color: var(--soft); }

/* ── Navigation ─────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 200;
  transition: background 0.35s, box-shadow 0.35s;
}

#nav.scrolled {
  background: var(--bg);
  box-shadow: 0 1px 0 rgba(0,0,0,0.07);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.9);
  transition: color 0.35s;
}
#nav.scrolled .nav-brand { color: var(--text); }

.nav-links {
  display: flex;
  gap: 2.25rem;
}
.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
#nav.scrolled .nav-links a { color: var(--soft); }
#nav.scrolled .nav-links a:hover { color: var(--accent); }

.nav-toggle {
  display: none;
  color: rgba(255,255,255,0.85);
  font-size: 1.35rem;
  line-height: 1;
}
#nav.scrolled .nav-toggle { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 68vh;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -20% 0;
  background-size: cover;
  background-position: center 30%;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,8,6,0.28) 0%,
    rgba(10,8,6,0.52) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-sig {
  max-width: min(380px, 75vw);
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.06em;
}

.hero-sub {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin: 0;
}

/* ── Sections ───────────────────────────────────────────────── */
.section {
  padding: 5.5rem 2rem;
}
.bg-light   { background: var(--bg-light); }
.bg-default { background: var(--bg); }

.section-intro {
  max-width: 600px;
  margin: 0 auto 3.5rem;
  text-align: center;
}

/* ── Gallery (CSS columns – masonry) ────────────────────────── */
.gallery {
  columns: 3 260px;
  column-gap: 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}

.g-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.g-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s ease;
}
.g-item:hover img,
.g-item:focus img { transform: scale(1.025); }

.g-item figcaption {
  padding: 0.45rem 0.1rem 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.g-item figcaption span {
  color: var(--accent);
  white-space: nowrap;
}

.g-item:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Wide panoramic works – span all columns */
.g-item--wide {
  column-span: all;
  margin-bottom: 1.5rem;
  cursor: pointer;
  overflow: hidden;
}
.g-item--wide img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: var(--bg-light);
  transition: transform 0.45s ease;
}
.bg-default .g-item--wide img { background: var(--bg); }
.g-item--wide:hover img { transform: scale(1.015); }
.g-item--wide figcaption {
  padding: 0.45rem 0.1rem 0.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--soft);
  display: flex;
  justify-content: space-between;
}
.g-item--wide figcaption span { color: var(--accent); }

/* ── Posts (Aktuellt) ───────────────────────────────────────── */
.posts-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.post-card {
  background: var(--bg-light);
  overflow: hidden;
}

.post-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.post-body {
  padding: 1.25rem 1.5rem 1.75rem;
}
.post-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.post-body p {
  font-size: 0.875rem;
  color: var(--soft);
  line-height: 1.65;
}
.post-no-image .post-body {
  padding-top: 2rem;
}

/* ── Kontakt ────────────────────────────────────────────────── */
.kontakt-grid {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.kontakt-cv h3 {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 0.8rem;
  margin-top: 1.75rem;
}
.kontakt-cv h3:first-child { margin-top: 0; }

.kontakt-cv li {
  font-size: 0.875rem;
  color: var(--soft);
  line-height: 1.9;
  padding-left: 1em;
  position: relative;
}
.kontakt-cv li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.kontakt-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 0.25rem;
}

.email-link {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  align-self: flex-start;
  transition: opacity 0.2s;
}
.email-link:hover { opacity: 0.65; }

.gamla-link {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--soft);
}
.gamla-link a {
  border-bottom: 1px solid var(--bg-light);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.gamla-link a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lb {
  position: fixed;
  inset: 0;
  background: rgba(8,6,5,0.93);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.lb.open {
  opacity: 1;
  pointer-events: all;
}

.lb-close {
  position: absolute;
  top: 1.1rem; right: 1.5rem;
  color: rgba(255,255,255,0.55);
  font-size: 2.1rem;
  line-height: 1;
  z-index: 10;
  transition: color 0.2s;
}
.lb-close:hover { color: var(--white); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.45);
  font-size: 3rem;
  line-height: 1;
  padding: 1.5rem 1rem;
  z-index: 10;
  transition: color 0.2s;
}
.lb-nav:hover { color: var(--white); }
.lb-prev { left: 0; }
.lb-next { right: 0; }

.lb-inner {
  position: relative;
  display: block;
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  line-height: 0;
}

.lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 90vh;
}
.lb-img-wrap img {
  max-height: 90vh;
  max-width: min(92vw, 1200px);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Info overlay at bottom of image */
.lb-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 4rem 2rem 1.5rem;
  background: linear-gradient(to top, rgba(8,6,5,0.82) 0%, transparent 100%);
  line-height: 1.5;
  pointer-events: none;
}
.lb-info h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255,255,255,0.95);
  margin-bottom: 0.3rem;
}
.lb-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.52);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.lb-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.72);
  font-style: italic;
  line-height: 1.55;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #nav { padding: 0 1.25rem; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    padding: 0.75rem 1.5rem 1.25rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.09);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    color: var(--text) !important;
    font-size: 0.9rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--bg-light);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-toggle { display: block; }

  .section { padding: 3.5rem 1.25rem; }

  .gallery {
    columns: 2 150px;
    column-gap: 0.75rem;
  }
  .g-item { margin-bottom: 0.75rem; }

  .kontakt-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .lb-inner { max-width: 98vw; }
  .lb-img-wrap img { max-height: 80vh; max-width: 98vw; }
  .lb-info { padding: 3rem 1rem 1rem; }
  .lb-nav { font-size: 2.2rem; }

  .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .gallery { columns: 1; }
  .hero-sub { letter-spacing: 0.12em; }
}
