:root {
  --background: #f8f4e4;
  --brown: #453031;
  --red: #c72842;
  --black: #2a2119;
  --work-bg: #f5e8dd;
  --font-sans: "DM Sans", sans-serif;
  --font-serif: "Crimson Pro", serif;
  --reveal-transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --reveal-transition: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--brown);
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

/* Scroll reveal */

main > section,
.cards__row,
.work-card,
.case-block,
.case-image,
.case-framed,
.about__photo-wrap,
.about__content,
.project-cover,
.contact__form,
.contact__links,
.contact__links-col {
  opacity: 0;
  transform: translateY(2rem);
  transition: var(--reveal-transition);
}

main > section.is-visible,
.cards__row.is-visible,
.work-card.is-visible,
.case-block.is-visible,
.case-image.is-visible,
.case-framed.is-visible,
.about__photo-wrap.is-visible,
.about__content.is-visible,
.contact__form.is-visible,
.contact__links.is-visible,
.contact__links-col.is-visible {
  opacity: 1;
  transform: none;
}

.project-cover.is-visible {
  opacity: 0.82;
  transform: none;
}

.accent {
  color: var(--red);
}

.accent-text {
  color: var(--red);
}

.eyebrow {
  font-size: 1.5rem;
  font-weight: 500;
  text-align: center;
  color: var(--brown);
  margin: 0;
}

.eyebrow--dark {
  color: var(--brown);
}

.eyebrow--left {
  text-align: left;
}

/* Navigation */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 1.75rem clamp(1.5rem, 6vw, 6.25rem);
  background: rgba(248, 244, 228, var(--nav-opacity, 0));
  backdrop-filter: blur(calc(var(--nav-opacity, 0) * 12px));
  -webkit-backdrop-filter: blur(calc(var(--nav-opacity, 0) * 12px));
  box-shadow: 0 1px 0 rgba(69, 48, 49, calc(var(--nav-opacity, 0) * 0.08));
  transition: background 0.15s ease;
  pointer-events: none;
}

.nav__container {
  pointer-events: auto;
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav__container a {
  font-weight: 500;
}

.nav__container a:hover {
  color: var(--red);
}

.nav__container--project {
  justify-content: space-between;
  align-items: center;
}

.nav__mark img {
  height: 1.75rem;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--brown);
  cursor: pointer;
}

.nav__toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 40rem) {
  .nav--project .nav__toggle {
    display: flex;
  }

  .nav--project .nav__links {
    position: absolute;
    top: 100%;
    right: clamp(1.5rem, 6vw, 6.25rem);
    margin-top: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--background);
    border: 1px solid rgba(69, 48, 49, 0.15);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 12px 32px rgba(69, 48, 49, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0.2s ease;
  }

  .nav--project .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  overflow: clip;
  min-height: 100vh;
}

.hero__glow {
  position: absolute;
  inset: -30% -20%;
  z-index: 0;
  background:
    radial-gradient(
      45% 45% at 30% 30%,
      rgba(199, 40, 66, 0.35),
      transparent 70%
    ),
    radial-gradient(
      40% 40% at 70% 60%,
      rgba(229, 232, 246, 0.6),
      transparent 70%
    ),
    radial-gradient(
      50% 50% at 50% 90%,
      rgba(255, 214, 170, 0.45),
      transparent 70%
    );
  filter: blur(40px);
  pointer-events: none;
}

.hero__logo {
  position: relative;
  z-index: 1;
  width: min(53rem, 90vw);
}

.hero__tagline {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.0625rem;
  color: var(--brown);
  font-size: 1.5rem;
}

.hero__badge {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  min-height: 3.625rem;
  min-width: 100px;
  padding: 0.625rem;
  background: #fff;
  border: 1px solid var(--red);
  color: var(--brown);
}

.hero__badge-dot {
  position: absolute;
  width: 0.589rem;
  height: 0.564rem;
  background: var(--red);
  border: 1px solid var(--red);
}

.hero__badge-dot--tl {
  left: -0.3125rem;
  top: -0.25rem;
}

.hero__badge-dot--bl {
  left: -0.3125rem;
  bottom: -0.3125rem;
}

.hero__badge-dot--br {
  right: -0.34rem;
  bottom: -0.3125rem;
}

.hero__badge-dot--tr {
  right: -0.34rem;
  top: -0.375rem;
}

.hero__badge-text {
  white-space: nowrap;
}

.hero__badge-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 0.15rem;
  background: var(--red);
  animation: badge-cursor-blink 1s step-end infinite;
}

