*, html {
  margin: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

html, body {
  background: #ffffff;
}

body {
  min-height: 100%;
  height: auto;
  padding: 0;
  overflow: visible;
  background: #ffffff;
  position: relative;
  font-family: var(--font);
  font-variation-settings: "wdth" 100;
}

html.is-info-postal-open {
  overflow: hidden;
  scroll-snap-type: none;
}

:root {
  --gray: #BCBCBC;
  --white: #FFFFFF;
  --black: #000000;
  --font: "instrument-sans-variable", sans-serif;
  --right-col: 54%;
  --font-services: clamp(28px, 3.4vw, 42px);
  --font-medium: clamp(20px, 2.5vw, 30px);
  --font-info: clamp(15px, 1.35vw, 18px);
}

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

.intro {
  position: relative;
  height: 100dvh;
  padding: 14px 18px;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.logo-container,
.services li,
.menu-btn,
.next-section {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.logo-container.is-visible,
.services li.is-visible,
.menu-btn.is-visible,
.next-section.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.next-section.is-away {
  opacity: 0;
  pointer-events: none;
}

.intro canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  filter: blur(32px);
  pointer-events: none;
}

.logo-container {
  position: relative;
  z-index: 2;
  mix-blend-mode: difference;
}

.logo-container img {
  filter: invert(1);
  width: 168px;
  height: auto;
}

.services {
  position: absolute;
  left: var(--right-col);
  top: 14px;
  z-index: 2;
  list-style: none;
  margin: 0;
  padding: 0;
  mix-blend-mode: difference;
}

.services li {
  font-family: var(--font);
  font-size: var(--font-services);
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.07em;
  color: #ffffff;
  white-space: nowrap;
  cursor: pointer;
}

.next-section {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 3;
  width: calc(44px * 0.9);
  height: calc(44px * 0.9);
}

.next-section svg,
.next-section img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.next-section img {
  transform: rotate(90deg);
}

.work-section {
  position: relative;
  z-index: 1;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  padding: 14px 18px;
  background: #ffffff;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.info-section {
  position: relative;
  z-index: 1;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  padding: 14px 18px;
  background: #ffffff;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.info-section h2,
.work-section .portfolio h2,
.contact-section h2 {
  margin: 0;
  font-size: var(--font-services);
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.07em;
}

.info-text {
  position: relative;
  z-index: 2;
  width: min(42vw, 540px);
  margin-top: 32px;
  pointer-events: none;
  font-family: var(--font);
  font-variation-settings: "wdth" 100;
  font-size: var(--font-info);
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.07em;
}

.info-kicker {
  margin: 1em 0 0.4em;
  font-weight: 500;
  line-height: 115%;
  letter-spacing: -0.07em;
  /* text-transform: uppercase; */
  font-size: var(--font-services);
}

.info-kicker:first-child {
  margin-top: 50px;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.1em;
  align-items: start;
  font-size: 1.3em;
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.05em;
  margin-bottom: 0.5em;
}

.info-skills {
  margin: 0;
  font-size: 1.3em;
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.05em;
}

.info-line {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.info-line.is-in {
  opacity: 1;
  transform: none;
}

.info-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.info-piece {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  opacity: 0;
  filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.18));
  will-change: transform, left, top, width;
}

.info-piece.is-dragging {
  cursor: grabbing;
  z-index: 12;
  transition: none;
}

.info-piece[data-id="calco"] {
  left: 46%;
  top: 16%;
  width: min(13vw, 180px);
  z-index: 2;
}

.info-piece[data-id="foto"] {
  left: 55%;
  top: 27%;
  width: min(12vw, 170px);
  z-index: 4;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.16);
  filter: none;
}

.info-piece[data-id="clip"] {
  left: 63%;
  top: 19%;
  width: 30px;
  z-index: 7;
}

.info-piece[data-id="maquina"] {
  left: 39%;
  top: 46%;
  width: min(30vw, 430px);
  z-index: 6;
}

.info-piece[data-id="postal"] {
  left: 63%;
  top: 15%;
  width: min(27vw, 400px);
  z-index: 3;
  cursor: pointer;
  perspective: 1400px;
  filter: none;
}

.info-piece[data-id="raton"] {
  left: 82%;
  top: 54%;
  width: min(15vw, 150px);
  z-index: 5;
}

.info-piece img,
.info-postal-card img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.info-postal-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0.05, 0.2, 1);
}

