/* ==========================================================================
   pages.css — Páginas internas: /proyectos, /servicios, /nosotros, /contacto
   Fondo blanco, mucho aire, letra pequeña; lo grande es el trabajo (fotos).
   Cada página tiene su color (el mismo de su punto en el menú).
   ========================================================================== */

.page {
  padding: 0 var(--gutter) var(--section-y);
}

/* --- Encabezado de página --- */
.page-head {
  padding: 120px 0 72px;
}

.page-title {
  margin: 20px 0 0;
  font-size: var(--fs-headline);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.page-lead {
  margin: 16px 0 0;
  max-width: 48ch;
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--color-muted);
}

/* Aviso de dato faltante: visible y discreto */
.page-pending {
  margin: 0;
  font-size: var(--fs-label);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* --- /proyectos --- */
.project-list {
  display: grid;
  gap: 72px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project__link {
  display: grid;
  gap: 8px;
}

.project__link:hover {
  color: var(--color-text);
}

.project__media {
  display: block;
  margin-bottom: 12px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--color-placeholder);
}

.project__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-reveal) var(--ease-out);
}

.project__link:hover .project__media img {
  transform: scale(1.02);
}

.project__num {
  font-size: var(--fs-label);
  letter-spacing: 2px;
  color: var(--brand-blue);
}

.project__name {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: 1.2;
}

.project__text {
  max-width: 52ch;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-muted);
}

.project__more {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  margin-top: 4px;
  font-size: var(--fs-small);
  font-weight: 500;
}

/* --- /servicios: estilos en services.css --- */

/* --- /nosotros --- */
.about {
  display: grid;
  gap: 40px;
  align-items: center;
}

.about__photo {
  align-self: end;
}

/* Celular: foto (centrada), franja azul pegada abajo de la foto y luego el texto */
@media (max-width: 899px) {
  .about {
    gap: 0;
  }

  .about__photo {
    margin: 0 auto;
    /* compensa el margen transparente de la derecha para que se vea centrada */
    padding-left: 6%;
  }

  .about--luigi .about__photo {
    padding-left: 0;
  }

  .about--luigi .about__photo img {
    transform: translateX(6%);
  }

  /* El margen transparente está a la izquierda: se recorre 6 % de su
     ancho a la izquierda para que la persona quede centrada */
  .about--right .about__photo {
    padding-left: 0;
  }

  .about--right .about__photo img {
    transform: translateX(-6%);
  }

  .about__text {
    padding-top: 40px;
  }

  .page-band--desktop {
    display: none;
  }
}

@media (min-width: 900px) {
  .page-band--mobile {
    display: none;
  }
}

.about__photo {
  margin: 0;
  max-width: 480px;
}

.about__photo img {
  display: block;
  vertical-align: bottom;
  width: 100%;
  height: auto;
}

.about__bio {
  margin: 0 0 12px;
  max-width: 46ch;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-text);
}

.about__name {
  margin: 16px 0 0;
  font-size: var(--fs-h2);
  font-weight: 600;
}

.about__role {
  margin: 6px 0 24px;
  font-size: var(--fs-body);
  color: var(--color-muted);
}

/* Solo el nombre y el cargo en azul ALGOLOCAL; la descripción en negro */
.about--blue .about__name,
.about--blue .about__role {
  color: var(--brand-blue);
}

/* Andrés: nombre y cargo en amarillo, su franja también */
.about--yellow .about__name,
.about--yellow .about__role {
  color: var(--brand-yellow);
}

.about--yellow .page-band.page-band--mobile,
.page-band.page-band--yellow {
  background: var(--brand-yellow);
}

/* Luigi: nombre y cargo en rojo, su franja también */
.about--red .about__name,
.about--red .about__role {
  color: var(--brand-red);
}

.about--red .page-band.page-band--mobile,
.page-band.page-band--red {
  background: var(--brand-red);
}

/* Palabra clave dentro de la bio (CONECTAR en la de Raúl): mayúsculas y en el color de la persona */
.about__key {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-blue);
}

.about--yellow .about__key { color: var(--brand-yellow); }
.about--red .about__key { color: var(--brand-red); }

