/* ============ BALDO — sections: sobre / obras / contato ============ */

/* ---------- sobre ---------- */
#sobre {
  padding: 18vh 6vw;
  background:
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(74,156,196,0.06), transparent),
    var(--ink-black);
}
.sobre-grid {
  display: grid;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
@media (min-width: 820px) {
  .sobre-grid { grid-template-columns: minmax(280px, 420px) 1fr; align-items: start; }
}
.sobre-photo-wrap {
  position: relative;
  transform: rotate(-2deg);
}
.sobre-photo-img {
  width: 100%;
  display: block;
  object-fit: contain;
  object-position: center top;
  background: var(--concrete);
  box-shadow: 6px 6px 0 #444444;
}
.sobre-photo-tape {
  position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%) rotate(3deg);
  width: 110px; height: 30px;
  background: rgba(180,180,180,0.7);
  clip-path: polygon(3% 12%, 97% 0%, 100% 90%, 0% 100%);
  z-index: 3;
}
.sobre-copy { max-width: 60ch; }
.sobre-copy .section-title { margin-bottom: 10px; }
.sobre-copy .tag-scrawl { color: #999; margin-bottom: 28px; }
.sobre-copy p {
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.7;
  color: #c9c5bd;
  margin-bottom: 20px;
  text-wrap: pretty;
}
.sobre-copy p strong { color: var(--dirty-white); }
.sobre-copy .placeholder-note {
  font-family: var(--marker);
  font-size: 14px;
  color: #6a6a6a;
  transform: rotate(-1deg);
  display: inline-block;
}

/* ---------- obras ---------- */
#obras {
  padding: 10vh 6vw 20vh;
  /* Parede de concreto / galeria de rua */
  background:
    radial-gradient(ellipse 100% 35% at 50% 0%, rgba(50,50,50,0.55), transparent 55%),
    repeating-linear-gradient(180deg,
      transparent 0, transparent 79px,
      rgba(0,0,0,0.22) 79px, rgba(0,0,0,0.22) 81px),
    repeating-linear-gradient(90deg,
      transparent 0, transparent 159px,
      rgba(0,0,0,0.12) 159px, rgba(0,0,0,0.12) 161px),
    #0e0e0e;
}
.obras-head {
  max-width: 1180px; margin: 0 auto 56px;
  position: relative; z-index: 2;
}
.obras-head .tag-scrawl { color: #888; }
.obras-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
  position: relative; z-index: 2;
  padding-top: 72px; /* espaço para o arame de cada card */
}

/* tag de grafite decorativa no fundo da seção */
.bg-tag {
  position: absolute;
  font-family: var(--marker);
  font-size: clamp(50px, 10vw, 160px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.025);
  transform: rotate(var(--rot, 0deg));
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
  line-height: 1;
}
@media (min-width: 600px) { .obras-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .obras-grid { grid-template-columns: 1fr 1fr 1fr; } }

.obra-card {
  position: relative;
  touch-action: pan-y;
  background: var(--concrete);
  overflow: visible; /* permite spotlight e arame saírem do card */
  transform: rotate(0deg);
  transition: transform .25s cubic-bezier(.5,-0.3,.4,1.5),
              box-shadow .3s ease;
  will-change: transform;
  /* sombra de quadro pendurado na parede */
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 0 0 4px #090909,
    0 28px 70px rgba(0,0,0,0.88),
    0 6px 20px rgba(0,0,0,0.65);
}
.obra-card:nth-child(odd) { transform: rotate(-0.6deg); }
.obra-card:nth-child(even) { transform: rotate(0.6deg); }
@media (hover: hover) {
  .obra-card:hover {
    transform: scale(1.035) rotate(0deg);
    z-index: 5;
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.08),
      0 0 0 4px #090909,
      0 40px 100px rgba(0,0,0,0.95),
      0 10px 30px rgba(0,0,0,0.8);
  }
}

/* Arame de pendurar */
.obra-card::before {
  content: '';
  position: absolute;
  top: -64px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 64px;
  background: linear-gradient(to bottom,
    rgba(180,180,180,0.06),
    rgba(180,180,180,0.40) 70%,
    rgba(180,180,180,0.55));
  pointer-events: none;
}

/* Spotlight de museu vindo de cima */
.obra-card::after {
  content: '';
  position: absolute;
  top: -140px; left: 50%;
  transform: translateX(-50%);
  width: 320px; height: 240px;
  background: radial-gradient(ellipse at 50% 88%,
    rgba(255,250,210,0.13) 0%,
    rgba(255,245,180,0.06) 35%,
    transparent 65%);
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  transition: background .3s ease;
}
@media (hover: hover) {
  .obra-card:hover::after {
    background: radial-gradient(ellipse at 50% 88%,
      rgba(255,250,210,0.24) 0%,
      rgba(255,245,180,0.10) 35%,
      transparent 65%);
  }
}