@keyframes badge-cursor-blink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__badge-cursor {
    animation: none;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Services */

.services {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  padding: 5rem clamp(1.5rem, 7vw, 7.5rem);
  text-align: center;
  overflow: clip;
}

.services__heading {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 52rem;
}

.services__intro {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  margin: 0;
  letter-spacing: -0.02em;
}

.star {
  color: var(--red);
  font-size: 2.25rem;
  line-height: 1;
}

.star--lg {
  font-size: clamp(4rem, 9vw, 8.75rem);
}

.marquee {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  color: rgba(69, 48, 49, 0.11);
  font-style: italic;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 22s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation-play-state: paused;
  }
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.marquee__phrase {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  padding-right: clamp(2rem, 6vw, 5rem);
}

.mq-cap {
  font-family: "MonteCarlo", cursive;
  font-size: clamp(4.5rem, 13.5vw, 12.5rem);
  letter-spacing: 0.03em;
  margin-left: clamp(2rem, 6vw, 5rem);
}

.mq-cap:first-child {
  margin-left: 0;
}

.mq-word {
  font-family: "Montaga", serif;
  font-size: clamp(3rem, 9vw, 8.75rem);
  letter-spacing: -0.05em;
}

.cards {
  width: 100%;
  max-width: 63rem;
}

.cards__row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 7.5rem;
  align-items: center;
  text-align: left;
  padding: 2.75rem 0.75rem;
  border-bottom: 1px solid var(--red);
}

.cards__row--last {
  border-bottom: none;
}

.cards__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0;
  flex: 0 0 auto;
  width: min(24.5rem, 100%);
}

.cards__body {
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cards__body p {
  margin: 0;
  font-size: 1rem;
}

.cards__body .star {
  font-size: 2.25rem;
}

/* Work / Projects */

.work {
  background: var(--work-bg);
  padding: 5.5rem clamp(1.5rem, 7vw, 7.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}

.work__heading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  width: 100%;
}

.work__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 4.25rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 3.25rem 5rem;
  width: 100%;
  max-width: 75rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work-card__thumb {
  border-radius: 1.125rem;
  overflow: clip;
  height: 17.75rem;
  opacity: 0.82;
  position: relative;
}

.work-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -93px 59.5px 0 rgba(0, 0, 0, 0.58);
}

.work-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.work-card__category {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

.work-card__name {
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.work-card__arrow {
  width: 2.375rem;
  height: 2.375rem;
  flex-shrink: 0;
}

/* About */

.about {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(2rem, 6vw, 6.25rem);
  padding: 5.5rem clamp(1.5rem, 7vw, 7.5rem);
}

.about__photo-wrap {
  position: relative;
  flex: 0 0 auto;
  width: min(21.875rem, 100%);
}

.about__photo {
  aspect-ratio: 350 / 507;
  border-radius: 20rem;
  overflow: clip;
  opacity: 0.82;
  background: linear-gradient(180deg, rgba(150, 0, 25, 0.2), transparent);
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  filter: grayscale(1);
  mix-blend-mode: luminosity;
}

.about__content {
  flex: 1 1 24rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.5rem;
}

.about__body p {
  margin: 0;
}

.star--about {
  display: none;
  position: absolute;
  left: 0;
  top: 80%;
  transform: translate(-50%, -50%);
  font-size: clamp(6rem, 9vw, 10rem);
}

@media (min-width: 60rem) {
  .star--about {
    display: block;
  }
}

/* Contact */

.contact {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: 3rem;
  padding: 5rem clamp(1.5rem, 7vw, 7.5rem);
}

.contact__glow {
  position: absolute;
  inset: -25% -10%;
  z-index: 0;
  background:
    radial-gradient(
      45% 45% at 70% 30%,
      rgba(199, 40, 66, 0.2),
      transparent 70%
    ),
    radial-gradient(
      40% 40% at 30% 70%,
      rgba(229, 232, 246, 0.35),
      transparent 70%
    );
  filter: blur(40px);
  pointer-events: none;
}

.contact__form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 30rem;
}

.contact__form .eyebrow {
  text-align: left;
}

.contact__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 4.25rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-weight: 500;
}

