/* Decorative layers remain beneath the content and never capture clicks. */
#solucoes .solution {
  position: relative;
}
#solucoes .solution::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid #ffe66a;
  border-radius: 17px;
  box-shadow: 0 0 8px rgba(255,230,106,.9),
    0 0 22px rgba(255,212,45,.55),
    0 0 40px rgba(255,200,25,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
@media (hover: hover) and (pointer: fine) {
  #solucoes .solution:hover::after { opacity: 1; }
}
#solucoes .solution:focus-within::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  #solucoes .solution::after { transition: none; }
}
#solucoes { background-color: #080b0a; }
#solucoes > .container > .section-heading .eyebrow { color: #ead39f; }
#solucoes > .container > .section-heading h2 { color: #fff; }
.solutions-building {
  position: absolute;
  inset: 0 0 auto;
  height: min(100%, 1050px);
  z-index: -1;
  pointer-events: none;
  opacity: var(--building-opacity, 1);
  background-image:
    linear-gradient(180deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.48) 32%, rgba(0,0,0,.82) 70%, #080b0a 100%),
    url("assets/predio-iluminado.webp");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
@media (max-width: 700px) {
  .solutions-building { height: 1000px; background-position: 65% top; }
}
@media (prefers-reduced-motion: reduce) {
  .solutions-building { opacity: .65; }
}
.hero, #solucoes, .about {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-inner, #solucoes > .container, .about > .container {
  position: relative;
  z-index: 1;
}
.hero::before, .hero::after, #solucoes::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 200px;
  aspect-ratio: 127 / 448;
  /* Frame the supplied logo's transparent margins without editing the asset. */
  -webkit-mask: url("assets/marca-dagua.png") 50.16% 50.89% / 850.4% 301.34% no-repeat;
  mask: url("assets/marca-dagua.png") 50.16% 50.89% / 850.4% 301.34% no-repeat;
}
.hero::before, .hero::after {
  top: 80px;
  right: 34%;
}
.hero::before {
  background: #fff;
  opacity: .045;
}
/* Rotate only the light, keeping the supplied logo mask perfectly still. */
@property --logo-light-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.hero::after {
  background: conic-gradient(from var(--logo-light-angle) at 50% 50%,
    transparent 0deg 275deg, rgba(197,166,109,.08) 290deg,
    rgba(234,211,159,.6) 325deg, #fff3cd 340deg,
    rgba(234,211,159,.25) 350deg, transparent 360deg);
  opacity: .38;
  animation: logo-contour-light 9s linear infinite;
}
@keyframes logo-contour-light {
  from { --logo-light-angle: 0deg; }
  to { --logo-light-angle: 360deg; }
}
#solucoes::before {
  top: 35px;
  right: 2%;
  width: 230px;
  background: var(--green);
  opacity: .035;
}
.about-watermark {
  position: absolute;
  z-index: 0;
  right: -0.02em;
  bottom: -0.12em;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(140px, 25vw, 380px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .06em;
  color: var(--green);
  opacity: .035;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 700px) {
  .hero::before { top: 200px; right: -35px; width: 170px; opacity: .035; }
  .hero::after { top: 200px; right: -35px; width: 170px; opacity: .25; }
  #solucoes::before { top: 45px; right: -40px; width: 160px; opacity: .025; }
  .about-watermark { font-size: 30vw; bottom: .08em; opacity: .03; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; opacity: 0; }
}

/* Supplied transparent logo, framed without changing the original image. */
.header .brand, .footer-inner .brand {
  position: relative;
  display: block;
  width: 170px;
  height: auto;
  aspect-ratio: 542 / 154;
  background: url("assets/logo-mossi-nome.png") center / contain no-repeat;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.footer-inner .brand { width: 160px; }
@media(max-width:700px) {
  .header .brand { width: 140px; }
  .footer-inner .brand { width: 145px; }
}

/* Keep the two positioning cards aligned and exactly the same size. */
.position .intro-cards {
  align-items: stretch;
}
.position .photo-card {
  display: grid;
  grid-template-rows: 205px minmax(140px, 1fr);
  height: 100%;
}
.position .photo-card img {
  height: 100%;
}
.position .photo-card:first-child img {
  object-position: center 58%;
}
.position .photo-card > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.position .photo-card.offset {
  transform: none;
}

/* A subtle Mossi mark with the same travelling light used in the hero. */
#solucoes::before,
#solucoes::after {
  top: 48px;
  right: 2.5%;
  width: clamp(170px, 14vw, 230px);
}
#solucoes::before {
  background: #fff;
  opacity: .055;
}
#solucoes::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  aspect-ratio: 127 / 448;
  -webkit-mask: url("assets/marca-dagua.png") 50.16% 50.89% / 850.4% 301.34% no-repeat;
  mask: url("assets/marca-dagua.png") 50.16% 50.89% / 850.4% 301.34% no-repeat;
  background: conic-gradient(from var(--logo-light-angle) at 50% 50%,
    transparent 0deg 275deg, rgba(197,166,109,.08) 290deg,
    rgba(234,211,159,.62) 325deg, #fff3cd 340deg,
    rgba(234,211,159,.25) 350deg, transparent 360deg);
  opacity: .34;
  animation: logo-contour-light 9s linear infinite;
}

