/* Geist (variable weight), served from the project (paths are relative to this file) */
@font-face {
  font-family: 'Geist';
  src: url('../../font/Geist/webfonts/Geist[wght].woff2') format('woff2-variations'),
    url('../../font/Geist/webfonts/Geist[wght].woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('../../font/Geist/webfonts/Geist-Italic[wght].woff2') format('woff2-variations'),
    url('../../font/Geist/webfonts/Geist-Italic[wght].woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--c-canvas);
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--c-canvas);
  color: var(--c-ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
  font: inherit;
}

ul, ol { list-style: none; }

/* the hidden attribute always wins over component display rules (e.g. .contact__email is flex) */
[hidden] { display: none !important; }

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

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

em { font-style: italic; font-weight: inherit; }

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

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  left: var(--margin);
  top: 0.75rem;
  z-index: calc(var(--z-logo) + 1);
  padding: 0.5rem 0.75rem;
  background: var(--c-ink);
  color: var(--c-canvas);
  font-weight: 500;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- type styles ---------- */
.display-xl,
.display-l,
.display-m {
  font-weight: 700;
  letter-spacing: var(--tracking-display);
}
/* headings break evenly, paragraphs avoid a lone last word */
.display-xl, .display-l, .display-m, .copy-l { text-wrap: balance; }
.copy-m, .muted { text-wrap: pretty; }
.display-xl { font-size: var(--fs-display-xl); line-height: var(--lh-display-xl); }
.display-l { font-size: var(--fs-display-l); line-height: var(--lh-display-l); }
.display-m { font-size: var(--fs-display-m); line-height: var(--lh-display-m); }
.copy-l {
  font-size: var(--fs-copy-l);
  line-height: var(--lh-copy-l);
  font-weight: 500;
  letter-spacing: -0.035em;
}
.copy-m { font-size: var(--fs-copy-m); line-height: var(--lh-copy-m); letter-spacing: -0.02em; }
.small { font-size: var(--fs-small); line-height: var(--lh-small); letter-spacing: -0.005em; }
.label {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.muted { color: var(--c-muted); }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--margin);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* ---------- reveal primitives ---------- */

/* SplitText masks: give descenders/ascenders room under tight line heights.
   The split element stays display: block (SplitText measures words in it on
   every re-split), so the masks keep their place with a single negative
   bottom margin plus a relative shift instead of collapsing margins. */
.line-mask {
  position: relative;
  top: -0.08em;
  padding-block: 0.08em 0.14em;
  margin-bottom: -0.22em;
  /* negative tracking lets glyphs overhang their advance: give the mask room on the sides */
  padding-inline: 0.1em;
  margin-inline: -0.1em;
}

/* image reveal: the wrapper is the mask, the inner element carries the lift */
.reveal-img {
  position: relative;
  overflow: hidden;
  background: var(--c-placeholder);
}
.reveal-img__inner {
  position: absolute;
  inset: 0;
}
/* a neutral hairline keeps pale paintings from dissolving into the canvas */
.reveal-img::after {
  content: '';
  position: absolute;
  inset: 0;
  outline: 1px solid oklch(0 0 0 / 0.1);
  outline-offset: -1px;
  pointer-events: none;
}
.reveal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* hide reveal targets until JS has prepared them, to avoid a flash.
   .no-motion (no animation library, or the failsafe) shows everything as is. */
.js:not(.no-motion) [data-reveal='text'],
.js:not(.no-motion) [data-intro='text'] {
  visibility: hidden;
}
.js:not(.no-motion) .is-split { visibility: visible; }
.js:not(.no-motion) [data-reveal='fade'],
.js:not(.no-motion) [data-intro='fade'] { opacity: 0; }
.js:not(.no-motion) [data-reveal='image'],
.js:not(.no-motion) [data-intro='image'] { clip-path: inset(100% 0 0 0); }

/* ---------- button: label rolls up on hover ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5em;
  min-height: 3.25rem;
  padding: 0.95em 1.25em 0.95em 1.4em;
  background: var(--c-ink);
  color: var(--c-canvas);
  font-size: var(--fs-copy-m);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: background-color var(--dur-dim) var(--ease-standard);
}
.btn__label {
  position: relative;
  display: block;
  overflow: hidden;
  padding-block: 0.1em;
  color: transparent;
  white-space: nowrap;
}
.btn__label::before,
.btn__label::after {
  content: attr(data-label);
  position: absolute;
  inset: 0.1em 0 auto;
  display: block;
  color: var(--c-canvas);
  transition: transform var(--dur-btn) var(--ease-out-expo);
}
.btn__label::after { transform: translateY(110%); }
.btn__arrow {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform var(--dur-btn) var(--ease-out-expo);
}
@media (hover: hover) {
  .btn:hover { background: var(--c-accent); }
  .btn:hover .btn__label::before { transform: translateY(-110%); }
  .btn:hover .btn__label::after { transform: translateY(0); }
  .btn:hover .btn__arrow { transform: translate(0.15em, -0.15em); }
}

/* press feedback: a small, interruptible scale on the controls that act in place */
.btn, .filter, .menu-btn, .ov-step, .overlay__close {
  transition-property: scale, background-color, color;
}
@media (prefers-reduced-motion: no-preference) {
  .btn:active, .filter:active, .menu-btn:active, .ov-step:active, .overlay__close:active {
    scale: 0.96;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
  }
}

/* ---------- text link with arrow ---------- */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 500;
  padding-block: 0.35em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size var(--dur-btn) var(--ease-out-expo), color var(--dur-dim) var(--ease-standard);
}
.link-cta__arrow {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform var(--dur-btn) var(--ease-out-expo);
}
@media (hover: hover) {
  .link-cta:hover { color: var(--c-accent); background-size: 0% 1px; background-position: 100% 100%; }
  .link-cta:hover .link-cta__arrow { transform: translateY(0.2em); }
}

/* underline that draws in on hover (nav, footer, inline links) */
.u-link {
  background: linear-gradient(currentColor, currentColor) 100% 100% / 0% 1px no-repeat;
  transition: background-size var(--dur-btn) var(--ease-out-expo), color var(--dur-dim) var(--ease-standard);
}
@media (hover: hover) {
  .u-link:hover { background-size: 100% 1px; background-position: 0 100%; }
}

/* smooth anchor scrolling is handled in header.js (CSS smooth scrolling fights ScrollTrigger) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