.about__bio--pending {
  color: var(--color-muted);
  font-style: italic;
}

/* Luigi: su foto es más alta que la de Raúl; con este ancho miden lo mismo (≈612 px) */
/* Luigi: un poco más chico que Raúl (≈85 % de alto) y centrado en la página */
.about--luigi {
  --about-shape: url("/assets/img/team/luigi-cardona-perez-silueta-v2-900.png");
  --about-photo-w: 392px;
}

.about--luigi .about__photo {
  max-width: calc(min(480px, 100%) * 0.748);
  margin-inline: auto;
}

/* Contorno de cada silueta para que el texto la rodee (computadora) */
.about--raul { --about-shape: url("/assets/img/team/raul-rocha-leos-silueta-900.png"); }
.about--andres {
  --about-shape: url("/assets/img/team/andres-alcala-marquez-silueta-color3-900.png");
  /* Su foto es más alta: con este ancho mide lo mismo que la de Raúl (≈612 px) */
  --about-photo-w: 396px;
}

/* Celular: mismo alto que la de Raúl */
.about--andres .about__photo {
  max-width: calc(min(480px, 100%) * 0.757);
  margin-inline: auto;
}

/* Franja azul de borde a borde para dividir secciones.
   En /nosotros va pegada al final de la foto (sin espacio arriba). */
.page-band {
  height: var(--band-h);
  margin: 0 calc(var(--gutter) * -1);
  background: var(--brand-blue);
}

/* --- /contacto --- */
.contact-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  margin: var(--section-y) auto 0;
  text-align: center;
  padding-top: 48px;
  border-top: 1px solid var(--color-line);
}

.contact-page__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  font-style: normal;
  font-size: var(--fs-body);
}

.contact-page__mail {
  font-size: var(--fs-h2);
  font-weight: 600;
  border-bottom: 2px solid var(--brand-yellow);
}

.contact-page__mail:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* --- /contacto: encuesta breve --- */
.brief {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 0 0;
  text-align: center;
}

.brief__title {
  margin: 20px 0 0;
  font-size: var(--fs-h2);
  font-weight: 600;
}

.brief__form {
  display: grid;
  gap: 32px;
  margin-top: 48px;
}

.brief__row {
  display: grid;
  gap: 32px;
}

.brief__field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.brief__label {
  margin: 0;
  padding: 0;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text);
}

.brief__input {
  width: 100%;
  min-height: var(--target-min);
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--color-text);
  border-radius: 0;
  font: inherit;
  font-size: var(--fs-body);
  text-align: center;
  color: var(--color-text);
  background: transparent;
}

.brief__input::placeholder {
  font-weight: 400;
  color: var(--color-muted);
}

.brief__input--area {
  text-align: center;
  resize: vertical;
  line-height: 1.6;
}

.brief__input:focus-visible {
  outline: none;
  border-bottom: 1px solid var(--q-color, var(--brand-blue));
}

.brief__choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.brief__choices .brief__label {
  width: 100%;
  margin-bottom: 4px;
}

/* Cada pregunta tiene su color de marca: punto junto a la pregunta (en negro)
   y relleno de la opción elegida */
.brief__q--red { --q-color: var(--brand-red); }
.brief__q--green { --q-color: var(--brand-green); }
.brief__q--blue { --q-color: var(--brand-blue); }
.brief__q--yellow { --q-color: var(--brand-yellow); --q-ink: var(--color-text); }

.brief__q .brief__label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: 1px;
  background: var(--q-color);
}

/* Centrado: etiqueta con punto, texto de entrada y datos de contacto */
.brief .label--dot { justify-content: center; }
.brief .page-lead { margin-inline: auto; }
.contact-page .contact-page__links { align-items: center; }

.brief__hint {
  display: block;
  margin-top: 6px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-muted);
}

.brief__hint--inline {
  display: inline;
  margin: 0 0 0 6px;
}

/* Mensaje al enviar la encuesta */
.brief__done {
  max-width: 560px;
  margin: 48px auto 0;
  font-size: var(--fs-body);
  line-height: 1.7;
}

.brief__done:focus { outline: none; }

