/* Every value the studio panel can change is a custom property here. The
   defaults below deliberately match the site as it already looks, so a config
   that omits a setting renders exactly as it did before that setting existed. */
:root {
  /* colors */
  --color-bg: #f6f4ee;
  --color-text: #1c1b18;
  --color-muted: #8a8577;
  --color-accent: #5c6b52;
  --color-border: #dcd8cb;

  /* families */
  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* weights + italics, per role */
  --weight-display: 500;
  --style-display: italic;
  --weight-body: 400;
  --style-body: normal;
  --weight-mono: 400;
  --style-mono: normal;

  /* type scale */
  --size-name: 4.5rem;
  --size-tagline: 0.8rem;
  --size-gtitle: 3rem;
  --size-label: 0.75rem;
  --size-caption: 0.68rem;
  --size-body: 1rem;

  /* letter spacing */
  --ls-label: 0.18em;
  --ls-heading: -0.01em;

  /* text transform for labels */
  --label-case: none;

  /* layout */
  --grid-min: 260px;
  --grid-gap: 2px;
  --frame-aspect: 4 / 5;
  --page-max: none;
  --gallery-pad-y: 6rem;
  --gallery-pad-x: 6vw;
  --home-align: center;

  /* shape + motion */
  --radius-grid: 12px;
  --radius-frame: 8px;
  --radius-image: 8px;
  --border-width: 1px;
  --hover-zoom: 1.04;
  --transition: 0.6s;
  --corner-size: 18px;
  --corner-display: block;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-style: var(--style-body);
  font-size: var(--size-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
}

a { color: inherit; }

/* corner ticks — the recurring mark that frames every page, like a slide mount */
.corner {
  position: fixed;
  display: var(--corner-display);
  width: var(--corner-size);
  height: var(--corner-size);
  border-color: var(--color-muted);
  opacity: 0.55;
  z-index: 5;
  pointer-events: none;
}
.corner--tl { top: 20px; left: 20px; border-top: 1px solid; border-left: 1px solid; }
.corner--tr { top: 20px; right: 20px; border-top: 1px solid; border-right: 1px solid; }
.corner--bl { bottom: 20px; left: 20px; border-bottom: 1px solid; border-left: 1px solid; }
.corner--br { bottom: 20px; right: 20px; border-bottom: 1px solid; border-right: 1px solid; }

@media (max-width: 640px) {
  .corner { width: calc(var(--corner-size) * 0.66); height: calc(var(--corner-size) * 0.66); }
  .corner--tl, .corner--tr { top: 12px; }
  .corner--bl, .corner--br { bottom: 12px; }
  .corner--tl, .corner--bl { left: 12px; }
  .corner--tr, .corner--br { right: 12px; }
}

/* ---------- shared nav (about / contact, when enabled) ---------- */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.site-nav a {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-style: var(--style-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.12em;
  text-transform: var(--label-case);
  text-decoration: none;
  color: var(--color-muted);
  transition: color 0.25s ease;
}

.site-nav a:hover { color: var(--color-accent); }

/* ---------- home ---------- */
.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: var(--home-align);
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.home .name {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-style: var(--style-display);
  font-size: clamp(2.5rem, 7vw, var(--size-name));
  letter-spacing: var(--ls-heading);
  margin: 0;
}

.home .tagline {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-style: var(--style-mono);
  font-size: var(--size-tagline);
  letter-spacing: var(--ls-label);
  text-transform: var(--label-case);
  color: var(--color-muted);
  margin: 0.9rem 0 3rem;
}

.enter {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-style: var(--style-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: var(--label-case);
  color: var(--color-text);
  padding: 0.4rem 0.2rem;
}

.enter .enter-arrow {
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.enter:hover .enter-arrow {
  transform: translateX(7px);
  color: var(--color-accent);
}

.enter:hover {
  color: var(--color-accent);
}

/* ---------- gallery ---------- */
.gallery-page {
  padding: var(--gallery-pad-y) var(--gallery-pad-x) 5rem;
  max-width: var(--page-max);
  margin: 0 auto;
}

@media (max-width: 640px) {
  .gallery-page { padding: 5rem 1.25rem 4rem; }
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2.5rem;
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-style: var(--style-mono);
  font-size: var(--size-label);
  letter-spacing: 0.12em;
  text-transform: var(--label-case);
  text-decoration: none;
  color: var(--color-muted);
  transition: color 0.25s ease;
}

.home-link:hover { color: var(--color-accent); }

.gallery-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.gallery-header .g-title {
  font-family: var(--font-display);
  font-style: var(--style-display);
  font-weight: var(--weight-display);
  font-size: clamp(2rem, 5vw, var(--size-gtitle));
  margin: 0 0 0.5rem;
}

.gallery-header .g-note {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-style: var(--style-mono);
  font-size: var(--size-label);
  letter-spacing: 0.16em;
  text-transform: var(--label-case);
  color: var(--color-muted);
  margin: 0;
}

/* ---------- collections ---------- */
.collection {
  margin-bottom: 4.5rem;
}

.collection:last-child { margin-bottom: 0; }

.collection-head {
  margin-bottom: 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: var(--border-width) solid var(--color-border);
}

.collection-head .c-title {
  font-family: var(--font-display);
  font-style: var(--style-display);
  font-weight: var(--weight-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  margin: 0;
}

.collection-head .c-desc {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.08em;
  text-transform: var(--label-case);
  color: var(--color-muted);
  margin: 0.45rem 0 0;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--grid-min), 1fr));
  gap: var(--grid-gap);
  background: var(--color-border);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-grid);
  overflow: hidden;
}

.frame {
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
  cursor: zoom-in;
  border-radius: var(--radius-frame);
}

.frame .frame-img-wrap {
  aspect-ratio: var(--frame-aspect);
  overflow: hidden;
  border-radius: var(--radius-image);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition) ease;
}

