/*
Theme Name: Adam Foto
Theme URI: https://adamfoto.se
Author: Adam Öjdahl
Description: A clean, minimal photography portfolio theme. Features a framed slideshow, portfolio category overlays with lightbox, a journal with category filtering, and a contact modal. Replace placeholder images by setting featured images on Slides, Portfolio works, and Posts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: adam-foto
*/

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --paper:   #f6f3ee;
  --paper-2: #efeae0;
  --ink:     #171614;
  --ink-2:   #2a2724;
  --mute:    #8b867d;
  --mute-2:  #b8b2a6;
  --rule:    #1716141a;
  --rule-2:  #17161414;
  --accent:  #9b7a44;

  --bg-slideshow: #f6f3ee;
  --bg-portfolio: #ebe1cf;
  --bg-journal:   #e2e4dd;
  --bg-about:     #1c1a17;

  --serif:  "DM Serif Display", Georgia, serif;
  --sans:   "DM Sans", "Helvetica Neue", Helvetica, sans-serif;
  --mono:   ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);

  --wordmark-style:     italic;
  --wordmark-transform: none;
  --wordmark-tracking:  0.005em;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 45px var(--gutter);
  transition: background .25s ease, padding .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
  color: #f6f3ee;
}
.site-header.is-scrolled {
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 30px var(--gutter);
  border-bottom-color: var(--rule-2);
  color: var(--ink);
}

.wordmark {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: var(--wordmark-tracking, 0.005em);
  font-style: var(--wordmark-style, italic);
  font-weight: 400;
  text-transform: var(--wordmark-transform, none);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--accent);
}
.wordmark .wordmark-text { color: inherit; white-space: nowrap; }
.logo-mark { display: block; flex-shrink: 0; }
.footer-wordmark { color: var(--accent); }
.footer-brand .footer-wordmark { font-size: 36px; gap: 18px; }

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1px; background: currentColor; transition: right .3s ease;
}
.nav a:hover::after, .nav a.is-active::after { right: 0; }
.nav-cta {
  font: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid currentColor;
  transition: background .2s, color .2s;
  margin-left: 8px;
}
.nav-cta:hover { background: currentColor; color: var(--paper); }
.site-header.is-scrolled .nav-cta:hover { color: var(--paper); }

/* ─── Slideshow ──────────────────────────────────────────────────────────── */
.slideshow {
  position: relative;
  width: 100%;
  padding: clamp(96px, 11vh, 140px) var(--gutter) clamp(56px, 7vh, 88px);
  background: transparent;
}
.slideshow .slide .photo {
  background: transparent;
}
.slideshow-frame {
  position: relative;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  height: 68vh;
  max-height: 780px;
  overflow: hidden;
  background: transparent;
}
@media (max-width: 1024px) { .slideshow-frame { height: 58vh; } }
@media (max-width: 640px)  {
  .slideshow-frame { height: auto; aspect-ratio: 3/2; }
  .slideshow { padding-top: 120px; }
}
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.slide.is-active { opacity: 1; }
.slide .photo, .slide img { width: 100%; height: 100%; }
.slide img { object-fit: cover; }
.slideshow .slide .photo img { object-fit: cover !important; width: 100%; height: 100%; }

.slide-meta {
  position: relative;
  max-width: var(--container);
  margin: 36px auto 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.slide-count { opacity: 0.65; }
.slide-caption::before { content: "—  "; opacity: 0.5; }

.slide-dots {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -28px;
  display: flex; gap: 10px;
}
.slide-dot {
  width: 22px; height: 1px; background: rgba(0,0,0,.25);
  transition: background .3s, height .3s;
}
.slide-dot.is-active { background: rgba(0,0,0,.85); height: 2px; }

/* ─── Section scaffolding ────────────────────────────────────────────────── */
.section { padding: clamp(80px, 10vw, 140px) var(--gutter); width: 100%; }
.section > .section-head,
.section > .cat-grid,
.section > .about-grid,
.section > .journal-row,
.section > .journal-grid,
.section > .journal-footer {
  max-width: var(--container);
  margin-inline: auto;
}
.section.portfolio { background: var(--bg-portfolio); }
.section.journal   { background: var(--bg-journal); }
.section.about     { background: var(--bg-about); color: var(--paper); }
.section-head {
  display: grid; gap: 18px;
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mute);
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; letter-spacing: -0.01em; margin: 0;
}
.section-title-link { color: inherit; text-decoration: none; }
.section-lede { font-size: 16px; color: var(--ink-2); max-width: 52ch; margin: 0; line-height: 1.6; }