.info-postal-front,
.info-postal-back {
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.16);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.info-postal-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotateY(180deg);
}

.info-postal.is-flipped .info-postal-card {
  transform: rotateY(180deg);
}

.info-postal.is-beckoning .info-postal-card {
  transform-origin: 50% 50%;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .info-postal.is-beckoning .info-postal-card {
    animation: none;
  }
}

.info-postal.is-open {
  z-index: 40;
  cursor: pointer;
}

.info-shade {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

body.is-info-postal-open .info-shade {
  opacity: 0.72;
  pointer-events: auto;
}

.info-section .next-section {
  z-index: 8;
  opacity: 1;
  pointer-events: auto;
}

.info-section .next-section.is-away,
.work-section .next-section.is-away {
  opacity: 0;
  pointer-events: none;
}

.work-section .next-section {
  z-index: 8;
  opacity: 1;
  pointer-events: auto;
}

.portfolio {
  height: 100%;
  min-height: 0;
}

.work-titles {
  position: absolute;
  left: 40%;
  right: 18px;
  top: 14px;
  font-size: var(--font-services);
  padding-right: 2.8em;
}

.work-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.2em;
}

.work-titles a {
  display: block;
  min-width: 0;
  color: var(--gray);
  font-family: var(--font);
  font-size: var(--font-services);
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.07em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.5s ease;
}

.work-year {
  flex-shrink: 0;
  color: var(--gray);
  font-family: var(--font);
  font-size: var(--font-services);
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.07em;
  white-space: nowrap;
  transition: color 0.5s ease;
}

.work-preview {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 2;
  width: min(32vw, 460px);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.work-preview.is-visible {
  opacity: 1;
}

.work-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.contact-section {
  position: relative;
  z-index: 1;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  padding: 14px 18px;
  background: #ffffff;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.contact-section h2 {
  position: relative;
  z-index: 2;
}

.contact-photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  height: 88dvh;
  transform: translate(-50%, 112%);
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.contact-section.is-in .contact-photo {
  transform: translate(-50%, 8%);
}

.contact-photo-inner {
  position: relative;
  height: 100%;
  transform-origin: 52% 28%;
}

.contact-photo img {
  display: block;
  height: 100%;
  width: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.18s ease;
}

.contact-photo-surprised {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  opacity: 0;
}

.contact-photo.is-bothered .contact-photo-idle {
  opacity: 0;
}

.contact-photo.is-bothered .contact-photo-surprised {
  opacity: 1;
}

.contact-photo.is-bothered .contact-photo-inner {
  animation: contact-bother 0.55s ease-in-out forwards;
}

@keyframes contact-bother {
  0% { transform: rotate(0deg); }
  18% { transform: rotate(-7deg); }
  36% { transform: rotate(8deg); }
  54% { transform: rotate(-5deg); }
  72% { transform: rotate(4deg); }
  100% { transform: rotate(-1.5deg); }
}

.contact-line {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#contact-question {
  line-height: 100%;
}

.contact-line.is-in {
  opacity: 1;
  transform: none;
}

.contact-copy {
  position: absolute;
  left: 18px;
  top: 24%;
  z-index: 2;
  width: min(34vw, 430px);
}

.contact-copy h3,
.contact-form h3 {
  margin: 0;
  font-size: var(--font-services);
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.07em;
}

.contact-copy p {
  margin: 0.85em 0 0;
  font-size: var(--font-info);
  font-weight: 450;
  line-height: 130%;
  letter-spacing: -0.04em;
}

.contact-form {
  position: absolute;
  right: 18px;
  top: 24%;
  z-index: 2;
  width: min(32vw, 500px);
}

#contact-form-title {
  font-size: var(--font-medium);
}

.contact-trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-field {
  display: block;
  margin-top: 0.9em;
}

.contact-check {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 1.05em;
  font-size: var(--font-info);
  font-weight: 450;
  letter-spacing: -0.04em;
  line-height: 115%;
  color: var(--black);
  cursor: pointer;
}

