/* The Sanctum — shared tokens & chrome (white minimal) */

:root {
  /* Google Fonts loaded with display=swap — see <link> in each HTML file */
  --bg: #fafaf9;
  --surface: #ffffff;
  --pearl: #f4f4f2;
  --text-primary: #111111;
  --text-secondary: rgba(17, 17, 17, 0.68);
  --text-subtle: rgba(17, 17, 17, 0.42);
  --line-soft: rgba(17, 17, 17, 0.08);
  --line-medium: rgba(17, 17, 17, 0.12);
  --rule: rgba(17, 17, 17, 0.06);
  --rule-strong: rgba(17, 17, 17, 0.14);
  /* Editorial accent — use sparingly (links, rare emphasis) */
  --accent-red: #722f37;
  --max: 1120px;
  --ease: cubic-bezier(0.2, 0.85, 0.25, 1);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--surface);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

::selection {
  background: rgba(17, 17, 17, 0.08);
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

.subtle-text {
  color: var(--text-subtle);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - clamp(28px, 5vw, 56px)));
  margin: 0 auto;
}

/* Header — thin, whisper nav, signature mark (Option A) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px) saturate(118%);
  -webkit-backdrop-filter: blur(12px) saturate(118%);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--surface);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 28px);
  padding: 17px 0 16px;
}

/* Signature wordmark: quiet, not a badge */
.mark {
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1;
  opacity: 0.92;
}

.mark:hover {
  opacity: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
}

.nav a {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 8px 12px;
  color: var(--text-subtle);
  transition: color 0.5s var(--ease);
}

.nav a:hover {
  color: var(--text-secondary);
}

.nav a:focus-visible {
  outline: 1px solid var(--line-medium);
  outline-offset: 3px;
}

.nav a[aria-current="page"] {
  color: var(--text-primary);
}

/* Threshold (entry) header: mark only, narrower */

.site-header--threshold .site-header__inner {
  justify-content: flex-start;
}

.site-header--threshold .mark--quiet {
  opacity: 0.72;
}

/* Footer */

.site-footer {
  padding: clamp(48px, 8vh, 64px) 0 clamp(44px, 7vh, 56px);
  background: var(--surface);
}

.site-footer__inner {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.site-footer__faith {
  margin: 0;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.65;
  color: var(--text-subtle);
}

@media (prefers-reduced-motion: reduce) {
  .nav a {
    transition: none;
  }
}

/* Fine-art photography detail pages (shared) */

.work-page {
  padding: clamp(48px, 8vh, 88px) 0 clamp(120px, 18vh, 200px);
}

.work-page__media {
  width: min(980px, calc(100% - clamp(40px, 9vw, 100px)));
  margin: 0 auto;
  padding: 0;
}

.work-page__media picture {
  display: block;
  width: 100%;
}

.work-page__media img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

.work-page__details {
  width: min(34rem, calc(100% - clamp(40px, 9vw, 100px)));
  margin: clamp(52px, 8vh, 80px) auto 0;
  padding: 0;
  text-align: center;
}

.work-page__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: 0.05em;
  line-height: 1.1;
  color: var(--text-primary);
}

.work-page__medium {
  margin: clamp(18px, 2.2vw, 24px) 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.work-page__price {
  margin: clamp(22px, 2.8vw, 30px) 0 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.5;
  color: var(--text-primary);
}

.work-page__acquire {
  margin: clamp(28px, 3.5vw, 40px) 0 0;
  padding: 0;
}

.work-page__acquire a {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  opacity: 0.9;
  transition: opacity 0.45s var(--ease);
}

.work-page__acquire a:hover {
  opacity: 1;
}

.work-page__caption {
  margin: clamp(36px, 5vh, 52px) auto 0;
  max-width: 28em;
  font-family: var(--serif);
  font-size: clamp(13px, 1.15vw, 15px);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1.7;
  color: var(--text-subtle);
}

@media (prefers-reduced-motion: reduce) {
  .work-page__acquire a {
    transition: none;
  }
}

/* Subtle reveal after decode — keeps first paint stable via width/height / aspect-ratio */
img.sanctum-img--reveal {
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}

img.sanctum-img--reveal.sanctum-img--ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  img.sanctum-img--reveal {
    opacity: 1;
    transition: none;
  }
}
