/* Kai Weissenfeld — Portfolio */
@import url("/fonts/inter.css");

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #6b6b6b;
  --line: #e8e8e8;
  --pad: clamp(18px, 3.4vw, 44px);
  --gap: 6px;
  --rowh: clamp(300px, 30vw, 460px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: #111; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding: clamp(22px, 4vw, 40px) var(--pad) clamp(18px, 3vw, 34px);
}
.brand {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav {
  display: flex;
  gap: clamp(16px, 2.6vw, 34px);
  align-items: baseline;
}
.site-nav a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.site-nav a.nav-book { color: var(--ink); }
.site-nav a.nav-book::after { content: " \2197"; font-size: 10px; }

/* ---------- Gallery (justified rows, no cropping) ---------- */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  padding: 0 var(--pad) var(--pad);
}
/* compact view: roughly twice as many images per row */
.gallery.compact { --rowh: clamp(150px, 14.5vw, 230px); --gap: 5px; }
@media (max-width: 900px) { .gallery.compact { --rowh: 21vw; } }
/* phones: strict two-column grid (uniform 4:5 tiles) */
@media (max-width: 620px) {
  .gallery.compact { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .gallery.compact::after { content: none; }
  .gallery.compact .g-item { aspect-ratio: 4 / 5; width: 100%; flex: none; }
}

/* view toggle (shop-style icons) */
.view-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 var(--pad) 12px;
  margin-top: -8px;
}
.view-toggle button {
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: #c4c4c4;
  line-height: 0;
  transition: color 0.2s ease;
}
.view-toggle button:hover { color: #888; }
.view-toggle button.active { color: var(--ink); }
.view-toggle svg { width: 15px; height: 15px; fill: currentColor; }
.gallery::after { content: ""; flex-grow: 1000000; }
.g-item {
  position: relative;
  aspect-ratio: var(--ar);
  flex-grow: calc(var(--ar) * 100);
  flex-shrink: 1;
  flex-basis: calc(var(--ar) * var(--rowh));
  overflow: hidden;
  cursor: zoom-in;
  background: #f4f4f4;
}
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}
.g-item img.is-loading { opacity: 0; }
@media (hover: hover) {
  .g-item::after {
    content: "";
    position: absolute; inset: 0;
    background: #fff;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
  }
  .g-item:hover::after { opacity: 0.12; }
}
.g-item.is-video { cursor: pointer; }
.g-item .play-badge {
  position: absolute;
  left: 50%; top: 50%;
  width: 54px; height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.g-item .play-badge svg { width: 18px; height: 18px; margin-left: 3px; fill: #111; }

@media (max-width: 900px) { :root { --rowh: 42vw; } }
@media (max-width: 620px) { :root { --rowh: 84vw; --gap: 5px; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(255, 255, 255, 0.985);
  z-index: 100;
  display: none;
  touch-action: pan-y;
}
.lightbox.open { display: block; }
.lb-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(48px, 8vh, 76px) clamp(14px, 6vw, 90px);
}
.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.10);
}
.lb-stage .lb-video {
  width: min(1200px, 100%);
  aspect-ratio: 16 / 9;
  max-height: 100%;
  border: 0;
  background: #000;
}
.lb-btn {
  position: absolute;
  background: none; border: 0;
  cursor: pointer;
  color: var(--ink);
  padding: 18px;
  z-index: 2;
  line-height: 0;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.lb-btn:hover { opacity: 1; }
.lb-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.4; fill: none; }
.lb-close { top: 10px; right: 10px; }
.lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
@media (max-width: 620px) {
  .lb-prev, .lb-next { display: none; } /* swipe on touch */
  .lb-stage { padding: 56px 12px 48px; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(30px, 5vw, 56px) var(--pad) clamp(34px, 5vw, 52px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  align-items: baseline;
  justify-content: space-between;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.site-footer a, .site-footer span {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-footer a:hover { color: var(--ink); }

/* ---------- About / text pages ---------- */
.page {
  padding: 0 var(--pad) clamp(50px, 8vw, 110px);
  max-width: 1200px;
}
.page-title {
  font-size: clamp(26px, 4.4vw, 44px);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: clamp(10px, 3vw, 40px) 0 clamp(28px, 4vw, 54px);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: start;
}
.about-grid figure { position: sticky; top: 24px; }
.about-grid figure img { width: 100%; height: auto; }
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid figure { position: static; max-width: 520px; }
}
.about-text p { margin-bottom: 1.2em; max-width: 62ch; }
.about-text h2 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 2.2em 0 0.9em;
}
.pull-quote {
  border-left: 2px solid var(--ink);
  padding: 2px 0 2px 22px;
  margin: 1.8em 0;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 300;
  font-style: italic;
  max-width: 56ch;
  color: #222;
}
.clients {
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 62ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 2.4em 0 0.6em;
}
.btn {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 15px 30px;
  border: 1px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: #fff; color: var(--ink); }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.contact-lines { margin-top: 2.4em; font-size: 14px; color: var(--ink-soft); }
.contact-lines a { color: var(--ink); border-bottom: 1px solid var(--line); }
.contact-lines a:hover { border-bottom-color: var(--ink); }

/* legal pages */
.legal { max-width: 760px; }
.legal h2 { font-size: 15px; font-weight: 500; margin: 2.2em 0 0.7em; }
.legal p { margin-bottom: 1em; color: #333; }
.legal a { border-bottom: 1px solid var(--line); }

/* ---------- Language switch ---------- */
.lang-switch {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}
.lang-switch button {
  background: none;
  border: 0;
  padding: 0 0 2px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: #b5b5b5;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active { color: var(--ink); border-bottom-color: var(--ink); }
.lang-switch .sep { color: #d5d5d5; font-size: 11px; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(30px, 6vw, 90px);
  align-items: start;
  max-width: 1100px;
}
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-intro { max-width: 44ch; margin-bottom: 1.6em; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1.8em; }
.form-title {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
#contact-form { max-width: 560px; }
#contact-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}
#contact-form input, #contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d9d9d9;
  background: #fff;
  font: inherit;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
}
#contact-form input:focus, #contact-form textarea:focus { outline: none; border-color: var(--ink); }
#contact-form button { margin-top: 20px; cursor: pointer; font-family: inherit; }
#contact-form button[disabled] { opacity: 0.5; cursor: default; }
.form-msg { font-size: 13px; margin-top: 12px; min-height: 1em; }
.form-msg.ok { color: #0a7d33; }
.form-msg.err { color: #b00020; }

/* misc */
.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 12px; top: 12px;
  background: #111; color: #fff;
  padding: 8px 14px; z-index: 200;
  font-size: 12px;
}
