/* =========================================================
   KORVA.inc — Core stylesheet
   Tokens, primitives, signature brand elements
   ========================================================= */

:root {
  --void: #0A0B0D;
  --concrete: #F4F1EC;
  --construcao: #E63A1F;
  --cromo: #1F2326;
  --pure: #FFFFFF;

  --concrete-50: rgba(244, 241, 236, 0.5);
  --concrete-30: rgba(244, 241, 236, 0.3);
  --concrete-15: rgba(244, 241, 236, 0.15);
  --concrete-08: rgba(244, 241, 236, 0.08);

  --grain-opacity: 0.07;

  --ff-display: "Archivo Black", "Archivo", system-ui, sans-serif;
  --ff-body: "Inter", system-ui, sans-serif;
  --ff-mono: "DM Mono", ui-monospace, "JetBrains Mono", monospace;

  --pad-x: clamp(24px, 4vw, 80px);
  --pad-y: clamp(48px, 8vh, 120px);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: var(--construcao); color: var(--concrete); }

html, body {
  background: var(--void);
  color: var(--concrete);
  font-family: var(--ff-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.display {
  font-family: var(--ff-display);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.92;
}
.mono {
  font-family: var(--ff-mono);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
}
.body-lg { font-size: clamp(17px, 1.4vw, 21px); line-height: 1.55; font-weight: 300; }
.accent { color: var(--construcao); }

/* Text wordmark */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--ff-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--concrete);
  user-select: none;
  white-space: nowrap;
}
.wordmark__main { font-size: 1em; }
.wordmark__square {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--construcao);
  margin: 0 0.04em 0.06em 0.02em;
  align-self: flex-end;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-out-expo);
}
.wordmark__inc {
  font-family: var(--ff-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 0.30em;
  color: var(--concrete);
  margin-left: 0.04em;
  text-transform: lowercase;
  transform: translateY(-0.18em);
}
.wordmark--lg { font-size: 56px; }
.wordmark--md { font-size: 22px; }

/* Signature elements */
.red-bar {
  display: block;
  width: 90px;
  height: 6px;
  background: var(--construcao);
  flex-shrink: 0;
}
.red-bar--draw {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.9s var(--ease-out-expo) 0.1s;
}
.in-view .red-bar--draw, .red-bar--draw.in-view { transform: scaleX(1); }

.stencil {
  position: absolute;
  width: 32px; height: 32px;
  pointer-events: none;
  z-index: 3;
}
.stencil::before, .stencil::after {
  content: "";
  position: absolute;
  background: var(--construcao);
}
.stencil--tl { top: 24px; left: 24px; }
.stencil--tl::before { top: 0; left: 0; width: 32px; height: 2px; }
.stencil--tl::after  { top: 0; left: 0; width: 2px; height: 32px; }
.stencil--br { bottom: 24px; right: 24px; }
.stencil--br::before { bottom: 0; right: 0; width: 32px; height: 2px; }
.stencil--br::after  { bottom: 0; right: 0; width: 2px; height: 32px; }
.stencil--tr { top: 24px; right: 24px; }
.stencil--tr::before { top: 0; right: 0; width: 32px; height: 2px; }
.stencil--tr::after  { top: 0; right: 0; width: 2px; height: 32px; }
.stencil--bl { bottom: 24px; left: 24px; }
.stencil--bl::before { bottom: 0; left: 0; width: 32px; height: 2px; }
.stencil--bl::after  { bottom: 0; left: 0; width: 2px; height: 32px; }

.stencil--reveal::before, .stencil--reveal::after {
  transform: scale(0);
  transition: transform 0.7s var(--ease-out-expo) 0.2s;
}
.stencil--tl.stencil--reveal::before { transform-origin: left center; }
.stencil--tl.stencil--reveal::after  { transform-origin: center top; }
.stencil--tr.stencil--reveal::before { transform-origin: right center; }
.stencil--tr.stencil--reveal::after  { transform-origin: center top; }
.stencil--bl.stencil--reveal::before { transform-origin: left center; }
.stencil--bl.stencil--reveal::after  { transform-origin: center bottom; }
.stencil--br.stencil--reveal::before { transform-origin: right center; }
.stencil--br.stencil--reveal::after  { transform-origin: center bottom; }
.in-view .stencil--reveal::before, .in-view .stencil--reveal::after,
.stencil--reveal.in-view::before, .stencil--reveal.in-view::after { transform: scale(1); }

.section-meta {
  position: absolute;
  /* Empurrado pra baixo do nav (que tem ~70px de altura) */
  top: 96px;
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
  pointer-events: none;
}
.section-meta__right {
  display: flex;
  gap: 28px;
  align-items: center;
  color: var(--concrete-50);
  font-size: 10.5px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMS42IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAuOTUgIDAgMCAwIDAgMC45NSAgMCAwIDAgMCAwLjk1ICAwIDAgMCAwLjcgMCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIiBmaWx0ZXI9InVybCgjbikiLz48L3N2Zz4=");
  background-size: 200px 200px;
}

/* Custom cursor */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--construcao);
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  transition: width 0.25s var(--ease-out-expo),
              height 0.25s var(--ease-out-expo),
              opacity 0.2s ease;
  will-change: transform;
}
.cursor.is-hover { width: 30px; height: 30px; opacity: 0.9; }
.cursor.is-text { width: 2px; height: 22px; }
.cursor.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) {
  .cursor { display: none !important; }
}
@media (hover: hover) and (pointer: fine) {
  .cursor-on body, .cursor-on a, .cursor-on button, .cursor-on [data-cursor] { cursor: none; }
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  background: var(--void);
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 32px var(--pad-x);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader.is-skipped { display: none; }
.loader__inner {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.loader__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--concrete-50);
}
.loader__bar { display: block; width: 90px; height: 6px; background: var(--construcao); }
.loader__coords { display: flex; gap: 24px; }