/* Phones show complete cards in one clean vertical column. */
@media (max-width: 760px) {
  .position .intro-cards {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 450px;
    margin-inline: auto;
  }
  .position .photo-card {
    grid-template-rows: clamp(240px, 78vw, 350px) auto;
    width: 100%;
  }
  .position .photo-card > div {
    min-height: 150px;
    padding: 24px 22px;
  }
  #solucoes .solutions-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  #solucoes .solution {
    width: 100%;
    min-width: 0;
  }
  #solucoes::before,
  #solucoes::after {
    top: 52px;
    right: -30px;
    width: 150px;
  }
  #solucoes::before { opacity: .04; }
  #solucoes::after { opacity: .24; }
}

@media (prefers-reduced-motion: reduce) {
  #solucoes::after { animation: none; opacity: 0; }
}

/* Fixed Mossi symbol: a discreet, illuminated shortcut back to the hero. */
.back-to-top-logo {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: block;
  width: 46px;
  height: 76px;
  background: transparent;
  transition: transform .25s ease, filter .25s ease;
}
.back-to-top-logo::before,
.back-to-top-logo::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 20px;
  height: 70px;
  transform: translateX(-50%);
  pointer-events: none;
  -webkit-mask: url("assets/icone-mossi-topo.png") 50.16% 50.89% / 850.4% 301.34% no-repeat;
  mask: url("assets/icone-mossi-topo.png") 50.16% 50.89% / 850.4% 301.34% no-repeat;
}
.back-to-top-logo::before {
  background: #d4b46f;
  filter: drop-shadow(0 0 4px rgba(212, 180, 111, .35));
}
.back-to-top-logo::after {
  background: linear-gradient(145deg,
    transparent 0 38%, rgba(255, 247, 216, .25) 44%,
    #fff7d8 50%, rgba(255, 231, 169, .45) 56%, transparent 62% 100%);
  background-size: 350% 350%;
  background-position: 100% 100%;
  opacity: 0;
  animation: back-to-top-light 7s ease-in-out infinite;
}
.back-to-top-logo:hover,
.back-to-top-logo:focus-visible {
  transform: translateY(-4px);
  filter: drop-shadow(0 0 8px rgba(212, 180, 111, .5));
}
@keyframes back-to-top-light {
  0%, 68% { background-position: 100% 100%; opacity: 0; }
  72% { opacity: .9; }
  88% { background-position: 0 0; opacity: .9; }
  94%, 100% { background-position: 0 0; opacity: 0; }
}
@media (max-width: 700px) {
  .back-to-top-logo {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 68px;
  }
  .back-to-top-logo::before,
  .back-to-top-logo::after {
    top: 3px;
    width: 18px;
    height: 62px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top-logo::after { animation: none; }
}

/* Square calls to action throughout the site. */
.button {
  border-radius: 0;
  line-height: 1.3;
  text-align: center;
}

/* Keep the final two solution cards centered after removing item 05. */
@media (min-width: 761px) {
  #solucoes .solutions-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #solucoes .solution { grid-column: span 2; }
  #solucoes .solution:nth-child(4) { grid-column: 2 / span 2; }
  #solucoes .solution-cta:last-child { grid-column: 4 / span 2; }
}
#solucoes .solution-cta {
  background: var(--green);
  color: #fff;
}

/* More visible CTA for constructors and developers, within the Mossi palette. */
.banner-copy .banner-gold {
  border: 1px solid rgba(231, 205, 145, .68);
  background: linear-gradient(135deg, #a98443 0%, #d4b46f 48%, #9d7839 100%);
  color: #03231f;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .2);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.banner-copy .banner-gold:hover,
.banner-copy .banner-gold:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 13px 30px rgba(0, 0, 0, .27), 0 0 16px rgba(212, 180, 111, .2);
}

/* Local honeycomb light that follows the cursor without covering content. */
.hero,
.difference {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.difference > .container {
  position: relative;
  z-index: 1;
}
.honeycomb-cursor {
  --honey-x: 50%;
  --honey-y: 50%;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    radial-gradient(circle 95px at var(--honey-x) var(--honey-y), rgba(226, 196, 126, .13), transparent 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='62' viewBox='0 0 72 62'%3E%3Cg fill='none' stroke='%23d4b46f' stroke-opacity='.58' stroke-width='1'%3E%3Cpath d='M18 1 35 11v20L18 41 1 31V11Z'/%3E%3Cpath d='m54 21 17 10v20L54 61 37 51V31Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 72px 62px;
  -webkit-mask-image: radial-gradient(circle 145px at var(--honey-x) var(--honey-y), #000 0 43%, rgba(0,0,0,.72) 62%, transparent 100%);
  mask-image: radial-gradient(circle 145px at var(--honey-x) var(--honey-y), #000 0 43%, rgba(0,0,0,.72) 62%, transparent 100%);
  filter: drop-shadow(0 0 5px rgba(226, 196, 126, .3));
  transition: opacity .22s ease;
}
.honeycomb-cursor.is-visible { opacity: .72; }

@media (max-width: 700px) {
  .banner-copy .button {
    width: fit-content;
    max-width: 100%;
    min-height: 44px;
    padding: 11px 16px;
    font-size: 11px;
    white-space: normal;
  }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .honeycomb-cursor { display: none; }
}
