/* R. Lenke Photography: site styles.
   Colors live in the variables below; change them here to restyle the whole site. */

:root {
  --bg: #f7f6f3;
  --text: #1b1b1a;
  --muted: #6d6b66;
  --line: #e2e0da;
  --accent: #1b1b1a;
  --gap: 8px;
  --row: 250px;            /* target height of a row of gallery photos */
  --max: 1600px;
  --pad: clamp(16px, 4vw, 48px);
  /* Inconsolata (typewriter-style) is used everywhere. To try another font, change --font. */
  --font: "Inconsolata", ui-monospace, Consolas, "Courier New", monospace;
  --serif: var(--font);
  --sans: var(--font);
  color-scheme: light dark;
  /* Magnifier cursors: a clean white outline that shows up on light and dark photos.
     (The built-in zoom cursor on Windows looks very dated.) Last value is the fallback. */
  --cursor-zoom-in: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cg stroke='%23000' stroke-opacity='.5' stroke-width='4.5'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M18 18l6 6M12 8.5v7M8.5 12h7'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M18 18l6 6M12 8.5v7M8.5 12h7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 12 12, zoom-in;
  --cursor-zoom-out: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cg stroke='%23000' stroke-opacity='.5' stroke-width='4.5'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M18 18l6 6M8.5 12h7'/%3E%3C/g%3E%3Cg stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M18 18l6 6M8.5 12h7'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 12 12, zoom-out;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --text: #ecebe7;
    --muted: #9c9a94;
    --line: #2b2a28;
    --accent: #ecebe7;
  }
}
@media (max-width: 700px) { :root { --row: 130px; --gap: 4px; } }

@font-face {
  font-family: "Inconsolata";
  src: url("/assets/inconsolata.6c0cf650.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 var(--sans);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: .04em; line-height: 1.2; }
h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 .4em; text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--bg); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 18px var(--pad);
}
.logo { display: block; color: var(--text); text-decoration: none; }
.logo-mark { display: block; width: 180px; height: auto; overflow: visible; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 26px; font-size: 15px; letter-spacing: .04em; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--text); }
.site-nav a[aria-current] { border-bottom-color: var(--text); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .site-header { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
  .logo-mark { width: 150px; }
  .nav-toggle {
    display: grid; gap: 5px; place-content: center; width: 44px; height: 44px;
    background: none; border: 0; padding: 0; cursor: pointer; color: var(--text);
  }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .25s, opacity .25s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .js .site-nav { display: none; }
  .site-nav { flex-direction: column; width: 100%; font-size: 18px; padding: 8px 0 12px; }
  .js .site-nav.open { display: flex; }
  .site-nav a[aria-current] { border-bottom-color: transparent; color: var(--text); font-weight: 600; }
}

/* ---------- home slider ---------- */
.slider {
  position: relative; max-width: var(--max); margin: 0 auto;
  height: min(78vh, 860px); min-height: 360px; overflow: hidden; background: #000;
}
@media (min-width: 1000px) { .slider { width: calc(100% - 2 * var(--pad)); } }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; visibility: hidden; transition: opacity 1.1s ease, visibility 0s 1.1s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 1.1s ease; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); }
html:not(.js) .slide noscript ~ img { display: none; }   /* no JavaScript: show the real first photo, not the blank placeholder */
.slide.is-active img { animation: drift 9s ease-out both; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }
/* Dark fade along the bottom so white text and controls stay readable on bright photos. */
.slide::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0)); pointer-events: none;
}
.slide-caption {
  position: absolute; z-index: 1; left: 24px; bottom: 22px; color: #fff; font: 400 clamp(22px, 3vw, 34px) var(--serif);
  text-shadow: 0 1px 10px rgba(0,0,0,.6); letter-spacing: .02em;
}
.slide-caption::after { content: " →"; font-size: .7em; opacity: .8; }
.slider-btn {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%; width: 48px; height: 64px;
  border: 0; background: rgba(0,0,0,.25); color: #fff; font-size: 40px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .3s, background .2s;
}
.slider:hover .slider-btn, .slider-btn:focus-visible { opacity: 1; }
.slider-btn:hover { background: rgba(0,0,0,.5); }
.slider-btn.prev { left: 0; } .slider-btn.next { right: 0; }
.slider-controls { position: absolute; right: 12px; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 4px; }
.slider-dots { display: flex; }
.slider-controls button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; color: #fff; }
.slider-dots button::before {    /* thin bar inside a finger-sized button */
  content: ""; display: block; height: 3px; margin: 0 2px; background: rgba(255,255,255,.55); transition: background .3s;
}
.slider-dots button[aria-current]::before { background: #fff; }
.slider-pause span { display: block; width: 10px; height: 12px; margin: auto; border: solid #fff; border-width: 0 3px; }
.slider-pause.is-paused span {   /* play triangle */
  width: 0; height: 0; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff;
}
@media (hover: none) { .slider-btn { display: none; } }

/* ---------- intro + cards ---------- */
.intro, .page-head { max-width: 760px; margin: 0 auto; padding: 48px var(--pad) 28px; text-align: center; }
.intro p, .page-head p { color: var(--muted); margin: 0; }
.cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  max-width: var(--max); margin: 0 auto; padding: 8px var(--pad) 64px;
}
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }
.card { text-decoration: none; display: block; }
.card-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-title { display: block; font: 400 24px var(--serif); margin-top: 12px; }
.card-count { display: block; color: var(--muted); font-size: 14px; }