.contact-check input {
  width: 0.85em;
  height: 0.85em;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--black);
  cursor: pointer;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--black);
  border-radius: 0;
  padding: 0.12em 0 0.28em;
  font-family: var(--font);
  font-variation-settings: "wdth" 100;
  font-size: var(--font-medium);
  font-weight: 450;
  letter-spacing: -0.07em;
  line-height: 115%;
  background: transparent;
  color: var(--black);
  outline: none;
  box-shadow: none;
  appearance: none;
}

.contact-field textarea {
  display: block;
  min-height: 2.4em;
  resize: none;
  overflow: auto;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--gray);
  opacity: 1;
  font-weight: 400;
}

.contact-submit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 100%;
  margin-top: 1.05em;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--font);
  font-variation-settings: "wdth" 100;
  font-size: var(--font-medium);
  font-weight: 450;
  letter-spacing: -0.07em;
  line-height: 115%;
  color: var(--black);
  cursor: pointer;
}

.contact-submit svg {
  width: 0.78em;
  height: 0.78em;
  flex-shrink: 0;
}

.contact-form.is-sending .contact-submit {
  opacity: 0.4;
  pointer-events: none;
}

.contact-status {
  min-height: 1.2em;
  margin: 0.7em 0 0;
  font-size: var(--font-info);
  font-weight: 450;
  letter-spacing: -0.04em;
  line-height: 125%;
  color: var(--black);
}

.contact-status.is-error {
  color: var(--gray);
}

.contact-details {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 2;
}

.contact-social {
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 2;
  text-align: right;
  display: flex;
  flex-direction: row;
  gap: 100px;
}

.contact-link {
  display: block;
  color: var(--black);
  font-family: var(--font);
  font-size: var(--font-medium);
  font-weight: 450;
  line-height: 115%;
  letter-spacing: -0.07em;
  text-decoration: none;
}

.contact-social-link {
  /* font-size: clamp(16px, 1.5vw, 20px); */
  letter-spacing: -0.05em;
}

@media (hover: hover) {
  .work-titles a:hover,
  .work-row:hover a,
  .work-row:hover .work-year {
    color: var(--black);
  }
}

@media (max-width: 900px) {
  :root {
    --font-services: clamp(22px, 6.4vw, 32px);
    --font-medium: clamp(18px, 5.2vw, 26px);
    --font-info: clamp(14px, 3.8vw, 16px);
  }

  .intro,
  .info-section,
  .work-section,
  .contact-section {
    height: 100dvh;
    min-height: 100dvh;
    padding: 14px 16px;
  }

  .logo-container img {
    width: 120px;
  }

  .services,
  .work-titles {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
    max-width: none;
    padding-right: 0;
  }

  .info-text {
    width: min(92vw, 420px);
    margin-top: 6px;
    font-size: var(--font-info);
  }

  .info-section h2 {
    font-size: var(--font-services);
  }

  .info-kicker {
    font-size: clamp(18px, 5.2vw, 24px);
  }

  .info-kicker:first-child {
    margin-top: 12px;
  }

  .info-row,
  .info-skills {
    font-size: 1.18em;
  }

  .info-stage {
    top: 28%;
  }

  .info-piece[data-id="calco"] { left: 40%; top: 44%; width: min(32vw, 150px); }
  .info-piece[data-id="foto"] { left: 56%; top: 50%; width: min(16vw, 82px); }
  .info-piece[data-id="clip"] { left: 61%; top: 42%; width: 16px; }
  .info-piece[data-id="maquina"] { left: 26%; top: 66%; width: min(44vw, 200px); }
  .info-piece[data-id="postal"] { left: 50%; top: 46%; width: min(34vw, 160px); }
  .info-piece[data-id="raton"] { left: 72%; top: 70%; width: min(14vw, 70px); }

  .services li,
  .work-titles a {
    white-space: normal;
  }

  .next-section {
    right: 16px;
    bottom: 14px;
  }

  .work-preview {
    display: none;
  }

  .portfolio {
    height: 100%;
    min-height: 0;
  }

  .contact-photo {
    height: 58dvh;
  }

  .contact-section.is-in .contact-photo {
    transform: translate(-50%, 12%);
  }

  .contact-copy {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    margin-top: 10px;
  }

  .contact-form {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    margin-top: 18px;
  }

  .contact-details {
    left: 16px;
  }

  .contact-social {
    right: 16px;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
  }

  .contact-social-link {
    font-size: clamp(14px, 3.8vw, 18px);
  }
}
