@font-face {
  font-family: 'Roboto Mono';
  src: url('assets/fonts/RobotoMono-VariableFont_wght.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
}

@font-face {
  font-family: 'Walter Neue';
  src: url('assets/fonts/ABCWalterNeue-Regular-Trial.otf') format('opentype');
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: 'Walter Neue Light';
  src: url('assets/fonts/ABCWalterNeue-Light-Trial.otf') format('opentype');
  font-style: normal;
  font-weight: 300;
  font-display: block;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

img, video {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

::selection {
  background: transparent;
}

::-moz-selection {
  background: transparent;
}

body {
  background: #f5f5f3;
  overflow-x: clip;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
}

/* Shared edge alignment: logo, menu panel, and mosaic media all use --edge.
   Single source of truth — change here to move everything together. */
:root {
  --edge: calc(clamp(12px, 3.2vw, 52px) + 12px);
}

/* ── Mosaic ───────────────────────────────────────────── */

/*
  2-column grid. Rows size to content (grid-auto-rows: auto).
  align-items: start → cells shrink-wrap their image; no stretching.
  gap: 1px           → hairline separator between cells.
  Images: width 100%, height auto → preserves ratio, no crop.
*/

/* Crazy: 3 cols on desktop, 2 on mobile. Wide cells (~22%) span 2 cols
   creating full-width heroes on mobile, 2/3 width on desktop. Uses
   default row flow (not dense) so wide cells leave intentional white
   spaces in the rhythm. */
#mosaic, .mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  align-items: start;
  gap: 1px;
  background: #f5f5f3;
}

/* Blob engine: wrappers are transparent to the grid; children tile like before */
.mosaic-blob {
  display: contents;
}

/* Full-width intentional pause between editorial blocks (projects / MIX) */
.mosaic-breather {
  grid-column: 1 / -1;
  min-height: 4vw;
  pointer-events: none;
  background: #f5f5f3;
}

/* Visible immediately — per-image fade still uses .mosaic-media opacity */
#mosaic {
  opacity: 1;
}

.mosaic-cell {
  position: relative;
  background: #f5f5f3;
  overflow: visible;
}

/* Wide cells: span 2 columns. Hero shots that break the rhythm. */
.mosaic-cell.is-wide {
  grid-column: span 2;
}

/* Edge margins use --edge so logo, menu, and media share the same alignment. */
.mosaic-cell > img,
.mosaic-cell > video {
  display: block;
  width: calc(100% - 2 * var(--edge));
  margin-left: var(--edge);
  margin-right: var(--edge);
  margin-top: clamp(9px, 1.35vw, 23px);
  margin-bottom: clamp(9px, 1.35vw, 23px);
  height: auto;
}

.mosaic-cell .mosaic-media {
  opacity: 0;
  transition: opacity 500ms cubic-bezier(0.25, 0, 0.2, 1);
}

.mosaic-cell .mosaic-media.is-loaded {
  opacity: 1;
}

/* Wide/cinematic strip — decorative extra element inside a cell. */
.wide-strip {
  display: block;
  width: calc(100% - 2 * var(--edge));
  margin-left: var(--edge);
  margin-right: var(--edge);
  margin-top: clamp(18px, 2.7vw, 46px);
  margin-bottom: clamp(18px, 2.7vw, 46px);
  overflow: hidden;
  position: relative;
}

.wide-strip img {
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: auto;
  margin: 0;             /* override .mosaic-cell img margins → no horizontal shift */
  transform: translateY(-50%);
}

/* No hover effects */
.mosaic-label {
  display: none;
}

#contact-trigger {
  position: fixed;
  top: 14px;
  left: var(--edge);
  z-index: 140;
  border: 0;
  background: transparent;
  color: #111;
  overflow: visible;
  padding: 6px 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 1120ms cubic-bezier(0.25, 0, 0.2, 1);
}

#contact-trigger img {
  display: block;
  height: clamp(1.1rem, 2.2vw, 1.7rem);
  width: auto;
}