/* ─── Portfolio categories ───────────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.4vw, 20px);
}
.cat-tile {
  position: relative; overflow: hidden; aspect-ratio: 3/4;
  text-align: left; background: var(--paper-2); display: block;
}
.cat-tile .photo { position: absolute; inset: 0; }
.cat-tile .photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s ease, filter .4s ease;
  filter: brightness(0.78);
}
.cat-tile:hover .photo img { transform: scale(1.04); filter: brightness(0.62); }
.cat-overlay {
  position: absolute; inset: 0; padding: 24px;
  display: grid; grid-template-rows: auto 1fr auto;
  color: #f6f3ee;
}
.cat-index { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; opacity: .7; }
.cat-text { align-self: end; }
.cat-name { font-family: var(--serif); font-size: clamp(36px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.01em; }
.cat-tagline { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 8px; opacity: .85; }
.cat-count {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 14px; border-top: 1px solid rgba(246,243,238,.3); padding-top: 14px;
}
.cat-count .arrow { transition: transform .3s ease; }
.cat-tile:hover .cat-count .arrow { transform: translateX(6px); }
@media (max-width: 880px) { .cat-grid { grid-template-columns: 1fr; } .cat-tile { aspect-ratio: 16/11; } }

/* ─── Portfolio overlay ──────────────────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed; inset: 0; z-index: 90;
  background: rgba(23, 22, 20, 0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
}
.overlay.is-open { display: block; animation: fadeIn .25s ease; }
.overlay-sheet {
  background: var(--paper);
  min-height: 100%;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
  animation: rise .35s cubic-bezier(.2,.7,.2,1);
}
.overlay-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px;
  max-width: var(--container);
  margin: 0 auto clamp(40px, 6vw, 72px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.overlay-title { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 7vw, 92px); line-height: 1; letter-spacing: -0.01em; margin: 14px 0 10px; }
.overlay-lede { color: var(--ink-2); margin: 0; }
.overlay-close {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--ink); padding: 12px 18px; white-space: nowrap;
  transition: background .2s, color .2s;
}
.overlay-close:hover { background: var(--ink); color: var(--paper); }

.gallery {
  columns: 3;
  column-gap: 14px;
  max-width: var(--container); margin: 0 auto;
}
.gallery-tile {
  break-inside: avoid;
  display: block;
  width: 100%;
  margin-bottom: 14px;
  position: relative; overflow: hidden; background: var(--paper-2);
  padding: 0; border: 0; cursor: zoom-in; text-align: left;
}
.gallery-tile .photo { width: 100%; height: auto; }
.gallery-tile .photo img { width: 100%; height: auto; object-fit: unset; display: block; transition: transform 1.2s ease; }
.gallery-tile:hover .photo img { transform: scale(1.03); }
.gallery-wide, .gallery-tall, .gallery-square { }
.gallery-tile figcaption {
  position: absolute; left: 16px; bottom: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #f6f3ee; opacity: 0; transform: translateY(4px);
  transition: opacity .3s, transform .3s;
  text-shadow: 0 1px 16px rgba(0,0,0,.5);
}
.gallery-tile:hover figcaption { opacity: 1; transform: translateY(0); }
@media (max-width: 880px) { .gallery { columns: 2; } }

/* ─── Journal ────────────────────────────────────────────────────────────── */
.journal-head {
  display: flex; justify-content: space-between; align-items: end;
  gap: 30px; flex-wrap: wrap; max-width: none;
}
.journal-head > div:first-child { display: grid; gap: 18px; max-width: 720px; }
.journal-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.journal-row {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 40px);
}
.journal-card { display: block; }
.journal-card-link { display: grid; gap: 14px; text-align: left; width: 100%; }
.journal-card-thumb { aspect-ratio: 4/5; overflow: hidden; background: var(--paper-2); }
.journal-card-thumb .photo, .journal-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.journal-card-link:hover .journal-card-thumb img { transform: scale(1.03); }
.journal-card-meta { margin-top: 4px; }
.journal-cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.journal-card-title { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 28px); line-height: 1.15; margin: 4px 0 0; }
.journal-card-excerpt,
.journal-cat { display: none !important; }
.journal-card-cta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; display: inline-flex; gap: 8px; align-items: center; margin-top: 6px; }
.journal-card-cta .arrow { transition: transform .3s ease; }
.journal-card-link:hover .journal-card-cta .arrow { transform: translateX(4px); }
.journal-empty { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); grid-column: 1/-1; padding: 40px 0; text-align: center; }
@media (min-width: 901px) {
  .journal-row .journal-card:nth-child(4) { display: none !important; }
}
@media (max-width: 900px) {
  .journal-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .journal-card-thumb { aspect-ratio: 4/5; }
}

