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

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

/* ── 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.
*/

#mosaic, .mosaic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
  align-items: start;
  gap: 1px;
  background: #f5f5f3;
}

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

/* Offset right column — breathing space around smaller photos. */
.mosaic-grid > .mosaic-cell:nth-child(even),
#mosaic > .mosaic-cell:nth-child(even) {
  transform: translateY(-30%);
}

/* Same margins for images and videos, with stable vertical rhythm and no crop. */
.mosaic-cell img,
.mosaic-cell video {
  display: block;
  width: calc(100% - 20% - 10px);
  margin-left: calc(10% + 5px);
  margin-right: calc(10% + 5px);
  margin-top: clamp(9px, 1.35vw, 23px);
  margin-bottom: clamp(9px, 1.35vw, 23px);
  height: auto;
}

.mosaic-cell img {
  transition: opacity 200ms ease;
}

/* Wide/cinematic strip — decorative extra element inside a cell */
img.wide-strip {
  display: block;
  width: calc(100% - 20% - 10px);
  margin-left: calc(10% + 5px);
  margin-right: calc(10% + 5px);
  margin-top: clamp(18px, 2.7vw, 46px);
  margin-bottom: clamp(18px, 2.7vw, 46px);
  object-fit: cover;
  object-position: center;
}

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

#contact-trigger {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 140;
  border: 0;
  background: transparent;
  color: #111;
  font-family: 'Walter Neue', sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 400ms ease;
}

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

#contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  background: #fff;
  opacity: 0;
  transition: opacity 400ms ease;
}

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

#contact-panel {
  position: absolute;
  top: 60px;
  left: 14px;
  width: min(92vw, 760px);
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 20px);
  overflow-y: hidden;
  padding: clamp(10px, 1.5vw, 14px) 0 clamp(20px, 3vh, 28px) 0;
  color: #111;
  font-family: 'Walter Neue Light', sans-serif;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 400ms ease;
}

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

.contact-accordion {
  display: grid;
  gap: 10px;
}

.contact-section {
  border-top: 1px solid #111;
  padding-top: 8px;
}

.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(1rem, 1.5vw, 1.2rem);
  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;
  opacity: 0;
  transition: grid-template-rows 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease;
}

.contact-section-inner {
  overflow: hidden;
}

.contact-section.is-open .contact-section-content {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 8px;
}

@media (max-width: 720px) {
  #contact-panel {
    left: 14px;
    right: 14px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 14px);
  }
}

@media (max-width: 600px) {
  html, body {
    overflow: hidden;
    height: 100dvh;
  }

  #site-shell {
    overflow-x: scroll;
    overflow-y: hidden;
    width: 100vw;
    height: 100dvh;
    scrollbar-width: none;
  }

  #site-shell::-webkit-scrollbar {
    display: none;
  }

  #mosaic, .mosaic-grid {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    row-gap: 1px;
  }

  .mobile-row {
    display: flex;
    flex-direction: row;
    flex: 1;
    width: max-content;
    column-gap: 1px;
  }

  .mobile-row-top {
    padding-top: 60px;
  }

  .mobile-row-bottom {
    padding-left: 25vw;
  }

  .mosaic-cell {
    flex-shrink: 0;
    min-width: 40vw;
  }

  .mosaic-cell img,
  .mosaic-cell video {
    display: block;
    height: calc(50dvh - clamp(18px, 10dvh, 100px));
    width: auto;
    margin: clamp(9px, 5dvh, 50px) clamp(9px, 1.35vh, 23px);
  }

  /* Top row: shorter images to fit within padding-top, less bottom margin */
  .mobile-row-top .mosaic-cell img,
  .mobile-row-top .mosaic-cell video {
    height: calc(50dvh - clamp(18px, 10dvh, 100px) - 60px);
    margin-bottom: clamp(5px, 1.5dvh, 15px);
  }

  /* Bottom row: less top margin — gap between rows stays proportional */
  .mobile-row-bottom .mosaic-cell img,
  .mobile-row-bottom .mosaic-cell video {
    margin-top: clamp(5px, 1.5dvh, 15px);
  }

  img.wide-strip {
    display: none;
  }

  /* translateY não faz sentido em layout horizontal */
  #mosaic > .mosaic-cell:nth-child(even) {
    transform: none;
  }
}

.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(0.88rem, 1.28vw, 1.03rem);
  line-height: 1.35;
}

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

.contact-link {
  color: #111;
  text-decoration: none;
  display: inline-block;
}

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