/* ---------- gallery grid (justified rows, keeps your photo order) ---------- */
.grid {
  display: flex; flex-wrap: wrap; gap: var(--gap);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
}
.grid::after { content: ""; flex-grow: 1000000; }
/* Hidden for the instant it takes to shuffle, so visitors never see photos jump around. */
.js .grid[data-shuffle] { visibility: hidden; }
.g-item {
  position: relative; display: block; overflow: hidden; background: var(--line);
  flex-grow: calc(var(--ar) * 100); flex-basis: calc(var(--ar) * var(--row));
  cursor: var(--cursor-zoom-in);
}
.g-item i { display: block; }
.g-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s, transform .5s ease; }
.g-item:hover img { transform: scale(1.02); }
.g-item.is-open img { opacity: 0; }

.gallery-nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px;
  padding: 48px var(--pad) 64px; letter-spacing: .04em;
}
.gallery-nav a { color: var(--muted); text-decoration: none; }
.gallery-nav a:hover, .gallery-nav a[aria-current] { color: var(--text); }
.gallery-nav a[aria-current] { border-bottom: 1px solid; }

/* ---------- lightbox ---------- */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 1000; touch-action: pinch-zoom; }
.lb-bg { position: absolute; inset: 0; background: rgba(8,8,8,.96); cursor: var(--cursor-zoom-out); }
.lb-bg, .lb-ui { opacity: 0; transition: opacity .3s ease; }
.lb.is-visible .lb-bg, .lb.is-visible .lb-ui { opacity: 1; }
.lb-ui { position: absolute; inset: 0; pointer-events: none; }
.lb-ui button { pointer-events: auto; }
.lb-img {
  position: fixed; margin: 0; max-width: none; object-fit: contain;
  transform-origin: 0 0; user-select: none; -webkit-user-drag: none;
  transition: opacity .25s;
}
.lb-img.is-animating { transition: transform .38s cubic-bezier(.2,.8,.2,1); }
.lb button {
  position: absolute; z-index: 2; border: 0; background: none; color: #e9e9e9; cursor: pointer;
  width: 56px; height: 56px; font-size: 34px; line-height: 1; opacity: .75; transition: opacity .2s;
}
.lb button:hover, .lb button:focus-visible { opacity: 1; }
.lb-close { top: 8px; right: 8px; font-size: 40px !important; }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; height: 96px !important; font-size: 48px !important; }
.lb-prev { left: 4px; } .lb-next { right: 4px; }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 20px; display: flex; gap: 18px;
  justify-content: space-between; color: #bdbdbd; font-size: 14px; pointer-events: none;
}
@media (hover: none) { .lb-prev, .lb-next { display: none; } }

/* ---------- about + contact ---------- */
.prose { max-width: 680px; margin: 0 auto; padding: 48px var(--pad) 72px; }
.prose p { margin: 0 0 1.1em; }
.about { display: flex; gap: 48px; align-items: flex-start; max-width: 1100px; margin: 0 auto; }
.about .prose { flex: 1; }
.about-photo { flex: 0 0 40%; margin: 48px 0 0 var(--pad); }
@media (max-width: 800px) { .about { flex-direction: column; gap: 0; } .about-photo { margin: 16px var(--pad) 0; } }

.contact-form { display: grid; gap: 16px; margin-top: 24px; }
.contact-form label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--text); outline: none; }
.contact-form button {
  justify-self: start; font: inherit; letter-spacing: .04em; cursor: pointer;
  padding: 12px 28px; border: 1px solid var(--text); background: var(--text); color: var(--bg);
}
.contact-form button:hover { background: transparent; color: var(--text); }
.contact-form .hp { position: absolute; left: -9999px; }
.form-msg { padding: 12px 16px; border-left: 3px solid; }
.form-msg.ok { border-color: #3c8a4a; } .form-msg.err { border-color: #b4412f; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 24px; padding: 28px var(--pad);
  text-align: center; color: var(--muted); font-size: 13px;
}
.site-footer p { margin: 0; }
.notfound { padding-bottom: 120px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Logo text uses the site font (it lives in assets/logo.svg). */
.logo-name, .logo-sub { font-family: var(--font); }
.about-photo { max-width: 400px; }
.about-photo figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.contact-photo { flex-basis: 266px; max-width: 266px; }   /* the source photo is small; don't enlarge it */
.contact-wrap .prose { margin: 0; }
@media (max-width: 800px) { .contact-photo { max-width: 200px; } }