.frame:hover img {
  transform: scale(var(--hover-zoom));
}

.frame .label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  color: #f6f4ee;
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-style: var(--style-mono);
  font-size: var(--size-caption);
  letter-spacing: 0.06em;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.frame:hover .label { transform: translateY(0); }

.frame .label .n { opacity: 0.65; flex-shrink: 0; }

.frame .label .cap { display: block; }

.frame .label .meta {
  display: block;
  margin-top: 0.2rem;
  opacity: 0.7;
  font-size: 0.92em;
  letter-spacing: 0.04em;
}

/* caption always visible */
[data-caption-mode="always"] .frame .label { transform: translateY(0); }

/* caption below the image, in the page's own colors rather than overlaid */
[data-caption-mode="below"] .frame .label {
  position: static;
  transform: none;
  background: none;
  color: var(--color-text);
  padding: 0.6rem 0.2rem 0.7rem;
}
[data-caption-mode="below"] .frame .label .meta { color: var(--color-muted); opacity: 1; }
[data-caption-mode="below"] .frame { background: var(--color-bg); }

/* photo numbers off */
[data-show-numbers="false"] .frame .label .n { display: none; }

/* ---------- about / contact ---------- */
.text-page {
  padding: var(--gallery-pad-y) var(--gallery-pad-x) 5rem;
  max-width: 68ch;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .text-page { padding: 5rem 1.25rem 4rem; }
}

.text-page .p-title {
  font-family: var(--font-display);
  font-style: var(--style-display);
  font-weight: var(--weight-display);
  font-size: clamp(2rem, 5vw, var(--size-gtitle));
  margin: 0 0 2rem;
}

.text-page .p-body p {
  line-height: 1.8;
  margin: 0 0 1.3rem;
}

.text-page .portrait {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-image);
  margin: 0 0 2rem;
  display: block;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  margin-bottom: 2rem;
}

.contact-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-links a {
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-size: var(--size-label);
  letter-spacing: 0.1em;
  text-transform: var(--label-case);
  text-decoration: none;
  color: var(--color-muted);
  transition: color 0.25s ease;
}

.contact-links a:hover { color: var(--color-accent); }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 12, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 4vh 4vw;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  object-fit: contain;
}

.lightbox-caption {
  position: fixed;
  bottom: 3vh;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-size: var(--size-label);
  letter-spacing: 0.1em;
  color: #f6f4ee;
  opacity: 0.75;
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  font-family: var(--font-mono);
  font-weight: var(--weight-mono);
  font-size: var(--size-label);
  letter-spacing: 0.1em;
  color: #f6f4ee;
  background: none;
  border: 1px solid rgba(246, 244, 238, 0.3);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  text-transform: var(--label-case);
}

.lightbox-close:hover { border-color: #f6f4ee; }

/* lightbox disabled — frames are no longer clickable */
[data-lightbox="off"] .frame { cursor: default; }

.empty-state {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-muted);
  padding: 4rem 1rem;
}