.field--grow {
  flex: 1;
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--brown);
  background: var(--background);
  border: 1px solid rgba(69, 48, 49, 0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.field textarea {
  min-height: 6rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.contact__form button {
  font-family: inherit;
  font-weight: 500;
  font-size: 1rem;
  color: var(--background);
  background: var(--red);
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.contact__form button:hover {
  opacity: 0.9;
}

.contact__links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0.75rem;
  border-bottom: 1px solid var(--red);
}

.contact-card > div {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-card img:not(.contact-card__arrow) {
  width: 2.875rem;
  height: 2.875rem;
  flex-shrink: 0;
}

.contact-card__label {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.contact-card__value {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card__arrow {
  width: 2.9375rem;
  height: 2.875rem;
  flex-shrink: 0;
}

.star--contact {
  display: none;
  position: absolute;
  right: 8%;
  top: 10%;
  font-size: 8.75rem;
}

@media (min-width: 75rem) {
  .star--contact {
    display: block;
  }
}

.contact__links-col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
}

.contact__star {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

/* Project page: hero */

.project-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 8rem clamp(1.5rem, 7vw, 7.5rem) 0;
  overflow: clip;
}

.project-hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-hero__heading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-hero__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.project-hero__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem 6.25rem;
  align-items: flex-start;
}

.project-hero__intro {
  flex: 1 1 24rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-hero__intro p {
  font-size: 1.5rem;
  margin: 0;
}

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-badge {
  display: inline-flex;
  align-self: flex-start;
  border: 1px solid var(--red);
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.125rem;
}

.project-meta {
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 1.75rem 4.5rem;
  margin: 0;
}

.project-meta dt {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
}

.project-meta dd {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.project-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1440 / 613;
  border-radius: 1.125rem;
  overflow: clip;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -93px 59.5px 0 rgba(0, 0, 0, 0.8);
}

.project-cover--light::after {
  box-shadow: inset 0 -93px 59.5px 0 rgba(215, 219, 226, 0.37);
}

/* Project page: case study */

.case {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6.25rem;
  padding: 5rem clamp(1.5rem, 7vw, 7.5rem) 8rem;
}

.case > * {
  width: 100%;
  max-width: 75rem;
}

.case-block {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 63.25rem;
}

.case-block--center {
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.case-block--intro {
  padding-bottom: 2rem;
}

.case-block--flex {
  flex: 1 1 20rem;
  max-width: none;
}

.case-block__heading {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.case-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.25rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.case-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.5rem;
}

.case-body p {
  margin: 0;
}

.case-body--center {
  align-items: center;
}

.case-image {
  position: relative;
  border-radius: 1.125rem;
  overflow: clip;
}

.case-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-image--wide {
  aspect-ratio: 4096 / 1505;
}

.case-image--design,
.case-image--palette,
.case-image--chat {
  border-radius: 0;
}

.case-split {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem 6.25rem;
  align-items: flex-start;
}

.case-split--end {
  align-items: flex-end;
}

.case-image--split {
  flex: 1 1 20rem;
  max-width: 40.0625rem;
  aspect-ratio: 641 / 563;
}

.case-image--design {
  aspect-ratio: 1536 / 1024;
}

.case-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 4rem 6.25rem;
  align-items: flex-start;
  justify-content: center;
}

.case-image--palette {
  flex: 3 1 30rem;
  max-width: 53.5625rem;
  aspect-ratio: 857 / 558;
}

.case-image--chat {
  flex: 1 1 12rem;
  max-width: 15.625rem;
  aspect-ratio: 250 / 558;
}

.case-image--benchmark {
  aspect-ratio: 2745 / 1020;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.case-image--architecture {
  flex: 1 1 20rem;
  max-width: 37.75rem;
  aspect-ratio: 604 / 433;
}

.case-image--data-wide {
  aspect-ratio: 4096 / 2455;
}

.case-image--data-fixed {
  max-width: 68rem;
  aspect-ratio: 1088 / 570;
  margin: 0 auto;
}

.case-image--semantica {
  max-width: 59.25rem;
  aspect-ratio: 948 / 531;
  margin: 0 auto;
  border: 1px solid rgba(69, 48, 49, 0.1);
}

.case-image--componentes {
  flex: 1 1 20rem;
  max-width: 31.125rem;
  aspect-ratio: 498 / 359;
  border: 1px solid rgba(69, 48, 49, 0.1);
}

.case-image--aplicacao {
  max-width: 55.25rem;
  aspect-ratio: 884 / 432;
  margin: 0 auto;
}

.case-image--sitemap {
  aspect-ratio: 4096 / 1035;
  border-radius: 0;
}

.case-image--prototipacao {
  max-width: 50.625rem;
  aspect-ratio: 810 / 742.5;
  margin: 0 auto;
}

.case-framed {
  flex: 1 1 20rem;
  max-width: 34.5rem;
  aspect-ratio: 552 / 595;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fefff6;
  border-radius: 1.125rem;
  overflow: clip;
  padding: 1.125rem 0;
}

.case-framed img {
  width: 100%;
  height: auto;
  aspect-ratio: 813 / 500;
  object-fit: cover;
}

/* Project page: related work */

.work--related {
  background: rgba(245, 232, 221, 0.6);
}

.work--related-strong {
  background: rgba(245, 232, 221, 0.8);
}

/* Footer */

footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.875rem;
  color: rgba(69, 48, 49, 0.6);
}

/* Back to top */

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: var(--red);
  color: var(--background);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease,
    background 0.15s ease;
}

.back-to-top:hover {
  background: var(--brown);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
}
