/* Foundation: tokens, reset, global layout and homepage hero. */

:root {
  --bg: #e8eaec;
  --text-dark: #111111;

  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.6);
}

body[data-theme="dark"] {
  --bg: #131417;
  --text-dark: #D1D1CB;
}

/* Barra de rolagem do viewport no tema escuro: mesma cor do texto (--text-dark).
   A variável vive em body[data-theme], fora do alcance do html, por isso o valor é repetido. */
html:has(body[data-theme="dark"]) {
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #D1D1CB transparent;
}

html:has(body[data-theme="dark"])::-webkit-scrollbar {
  width: 10px;
}

html:has(body[data-theme="dark"])::-webkit-scrollbar-track {
  background: transparent;
}

html:has(body[data-theme="dark"])::-webkit-scrollbar-thumb {
  background: #D1D1CB;
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.is-preloading {
  overflow: hidden;
}

.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100svh;
  pointer-events: all;
}

.skip-site-preloader .site-preloader {
  display: none;
}

.site-preloader-veil {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  will-change: opacity;
}

.site-preloader-flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.site-preloader-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

.site-preloader-logo {
  display: block;
  width: clamp(360px, 36vw, 560px);
  max-width: calc(100vw - 32px);
  height: auto;
  transform-origin: 47.5% 65%;
}

.site-preloader-piece {
  fill: #131417;
  fill-opacity: 0;
  stroke: #131417;
  stroke-width: 1.4;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-opacity: 1;
}

body[data-theme="dark"] .site-preloader-piece {
  fill: var(--text-dark);
  stroke: var(--text-dark);
}

.site-preloader-spinner {
  position: relative;
  width: 30px;
  height: 30px;
}

.site-preloader-spinner::before,
.site-preloader-spinner::after {
  content: "";
  position: absolute;
  top: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #131417;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.site-preloader-spinner::before {
  left: 0;
  animation-name: site-preloader-first-dot;
}

.site-preloader-spinner::after {
  right: 0;
  opacity: 0.55;
  animation-name: site-preloader-second-dot;
}

body[data-theme="dark"] .site-preloader-spinner::before,
body[data-theme="dark"] .site-preloader-spinner::after {
  background: var(--text-dark);
}

@keyframes site-preloader-first-dot {
  0%,
  50% {
    transform-origin: 15px center;
  }

  50% {
    transform: rotate(180deg);
  }

  51%,
  100% {
    transform-origin: center;
  }

  51% {
    transform: rotate(180deg) translateX(-22px);
  }

  100% {
    transform: rotate(180deg) translateX(0);
  }
}

@keyframes site-preloader-second-dot {
  0%,
  50% {
    transform: rotate(-180deg);
  }

  51%,
  100% {
    transform-origin: -8px center;
  }
}

.tracking-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: none;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #f2f2f2;
  mix-blend-mode: difference;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .tracking-cursor {
    display: block;
  }

  body.cursor-tracking-ready,
  body.cursor-tracking-ready a,
  body.cursor-tracking-ready button,
  body.cursor-tracking-ready [tabindex] {
    cursor: none;
  }

  .cursor-magnetic {
    position: relative;
  }

  .cursor-hover-bounds {
    position: absolute;
    inset: 0;
    z-index: 5;
  }

  .cursor-magnetic:hover .cursor-hover-bounds {
    transform: scale(3.5);
  }
}

main {
  display: flex;
  flex-direction: column;
  gap: clamp(96px, 12vw, 180px);
  width: 100%;
  padding: 0 48px;
}

.page-section {
  width: min(100%, 1440px);
  margin: 0 auto;
}

.hero-section {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  overflow: visible;
}

/* Hero — full-bleed (escapa do padding do <main>), fundo em fumaça WebGL
   (js/smoke-fluid.js) por trás do texto. */
.hero-section.hero-liquid {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-top: calc(88px + clamp(96px, calc(8vh + 40px), 136px));
  padding-bottom: calc(48px + 24px);
}

.hero-liquid-content {
  display: grid;
  grid-template-columns: calc(57.8vw - (48px + 24px)) max-content;
  align-items: start;
  align-items: first baseline;
  justify-content: start;
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  padding-inline: calc(48px + 24px);
  text-align: left;
  pointer-events: none;
  user-select: none;
  color: #111;
  perspective: 500px;
}

body[data-theme="dark"] .hero-liquid-content {
  color: var(--text-dark);
}

.hero-liquid-content h1 {
  margin: 0;
  white-space: nowrap;
  font-family: "Archivo", sans-serif;
  font-optical-sizing: auto;
  font-size: clamp(22px, 1.9vw, 30px);
  font-weight: 350;
  font-style: normal;
  font-variation-settings: "wdth" 110;
  letter-spacing: 0.01em;
}

.hero-tags {
  position: static;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Archivo", sans-serif;
  font-optical-sizing: auto;
  font-size: clamp(40px, 3.6vw, 56px);
  font-weight: 220;
  font-style: normal;
  font-variation-settings: "wdth" 110;
  line-height: 1.6;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .hero-section.hero-liquid {
    min-height: 0;
    padding-bottom: clamp(44px, calc(18vh - 85px), 109px);
  }

  main:has(> .hero-liquid) {
    gap: clamp(44px, calc(18vh - 85px), 109px);
  }
}

@media (max-width: 1023px) {
  .hero-liquid-content {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    row-gap: clamp(32px, 8vw, 64px);
  }

  .hero-liquid-content h1 {
    white-space: normal;
  }
}

@media (max-width: 960px), (pointer: coarse) and (orientation: portrait) and (max-width: 1200px) {
  .hero-section.hero-liquid {
    padding-bottom: calc(24px + 24px);
  }

  .hero-liquid-content {
    padding-inline: calc(24px + 24px);
  }
}

@media (max-width: 600px) {
  .hero-section.hero-liquid {
    padding-bottom: calc(16px + 16px);
  }

  .hero-liquid-content {
    padding-inline: calc(16px + 16px);
  }
}

.hero-liquid-reveal-word {
  display: inline-block;
  white-space: nowrap;
}

.hero-liquid-reveal-char {
  display: inline-block;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

.page-section h2 {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 200;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.page-section h2 strong {
  font-weight: 700;
}

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