.brief__form[hidden] { display: none; }

.brief__done .label--dot { justify-content: center; }

.brief__done-title {
  margin: 16px 0 24px;
  line-height: 1.3;
  font-size: var(--fs-h2);
  font-weight: 600;
}

.brief__done p { margin: 0 0 14px; }

.brief__done-price {
  margin-top: 24px !important;
  padding: 16px 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.brief__done .brief__note { margin-top: 24px; }

.brief__next {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 28px;
  font-weight: 500;
}

.brief__next a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  border-bottom: 1px solid currentColor;
}

.brief__choice {
  position: relative;
  cursor: pointer;
}

.brief__choice input {
  position: absolute;
  opacity: 0;
}

.brief__choice span {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: 0 18px;
  border: 1px solid var(--q-color, var(--color-line));
  border-radius: 999px;
  font-size: var(--fs-small);
  transition: background-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out);
}

.brief__choice:hover span {
  border-color: var(--q-color, var(--color-text));
}

.brief__choice input:checked + span {
  border-color: var(--q-color, var(--brand-blue));
  color: var(--q-ink, var(--color-bg));
  background: var(--q-color, var(--brand-blue));
}

.brief__choice input:focus-visible + span {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.brief__error {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--brand-red);
}

.brief__submit {
  justify-self: center;
  min-height: calc(var(--target-min) + 8px);
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--color-bg);
  background: var(--brand-blue);
  cursor: pointer;
}

.brief__submit:hover {
  background: var(--color-text);
}

.brief__note {
  margin: -16px 0 0;
  font-size: var(--fs-small);
  color: var(--color-muted);
}

/* --- Computadora --- */
@media (min-width: 900px) {
  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  .brief__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Computadora: la foto flota y el texto sigue la silueta (shape-outside
     con el PNG sin fondo), corrida un poco a la derecha */
  .about {
    display: flow-root;
    padding-left: var(--about-shift);
  }

  /* La que flota es la imagen misma: así el contorno (shape-outside) toma
     el tamaño de la foto en pantalla y no el del archivo */
  .about__photo,
  .about__photo picture {
    display: contents;
  }

  .about__photo img {
    float: left;
    width: var(--about-photo-w);
    shape-outside: var(--about-shape);
    shape-image-threshold: 0.4;
    shape-margin: var(--about-shape-gap);
  }

  .about__text {
    padding-top: var(--about-text-top);
    padding-right: var(--about-text-right);
  }

  /* Espejo (Andrés): la foto flota a la derecha y el texto la rodea por la izquierda */
  .about--right {
    padding-left: 0;
    padding-right: var(--about-shift);
  }

  .about--right .about__photo img {
    float: right;
  }

  .about--right .about__text {
    padding-right: 0;
    padding-left: var(--about-text-right);
  }

  /* Luigi: su foto queda en el centro exacto de la página (el margen
     transparente está a la derecha: la persona ocupa el 88 % izquierdo) */
  .about--luigi {
    padding-left: calc(50% - var(--about-photo-w) * 0.44);
  }

  .about--luigi .about__text {
    padding-right: 6vw;
  }

  /* Andrés: su foto queda en el centro exacto de la página */
  /* Andrés y su texto se centran juntos, como bloque (igual que Raúl):
     columna de texto de ≈400 px + su foto, con el mismo margen a cada lado */
  .about--andres {
    --andres-text-w: 400px;
    padding-left: max(var(--gutter), calc((100% - var(--andres-text-w) - var(--about-photo-w)) / 2));
    padding-right: max(var(--gutter), calc((100% - var(--andres-text-w) - var(--about-photo-w)) / 2));
  }

  /* El texto se recarga a la derecha: cada renglón termina pegado al
     contorno de Andrés (espejo de Raúl, cuyo texto arranca en su curva) */
  .about--andres .about__text {
    padding-left: 0;
    text-align: right;
  }

  /* Sin ancho máximo: el ancho lo marca la silueta (y padding-right) */
  .about__text .about__bio {
    max-width: none;
  }
}

/* Aire entre una franja y la siguiente persona del equipo */
.page-band + .about {
  margin-top: var(--section-y);
}