.page-pad { padding-top: 90px; }
.journal-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 48px) clamp(24px, 3vw, 40px);
}
@media (max-width: 980px) { .journal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .journal-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 16px; } }
.journal-footer {
  margin-top: clamp(40px, 5vw, 64px); padding-top: 26px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: center;
}
.journal-footer .link-btn { display: inline-flex; gap: 10px; align-items: center; }
.journal-footer .arrow { transition: transform .3s ease; }
.journal-footer .link-btn:hover .arrow { transform: translateX(4px); }

/* ─── Lightbox ───────────────────────────────────────────────────────────── */
.js-lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 14, 12, 0.94);
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  padding: clamp(20px, 4vw, 56px);
  cursor: zoom-out;
}
.js-lightbox.is-open { display: grid; animation: fadeIn .25s ease; }
.lb-figure { grid-column: 2; margin: 0; display: grid; gap: 16px; justify-self: center; max-width: min(1400px, 100%); cursor: default; animation: rise .35s cubic-bezier(.2,.7,.2,1); }
.lb-photo { width: 100%; max-height: 78vh; }
.lb-photo img { width: 100%; height: 100%; max-height: 78vh; object-fit: contain; background: transparent; }
.lb-caption { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(246,243,238,.75); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.lb-count { opacity: .65; }
.lb-close {
  position: absolute; top: 22px; right: 24px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(246,243,238,.85); padding: 10px 14px;
  border: 1px solid rgba(246,243,238,.3);
  transition: background .2s, border-color .2s;
}
.lb-close:hover { background: rgba(246,243,238,.1); border-color: rgba(246,243,238,.6); }
.lb-nav {
  font-size: 22px; color: rgba(246,243,238,.6);
  width: 56px; height: 56px; display: grid; place-items: center;
  align-self: center; justify-self: center;
  border: 1px solid rgba(246,243,238,.18); transition: all .2s;
}
.lb-nav:hover { color: #f6f3ee; border-color: rgba(246,243,238,.5); background: rgba(246,243,238,.06); }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
@media (max-width: 640px) {
  .js-lightbox { grid-template-columns: 1fr; padding: 60px 16px 80px; }
  .lb-nav { position: absolute; bottom: 16px; }
  .lb-prev { left: 16px; } .lb-next { right: 16px; }
  .lb-figure { grid-column: 1; }
}

/* ─── Modal (shared) ─────────────────────────────────────────────────────── */
.modal-scrim {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(23, 22, 20, 0.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  place-items: start center;
  padding: clamp(20px, 5vw, 60px);
  overflow-y: auto;
}
.modal-scrim.is-open { display: grid; animation: fadeIn .25s ease; }
.modal {
  position: relative; background: var(--paper);
  max-width: 820px; width: 100%; padding: 0 0 60px;
  animation: rise .35s cubic-bezier(.2,.7,.2,1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  background: rgba(246,243,238,.95); padding: 8px 12px;
}
.modal-cover { aspect-ratio: 16/9; display: block; width: 100%; }
.modal-cover img { width: 100%; height: 100%; object-fit: cover; }
.modal-cover-btn { padding: 0; border: 0; background: transparent; cursor: zoom-in; position: relative; aspect-ratio: 16/9; display: block; width: 100%; }
.modal-cover-btn::after {
  content: "Click to enlarge";
  position: absolute; right: 14px; bottom: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  background: rgba(23,22,20,.7); color: #f6f3ee; padding: 7px 10px;
  opacity: 0; transition: opacity .25s ease;
}
.modal-cover-btn:hover::after { opacity: 1; }
.modal-body { padding: 36px clamp(24px, 5vw, 64px) 0; }
.modal-title { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; margin: 14px 0 24px; }
.modal-p { font-size: 16px; line-height: 1.7; margin: 0 0 18px; max-width: 60ch; color: var(--ink-2); }
.modal-read-more { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 3px; margin-top: 8px; }
.journal-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); display: flex; gap: 10px; align-items: center; }

/* ─── About ──────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.about-portrait { aspect-ratio: 3/4; }
.about-portrait .photo, .about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-text p { font-size: 17px; line-height: 1.7; color: var(--ink-2); max-width: 52ch; margin: 14px 0; }
.about-text em { font-family: var(--serif); font-style: italic; font-size: 1.06em; color: var(--ink); }
.about-text .section-title { margin-top: 14px; }
.about-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 26px 0 6px; }
.about-meta {
  margin: 36px 0 0; border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.about-meta > div { display: grid; grid-template-columns: 100px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.about-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.about-meta dd { margin: 0; font-size: 14px; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } .about-meta { grid-template-columns: 1fr; } }
.section.about .eyebrow       { color: rgba(246,243,238,.55); }
.section.about .section-title { color: var(--paper); }
.section.about .about-text p  { color: rgba(246,243,238,.78); }
.section.about .about-text em { color: var(--paper); }
.section.about .btn           { background: var(--paper); color: var(--ink); }
.section.about .btn:hover     { background: rgba(246,243,238,.88); }
.section.about .about-meta          { border-top-color: rgba(246,243,238,.18); }
.section.about .about-meta > div    { border-bottom-color: rgba(246,243,238,.18); }
.section.about .about-meta dt       { color: rgba(246,243,238,.5); }
.section.about .about-meta dd       { color: var(--paper); }

/* ─── Contact modal ──────────────────────────────────────────────────────── */
.contact-modal {
  position: relative; background: var(--paper);
  max-width: 760px; width: 100%;
  padding: clamp(36px, 5vw, 60px) clamp(24px, 5vw, 64px);
  animation: rise .35s cubic-bezier(.2,.7,.2,1);
}
.contact-modal-head { margin-bottom: 32px; }
.contact-simple { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field > span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.field input, .field textarea {
  font: inherit; background: var(--paper);
  border: 1px solid var(--rule); padding: 14px 16px; border-radius: 0;
  color: var(--ink); transition: border-color .2s, background .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--ink); background: #fff; }
.field.has-err input, .field.has-err textarea { border-color: #b84436; }
.err { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: #b44; font-style: normal; }
.chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 13px; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); transition: all .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.contact-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 10px; }
.btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 16px 26px; background: var(--ink); color: var(--paper); transition: background .2s ease;
}
.btn:hover { background: var(--ink-2); }
.btn:disabled { opacity: .6; cursor: progress; }
.contact-aside { color: var(--mute); font-size: 13px; }
.contact-sent { text-align: center; padding: 30px 0; }
.sent-mark { width: 56px; height: 56px; line-height: 56px; text-align: center; border: 1px solid var(--ink); border-radius: 50%; margin: 0 auto 20px; font-size: 24px; }
.contact-sent h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin: 0 0 10px; }
.contact-sent p  { color: var(--ink-2); margin: 0 0 20px; }
.link-btn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 3px; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: var(--paper); padding: 80px var(--gutter) 28px; }
.footer-inner { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 4fr 8fr; gap: 60px; padding-bottom: 60px; border-bottom: 1px solid rgba(246,243,238,.14); }
.footer-brand .wordmark { font-size: 36px; }
.footer-tag { color: rgba(246,243,238,.65); max-width: 28ch; margin: 14px 0 0; font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 18px; color: rgba(246,243,238,.6); font-weight: 400; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a, .footer-link-btn { position: relative; transition: opacity .2s; font: inherit; color: inherit; text-align: left; }
.footer-col a:hover, .footer-link-btn:hover { opacity: .65; }
.footer-col .ext { font-size: 11px; opacity: .5; margin-left: 4px; }
.footer-base { max-width: var(--container); margin: 22px auto 0; display: flex; justify-content: space-between; gap: 20px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(246,243,238,.5); }
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr; gap: 40px; } .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) {
  .footer-cols { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav a { display: none; }
  .nav .nav-cta { display: inline-flex; }
  .wordmark .custom-logo { max-height: 28px !important; max-width: 120px !important; }
  .wordmark { font-size: 14px; gap: 6px; }
  .logo-mark { height: 16px !important; }
  .nav-cta { padding: 6px 12px; font-size: 12px; letter-spacing: 0.04em; }
}

/* ─── Custom logo ────────────────────────────────────────────────────────── */
.wordmark .custom-logo {
  max-height: 56px !important;
  max-width: 220px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}
.footer-custom-logo {
  max-height: 75px !important;
  max-width: 300px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}

/* ─── Photo container baseline ───────────────────────────────────────────── */
.photo { position: relative; overflow: hidden; background: var(--paper-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Single post / page ─────────────────────────────────────────────────── */
.single-wrap, .page-wrap {
  max-width: 820px; margin: 0 auto;
  padding: clamp(120px, 14vh, 160px) var(--gutter) clamp(80px, 10vw, 120px);
}
.single-cover { width: 100%; margin-bottom: clamp(36px, 5vw, 60px); }
.single-cover img { width: 100%; height: auto; display: block; }
.single-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin-bottom: 16px; }
.single-title { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 36px; }
.single-content p { font-size: 17px; line-height: 1.75; color: var(--ink-2); margin: 0 0 22px; max-width: 60ch; }
.single-content h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 36px); margin: 40px 0 16px; }
.single-back { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 3px; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 36px; }
.single-back:hover { opacity: .7; }

