/* ============================================================
   Wiler Projetos — estilo global
   Tipografia: Inter Tight (base) + IBM Plex Mono (acentos técnicos)
   ============================================================ */

:root {
  --bg: #f7f6f3;
  --bg-alt: #efede8;
  --ink: #141412;
  --muted: #6e6a63;
  --line: #e2dfd8;
  --dark: #0c0c0b;
  --dark-ink: #f1efe9;
  --font-base: "Inter Tight", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: auto; /* Lenis assume o controle */
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--font-base);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.08;
}

em {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 500;
  font-size: 0.92em;
  letter-spacing: -0.03em;
}

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

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* ============================== NAV ============================== */

/* Pill flutuante e translúcida. Sobre o hero (vídeo escuro) a nav
   usa o esquema claro (.nav--hero, alternado via JS); sobre as
   sessões claras volta ao esquema escuro. */
.nav {
  position: fixed;
  top: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  width: min(calc(100% - 2rem), 1060px);
  padding: 0.6rem 0.7rem 0.6rem 1.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 30%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  transition:
    background 0.5s var(--ease),
    border-color 0.5s var(--ease),
    color 0.5s var(--ease);
}

.nav--hero {
  background: rgba(12, 12, 11, 0.22);
  border-color: rgba(241, 239, 233, 0.18);
  color: var(--dark-ink);
}

.nav--hero .nav__links a {
  color: rgba(241, 239, 233, 0.72);
}

.nav--hero .nav__links a:hover {
  color: #fff;
}

.nav--hero .nav__logo span {
  color: rgba(241, 239, 233, 0.6);
}

.nav--hero .nav__cta {
  border-color: rgba(241, 239, 233, 0.55);
}

.nav--hero .nav__cta:hover {
  background: var(--dark-ink);
  color: var(--dark);
}

.nav__logo,
.footer__logo {
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

.nav__logo span,
.footer__logo span {
  font-weight: 300;
  color: var(--muted);
  margin-left: 0.35em;
}

.nav__links {
  display: flex;
  gap: 2.2rem;
}

.nav__links a {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: color 0.3s;
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__cta {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--ink);
  border-radius: 99px;
  padding: 0.55em 1.4em;
  transition:
    background 0.35s var(--ease),
    color 0.35s var(--ease);
}

.nav__cta:hover {
  background: var(--ink);
  color: var(--bg);
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
  }
}

/* ============================ HERO ============================ */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      ellipse 90% 60% at 50% -10%,
      rgba(241, 239, 233, 0.08),
      transparent 60%
    ),
    var(--dark);
  color: var(--dark-ink);
  padding: 7rem 1.5rem 3rem;
}

.hero__inner {
  width: min(1020px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(241, 239, 233, 0.55);
  border: 1px solid rgba(241, 239, 233, 0.18);
  border-radius: 99px;
  padding: 0.55em 1.3em;
  margin-bottom: 1.6rem;
}

.hero__title {
  font-size: clamp(2.3rem, 5.4vw, 4.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.hero__title em {
  color: #fff;
}

.hero__sub {
  margin: 1.1rem 0 2.2rem;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: rgba(241, 239, 233, 0.6);
  max-width: 46ch;
  text-wrap: balance;
}

/* Comparador before/after */

.compare {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  max-height: min(56svh, 540px);
  border-radius: 12px;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  border: 1px solid rgba(241, 239, 233, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  outline: none;
}

.compare:focus-visible {
  border-color: rgba(241, 239, 233, 0.55);
}

.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* imagem "pronto" fica por cima, recortada via clip-path pelo JS */
.compare__img--after {
  clip-path: inset(0 0 0 50%);
}

.compare__label {
  position: absolute;
  top: 1rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dark-ink);
  background: rgba(12, 12, 11, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(241, 239, 233, 0.18);
  border-radius: 99px;
  padding: 0.5em 1.1em;
  pointer-events: none;
}

.compare__label--before {
  left: 1rem;
}

.compare__label--after {
  right: 1rem;
}

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  z-index: 1;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.45);
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 12, 11, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid #fff;
}

.compare__handle svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 6.5rem;
  }
  .compare {
    aspect-ratio: 4 / 3;
  }
}

/* ============================== BOTÕES ============================== */

.btn {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  border-radius: 99px;
  padding: 0.95em 2.4em;
  transition:
    transform 0.45s var(--ease),
    background 0.35s,
    color 0.35s,
    border-color 0.35s;
  pointer-events: auto;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--light {
  border: 1px solid rgba(241, 239, 233, 0.5);
  color: var(--dark-ink);
}

.btn--light:hover {
  background: var(--dark-ink);
  color: var(--dark);
  border-color: var(--dark-ink);
}

.btn--dark {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
}

.btn--dark:hover {
  background: transparent;
  color: var(--ink);
}

/* ============================== SEÇÕES ============================== */

.site {
  position: relative;
  background: var(--bg);
}

.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(6rem, 12vw, 11rem) clamp(1.5rem, 4vw, 3.5rem);
}