.loader__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.loader__mark {
  position: relative;
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.loader__bracket {
  position: absolute;
  width: 36px; height: 36px;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out-expo);
}
.loader__bracket::before, .loader__bracket::after {
  content: ""; position: absolute; background: var(--construcao);
}
.loader__bracket--tl { top: 0; left: 0; }
.loader__bracket--tl::before { top: 0; left: 0; width: 36px; height: 3px; }
.loader__bracket--tl::after  { top: 0; left: 0; width: 3px; height: 36px; }
.loader__bracket--tr { top: 0; right: 0; }
.loader__bracket--tr::before { top: 0; right: 0; width: 36px; height: 3px; }
.loader__bracket--tr::after  { top: 0; right: 0; width: 3px; height: 36px; }
.loader__bracket--bl { bottom: 0; left: 0; }
.loader__bracket--bl::before { bottom: 0; left: 0; width: 36px; height: 3px; }
.loader__bracket--bl::after  { bottom: 0; left: 0; width: 3px; height: 36px; }
.loader__bracket--br { bottom: 0; right: 0; }
.loader__bracket--br::before { bottom: 0; right: 0; width: 36px; height: 3px; }
.loader__bracket--br::after  { bottom: 0; right: 0; width: 3px; height: 36px; }
.loader.is-stage-1 .loader__bracket { opacity: 1; }

