/* ==========================================================================
   Sobre: foto em camadas + texto curto (js/sections/about.js)

   Camadas da foto: placa de luz azul deslocada (atrás) > foto (com paralaxe leve) >
   reflexo que segue o cursor > moldura elétrica (traço que se desenha na entrada e uma
   corrente de luz que percorre a borda) > legenda.
   A foto em si não recebe filtros: a luz fica nas bordas e na moldura.
   ========================================================================== */

.about .light {
  --size: 64vmax;
  --strength: 0.13;
  top: 45%;
  left: 0;
}

.about__layout {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

/* Foto ------------------------------------------------------------------------ */

.about__portrait {
  --mx: 0;
  --my: 0;
  --py: 0;
  position: relative;
  width: min(100%, 34rem);
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  transform: perspective(1400px) rotateX(calc(var(--my) * -4deg)) rotateY(calc(var(--mx) * 5deg));
  transition: transform 0.6s var(--ease-out);
}

.about__plate {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgb(29 143 240 / 0.35);
  border-radius: 28px;
  background:
    radial-gradient(70% 60% at 70% 20%, rgb(29 143 240 / 0.35), transparent 70%),
    linear-gradient(160deg, #0b2a5a, #02060f 75%);
  box-shadow: 0 0 80px -20px rgb(29 143 240 / 0.55);
  translate: calc(clamp(14px, 2.4vw, 26px) + var(--mx) * -8px) calc(clamp(14px, 2.4vw, 26px) + var(--py) * 22px + var(--my) * -6px);
}

.about__photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 28px;
  background: #050a14;
  box-shadow: 0 50px 100px -50px rgb(0 0 0 / 0.95);
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transform: translateY(calc(var(--py) * -22px)) scale(1.08);
  will-change: transform;
}

/* a base da foto (o notebook em primeiro plano) se funde ao fundo da página */
.about__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: linear-gradient(to top, rgb(1 2 3 / 0.85), transparent);
  pointer-events: none;
}

/* reflexo azul que acompanha o cursor (nas bordas a luz é mais forte que no rosto) */
.about__sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(45% 40% at calc(50% + var(--mx) * 45%) calc(50% + var(--my) * 45%), rgb(120 190 255 / 0.16), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.about__portrait.is-hover .about__sheen {
  opacity: 1;
}

/* moldura elétrica */
.about__frame {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  max-width: none;
  height: calc(100% + 2px);
  overflow: visible;
  pointer-events: none;
}

.about__frame rect {
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  fill: none;
}

.about__frame-line {
  stroke: rgb(90 174 255 / 0.55);
  stroke-width: 1.2;
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 4px rgb(29 143 240 / 0.8));
}

.about__frame-current {
  stroke: #e9f5ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 70 930;
  filter: drop-shadow(0 0 6px rgb(120 190 255 / 0.95));
  opacity: 0;
}

.about__portrait figcaption {
  position: absolute;
  bottom: 1.1rem;
  left: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgb(1 2 3 / 0.55);
  color: var(--frost);
  font-size: var(--fs-micro);
  font-weight: 600;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.about__portrait figcaption .spark-dot {
  width: 5px;
  height: 5px;
}

/* Entrada (com JavaScript e sem "reduzir movimento") */
.about.is-pending .about__photo {
  clip-path: inset(100% 0 0 0 round 28px);
}

.about.is-pending .about__photo img {
  scale: 1.12;
}

.about.is-pending .about__plate {
  opacity: 0;
}

.about.is-pending .about__frame-line {
  stroke-dashoffset: 1000;
}

.about.is-pending .about__portrait figcaption,
.about.is-pending .about__text > * {
  opacity: 0;
  translate: 0 18px;
}

.about.is-in .about__photo {
  clip-path: inset(0 0 0 0 round 28px);
  transition: clip-path 1.3s cubic-bezier(0.7, 0, 0.2, 1);
}

.about.is-in .about__photo img {
  scale: 1;
  transition: scale 1.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.about.is-in .about__plate {
  opacity: 1;
  transition: opacity 1.2s ease 0.5s;
}

.about.is-in .about__frame-line {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.6, 0, 0.2, 1) 0.6s;
}

.about.is-in .about__frame-current {
  opacity: 1;
  transition: opacity 0.6s ease 2s;
  animation: about-current 7s linear 2s infinite;
}

.about.is-in .about__portrait figcaption,
.about.is-in .about__text > * {
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.8s ease, translate 0.8s var(--ease-out);
}

.about.is-in .about__portrait figcaption { transition-delay: 1.1s; }
.about.is-in .about__text > :nth-child(1) { transition-delay: 0.25s; }
.about.is-in .about__text > :nth-child(2) { transition-delay: 0.35s; }
.about.is-in .about__text > :nth-child(3) { transition-delay: 0.5s; }
.about.is-in .about__text > :nth-child(4) { transition-delay: 0.6s; }
.about.is-in .about__text > :nth-child(5) { transition-delay: 0.75s; }

@keyframes about-current {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Texto ------------------------------------------------------------------------ */

.about__text {
  display: grid;
  gap: 1.15rem;
  justify-items: start;
}

.about__lead {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 1.7vw, 2.75rem);
  font-weight: 300;
  line-height: 1.12;
}

.about__body {
  max-width: 42ch;
  color: var(--frost-soft);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0938rem);
  line-height: 1.7;
}

.about__principles {
  display: grid;
  gap: 0;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.about__principles li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  row-gap: 0.15rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line-strong);
}

.about__principles .line-icon {
  grid-row: span 2;
}

.about__principles h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.7rem);
  font-weight: 400;
  line-height: 1.1;
}

.about__principles p {
  color: var(--mist);
  font-size: var(--fs-small);
}

@media (min-width: 900px) {
  .about__layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .about__portrait {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about__portrait {
    transform: none;
  }

  .about__photo img,
  .about__plate {
    transform: none;
    translate: none;
  }

  .about__frame-current {
    display: none;
  }
}