#contact-trigger span {
  font-family: 'Walter Neue', sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  letter-spacing: 0.03em;
  line-height: 1;
}

#frame-fade {
  position: fixed;
  inset: 0;
  background: #f5f5f3;
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition: opacity 420ms ease-out;
}

#contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  background: #f5f5f3;
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.25, 0, 0.2, 1);
}

#contact-overlay.is-open {
  pointer-events: auto;
  opacity: 1;
}

#contact-panel {
  --menu-gap: 6px;
  /* Moves only the menu titles closer to the viewport edge (logo stays put). */
  --menu-shift: 0px;
  position: absolute;
  top: 60px;
  left: var(--edge);
  width: calc(100% - (2 * var(--edge)));
  max-width: 760px;
  max-height: calc(100dvh - 20px);
  overflow-y: hidden;
  overflow-x: visible;
  /* top padding matches menu title spacing (see .contact-accordion gap) */
  padding: var(--menu-gap) 0 clamp(20px, 3vh, 28px) 0;
  color: #111;
  font-family: 'Walter Neue Light', sans-serif;
  text-transform: uppercase;
  opacity: 0;
  outline: none;
  transition: opacity 560ms cubic-bezier(0.25, 0, 0.2, 1);
}

#contact-panel,
#contact-panel * {
  -webkit-user-select: text;
  user-select: text;
}

#contact-overlay.is-open #contact-panel {
  opacity: 1;
}

.contact-accordion {
  display: grid;
  gap: var(--menu-gap);
}

.contact-section {
  padding-top: 0;
}

.contact-section-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: #111;
  text-align: left;
  font-family: 'Walter Neue Light', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(1.06rem, 1.9vw, 1.5rem);
  line-height: 1.1;
  padding: 2px 0;
  cursor: pointer;
}

.contact-section.is-open .contact-section-toggle {
  display: none;
}

.contact-section-content {
  display: grid;
  grid-template-rows: 0fr;
  pointer-events: none;
}

.contact-section-inner {
  min-height: 0;
  overflow: hidden;
}

.contact-section.is-open .contact-section-content {
  grid-template-rows: 1fr;
  pointer-events: auto;
  margin-top: 6px;
  margin-bottom: 6px;
}


/* Mobile: 2 cols + alternating lane weights (blob rhythm toggles in JS). */
@media (max-width: 600px) {
  :root {
    --edge: calc(clamp(10px, 3.2vw, 44px) + 3px);
  }

  /* Mobile: bring menu titles a bit closer to the edge (logo stays put) */
  #contact-panel {
    --menu-shift: 0px;
  }

  #mosaic, .mosaic-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #mosaic[data-mosaic-rhythm="a"],
  .mosaic-grid[data-mosaic-rhythm="a"] {
    grid-template-columns: 1.18fr 0.82fr;
  }

  #mosaic[data-mosaic-rhythm="b"],
  .mosaic-grid[data-mosaic-rhythm="b"] {
    grid-template-columns: 0.82fr 1.18fr;
  }
}

/* Desktop / tablet: subtle lane bias so rhythm isn’t only “mobile tricks” */
@media (min-width: 601px) and (max-width: 1100px) {
  #mosaic[data-mosaic-rhythm="a"],
  .mosaic-grid[data-mosaic-rhythm="a"] {
    grid-template-columns: 1.04fr 0.96fr 0.96fr;
  }

  #mosaic[data-mosaic-rhythm="b"],
  .mosaic-grid[data-mosaic-rhythm="b"] {
    grid-template-columns: 0.96fr 1.04fr 0.96fr;
  }
}

.contact-section-content p,
.contact-section-content a {
  font-family: 'Walter Neue Light', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.35;
}

.contact-section-content p {
  text-wrap: balance;
}

.contact-section-content p + p {
  margin-top: 12px;
}

.contact-link {
  color: #111;
  text-decoration: none;
  display: block;
  text-transform: none;
  letter-spacing: 0;
}

.contact-link:hover {
  text-decoration: underline;
}