.obra-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden; /* clipa a imagem e o glitch — o spotlight fica fora daqui */
}
.obra-media image-slot {
  width: 100%; height: 100%; display: block;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), filter .25s;
  will-change: transform, filter;
}
@media (hover: hover) {
  .obra-card:hover .obra-media image-slot {
    transform: scale(1.09);
    filter: contrast(1.15) saturate(1.2);
  }
}
/* glitch overlay layers */
.obra-glitch {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
}
@media (hover: hover) {
  .obra-card:hover .obra-glitch { opacity: 1; }
}
.obra-glitch::before,
.obra-glitch::after {
  content: '';
  position: absolute; inset: 0;
}
.obra-glitch::before {
  background: #ffffff;
  mix-blend-mode: screen;
  opacity: 0.12;
  animation: glitch-shift-a .32s steps(2) infinite;
}
.obra-glitch::after {
  background: #000000;
  mix-blend-mode: exclusion;
  opacity: 0.15;
  animation: glitch-shift-b .27s steps(3) infinite;
}
@keyframes glitch-shift-a {
  0% { transform: translateX(0); clip-path: inset(8% 0 76% 0); }
  33% { transform: translateX(-7px); clip-path: inset(48% 0 30% 0); }
  66% { transform: translateX(5px); clip-path: inset(78% 0 6% 0); }
  100% { transform: translateX(0); clip-path: inset(20% 0 64% 0); }
}
@keyframes glitch-shift-b {
  0% { transform: translateX(0); clip-path: inset(60% 0 22% 0); }
  50% { transform: translateX(8px); clip-path: inset(12% 0 70% 0); }
  100% { transform: translateX(-6px); clip-path: inset(36% 0 44% 0); }
}
@media (prefers-reduced-motion: reduce) {
  .obra-glitch::before, .obra-glitch::after { animation: none; }
  .obra-card:hover .obra-glitch { opacity: 0.15; }
}

.obra-meta {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
}
.obra-meta h3 {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.obra-meta .obra-num {
  font-family: var(--marker);
  font-size: 15px;
  color: #888888;
}
.obra-card:nth-child(3n+2) .obra-num { color: #777777; }
.obra-card:nth-child(3n) .obra-num { color: #aaaaaa; }

/* Etiqueta de museu */
.obra-label {
  padding: 0 16px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #484848;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 2px;
}

/* ---------- contato ---------- */
#contato {
  padding: 18vh 6vw 12vh;
  background:
    radial-gradient(ellipse 70% 40% at 50% 110%, rgba(245,166,35,0.05), transparent),
    var(--ink-black);
}
.contato-inner {
  max-width: 880px; margin: 0 auto;
  position: relative; z-index: 2;
}
.contato-inner .tag-scrawl { color: #888; }
.contato-form {
  margin-top: 44px;
  display: grid; gap: 22px;
}
@media (min-width: 700px) {
  .contato-form { grid-template-columns: 1fr 1fr; }
  .contato-form .form-row-full { grid-column: 1 / -1; }
}
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label {
  font-family: var(--display);
  font-size: 14px; letter-spacing: 0.18em;
  color: #999;
  text-transform: uppercase;
}
.form-field input,
.form-field textarea {
  background: transparent;
  border: none;
  border-bottom: 3px solid var(--concrete);
  color: var(--dirty-white);
  font-family: var(--body);
  font-size: 17px;
  padding: 10px 2px;
  transition: border-color .25s;
  border-radius: 0;
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--dirty-white);
}
.contato-form .paint-btn { justify-self: start; }

.social-row {
  margin-top: 64px;
  display: flex; flex-wrap: wrap; gap: 18px;
}
.social-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 16px; letter-spacing: 0.12em;
  color: var(--dirty-white);
  text-decoration: none;
  padding: 10px 18px;
  background: var(--concrete);
  clip-path: polygon(3% 10%, 100% 0%, 97% 92%, 0% 100%);
  transition: transform .2s cubic-bezier(.5,-0.4,.4,1.6), background .2s, color .2s;
  will-change: transform;
}
.social-link .social-dot {
  width: 11px; height: 11px;
  border-radius: 60% 40% 55% 45% / 45% 60% 40% 55%;
  background: #777;
  transition: transform .25s;
}
.social-link:nth-child(2) .social-dot { background: #888; }
.social-link:nth-child(3) .social-dot { background: #999; }
.social-link:nth-child(4) .social-dot { background: #aaa; }
.social-link:hover {
  transform: rotate(-2deg) scale(1.07);
  background: #333333;
}
.social-link:hover .social-dot {
  transform: scale(1.7) rotate(120deg);
}

/* ---------- footer ---------- */
.site-footer {
  position: relative; z-index: 2;
  padding: 40px 6vw 100px;
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  border-top: 1px solid #1c1c1c;
}
.foot-logo {
  height: 36px;
  width: auto;
  opacity: 0.65;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.08));
}
.site-footer small {
  color: #666;
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ---------- reveal helpers (JS adds .in) ---------- */
.slam {
  opacity: 0;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: reduce) {
  .slam { opacity: 1 !important; transform: none !important; }
  .paint-btn, .social-link, .obra-card, .obra-media image-slot { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 1100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 60px 24px 48px;
  background: rgba(4,4,4,0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: opacity;
  overflow-y: auto;
}
#lightbox.lb-open {
  opacity: 1;
}
.lb-frame-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: clamp(200px, 42vh, 340px);
  flex-shrink: 0;
  will-change: transform, opacity;
}
.lb-artwork {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  position: relative;
  z-index: 1;
  background: #111;
}
.lb-baroque {
  display: none;
}
.lb-caption {
  text-align: center;
  max-width: 420px;
  z-index: 3;
}
.lb-caption h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dirty-white);
  margin-bottom: 6px;
}
.lb-sub-line {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 16px;
}
.lb-desc {
  font-family: var(--body);
  font-size: clamp(13px, 1.6vw, 15px);
  line-height: 1.7;
  color: #8a8680;
  font-style: italic;
}
.lb-close {
  position: fixed;
  top: 20px; right: 24px;
  background: transparent;
  border: none;
  color: #555;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  cursor: none;
  padding: 6px 12px;
  transition: color .2s, transform .2s;
  z-index: 10;
}
.lb-close:hover { color: var(--dirty-white); transform: rotate(90deg) scale(1.2); }
@media (pointer: coarse) { .lb-close { cursor: pointer; } }