.section--alt {
  max-width: none;
  background: var(--bg-alt);
}

.section--alt > * {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.section__head {
  margin-bottom: clamp(3rem, 6vw, 5.5rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

/* Revelação ao rolar */

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
}

/* ============================== PROJETOS ============================== */

.cases {
  border-top: 1px solid var(--line);
}

.case {
  border-bottom: 1px solid var(--line);
  padding: 2.8rem 0 3.2rem;
}

.case__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 1.6rem 2.2rem;
  margin-bottom: 1.6rem;
}

.case__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.45em 0.7em;
  line-height: 1;
}

.case__title h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.case__title p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.case__specs {
  list-style: none;
  display: flex;
  gap: clamp(1.2rem, 2.6vw, 2.6rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: -0.01em;
}

.case__specs li span {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.35em;
}

.case__media {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
}

.case__panel {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  margin: 0;
}

.case__panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.case__panel:hover img {
  transform: scale(1.03);
}

/* painel do desenho técnico: papel claro com moldura tracejada */
.case__panel--projeto {
  border: 1px solid var(--line);
  background: #fbfaf7;
}

.case__panel--projeto::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 3px;
  pointer-events: none;
}

.case__panel--projeto img {
  object-fit: contain;
  padding: 4px;
}

.case__panel figcaption {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 99px;
  padding: 0.55em 1em;
}

.case__panel--projeto figcaption {
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.case__panel--pronto figcaption {
  color: var(--dark-ink);
  background: rgba(12, 12, 11, 0.55);
  border: 1px solid rgba(241, 239, 233, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.case__arrow {
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg);
}

.case__arrow svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 1.5;
}

@media (max-width: 860px) {
  .case__head {
    grid-template-columns: auto 1fr;
  }
  .case__specs {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 1rem 1.8rem;
  }
  .case__media {
    grid-template-columns: 1fr;
  }
  .case__arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/* ============================== LIGHTBOX ============================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 10, 9, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.lightbox__figure {
  max-width: min(1100px, 100%);
  margin: 0;
}

.lightbox__img {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox__caption {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding-top: 1.1rem;
  color: var(--dark-ink);
}

.lightbox__title {
  font-size: 1.05rem;
  font-weight: 400;
}

.lightbox__meta {
  font-size: 0.8rem;
  color: rgba(241, 239, 233, 0.6);
  letter-spacing: 0.02em;
}

.lightbox__count {
  font-family: var(--font-mono);
  margin-left: auto;
  font-size: 0.78rem;
  color: rgba(241, 239, 233, 0.5);
  letter-spacing: 0.12em;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(241, 239, 233, 0.3);
  color: var(--dark-ink);
  background: rgba(12, 12, 11, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.3s;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  border-color: rgba(241, 239, 233, 0.85);
}

.lightbox__close svg,
.lightbox__nav svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke-width: 1.5;
}

.lightbox__close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
}

.lightbox__nav--prev {
  left: clamp(0.6rem, 3vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__nav--next {
  right: clamp(0.6rem, 3vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 720px) {
  .lightbox__caption {
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }
}

/* ============================== PROCESSO ============================== */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.step {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.step__num {
  font-family: var(--font-mono);
  font-family: var(--font-mono);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
  display: block;
  margin-bottom: 2.4rem;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 0.8rem;
}

.step p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ============================== RAZÕES ============================== */

.reasons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.reason svg {
  width: 30px;
  height: 30px;
  margin-bottom: 1.6rem;
  color: var(--muted);
}

.reason h3 {
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 0.7rem;
}

.reason p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 900px) {
  .reasons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .reasons {
    grid-template-columns: 1fr;
  }
}

/* ============================== CONTATO ============================== */

.section--contact {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.contact__cta {
  text-align: center;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.contact__cta h2 {
  margin-bottom: 1.4rem;
}

.contact__cta p {
  color: var(--muted);
  margin-bottom: 2.4rem;
}

/* ============================== FOOTER ============================== */

.footer {
  border-top: 1px solid var(--line);
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem) 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer__links {
  display: flex;
  gap: 1.8rem;
}

.footer__links a {
  font-size: 0.82rem;
  color: var(--muted);
  transition: color 0.3s;
}

.footer__links a:hover {
  color: var(--ink);
}

.footer__copy {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ============================== ACESSIBILIDADE ============================== */

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