/* ─── 404 ────────────────────────────────────────────────────────────────── */
.not-found { text-align: center; padding: clamp(160px, 20vh, 220px) var(--gutter) clamp(80px, 10vw, 120px); }
.not-found .section-title { margin-bottom: 18px; }
.not-found p { color: var(--ink-2); max-width: 40ch; margin: 0 auto 32px; font-size: 16px; }

/* ─── Tweaks panel ───────────────────────────────────────────────────────── */
.tweaks-toggle-btn {
  position: fixed; right: 16px; bottom: 16px; z-index: 2000;
  width: 38px; height: 38px; display: grid; place-items: center;
  background: rgba(246,243,238,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: .5px solid rgba(0,0,0,.1); border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.14);
  color: var(--ink-2); transition: background .2s;
}
.tweaks-toggle-btn:hover { background: var(--paper); }
.js-tweaks-panel { position: fixed; right: 16px; bottom: 62px; z-index: 1999; width: 280px; display: none; }
.js-tweaks-panel.is-open { display: block; }
.twk-panel {
  background: rgba(250,249,247,.88);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: .5px solid rgba(255,255,255,.6); border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 40px rgba(0,0,0,.18);
  font: 11.5px/1.4 ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #29261b; overflow: hidden;
  max-height: calc(100vh - 96px); display: flex; flex-direction: column;
}
.twk-hd { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 10px 14px; cursor: default; }
.twk-hd b { font-size: 12px; font-weight: 600; }
.twk-x { width: 22px; height: 22px; border-radius: 6px; font-size: 13px; line-height: 1; color: rgba(41,38,27,.55); }
.twk-x:hover { background: rgba(0,0,0,.06); color: #29261b; }
.twk-body { padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.twk-sect { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(41,38,27,.45); padding: 10px 0 0; }
.twk-sect:first-child { padding-top: 0; }
.twk-row { display: flex; flex-direction: column; gap: 5px; }
.twk-row-h { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.twk-lbl { display: flex; justify-content: space-between; align-items: baseline; color: rgba(41,38,27,.72); }
.twk-lbl > span:first-child { font-weight: 500; }
.twk-val { color: rgba(41,38,27,.5); font-variant-numeric: tabular-nums; }
.twk-field {
  appearance: none; width: 100%; height: 26px; padding: 0 8px;
  border: .5px solid rgba(0,0,0,.1); border-radius: 7px;
  background: rgba(255,255,255,.6); color: inherit; font: inherit; outline: none;
}
.twk-field:focus { border-color: rgba(0,0,0,.25); background: rgba(255,255,255,.85); }
select.twk-field {
  padding-right: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='rgba(0,0,0,.5)' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center;
}
.twk-slider {
  appearance: none; -webkit-appearance: none; width: 100%; height: 4px; margin: 6px 0;
  border-radius: 999px; background: rgba(0,0,0,.12); outline: none;
}
.twk-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: .5px solid rgba(0,0,0,.12); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: default; }
.twk-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: .5px solid rgba(0,0,0,.12); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: default; }
.twk-toggle {
  position: relative; width: 32px; height: 18px; border-radius: 999px;
  background: rgba(0,0,0,.15); transition: background .15s; cursor: default; padding: 0; flex-shrink: 0;
}
.twk-toggle[data-on="1"] { background: #34c759; }
.twk-toggle i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; display: block; }
.twk-toggle[data-on="1"] i { transform: translateX(14px); }
.twk-chips { display: flex; gap: 6px; }
.twk-chip {
  position: relative; flex: 1; min-width: 0; height: 36px; padding: 0;
  border: 0; border-radius: 6px; overflow: hidden; cursor: default;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06);
  transition: box-shadow .12s;
}
.twk-chip[data-on="1"] { box-shadow: 0 0 0 1.5px rgba(0,0,0,.85), 0 2px 6px rgba(0,0,0,.15); }
.tweak-note { font-size: 11px; line-height: 1.5; color: rgba(0,0,0,.55); margin-top: -4px; }

/* ─── Elementor compatibility ─────────────────────────────────────────────── */

/* Strip Elementor's default widget padding so our sections fill edge-to-edge */
.elementor-widget-af_slideshow > .elementor-widget-container,
.elementor-widget-af_portfolio > .elementor-widget-container,
.elementor-widget-af_journal   > .elementor-widget-container,
.elementor-widget-af_about     > .elementor-widget-container {
  padding: 0;
  margin: 0;
}

/* Ensure Elementor column/section wrappers don't clip our full-width sections */
.elementor-widget-af_slideshow,
.elementor-widget-af_portfolio,
.elementor-widget-af_journal,
.elementor-widget-af_about {
  width: 100%;
}

/* Override Elementor's body font and color so our CSS variables take effect */
.elementor-page body,
.elementor-page {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}

/* Prevent Elementor section default margin from disrupting section backgrounds */
.elementor-section > .elementor-container {
  max-width: 100%;
}
