/* =========================================================
   TERRAI — Assinaturas da marca
   1) Linhas: feixe ondulado em traço de aquarela, fixo na lateral.
   2) Aquarela: fotos que "se pintam" ao aparecer.
   ========================================================= */

/* ---------------- Linhas ---------------- */
.side-lines,
.bundle {
  pointer-events: none;
  overflow: visible;
}
.side-lines {
  position: fixed; left: 0; top: 0;
  width: 100vw; height: 100vh; height: 100lvh; /* cobre a tela mesmo quando a barra do navegador some */
  z-index: 45;
  /* gradiente de opacidade: as linhas nascem e somem suavemente no começo e no fim */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
  --ln-color: #CFC8AE;   /* traço fino sobre a Areia */
  --ln-w: 1.6px;
  --ln-wash: 7px;
  --ln-wash-o: .09;
}
.side-lines { transition: opacity 1.2s var(--ease-out); will-change: opacity; }
.side-lines.is-hidden,
.intro-on .side-lines { opacity: 0; }
.side-lines.on-dark  { --ln-color: rgba(201, 155, 88, .5); }

.ln-core, .ln-wash {
  fill: none;
  stroke: var(--ln-color);
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke .9s var(--ease-out);
}
.ln-core { stroke-width: var(--ln-w); }
.ln-wash { stroke-width: var(--ln-wash); opacity: var(--ln-wash-o); }

/* desenho inicial (acontece por trás da abertura) */
.side-lines .ln-core,
.side-lines .ln-wash {
  animation: ln-draw 1.3s var(--ease-io) forwards;
  animation-delay: calc(.7s + var(--i) * .07s);
}
.side-lines .ln-wash { animation-delay: calc(.8s + var(--i) * .07s); }
.intro-done .side-lines .ln-core,
.intro-done .side-lines .ln-wash { stroke-dashoffset: 0; animation: none; }
@keyframes ln-draw { to { stroke-dashoffset: 0; } }

/* feixe sobre a foto do Hero (branco, como nos posts) */
.bundle {
  position: absolute; left: -1px; top: 0; z-index: 2;
  width: 30%; height: 100%;
  --ln-color: #C99B58;   /* traços fluidos em ouro (Design System v3) */
  --ln-w: 1.4px;
  --ln-wash: 6px;
  --ln-wash-o: .14;
}
.bundle .ln-core, .bundle .ln-wash {
  animation: ln-draw 1.6s var(--ease-io) forwards paused;
  animation-delay: calc(.9s + var(--i) * .08s);
}
.is-painted .bundle .ln-core, .is-painted .bundle .ln-wash { animation-play-state: running; }

@media (max-width: 960px) {
  .side-lines { --ln-w: 1.2px; --ln-wash: 5px; }
    .bundle { width: 38%; --ln-w: 1.2px; --ln-wash: 5px; }
}

/* ---------------- Aquarela ---------------- */
.wc { background: var(--paper); }
.wc > .wc__wash,
.wc > .wc__ink {
  position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask: url("../img/wc-mask.png") 50% 50% / 0 0 no-repeat;
          mask: url("../img/wc-mask.png") 50% 50% / 0 0 no-repeat;
}
.wc > .wc__wash img { filter: blur(6px) saturate(.45) sepia(.35) contrast(.8) brightness(1.1); }
.wc > .wc__ink { transform: scale(1.05); }

.wc.is-painted > .wc__wash {
  -webkit-mask-size: var(--wc-size) var(--wc-size);
          mask-size: var(--wc-size) var(--wc-size);
  transition: -webkit-mask-size 1.5s cubic-bezier(.25, .7, .3, 1), mask-size 1.5s cubic-bezier(.25, .7, .3, 1);
}
.wc.is-painted > .wc__ink {
  -webkit-mask-position: 46% 56%;
          mask-position: 46% 56%;
  -webkit-mask-size: var(--wc-size) var(--wc-size);
          mask-size: var(--wc-size) var(--wc-size);
  transform: none;
  transition: -webkit-mask-size 2s cubic-bezier(.3, .55, .25, 1) .4s, mask-size 2s cubic-bezier(.3, .55, .25, 1) .4s,
              transform 2.6s var(--ease-out) .4s;
}

/* Movimento reduzido: tudo já pintado e desenhado */
@media (prefers-reduced-motion: reduce) {
  .ln-core, .ln-wash { stroke-dashoffset: 0 !important; animation: none !important; }
  .wc > .wc__wash, .wc > .wc__ink { -webkit-mask: none; mask: none; transform: none; }
}