.loader__k {
  font-family: var(--ff-display);
  font-size: 130px;
  line-height: 1;
  color: var(--concrete);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.loader.is-stage-2 .loader__k { opacity: 1; transform: scale(1); }

.loader__caption {
  color: var(--concrete-50);
  letter-spacing: 0.18em;
  opacity: 0;
  transition: opacity 0.5s ease 0.2s;
}
.loader.is-stage-2 .loader__caption { opacity: 1; }

.loader__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 12px;
  font-family: var(--ff-mono);
  text-transform: uppercase;
  font-size: 11px;
  color: var(--concrete-50);
}
.loader__count {
  font-family: var(--ff-display);
  font-size: 64px;
  line-height: 1;
  color: var(--concrete);
  display: flex;
  align-items: baseline;
  gap: 8px;
  letter-spacing: -0.04em;
}
.loader__count .mono { font-size: 12px; color: var(--concrete-50); align-self: flex-end; padding-bottom: 8px; }
.loader__brand {
  font-family: var(--ff-display);
  font-size: 18px;
  color: var(--concrete);
  display: inline-flex;
  align-items: baseline;
  letter-spacing: -0.02em;
}
.loader__dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--construcao);
  margin: 0 2px 2px;
  align-self: flex-end;
}
.loader__progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--concrete-08);
}
.loader__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--construcao);
  transition: width 0.1s linear;
}

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 22px var(--pad-x);
  background: linear-gradient(to bottom, rgba(10, 11, 13, 0.7) 0%, rgba(10, 11, 13, 0) 100%);
  transition: background 0.3s ease, padding 0.3s ease, transform 0.4s var(--ease-out-expo);
}
.nav.is-condensed {
  background: rgba(10, 11, 13, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 14px var(--pad-x);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__brand { color: var(--concrete); }

.nav__list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 36px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav__list a {
  position: relative;
  color: var(--concrete-50);
  padding: 8px 0;
  transition: color 0.25s ease;
}
.nav__list a:hover { color: var(--concrete); }
.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 4px;
  width: 100%; height: 1px;
  background: var(--construcao);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.4s var(--ease-out-expo);
}
.nav__list a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--concrete-15);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--concrete);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav__cta:hover { border-color: var(--construcao); background: var(--construcao); }
.nav__cta-square {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--construcao);
  transition: background 0.3s ease;
}
.nav__cta:hover .nav__cta-square { background: var(--concrete); }

@media (max-width: 880px) {
  .nav { grid-template-columns: auto auto; }
  .nav__list { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  position: relative;
}
.btn__square {
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--construcao);
  transition: background 0.3s ease, transform 0.3s ease;
}
.btn--primary {
  color: var(--concrete);
  border-color: var(--concrete);
}
.btn--primary:hover {
  background: var(--construcao);
  border-color: var(--construcao);
  color: var(--concrete);
}
.btn--primary:hover .btn__square { background: var(--concrete); transform: scale(1.2); }
.btn svg { transition: transform 0.3s var(--ease-out-expo); }
.btn:hover svg { transform: translateX(4px); }

/* Reveal primitives */
[data-fade] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}
[data-fade].in-view { opacity: 1; transform: translateY(0); }

[data-split] .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.04em;
  margin-right: 0.04em;
}
[data-split] .word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.95s var(--ease-out-expo);
  transition-delay: calc(var(--i, 0) * 0.07s);
}
[data-split].in-view .word > span { transform: translateY(0); }

@media (max-width: 720px) {
  :root { --pad-x: 20px; }
  .stencil { width: 24px; height: 24px; }
  .stencil--tl { top: 16px; left: 16px; }
  .stencil--tr { top: 16px; right: 16px; }
  .stencil--bl { bottom: 16px; left: 16px; }
  .stencil--br { bottom: 16px; right: 16px; }
  .stencil--tl::before, .stencil--tr::before { width: 24px; }
  .stencil--bl::before, .stencil--br::before { width: 24px; }
  .stencil--tl::after, .stencil--tr::after,
  .stencil--bl::after, .stencil--br::after { height: 24px; }

  .section-meta { top: 70px; }
  .section-meta__right { gap: 14px; font-size: 9.5px; }
  .section-meta__right > span:first-child { display: none; }

  .red-bar { width: 60px; height: 4px; }
  .body-lg { font-size: 16px; line-height: 1.55; }

  .nav { padding: 14px var(--pad-x); }
  .nav.is-condensed { padding: 10px var(--pad-x); }

  .loader { padding: 24px var(--pad-x); }
  .loader__top { font-size: 9.5px; }
  .loader__coords { gap: 14px; }
  .loader__mark { width: 140px; height: 140px; }
  .loader__bracket { width: 24px; height: 24px; }
  .loader__bracket::before { width: 24px !important; height: 2px !important; }
  .loader__bracket::after { width: 2px !important; height: 24px !important; }
  .loader__k { font-size: 96px; }
  .loader__count { font-size: 44px; }
}
