/* ==========================================================================
   base.css — reset, document defaults, typography, layout primitives
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- Document ---------- */

body {
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body-md);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

/* ---------- Type ---------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--lh-headline);
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Display */
.t-display-lg {
  font-size: var(--fs-display-lg);
  line-height: var(--lh-display);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
}

.t-display-md {
  font-size: var(--fs-display-md);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.t-headline-lg {
  font-size: var(--fs-headline-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.t-headline-md {
  font-size: var(--fs-headline-md);
}

.t-headline-sm {
  font-size: var(--fs-headline-sm);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.t-body-lg {
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  letter-spacing: -0.005em;
}

.t-body-md {
  font-size: var(--fs-body-md);
  line-height: var(--lh-body);
}

.t-body-sm {
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* Uppercase micro-labels — museum archive index cards */
.t-label-lg,
.t-label-md,
.t-label-sm,
.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.4;
}

.t-label-lg {
  font-size: var(--fs-label-lg);
  letter-spacing: 0.08em;
}

.t-label-md {
  font-size: var(--fs-label-md);
  letter-spacing: var(--tracking-label);
}

.t-label-sm {
  font-size: var(--fs-label-sm);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: var(--tracking-label-wide);
}

.eyebrow {
  font-size: var(--fs-label-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--ink-subtle);
}

.t-italic {
  font-style: italic;
}

.t-muted {
  color: var(--ink-muted);
}

.t-subtle {
  color: var(--ink-subtle);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.section {
  padding-block: var(--section-y);
  padding-inline: var(--margin);
}

.section--alt {
  background-color: var(--surface-alt);
}

.section--tight {
  padding-block: calc(var(--section-y) * 0.6);
}

.section--ruled {
  border-block-end: 1px solid var(--border-soft);
}

.center {
  text-align: center;
}

.measure {
  max-width: var(--measure);
  margin-inline: auto;
}

.stack > * + * {
  margin-block-start: var(--space-md);
}

.stack-lg > * + * {
  margin-block-start: var(--space-lg);
}

.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--margin);
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: var(--ink);
  color: var(--cream);
  font-size: var(--fs-label-md);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.skip-link:focus {
  top: var(--space-md);
}

/* ---------- Photo treatment (never grayscale) ---------- */

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--photo-grade);
}

/* Photography is presented, not extracted: no text selection, no iOS save sheet */
.hero__slide,
.card__media img,
.collection-card__media img,
.gallery__item img,
.about-split__media img,
.post__media img,
.studio-block__map img,
.lightbox__img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ---------- Scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
